Re: Feature request: pg_get_tabledef(text)

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: Hans Schou <hans(dot)schou(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Feature request: pg_get_tabledef(text)
Date: 2023-11-22 15:50:57
Message-ID: CANzqJaCcj2ipPnbvawSyuSh=A9Z-+v=Kyd1paFEFXT6JN4zDJg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Nov 22, 2023 at 10:41 AM Hans Schou <hans(dot)schou(at)gmail(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2023-11-22 16:09:39 Re: Feature request: pg_get_tabledef(text)
Previous Message Hans Schou 2023-11-22 15:41:24 Feature request: pg_get_tabledef(text)