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

From Tom Lane
Subject Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT
Date
Msg-id 28763.1493233631@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] RFC: ALTER SYSTEM [...] COMMENT  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> * Tom Lane (tgl@sss.pgh.pa.us) wrote:
>> It'd be better to invent inverse pg_get_comment and pg_set_comment
>> functions, then you could do bulk-update things like
>> select pg_set_comment('table', pg_get_comment('table') || ' more')
>> from pg_class where ...

> Of course, once we start thinking about what kind of comments people
> might be interested in, as alluded to elsewhere, it's entirely likely
> they'll want to get things like timestamps included and other
> information that, ultimately, would be better if it was structured and
> not just thrown together into a free-form text field.

It's not hard to imagine people deciding that all their comments will
be (the text form of) JSON objects containing certain fields.  But
I don't think it's appropriate for us to mandate that sort of thing.
Given get/set comment functions as above, users could write wrapper
functions implementing their local conventions.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Fixup some misusage of appendStringInfo and friends
Next
From: Konstantin Knizhnik
Date:
Subject: Re: [HACKERS] Cached plans and statement generalization