Re: Adding SHOW CREATE TABLE

Поиск
Список
Период
Сортировка
От Kirk Wolak
Тема Re: Adding SHOW CREATE TABLE
Дата
Msg-id CACLU5mQw3wQp+ySHFGy90SqWPqCBw0DjdNQ_QDaQAvFG=OM3CA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Adding SHOW CREATE TABLE  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-general
On Fri, May 12, 2023 at 8:37 PM Stephen Frost <sfrost@snowman.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...

В списке pgsql-general по дате отправления:

Предыдущее
От: Christophe Pettus
Дата:
Сообщение: xid type? (was :)
Следующее
От: jian he
Дата:
Сообщение: Re: function signature allow "default" keyword