pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Kirk Wolak <wolakk@gmail.com>
Cc: Jeremy Smith <jeremy@musicsmith.net>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Ron <ronljohnsonjr@gmail.com>
Subject: Re: Adding SHOW CREATE TABLE
Date: Thu, 18 May 2023 19:53:58 -0400
Message-ID: <ZGa6lrLlZVIarDK4@tamriel.snowman.net> (raw)
In-Reply-To: <CACLU5mQmq2r6FicCXm7Rj2JbyTyDdAdTEcSFAfO6bnK7x+S6aA@mail.gmail.com>
References: <CAFEN2wxg0Vtj1gvk6Ms0L2CAutbycyxHZPiZSpW7eLsBc6VGnA@mail.gmail.com>
	<ZF6eIysBeQrXpz7r@tamriel.snowman.net>
	<1565715.1683923271@sss.pgh.pa.us>
	<ZF6jY1vqhxfGME+b@tamriel.snowman.net>
	<CACLU5mROQewFBFXG=C6DMvEtDgGZoF9k=m_bkTJYFgSNZptUkg@mail.gmail.com>
	<1aac01a1-d9db-8048-9bfa-1e4f9bb69a03@gmail.com>
	<CACLU5mQDDhdwu4Z8aRqNrc+UDLTE+GmfZPbxn39dha5m_EUEfQ@mail.gmail.com>
	<CAM8SmLV3RcGHsnhwk9=vAdhUGnYfCQ9xUsrBdXwyKn=_9wCDLw@mail.gmail.com>
	<CACLU5mSmZ0hoCbbkGBS7X2jczC8bmP5PE+w=BC=UvAp+36AoBw@mail.gmail.com>
	<CACLU5mQmq2r6FicCXm7Rj2JbyTyDdAdTEcSFAfO6bnK7x+S6aA@mail.gmail.com>

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

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (46+ messages)  latest in thread

Message-ID: <ZGa6lrLlZVIarDK4@tamriel.snowman.net>
Permalink:  ../ZGa6lrLlZVIarDK4@tamriel.snowman.net/
Also on:    postgresql.org/message-id/ZGa6lrLlZVIarDK4@tamriel.snowman.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: sfrost@snowman.net, wolakk@gmail.com, jeremy@musicsmith.net, pgsql-hackers@lists.postgresql.org, ronljohnsonjr@gmail.com
  Subject: Re: Adding SHOW CREATE TABLE
  In-Reply-To: <ZGa6lrLlZVIarDK4@tamriel.snowman.net>
  References: <CAFEN2wxg0Vtj1gvk6Ms0L2CAutbycyxHZPiZSpW7eLsBc6VGnA@mail.gmail.com> <ZF6eIysBeQrXpz7r@tamriel.snowman.net> <1565715.1683923271@sss.pgh.pa.us> <ZF6jY1vqhxfGME+b@tamriel.snowman.net> <CACLU5mROQewFBFXG=C6DMvEtDgGZoF9k=m_bkTJYFgSNZptUkg@mail.gmail.com> <1aac01a1-d9db-8048-9bfa-1e4f9bb69a03@gmail.com> <CACLU5mQDDhdwu4Z8aRqNrc+UDLTE+GmfZPbxn39dha5m_EUEfQ@mail.gmail.com> <CAM8SmLV3RcGHsnhwk9=vAdhUGnYfCQ9xUsrBdXwyKn=_9wCDLw@mail.gmail.com> <CACLU5mSmZ0hoCbbkGBS7X2jczC8bmP5PE+w=BC=UvAp+36AoBw@mail.gmail.com> <CACLU5mQmq2r6FicCXm7Rj2JbyTyDdAdTEcSFAfO6bnK7x+S6aA@mail.gmail.com> <ZGa6lrLlZVIarDK4@tamriel.snowman.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox