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
Sergey Karin schrieb:
Yes, it is not a problem via psql.
But I want to detect primary key via libpq (e.g using select commands)
Look into informational-schema
or start psql with the option -e
then use \d+ and see what it prints :-)
Regards
Tino
---(end of broadcast)-
Yes, it is not a problem via psql.But I want to detect primary key via libpq (e.g using select commands)2006/3/30, Michael Kleiser <
[EMAIL PROTECTED]>:\d your_tablewill show it>> create table foobar ( foo int primary key, bar int );
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index"fo
Hi, List!I use PG8.1Are there any abilities to detect primary key of a table?Sergey Karin