TODO: You can alter it, but you can't view it - Mailing list pgsql-hackers

From Josh Berkus
Subject TODO: You can alter it, but you can't view it
Date
Msg-id 4CA02948.1070504@agliodbs.com
Whole thread Raw
Responses Re: TODO: You can alter it, but you can't view it  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
List pgsql-hackers
All,

While working on some database maintenance, I was just tripped up by the 
fact that there is no good way to query reloptions for tables.  By "no 
good way" I mean "no way which does not involve UNNEST and regexps or 
procedural code".

This puts us in the wierd place that while one can ALTER various 
reloptions, one cannot check them to see if they *need* to be altered. 
That's a particularly bad situation given that changing reloptions 
requires a lock on the table (though less of one in 9.1).

I propose that we have an additional system view, pg_class_reloptions 
(or pg_table_reloptions if reloptions aren't relevant for views and 
indexes).  It would have the following columns:

relid
name    
setting_numeric
setting_boolean
setting_text

comments/objections/something I missed in the internal functions or 9.1 
patches which already does this?

--                                   -- Josh Berkus                                     PostgreSQL Experts Inc.
                           http://www.pgexperts.com
 


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: security label support, revised
Next
From: Itagaki Takahiro
Date:
Subject: Re: TODO: You can alter it, but you can't view it