Re: function defined (or not), more worries on version 10->14 upgrade

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: function defined (or not), more worries on version 10->14 upgrade
Дата
Msg-id 1837006.1650062895@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: function defined (or not), more worries on version 10->14 upgrade  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> ... And if I know something exists
> in the DB and I want details, doing a name-only search followed by \sf
> seems like it would work well enough.

It could work better though.  For example,

regression=# \df *backup*
                                                                    List of functions
   Schema   |      Name       | Result data type |                                      Argument data types
                         | Type  

------------+-----------------+------------------+------------------------------------------------------------------------------------------------+------
 pg_catalog | pg_backup_start | pg_lsn           | label text, fast boolean DEFAULT false
                         | func 
 pg_catalog | pg_backup_stop  | record           | wait_for_archive boolean DEFAULT true, OUT lsn pg_lsn, OUT labelfile
text,OUT spcmapfile text | func 
(2 rows)

regression=# \sf pg_backup_start (label text, fast boolean DEFAULT false)
ERROR:  syntax error at or near "text"

It seems annoying that I can't copy-and-paste \df's output to invoke \sf.

Moreover, once I peel that down to what will work:

regression=# \sf pg_backup_start (text,  boolean )
CREATE OR REPLACE FUNCTION pg_catalog.pg_backup_start(label text, fast boolean DEFAULT false)
 RETURNS pg_lsn
 LANGUAGE internal
 PARALLEL RESTRICTED STRICT
AS $function$pg_backup_start$function$

it's apparent that \sf isn't even consistent with *itself*.
So I agree that there's room for some polishing here.

I'm not sure how far we can go without breaking backwards compatibility.
OTOH, it looks like \df's ability to consider parameters at all is new
as of v14, so maybe the details don't have a huge constituency yet.

            regards, tom lane



В списке pgsql-general по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: function defined (or not), more worries on version 10->14 upgrade
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: What do you guys use for issue tracking, CI/CD and team management? any nice open source options?