Re: Displaying keys and triggers of tables?

Поиск
Список
Период
Сортировка
От will trillich
Тема Re: Displaying keys and triggers of tables?
Дата
Msg-id 20010424141837.C30699@serensoft.com
обсуждение исходный текст
Ответ на Displaying keys and triggers of tables?  ("Mads Orbesen Troest" <mads@loxodonte.NEVERMORE.dk>)
Список 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@serensoft.com
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

В списке pgsql-general по дате отправления:

Предыдущее
От: will trillich
Дата:
Сообщение: Re: Re: BETWEEN clause
Следующее
От:
Дата:
Сообщение: Question on Bizarre Sorting (ORDER BY in 7.1)