Re: Adding SHOW CREATE TABLE

Поиск
Список
Период
Сортировка
От Kirk Wolak
Тема Re: Adding SHOW CREATE TABLE
Дата
Msg-id CACLU5mSmZ0hoCbbkGBS7X2jczC8bmP5PE+w=BC=UvAp+36AoBw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Adding SHOW CREATE TABLE  (Jeremy Smith <jeremy@musicsmith.net>)
Список pgsql-general
On Sat, May 13, 2023 at 3:34 PM Jeremy Smith <jeremy@musicsmith.net> wrote:


On Sat, May 13, 2023, 3:25 AM Kirk Wolak <wolakk@gmail.com> wrote:
Does this imply SQL SYNTAX like:

SHOW CREATE TABLE <table_name> 
  [ INCLUDING { ALL | INDEXES |  SEQUENCES | ??? }] 
  [EXCLUDING { PK | FK | COMMENTS | STORAGE | } ] 
  [FOR {V11 | V12 | V13 | V14 | V15 }] ??
?

Personally, I would expect a function, like pg_get_tabledef(oid), to match the other pg_get_*def functions instead of overloading SHOW.  To me, this also argues that we shouldn't include indexes because we already have a pg_get_indexdef function.

      -Jeremy
+1

In fact, making it a function will make my life easier for testing, that's for certain.  I don't need to involve the parser,etc.  Others can help with that after the function works.
Thanks for the suggestion! 

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

Предыдущее
От: Jeremy Smith
Дата:
Сообщение: Re: Adding SHOW CREATE TABLE
Следующее
От: Rahul Chordiya
Дата:
Сообщение: stop