From: | Kirk Wolak <wolakk(at)gmail(dot)com> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Nathaniel Sabanski <sabanski(dot)n(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Adding SHOW CREATE TABLE |
Date: | 2023-05-16 01:26:16 |
Message-ID: | CACLU5mQw3wQp+ySHFGy90SqWPqCBw0DjdNQ_QDaQAvFG=OM3CA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
On Fri, May 12, 2023 at 8:37 PM Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> Greetings,
> ...
> Yes, it's a large effort, no doubt.
>
>
Stephen, I started looking at the code.
And I have the queries from \set SHOW_HIDDEN
that psql uses. And also the pg_dump output.
My first table was an ID bigint NOT NULL PRIMARY KEY GENERATED ALWAYS AS
IDENTITY
pg_dump puts the decorations on the SEQUENCE
\dt puts that text as the "Default" value
But the STRANGE part for me is the query I Assembled from the FDW returns
nothing for extra attributes.
And only seems to care about the "GENERATED AS (%s) STORED" syntax.
For me, generating the INLINE syntax will produce the SEQUENCE
automatically, so this is my preference.
Let me know if I am missing anything... Please.
Finally, I cannot GRASP this additional syntax:
appendStringInfo(&buf, "\n) SERVER %s\nOPTIONS (",
This is at the end of the create table syntax:
CREATE TABLE %s ( ... ) SERVER %s\n OPTIONS (" ...");
Is this special "FDW" Decorations because I don't see those on the create
table documentation?
It's easy enough to ignore, but I don't want to miss something.
Kirk...
From | Date | Subject | |
---|---|---|---|
Next Message | jian he | 2023-05-16 03:11:30 | Re: function signature allow "default" keyword |
Previous Message | Christophe Pettus | 2023-05-15 15:47:44 | xid type? (was :) |
From | Date | Subject | |
---|---|---|---|
Next Message | Kirk Wolak | 2023-05-16 01:35:54 | pgbench: can we add a way to specify the schema to write to? |
Previous Message | Kirk Wolak | 2023-05-16 01:05:19 | Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN) |