X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8D82552C23 for ; Thu, 18 Aug 2005 12:05:58 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 86291-09 for ; Thu, 18 Aug 2005 15:05:52 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 4BA5552969 for ; Thu, 18 Aug 2005 12:05:51 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j7IF5lCn008024 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 18 Aug 2005 09:05:49 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j7IF5lE2098055; Thu, 18 Aug 2005 09:05:47 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j7IF5kxg098054; Thu, 18 Aug 2005 09:05:46 -0600 (MDT) (envelope-from mfuhr) Date: Thu, 18 Aug 2005 09:05:46 -0600 From: Michael Fuhr To: Roger Tannous Cc: pgsql-sql@postgresql.org Subject: Re: A Table's Primary Key Listing Message-ID: <20050818150546.GA97974@winnie.fuhr.org> References: <20050818143622.32448.qmail@web51910.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050818143622.32448.qmail@web51910.mail.yahoo.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 required=5 tests=[AWL=0.005] X-Spam-Level: X-Archive-Number: 200508/142 X-Sequence-Number: 22370 On Thu, Aug 18, 2005 at 07:36:22AM -0700, Roger Tannous wrote: > Is there any means to get a list of the Primary Keys (or simply the > Primary Key if there's only one :) ) for a given table using an SQL query? Are you looking for the primary key definition or do you want the primary key values themselves? It's not clear what problem you're trying to solve if "SELECT columnname FROM tablename" isn't the answer. -- Michael Fuhr