From: | Ray O'Donnell <ray(at)rodonnell(dot)ie> |
---|---|
To: | Igor Korot <ikorot01(at)gmail(dot)com>, Michael Nolan <htfoot(at)gmail(dot)com> |
Cc: | "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 17:47:18 |
Message-ID: | 88e4ccd9-0fea-f18f-7541-33c7838e1989@rodonnell.ie |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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 will show you the SQL used to generate the output... this may help.
Ray.
--
Raymond O'Donnell // Galway // Ireland
ray(at)rodonnell(dot)ie
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Nolan | 2022-07-10 17:57:30 | Re: Get the table creation DDL |
Previous Message | Igor Korot | 2022-07-10 17:18:33 | Re: Get the table creation DDL |