Re: Adding SHOW CREATE TABLE
Kirk Wolak <wolakk@gmail.com>
From: Kirk Wolak <wolakk@gmail.com>
To: pgsql-hackers@lists.postgresql.org
Cc: Andrew Dunstan <andrew@dunslane.net>,
Pavel Stehule <pavel.stehule@gmail.com>, Jelte Fennema <postgres@jeltef.nl>, Tom Lane <tgl@sss.pgh.pa.us>, Laurenz Albe <laurenz.albe@cybertec.at>,
Andrey Borodin <x4mmm@yandex-team.ru>
Date: 2023-07-01T21:41:25Z
Lists: pgsql-hackers
On Fri, Jun 30, 2023 at 1:56 PM Kirk Wolak <wolakk@gmail.com> wrote:
> On Wed, Jun 21, 2023 at 8:52 PM Kirk Wolak <wolakk@gmail.com> wrote:
>
>> On Mon, Jun 5, 2023 at 7:43 AM Jelte Fennema <postgres@jeltef.nl> wrote:
>>
>>> On Thu, 1 Jun 2023 at 18:57, Kirk Wolak <wolakk@gmail.com> wrote:
>>>
>>
Definitely have the questions from the previous email, but I CERTAINLY
appreciate this output.
(Don't like the +, but pg_get_viewdef() creates the view the same way)...
Will psql doing \st pg_class be able to just call/output this so that the
output is nice and clean?
At this point... I will keep pressing forward, cleaning things up. And
then send a patch for others to play with....
(Probably bad timing with wrapping up V16)
*select pg_get_tabledef('pg_class'::regclass);*
pg_get_tabledef
----------------------------------------
CREATE TABLE pg_class (oid oid NOT NULL,+
relname name NOT NULL COLLATE "C", +
relnamespace oid NOT NULL, +
reltype oid NOT NULL, +
reloftype oid NOT NULL, +
relowner oid NOT NULL, +
relam oid NOT NULL, +
relfilenode oid NOT NULL, +
reltablespace oid NOT NULL, +
relpages integer NOT NULL, +
reltuples real NOT NULL, +
relallvisible integer NOT NULL, +
reltoastrelid oid NOT NULL, +
relhasindex boolean NOT NULL, +
relisshared boolean NOT NULL, +
relpersistence "char" NOT NULL, +
relkind "char" NOT NULL, +
relnatts smallint NOT NULL, +
relchecks smallint NOT NULL, +
relhasrules boolean NOT NULL, +
relhastriggers boolean NOT NULL, +
relhassubclass boolean NOT NULL, +
relrowsecurity boolean NOT NULL, +
relforcerowsecurity boolean NOT NULL, +
relispopulated boolean NOT NULL, +
relreplident "char" NOT NULL, +
relispartition boolean NOT NULL, +
relrewrite oid NOT NULL, +
relfrozenxid xid NOT NULL, +
relminmxid xid NOT NULL, +
relacl aclitem[], +
reloptions text[] COLLATE "C", +
relpartbound pg_node_tree COLLATE "C" +
) USING heap