Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT

Поиск
Список
Период
Сортировка
Искать
От
Stephen Frost
Тема
Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT
Дата
Msg-id
20170426171404.GB21223@tamriel.snowman.net
Ответ на
Список
Дерево обсуждения
[HACKERS] RFC: ALTER SYSTEM [...] COMMENT "Joshua D. Drake" <jd@commandprompt.com>
Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT Stephen Frost <sfrost@snowman.net>
Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT "Joshua D. Drake" <jd@commandprompt.com>
Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT "Joshua D. Drake" <jd@commandprompt.com>
Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT Stephen Frost <sfrost@snowman.net>
Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT Thom Brown <thom@linux.com>
Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT Amit Kapila <amit.kapila16@gmail.com>
Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT "Hunley, Douglas" <douglas.hunley@openscg.com>
JD,

* Joshua D. Drake (jd@commandprompt.com) wrote:
> Does not use existing comment functionality. Alternate solution
> which would decrease functionality is:
> 
> COMMENT ON SETTING setting IS 'comment';

That seems like a pretty reasonable idea, at least from where I sit.

> Looking forward, we may want to do the following:
> 
> 1. Make it so any object can have a comment with creation, e.g;
> 
> CREATE TABLE table () COMMENT IS '';

I'm pretty sure this has been discussed previously.

> 2. Make it so comments are appended not replaced.

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');

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.

Thanks!

Stephen
В списке pgsql-hackers по дате отправления
От: Oleg Golovanov
Дата:
От: Peter Geoghegan
Дата:
FAQ