Re: Getting show results into a table - Mailing list pgsql-general

From Little, Douglas
Subject Re: Getting show results into a table
Date
Msg-id 8585BA53443004458E0BAA6134C5A7FBB1D2251E@EGEXCMB01.oww.root.lcl
Whole thread Raw
In response to Re: Getting show results into a table  (Guillaume Lelarge <guillaume@lelarge.info>)
List pgsql-general
Thanks everybody.    Always wondered where the command was sourcing the data.

Thanks

-----Original Message-----
From: Guillaume Lelarge [mailto:guillaume@lelarge.info] 
Sent: Wednesday, November 28, 2012 3:24 PM
To: Little, Douglas
Cc: PostgreSQL General (pgsql-general@postgresql.org)
Subject: Re: [GENERAL] Getting show results into a table

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


pgsql-general by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: Getting show results into a table
Next
From: Andres Freund
Date:
Subject: Re: 'alternatives'