Re: Adding SHOW CREATE TABLE - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Adding SHOW CREATE TABLE
Date
Msg-id ZGa6lrLlZVIarDK4@tamriel.snowman.net
Whole thread Raw
In response to Re: Adding SHOW CREATE TABLE  (Kirk Wolak <wolakk@gmail.com>)
Responses Re: Adding SHOW CREATE TABLE
List pgsql-hackers
Greetings,

* Kirk Wolak (wolakk@gmail.com) wrote:
> My approach for now is to develop this as the \st command.
> After reviewing the code/output from the 3 sources (psql, fdw, and
> pg_dump).  This trivializes the approach,
> and requires the smallest set of changes (psql is already close with
> existing queries, etc).
>
> And frankly, I would rather have an \st feature that handles 99% of the use
> cases then go 15yrs waiting for a perfect solution.
> Once this works well for the group.  Then, IMO, that would be the time to
> discuss moving it.

Having this only available via psql seems like the least desirable
option as then it wouldn't be available to any other callers..

Having it in libpq, on the other hand, would make it available to psql
as well as any other utility, library, or language / driver which uses
libpq, including pg_dump..

Using libpq would also make sense from the perspective that libpq can be
used to connect to a number of different major versions of PG and this
could work work for them all in much the way that pg_dump does.

The downside with this apporach is that drivers which don't use libpq
(eg: JDBC) would have to re-implement this if they wanted to keep
feature parity with libpq..

Thanks,

Stephen

Attachment

pgsql-hackers by date:

Previous
From: Matthias van de Meent
Date:
Subject: Re: XLog size reductions: smaller XLRec block header for PG17
Next
From: Tom Lane
Date:
Subject: Re: The documentation for READ COMMITTED may be incomplete or wrong