Re: Column COMMENTs in CREATE TABLE? - Mailing list pgsql-hackers

From David Fetter
Subject Re: Column COMMENTs in CREATE TABLE?
Date
Msg-id 20160805155807.GA32377@fetter.org
Whole thread Raw
In response to Re: Column COMMENTs in CREATE TABLE?  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: Column COMMENTs in CREATE TABLE?  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
On Fri, Aug 05, 2016 at 10:14:21AM -0400, Peter Eisentraut wrote:
> On 7/3/16 11:41 AM, Tom Lane wrote:
> > 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';
> > 
> > vs
> > 
> >     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.
> 
> I had actually been thinking about a similar proposal, but specifically
> for CREATE FUNCTION.  But the syntax would have to put it above the
> function body, not below it.  I think the CREATE FUNCTION syntax could
> actually handle that.

For what it's worth, I tend to put the function body last.  That's
just my taste, though.  Would it be hard to keep the ability to
permute the stuff after
   CREATE FUNCTION (args)   RETURNS [SETOF] type

as we have it now?

Best,
David.
-- 
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: regression test for extended query protocol
Next
From: Robert Haas
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Prevent "snapshot too old" from trying to return pruned TOAST tu