On Thu, Mar 30, 2006 at 03:13:12PM +0400, Sergey Karin wrote:
> Are there any abilities to detect primary key of a table?
In psql you could use "\d tablename". To see the queries that psql
makes, execute "\set ECHO_HIDDEN" and then "\d tablename". Here's
the documentation for the system catalogs that psql queries:
You could also query the Information Schema; table_constraints
joined with key_column_usage or constraint_column_usage should
yield a table's primary key columns.
In response to
pgsql-general by date
|Next:||From: jayati.biswas||Date: 2006-03-30 11:55:34|
|Subject: Recovery with pg_xlog|
|Previous:||From: Martijn van Oosterhout||Date: 2006-03-30 11:38:07|
|Subject: Re: converting timstamptz to local time zone|