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.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services