Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT
От | Amit Kapila |
---|---|
Тема | Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT |
Дата | |
Msg-id | CAA4eK1L1VTcLUYEN3BJbMgeyqBz3nYbjuQLKsFMUoXzwgEyWmQ@mail.gmail.com обсуждение исходный текст |
Ответ на | [HACKERS] RFC: ALTER SYSTEM [...] COMMENT ("Joshua D. Drake" <jd@commandprompt.com>) |
Список | pgsql-hackers |
On Wed, Apr 26, 2017 at 10:33 PM, Joshua D. Drake <jd@commandprompt.com> wrote: > I propose: > > Add a column to pg_settings comment(text) > Change the grammar to allow: > > ALTER SYSTEM SET configuration_parameter { TO | = } { value | 'value' | > DEFAULT } COMMENT 'comment' > > Example: > > ALTER SYSTEM SET maintenance_work_mem TO '1GB' COMMENT IS 'Increased to > allow autovacuum to be more efficient'; > > Potential issues: > > Does not use existing comment functionality. Alternate solution which would > decrease functionality is: > > COMMENT ON SETTING setting IS 'comment'; > I think syntax wise, it makes sense to have both the forms in some way as proposed by you. I think providing COMMENT along with ALTER SYSTEM has the advantage that user can specify it when it specifies the setting and by providing a separate command facilitates to use it even when we just want to add/change the comments for a particular setting. I think Robert [1] and I [2] have made some comments when this topic was previously discussed which are worth looking if you or someone is planning to write a patch for this feature. [1] - https://www.postgresql.org/message-id/CA%2BTgmoZBDLhDexHyTJ%3DH0xZt7-6M%3Dh%2Bv2Xi0Myj7Q37QGZQb4g%40mail.gmail.com [2] - https://www.postgresql.org/message-id/CAA4eK1%2B%3DovYQqYGHcX2OBU3mk%2BhSHjFDpvmrHCos1Vgj8_b6vg%40mail.gmail.com -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: