David Fetter <da...@fetter.org> writes:
> On Sat, Jul 02, 2016 at 01:06:49PM -0400, David G. Johnston wrote:
>> ​+1 for the idea - though restricting it to columns would not be ideal.

> +1 for adding it to all the CREATEs whose objects support COMMENT.

TBH, I think this is a pretty bad idea.  I can see the reasoning for
allowing COMMENT in a table column definition, but the argument for
allowing it in simpler CREATEs seems tissue-thin:

        CREATE FUNCTION foo(int) RETURNS ... ;
        COMMENT ON FUNCTION foo(int) IS 'blah';


        CREATE FUNCTION foo(int) RETURNS ...
        WITH (COMMENT 'blah');

Not much of a keystroke savings, nor is the comment noticeably
"closer" to its object than before.  Furthermore, the code footprint
of allowing that everywhere will be enormous.  And for statements that
already use WITH for something, I'm not sure you'll be able to
shoehorn this in without any grammatical trouble, either.  (It would
certainly be embarrassing if you did thirty-five flavors of CREATE
this way and then the syntax failed to work in the thirty-sixth.)

I think we should add something to ColumnDef and call it good.

                        regards, tom lane

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to