Re: Adding SHOW CREATE TABLE

From: Jeremy Smith <jeremy(at)musicsmith(dot)net>
To: Kirk Wolak <wolakk(at)gmail(dot)com>
Cc: Ron <ronljohnsonjr(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Adding SHOW CREATE TABLE
Date: 2023-05-13 19:34:44
Message-ID: CAM8SmLV3RcGHsnhwk9=vAdhUGnYfCQ9xUsrBdXwyKn=_9wCDLw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Sat, May 13, 2023, 3:25 AM Kirk Wolak <wolakk(at)gmail(dot)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

>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kirk Wolak 2023-05-14 06:20:07 Re: Adding SHOW CREATE TABLE
Previous Message Ron 2023-05-13 18:28:11 Re: Adding SHOW CREATE TABLE

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2023-05-13 21:47:53 Re: Memory leak from ExecutorState context?
Previous Message Ron 2023-05-13 18:28:11 Re: Adding SHOW CREATE TABLE