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

From Itagaki Takahiro
Subject Re: TODO: You can alter it, but you can't view it
Date
Msg-id AANLkTimzhZUrNhE+MZ_3Zm2e21ABiXAK6=oQG8NysVLQ@mail.gmail.com
Whole thread Raw
In response to TODO: You can alter it, but you can't view it  (Josh Berkus <josh@agliodbs.com>)
Responses Re: TODO: You can alter it, but you can't view it  (Josh Berkus <josh@agliodbs.com>)
Re: TODO: You can alter it, but you can't view it  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Mon, Sep 27, 2010 at 2:19 PM, Josh Berkus <josh@agliodbs.com> wrote:
> 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".

Can you use pg_options_to_table() for your purpose?

=# CREATE TABLE tbl (i integer) with (fillfactor = 70);
=# SELECT (pg_options_to_table(reloptions)).* FROM pg_class WHERE oid
= 'tbl'::regclass;option_name | option_value
-------------+--------------fillfactor  | 70

--
Itagaki Takahiro


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: TODO: You can alter it, but you can't view it
Next
From: Fujii Masao
Date:
Subject: Re: recovery.conf location