Re: bugfix: --echo-hidden is not supported by \sf statements - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: bugfix: --echo-hidden is not supported by \sf statements
Date
Msg-id CAFj8pRCRVcCn_u48y2Ms6y8n4i2V_fzpH33NAwY8RdfsOVBhYQ@mail.gmail.com
Whole thread Raw
In response to Re: bugfix: --echo-hidden is not supported by \sf statements  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
2013/2/24 Stephen Frost <sfrost@snowman.net>:
> * 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.

ok, please, send me some SQL that identify some overloaded function -
that will be compatible with current behave and enough robust and not
too much ugly.


>
>> 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.

no, I talked about new SRF function, that should to help with function
identification. Probably there are not too much shared lines with
regproc8 routines

Regards

Pavel


>
>         Thanks,
>
>                 Stephen



pgsql-hackers by date:

Previous
From: Atri Sharma
Date:
Subject: Re: [pgsql-advocacy] Call for Google Summer of Code mentors, admins
Next
From: Craig Ringer
Date:
Subject: Re: json generation enhancements