From: Marc Grimme <grimme@atix.de>
To: jose' soares <sferac@bo.nettuno.it>
Cc: pgsql-sql@postgreSQL.org <pgsql-sql@postgreSQL.org>
Subject: Re: [SQL] SQL-Query 2 get primary key
Date: Fri, 19 Feb 1999 18:09:53 +0100
Message-ID: <36CD9AE1.F2C412CE@atix.de> (raw)
References: <36CD659A.438BE39B@atix.de>
<36CD920E.26F4FA3A@bo.nettuno.it>
Hi,
jose' soares wrote:
>
> You may query pg_indexes as in:
>
> select * from pg_indexes where tablename = 'test';
>
> tablename|indexname|indexdef
> ---------+---------+-----------------------------------------------------------------------
>
> test |test_pkey|CREATE UNIQUE INDEX "test_pkey" ON "test" USING
> btree ("id" "int4_ops")
> (1 row)
>
>
>
I read about the pg_indexes table and stuff but I am interested in the
"columnname" of the primary key in the specified table.
Isn“t this feature very important?
Cheers,
Marc
--
-----------------------------------------------------------
Marc Grimme - An der Muehle 1 - 85716 Unterschleissheim
Fon: +49 89 37 48 81 22 - +49 89 37 48 92 7 - 3/0 -
mail2: grimme@informatik.tu-muenchen.de, grimme@atix.de
-----------------------------------------------------------
The UNIX Guru's View of Sex:
# unzip ; strip ; touch ; finger ; mount ; fsck ; more ; yes ; umount ;
sleep
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: grimme@atix.de, sferac@bo.nettuno.it
Subject: Re: [SQL] SQL-Query 2 get primary key
In-Reply-To: <36CD9AE1.F2C412CE@atix.de>
References: <36CD659A.438BE39B@atix.de> <36CD920E.26F4FA3A@bo.nettuno.it> <36CD9AE1.F2C412CE@atix.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox