Re: Feature request: pg_get_tabledef(text) - Mailing list pgsql-general

From Ron Johnson
Subject Re: Feature request: pg_get_tabledef(text)
Date
Msg-id CANzqJaCcj2ipPnbvawSyuSh=A9Z-+v=Kyd1paFEFXT6JN4zDJg@mail.gmail.com
Whole thread Raw
In response to Feature request: pg_get_tabledef(text)  (Hans Schou <hans.schou@gmail.com>)
List pgsql-general
On Wed, Nov 22, 2023 at 10:41 AM Hans Schou <hans.schou@gmail.com> wrote:
Hi

Similar to pg_get_viewdef() and pg_get_functiondef() it would be useful with a pg_get_tabledef() to get a full description of how a table is defined.
 
Because there's already pg_get_viewdef(), pg_get_functiondef(), pg_get_constraintdef(), pg_indexes.indexdef and ways to get all GRANT and REVOKE privs, any pg_get_tabledef() would just be the CREATE TABLE statement without PRIMARY KEY or FOREIGN KEY clauses.

pgsql-general by date:

Previous
From: Hans Schou
Date:
Subject: Feature request: pg_get_tabledef(text)
Next
From: Laurenz Albe
Date:
Subject: Re: Feature request: pg_get_tabledef(text)