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
Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT
Список pgsql-hackers
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
Дата:
Сообщение: [HACKERS] Re: [HACKERS] WIP: [[Parallel] Shared] Hash
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: [HACKERS] [PATCH] Incremental sort