Re: bugfix: --echo-hidden is not supported by \sf statements

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: bugfix: --echo-hidden is not supported by \sf statements
Дата
Msg-id 20130224060441.GE16142@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: bugfix: --echo-hidden is not supported by \sf statements  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: bugfix: --echo-hidden is not supported by \sf statements  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: bugfix: --echo-hidden is not supported by \sf statements  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
* Pavel Stehule (pavel.stehule@gmail.com) wrote:
> it is not possible - both fragments has different purpose. Code in \ef
> or \sf should to select exactly one function based on complete
> function signature, \df try to show list of functions filtered by
> name.

I don't buy that argument.  You could use the same code and simply
complain if multiple functions are returned from the query.  That's the
point- when you actually query the catalog instead of just trying to use
the cast functions, you can do things like detect how many records are
returned and do something sensible.

> Minimally \ef needs exact specification - you cannot to edit more
> functions in same time. So we have to be able identify if there are no
> selected function or if there are more functions. We can write a
> auxiliary function that returns list of function oids for specified
> signature - but it is relative much more code and it is hard to
> implement for older versions - but we can use regproc and regprocedure
> there.

Using regproc and regprocedure is the wrong approach here and will be a
pain to maintain as well as a backwards incompatible change to how they
behave.  We have solved this problem already and what \df does is exactly
the right answer.

> It is not hard problem - just a some about 100 lines - but it
> is going out of original proposal, so I am asking if we want this and
> more code will be accepted.

I don't see any reason nor need to change regproc or regprocedure.
Thanks,
    Stephen

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: bugfix: --echo-hidden is not supported by \sf statements
Следующее
От: Steve Singer
Дата:
Сообщение: Re: json generation enhancements