Re: Get the table creation DDL

From: Igor Korot <ikorot01(at)gmail(dot)com>
To: "Ray O'Donnell" <ray(at)rodonnell(dot)ie>
Cc: Michael Nolan <htfoot(at)gmail(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Get the table creation DDL
Date: 2022-07-10 18:59:40
Message-ID: CA+FnnTzv8tN67pe=hPV7QeYONeSwDq22wG6YBVo2QXz8My=Z4Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

On Sun, Jul 10, 2022 at 12:47 PM Ray O'Donnell <ray(at)rodonnell(dot)ie> wrote:
>
> On 10/07/2022 17:47, Igor Korot wrote:
> > Hi, Michael,
> >
> > On Sun, Jul 10, 2022 at 11:13 AM Michael Nolan <htfoot(at)gmail(dot)com> wrote:
> >>
> >>
> >>
> >> On Sun, Jul 10, 2022 at 10:28 AM Igor Korot <ikorot01(at)gmail(dot)com> wrote:
> >>>
> >>> Hi,
> >>> Is there a query I can execute that will give me CREATE TABLE() command
> >>> used to create a table?
> >
> > So there is no "query" per se?
> > Also how do I pass the table name?
> >
>
> If you connect to the database with psql including the -E option, then do
>
> \d <table name>

It means it is possible to have an actal query getting it...

Thank you.

>
> It will show you the SQL used to generate the output... this may help.
>
> Ray.
>
>
> --
> Raymond O'Donnell // Galway // Ireland
> ray(at)rodonnell(dot)ie

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mladen Gogala 2022-07-10 19:26:49 Re: Get the table creation DDL
Previous Message Mladen Gogala 2022-07-10 18:50:27 Re: Get the table creation DDL