Received: from e104.serverdienst.de (bfs.xact.de [195.63.7.104]) by hub.org (8.9.2/8.9.1) with ESMTP id MAA99652 for ; Fri, 19 Feb 1999 12:09:37 -0500 (EST) (envelope-from grimme@atix.de) Received: from methusalix.gallien.de [129.187.25.2] by e104.serverdienst.de (SMTPD32-5.00) id A9CF8B02A0; Fri, 19 Feb 1999 18:05:19 +0100 Received: (qmail 19799 invoked by alias); 19 Feb 1999 17:17:20 -0000 Received: from taugnix.gallien.de (HELO atix.de) (marc@192.168.3.10) by methusalix.gallien.de with SMTP; 19 Feb 1999 17:17:20 -0000 Sender: marc Message-ID: <36CD9AE1.F2C412CE@atix.de> Date: Fri, 19 Feb 1999 18:09:53 +0100 From: Marc Grimme Organization: ATIX computer systems X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.0.36 i586) X-Accept-Language: en MIME-Version: 1.0 To: "jose' soares" CC: "pgsql-sql@postgreSQL.org" Subject: Re: [SQL] SQL-Query 2 get primary key References: <36CD659A.438BE39B@atix.de> <36CD920E.26F4FA3A@bo.nettuno.it> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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