Re: Getting show results into a table

Поиск
Список
Период
Сортировка
От Little, Douglas
Тема Re: Getting show results into a table
Дата
Msg-id 8585BA53443004458E0BAA6134C5A7FBB1D2251E@EGEXCMB01.oww.root.lcl
обсуждение исходный текст
Ответ на Re: Getting show results into a table  (Guillaume Lelarge <guillaume@lelarge.info>)
Список 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 по дате отправления:

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Getting show results into a table
Следующее
От: Andres Freund
Дата:
Сообщение: Re: 'alternatives'