Re: Getting show results into a table

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: "Little, Douglas" <DOUGLAS(dot)LITTLE(at)orbitz(dot)com>
Cc: "PostgreSQL General (pgsql-general(at)postgresql(dot)org)" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Getting show results into a table
Date: 2012-11-28 21:23:38
Message-ID: 1354137818.2232.12.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2012-11-28 at 12:38 -0600, Little, Douglas wrote:
> Is there a way in sql to get the results of the show all command into a table?
>

SELECT name, setting, short_desc FROM pg_settings

> I'm expecting something like
> Insert into Config_history as select * from (show all);
>

INSERT INTO config_history
SELECT name, setting, short_desc FROM pg_settings;

That should work.

--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Little, Douglas 2012-11-28 21:47:11 Re: Getting show results into a table
Previous Message Christophe Pettus 2012-11-28 21:07:12 'alternatives'