Re: usability of pg_get_function_arguments

From: Gevik Babakhani <pgdev(at)xs4all(dot)nl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: usability of pg_get_function_arguments
Date: 2009-05-26 17:58:55
Message-ID: 4A1C2DDF.1050806@xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Gevik Babakhani <pgdev(at)xs4all(dot)nl> writes:
>>> I experimented with your example and noticed that pg_get_expr requires a
>>> hack --- it insists on having a relation OID argument, because all
>>> previous use-cases for it involved expressions that might possibly refer
>>> to a particular table. So you have to do something like
>>>
>>> regression=# select pg_get_expr(proargdefaults,'pg_proc'::regclass) from pg_proc where proname='f13';
>>> pg_get_expr
>>> -----------------------------------------------------------------------------------------------------------------------
>>> 10, 'hello'::character varying, '2009-01-01 00:00:00'::timestamp without time zone, 'comma here ,'::character varying
>>> (1 row)
>>>
>>>
>> Unfortunately, there is no way to know to which argument(s) the values
>> above belongs to.
>
> The last ones --- you can only omit arguments from the right, so it
> makes no sense to allow a nonconsecutive set of defaults.
>
> regards, tom lane
>

Indeed. I did not see that earlier. Thank you.

--
Regards,
Gevik

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-05-26 18:05:29 Re: A couple of gripes about the gettext plurals patch
Previous Message Robert Haas 2009-05-26 17:53:33 Re: generic options for explain