Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT - Mailing list pgsql-hackers

From Joshua D. Drake
Subject Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT
Date
Msg-id 7d9da64d-aa77-df54-24ae-424f74b5dd55@commandprompt.com
Whole thread Raw
In response to Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT  (Stephen Frost <sfrost@snowman.net>)
Responses Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 04/26/2017 10:14 AM, Stephen Frost wrote:
> JD,

> Having COMMENT ON accept a general query whose result is then cast to
> text and stored as the comment would allow this to be done, eg:
>
> COMMENT ON table IS (pg_get_comment('table') || ' new text');

Dig it, although we probably want the equivalent of:

COMMENT ON table IS (pg_get_comment('table') || '\n\n' || ' new text');

Or something like that.

>
> We could also have new syntax along these lines, for this specific case:
>
> COMMENT ON table ADD ' new text';
>
> Though we have this pretty powerful language, seems a bit of a shame to
> invent something new for working with comments.

Agreed and I think that using existing COMMENT ON capability is likely 
to get this pushed farther down the road.

I wouldn't fight hard to change it but really if we think about it, what 
makes more sense from usability perspective?

CREATE TABLE foo() COMMENT IS

or

CREATE TABLE foo;
COMMENT ON TABLE foo IS

Thanks,

JD




-- 
Command Prompt, Inc.                  http://the.postgres.company/                        +1-503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Everyone appreciates your honesty, until you are honest with them.
Unless otherwise stated, opinions are my own.



pgsql-hackers by date:

Previous
From: Thom Brown
Date:
Subject: Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] StandbyRecoverPreparedTransactions recovers subtrans links incorrectly