Re: how to recall the initial definition (CREATE TABLE) - Mailing list pgsql-novice

From Jaime Casanova
Subject Re: how to recall the initial definition (CREATE TABLE)
Date
Msg-id c2d9e70e0601090738s213f90d1x44c7f2ee2d05e73@mail.gmail.com
Whole thread Raw
In response to Re: how to recall the initial definition (CREATE TABLE)  (Sean Davis <sdavis2@mail.nih.gov>)
Responses Re: how to recall the initial definition (CREATE TABLE)  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-novice
On 1/9/06, Sean Davis <sdavis2@mail.nih.gov> wrote:
>
>
>
> On 1/9/06 1:27 PM, "Joao Miguel Ferreira" <jmf@estg.ipvc.pt> wrote:
>
> > Hello all at PG,
> >
> > Let's say I forgot the "definition" of a table (.. the original CREATE
> > TABLE query)...
>
> Use pg_dump or use some program like PgAdminIII to give you the table
> definition.  There is no "DESCRIBE mytable" like in MySQL.
>
> Sean
>
>

or inside psql you can execute the \d command table to see the table
definition...

or even you can do in the shelll


psql -U postgres -d database_name -c "\d schema_name.table_name" > file

--
regards,
Jaime Casanova
(DBA: DataBase Aniquilator ;)

pgsql-novice by date:

Previous
From: Brad Nicholson
Date:
Subject: Re: how to list all tables in a database
Next
From: Joao Miguel Ferreira
Date:
Subject: What does 'schema' mean ?