Re: Adding SHOW CREATE TABLE

2023-07-01 Thread Kirk Wolak
On Fri, Jun 30, 2023 at 1:56 PM Kirk Wolak wrote: > On Wed, Jun 21, 2023 at 8:52 PM Kirk Wolak wrote: > >> On Mon, Jun 5, 2023 at 7:43 AM Jelte Fennema wrote: >> >>> On Thu, 1 Jun 2023 at 18:57, Kirk Wolak wrote: >>> >> Definitely have the questions from the previous email, but I CERTAINLY

Re: Adding SHOW CREATE TABLE

2023-06-30 Thread Kirk Wolak
On Wed, Jun 21, 2023 at 8:52 PM Kirk Wolak wrote: > On Mon, Jun 5, 2023 at 7:43 AM Jelte Fennema wrote: > >> On Thu, 1 Jun 2023 at 18:57, Kirk Wolak wrote: >> > Can this get turned into a Patch? Were you offering this code up for >> others (me?) to pull, and work into a patch? >> > [If I do

Re: Adding SHOW CREATE TABLE

2023-06-21 Thread Kirk Wolak
On Mon, Jun 5, 2023 at 7:43 AM Jelte Fennema wrote: > On Thu, 1 Jun 2023 at 18:57, Kirk Wolak wrote: > > Can this get turned into a Patch? Were you offering this code up for > others (me?) to pull, and work into a patch? > > [If I do the patch, I am not sure it gives you the value of reducing

Re: Adding SHOW CREATE TABLE

2023-06-05 Thread Jelte Fennema
On Thu, 1 Jun 2023 at 18:57, Kirk Wolak wrote: > Can this get turned into a Patch? Were you offering this code up for others > (me?) to pull, and work into a patch? > [If I do the patch, I am not sure it gives you the value of reducing what > CITUS has to maintain. But it dawns on > me that

Re: Adding SHOW CREATE TABLE

2023-06-02 Thread Kirk Wolak
On Thu, Jun 1, 2023 at 4:46 PM Andrew Dunstan wrote: > On 2023-06-01 Th 16:39, Kirk Wolak wrote: > > On Thu, Jun 1, 2023 at 3:13 PM Andrew Dunstan wrote: > >> On 2023-06-01 Th 12:57, Kirk Wolak wrote: >> >> PS: It dawned on me that if pg_dump had used server side code to generate >> its DDL,

Re: Adding SHOW CREATE TABLE

2023-06-01 Thread Andrew Dunstan
On 2023-06-01 Th 16:39, Kirk Wolak wrote: On Thu, Jun 1, 2023 at 3:13 PM Andrew Dunstan wrote: On 2023-06-01 Th 12:57, Kirk Wolak wrote: PS: It dawned on me that if pg_dump had used server side code to generate its DDL, its complexity would drop. Maybe, that remains to be

Re: Adding SHOW CREATE TABLE

2023-06-01 Thread Kirk Wolak
On Thu, Jun 1, 2023 at 3:13 PM Andrew Dunstan wrote: > On 2023-06-01 Th 12:57, Kirk Wolak wrote: > > PS: It dawned on me that if pg_dump had used server side code to generate > its DDL, its complexity would drop. > > Maybe, that remains to be seen. pg_dump needs to produce SQL that is > suitable

Re: Adding SHOW CREATE TABLE

2023-06-01 Thread Andrew Dunstan
On 2023-06-01 Th 12:57, Kirk Wolak wrote: PS: It dawned on me that if pg_dump had used server side code to generate its DDL, its complexity would drop. Maybe, that remains to be seen. pg_dump needs to produce SQL that is suitable for the target database, not the source database. cheers

Re: Adding SHOW CREATE TABLE

2023-06-01 Thread Kirk Wolak
On Thu, May 25, 2023 at 9:23 AM Jelte Fennema wrote: > On Mon, 22 May 2023 at 13:52, Andrew Dunstan wrote: > > A performant server side set of functions would be written in C and > follow the patterns in ruleutils.c. > > We have lots of DDL ruleutils in our Citus codebase: > >

Re: Adding SHOW CREATE TABLE

2023-05-26 Thread Andrew Dunstan
On 2023-05-25 Th 09:23, Jelte Fennema wrote: On Mon, 22 May 2023 at 13:52, Andrew Dunstan wrote: A performant server side set of functions would be written in C and follow the patterns in ruleutils.c. We have lots of DDL ruleutils in our Citus codebase:

Re: Adding SHOW CREATE TABLE

2023-05-25 Thread Jelte Fennema
On Mon, 22 May 2023 at 13:52, Andrew Dunstan wrote: > A performant server side set of functions would be written in C and follow > the patterns in ruleutils.c. We have lots of DDL ruleutils in our Citus codebase:

Re: Adding SHOW CREATE TABLE

2023-05-22 Thread Andrew Dunstan
On 2023-05-22 Mo 05:24, Pavel Stehule wrote: po 22. 5. 2023 v 7:19 odesílatel Kirk Wolak napsal: On Fri, May 19, 2023 at 1:08 PM Andrew Dunstan wrote: I think the ONLY place we should have this is in server side functions. More than ten years ago I did some work in

Re: Adding SHOW CREATE TABLE

2023-05-22 Thread Pavel Stehule
po 22. 5. 2023 v 7:19 odesílatel Kirk Wolak napsal: > On Fri, May 19, 2023 at 1:08 PM Andrew Dunstan > wrote: > >> I think the ONLY place we should have this is in server side functions. >> More than ten years ago I did some work in this area (see below), but it's >> one of those things that

Re: Adding SHOW CREATE TABLE

2023-05-21 Thread Kirk Wolak
On Fri, May 19, 2023 at 1:08 PM Andrew Dunstan wrote: > I think the ONLY place we should have this is in server side functions. > More than ten years ago I did some work in this area (see below), but it's > one of those things that have been on my ever growing personal TODO list > > See

Re: Adding SHOW CREATE TABLE

2023-05-20 Thread Kirk Wolak
On Sat, May 20, 2023 at 2:33 PM Stephen Frost wrote: > Greetings, > > On Sat, May 20, 2023 at 13:32 David G. Johnston < > david.g.johns...@gmail.com> wrote: > >> On Sat, May 20, 2023 at 10:26 AM Stephen Frost >> wrote: >> >>> > A server function can be conveniently called from any client code.

Re: Adding SHOW CREATE TABLE

2023-05-20 Thread Stephen Frost
Greetings, On Sat, May 20, 2023 at 13:32 David G. Johnston wrote: > On Sat, May 20, 2023 at 10:26 AM Stephen Frost wrote: > >> > A server function can be conveniently called from any client code. >> >> Clearly any client using libpq can conveniently call code which is in >> libpq. >> > >

Re: Adding SHOW CREATE TABLE

2023-05-20 Thread Tom Lane
"David G. Johnston" writes: > On Sat, May 20, 2023 at 10:26 AM Stephen Frost wrote: >> Clearly any client using libpq can conveniently call code which is in >> libpq. > Clearly there are clients that don't use libpq. JDBC comes to mind. Yeah. I'm also rather concerned about the bloat factor;

Re: Adding SHOW CREATE TABLE

2023-05-20 Thread David G. Johnston
On Sat, May 20, 2023 at 10:26 AM Stephen Frost wrote: > > A server function can be conveniently called from any client code. > > Clearly any client using libpq can conveniently call code which is in > libpq. > > Clearly there are clients that don't use libpq. JDBC comes to mind. David J.

Re: Adding SHOW CREATE TABLE

2023-05-20 Thread Stephen Frost
Greetings, * Laurenz Albe (laurenz.a...@cybertec.at) wrote: > On Fri, 2023-05-19 at 13:08 -0400, Andrew Dunstan wrote: > > On 2023-05-18 Th 19:53, Stephen Frost wrote: > > > * Kirk Wolak (wol...@gmail.com) wrote: > > > > My approach for now is to develop this as the \st command. > > > > After

Re: Adding SHOW CREATE TABLE

2023-05-19 Thread Ziga
On 19/05/2023 19:08, Andrew Dunstan wrote: I think the ONLY place we should have this is in server side functions. More than ten years ago I did some work in this area (see below), but it's one of those things that have been on my ever growing personal TODO list See

Re: Adding SHOW CREATE TABLE

2023-05-19 Thread Laurenz Albe
On Fri, 2023-05-19 at 13:08 -0400, Andrew Dunstan wrote: > On 2023-05-18 Th 19:53, Stephen Frost wrote: > > * Kirk Wolak (wol...@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 > > >

Re: Adding SHOW CREATE TABLE

2023-05-19 Thread Corey Huinker
> > I think the ONLY place we should have this is in server side functions. > More than ten years ago I did some work in this area (see below), but it's > one of those things that have been on my ever growing personal TODO list > > See >

Re: Adding SHOW CREATE TABLE

2023-05-19 Thread Andrew Dunstan
On 2023-05-18 Th 19:53, Stephen Frost wrote: Greetings, * Kirk Wolak (wol...@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

Re: Adding SHOW CREATE TABLE

2023-05-18 Thread Stephen Frost
Greetings, * Kirk Wolak (wol...@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 >

Re: Adding SHOW CREATE TABLE

2023-05-17 Thread Kirk Wolak
On Sun, May 14, 2023 at 2:20 AM Kirk Wolak wrote: > On Sat, May 13, 2023 at 3:34 PM Jeremy Smith > wrote: > >> >> >> On Sat, May 13, 2023, 3:25 AM Kirk Wolak wrote: >> >>> Does this imply SQL SYNTAX like: >>> >>> SHOW CREATE TABLE >>> [ INCLUDING { ALL | INDEXES | SEQUENCES | ??? }] >>>