Re: deparsing utility commands

Поиск
Список
Период
Сортировка
От Ryan Pedela
Тема Re: deparsing utility commands
Дата
Msg-id CACu89FTn23NKLcFbgo57u7BAy8fXFE2vwucEHJD2F7n92VLerw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: deparsing utility commands  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
On Tue, Feb 24, 2015 at 6:48 AM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
Stephen Frost wrote:

I'm thinking something like
 SELECT * FROM pg_creation_commands({'pg_class'::regclass, 'sometable'::pg_class});
would return a set of commands in the JSON-blob format that creates the
table.  The input argument is an array of object addresses, so that you
can request creation commands for multiple objects.  (It's not my
intention to provide this functionality right away, but if somebody else
wants to work on top of the current deparse patch, by my guest; if it
proves simple enough we can still get it into 9.5 as part of this
patch.)

 +1

Another possible function could be to diff two relations to produce a set of DDL commands that could be used for schema migrations.

Also thank you very much! CREATE/ALTER support in event triggers is the upcoming feature I am most excited about, and I am happy to see progress.

Thanks,
Ryan Pedela 

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: pg_dump gets attributes from tables in extensions
Следующее
От: Corey Huinker
Дата:
Сообщение: Re: Partitioning WIP patch (was: Partitioning: issues/ideas)