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.
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers