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