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

From A. Kretschmer
Subject Re: how to recall the initial definition (CREATE TABLE) of a table ?
Date
Msg-id 20060109140815.GJ26237@webserv.wug-glas.de
Whole thread Raw
In response to how to recall the initial definition (CREATE TABLE) of a table ?  (Joao Miguel Ferreira <jmf@estg.ipvc.pt>)
List pgsql-novice
am  09.01.2006, um 13:27:29 -0500 mailte Joao Miguel Ferreira folgendes:
> Hello all at PG,
>
> Let's say I forgot the "definition" of a table (.. the original CREATE
> TABLE query)...
>
> how do I ask PG to tell me these definition's (int not null, text,
> foreign key, etc) ??

You can use pg_dump for this, example:

pg_dump -t <table> -s -U <user> <database>



HTH, Andreas
--
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47212,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    ===

pgsql-novice by date:

Previous
From: Joao Miguel Ferreira
Date:
Subject: how to recall the initial definition (CREATE TABLE) of a table ?
Next
From: Sean Davis
Date:
Subject: Re: how to recall the initial definition (CREATE TABLE)