Viewing Foreign key constraints in psql

Поиск
Список
Период
Сортировка
Искать

Viewing Foreign key constraints in psql

От:
Ludwig Lim <lud_nowhere_man@yahoo.com>
Дата:
Hi:

  How do I view the foreign key constraints (name and
definition) in psql? I can only see the triggers
created by the constraint when I use the "\d "
command in psql.


Thank you ,

ludwig

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

how to know backend crashed ??

От:
HK <harikrishnan@midascomm.com>
Дата:
hi all,
	I am accessing postgresql-7.1.3 from C with asynchronous query 
processing. 
	If by any chance the backend crashes, is there any means to 
know in C that the backend has crashed. Querying from pqsocket doesn't 
help. 
	Can anybody throw light on it.

Thanx in advance.

-- 
regards,
hari

Re: Viewing Foreign key constraints in psql

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Ludwig Lim  writes:
>   How do I view the foreign key constraints (name and
> definition) in psql? I can only see the triggers
> created by the constraint when I use the "\d "
> command in psql.

In PG versions < 7.3, you don't: the system doesn't retain any concept
of the foreign key constraint as such, only the triggers that implement
it.  In 7.3 there is a pg_constraint table with an actual entry for each
foreign key constraint.

			regards, tom lane
FAQ