Re: deparsing utility commands

From: Ryan Pedela <rpedela(at)datalanche(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Andres Freund <andres(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: deparsing utility commands
Date: 2015-02-24 15:49:37
Message-ID: CACu89FTn23NKLcFbgo57u7BAy8fXFE2vwucEHJD2F7n92VLerw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 24, 2015 at 6:48 AM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2015-02-24 16:13:05 Re: Partitioning WIP patch (was: Partitioning: issues/ideas)
Previous Message Gord Tomlin 2015-02-24 15:31:15 PostgreSQL on z/OS UNIX?