Re: Export the CREATE TABLE command in pure SQL

From: Christoph Berg <myon(at)debian(dot)org>
To: pgsql-gui-dev(at)lists(dot)postgresql(dot)org
Subject: Re: Export the CREATE TABLE command in pure SQL
Date: 2019-03-18 15:10:17
Message-ID: 20190318151017.GE3087@msg.df7cb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-gui-dev

Re: Damien Clochard 2019-03-17 <2bc470194b4837c1f733a4e05f569bc6(at)dalibo(dot)info>
> How do you guys deal with this ? It seems that a lot of GUI tools are able
> to "export the table structure".... Is there an extension somewhere to do
> that ? Is it possible to write i in pure SQL ? If yes, there anybody here
> interested in joining forces to build a shared export function ?

IMHO the cleanest way would be to move all of that into the server.
There are already functions like pg_getindexdef() which pg_dump can
(could?) use. But of course that won't fix the problem for existing PG
versions.

For a medium-term solution, a plpgsql extension (or the client-side
equivalent) seems like the best way.

Christoph

In response to

Responses

Browse pgsql-gui-dev by date

  From Date Subject
Next Message Damien Clochard 2019-03-18 17:37:34 Re: Export the CREATE TABLE command in pure SQL
Previous Message Damien Clochard 2019-03-17 08:49:50 Export the CREATE TABLE command in pure SQL