On Mon, Sep 20, 2010 at 1:07 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Robert Haas <robertmh...@gmail.com> writes: >> In view of the foregoing problems, I'd like to propose adding a new >> system view, tentatively called pg_comments, which lists all of the >> comments for everything in the system in such a way that it's >> reasonably possible to do further filtering out the output in ways >> that you might care about; and which also gives objects the names and >> types in a format that matches what the COMMENT command will accept as >> input. Patch attached. > > Unless you propose to break psql's hard-won backwards compatibility, > this isn't going to accomplish anything towards making describe.c > simpler or shorter. Also, it seems to me that what you've mostly done > is to move complexity from describe.c (where the query can be fixed > easily if it's found to be broken) to system_views.sql (where it cannot > be changed without an initdb).
Those are legitimate gripes, but... > How about improving the query in-place in describe.c instead? ...I still don't care much for this option. It doesn't do anything to easy the difficulty of ad-hoc queries, which I think is important (and seems likely to be even more important for security labels - because people who use that feature at all are going to label the heck out of everything, whereas comments are never strictly necessary), and it isn't useful for clients other than psql. Most of this code hasn't been touched since 2002, despite numerous, relevant changes since then. You could take as support for your position that we need the ability to fix future bugs without initdb, but my reading of it is that that code is just too awful to be easily maintained and so no one has bothered. (It also supports my previous contention that we need a way to make minor system catalog updates without forcing initdb, but that's a problem for another day.) -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers