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

From Joshua D. Drake
Subject [HACKERS] RFC: ALTER SYSTEM [...] COMMENT
Date
Msg-id 43e448c4-733e-4605-f752-7e955a0d3c09@commandprompt.com
Whole thread Raw
Responses Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT  (Stephen Frost <sfrost@snowman.net>)
Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT  (Thom Brown <thom@linux.com>)
Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT  ("Hunley, Douglas" <douglas.hunley@openscg.com>)
Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
-hackers,

We have had ALTER SYSTEM for some time now. It is awesome to be able to 
make changes that can be system wide without ever having to hit a shell 
but it does lack a feature that seems like an oversight, the ability to 
comment.

Problem we are trying to solve:

Having documentation for changes to GUC parameters that are modified via 
ALTER SYSTEM.

Why?

Because documentation is good and required for a proper production system.

How?

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

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

2. Make it so comments are appended not replaced.

Thanks in advance,

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: Robert Haas
Date:
Subject: Re: [HACKERS] scram and \password
Next
From: Doug Doole
Date:
Subject: Re: [HACKERS] Cached plans and statement generalization