Skip site navigation (1) Skip section navigation (2)

Re: TODO: You can alter it, but you can't view it

From: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: postgres hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: TODO: You can alter it, but you can't view it
Date: 2010-09-27 05:30:02
Message-ID: AANLkTimzhZUrNhE+MZ_3Zm2e21ABiXAK6=oQG8NysVLQ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Mon, Sep 27, 2010 at 2:19 PM, Josh Berkus <josh(at)agliodbs(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Fujii MasaoDate: 2010-09-27 06:34:11
Subject: Re: recovery.conf location
Previous:From: Josh BerkusDate: 2010-09-27 05:19:04
Subject: TODO: You can alter it, but you can't view it

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group