Re: Displaying keys and triggers of tables?

From: will trillich <will(at)serensoft(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Displaying keys and triggers of tables?
Date: 2001-04-24 19:18:37
Message-ID: 20010424141837.C30699@serensoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Apr 20, 2001 at 11:16:11AM +0200, Mads Orbesen Troest wrote:
> Hi,
>
> Could someone tell me how to get more information from a previously created
> table in Postgres; "\d table" doesn't show defined primary key, foreign keys
> and their implied triggers and I can't seem to find a way to obtain this
> information. Surely, it is possible to get a fuller table description?
>
> I'm new to Postgres, so please bear with me. :-)

we all were, at some point--

try

psql -E my_db_name

and then

\d some_tbl_name
\d view_name
\d sequence_name_seq

it'll get you started on how the system tables can work...

also see postgresql-doc/html/postgres/extend18864.htm (on my
debian system that's under /usr/share/doc/ ) for an overview of
postgres system tables.

but for specifics as what you're after, try creating a small
database (two tables should do) with primary keys, foreign keys,
sequences and maybe even a couple of explicit triggers, then

pg_dump testdb > schema_to_dissect.sql

give that a look and you'll be busy for days!

--
don't visit this page. it's bad for you. take my expert word for it.
http://www.salon.com/people/col/pagl/2001/03/21/spring/index1.html

will(at)serensoft(dot)com
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2001-04-24 19:27:16 Re: Re: BETWEEN clause
Previous Message will trillich 2001-04-24 19:11:10 Re: Re: BETWEEN clause