Re: how to recall the initial definition (CREATE TABLE) of a table ?

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: how to recall the initial definition (CREATE TABLE) of a table ?
Date: 2006-01-09 14:08:15
Message-ID: 20060109140815.GJ26237@webserv.wug-glas.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 ===

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Sean Davis 2006-01-09 14:08:53 Re: how to recall the initial definition (CREATE TABLE)
Previous Message Amit_Wadhwa 2006-01-09 13:58:54 Re: how to recall the initial definition (CREATE TABLE) of a table ?