From: | Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> |
---|---|
To: | Charles Clavadetscher <clavadetscher(at)swisspug(dot)org>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Attach comments to functions' parameters and return value |
Date: | 2015-12-07 01:37:20 |
Message-ID: | 5664E2D0.4040809@BlueTreble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 9/15/15 12:35 AM, Charles Clavadetscher wrote:
> COMMENT ON FUNCTION function_name ( [ [ argmode ] [ argname ] argtype [,
> ...] ] ) PARAMETER param_position IS 'text';
>
> COMMENT ON FUNCTION function_name ( [ [ argmode ] [ argname ] argtype [,
> ...] ] ) RETURN VALUE IS 'text';
>
> An alternative to "RETURN VALUE" could be "RETURNS", which would make
> the statement shorter, but I think this may be confusing.
I like RETURN VALUE better myself.
> The parameter list of the function is only required to identify the
> function also in cases it exists with the same name in different
> flavours. This sticks to the general syntax of the command and should be
> easy to understand.
Right. You should be able to use the current COMMENT ON code. Note
however that the last time I looked it does NOT support the full syntax
that CREATE FUNCTION does. It'd be nice to fix that, but that's mostly a
separate matter.
Though, it would probably be nice if all of this stuff (along with the
regprocedure input function) could be factored into a single piece of
code...
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2015-12-07 02:11:24 | jsonb_delete not documented |
Previous Message | Jim Nasby | 2015-12-07 01:30:56 | Re: Double linking MemoryContext children |