Re: Adding SHOW CREATE TABLE

From: Kirk Wolak <wolakk(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Jelte Fennema <postgres(at)jeltef(dot)nl>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Subject: Re: Adding SHOW CREATE TABLE
Date: 2023-07-01 21:41:25
Message-ID: CACLU5mTdXv1_FRYu2L57wJBSKOXQs4Ux-xXO0z2Z=bb=7AHXpg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Fri, Jun 30, 2023 at 1:56 PM Kirk Wolak <wolakk(at)gmail(dot)com> wrote:

> On Wed, Jun 21, 2023 at 8:52 PM Kirk Wolak <wolakk(at)gmail(dot)com> wrote:
>
>> On Mon, Jun 5, 2023 at 7:43 AM Jelte Fennema <postgres(at)jeltef(dot)nl> wrote:
>>
>>> On Thu, 1 Jun 2023 at 18:57, Kirk Wolak <wolakk(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Wen Yi 2023-07-02 11:06:25 Re: [Beginner Question] How to print the call link graph?
Previous Message Erik Wienhold 2023-07-01 19:44:58 Re: [Beginner Question] How to print the call link graph?

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2023-07-02 00:25:12 Re: Incremental View Maintenance, take 2
Previous Message Joe Conway 2023-07-01 19:52:50 Re: RFC: pg_stat_logmsg