X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id DA3829DCD1F for ; Fri, 23 Dec 2005 14:24:12 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 14112-10 for ; Fri, 23 Dec 2005 14:24:12 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from anu.ie (mail.anu.net [213.247.49.236]) by postgresql.org (Postfix) with ESMTP id 69B009DCD1A for ; Fri, 23 Dec 2005 14:24:09 -0400 (AST) Received: from kenxp (68.40.184.254) by anu.ie with ESMTP (Eudora Internet Mail Server X 3.2.8b1) for ; Fri, 23 Dec 2005 18:24:09 +0000 From: "Ken Winter" To: "PostgreSQL pg-sql list" Subject: The Information Schema vs the PG Catalog Date: Fri, 23 Dec 2005 13:24:03 -0500 Message-ID: <001801c607ee$0dbed960$6603a8c0@kenxp> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0019_01C607C4.24E8D160" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.021 required=5 tests=[AWL=0.020, HTML_MESSAGE=0.001] X-Spam-Score: 0.021 X-Spam-Level: X-Archive-Number: 200512/204 X-Sequence-Number: 23746 This is a multi-part message in MIME format. ------=_NextPart_000_0019_01C607C4.24E8D160 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I'm writing PL/pgSQL routines that generate triggers, functions, and = rules based on design characteristics of tables, columns, and other database objects. These routines need to be able to look up the definitions of = these objects. I see that there are two places available to look up this = info: the Information Schema and in the PG Catalog. =20 =20 Which source is preferable? Or if that answer isn't absolute, what are = the reasons or conditions for preferring one over the other? =20 =20 Also, a specific question: Does the Information Schema offer any way to list the sequences that exist and their attributes? I can't seem to = find any. =20 ~ TIA ~ Ken ------=_NextPart_000_0019_01C607C4.24E8D160 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I’m writing PL/pgSQL routines that generate triggers, functions, and rules based on design characteristics of = tables, columns, and other database objects.  These routines need to be able to look = up the definitions of these objects.  I see that there are two places = available to look up this info: the Information Schema and in the PG = Catalog. 

 

Which source is preferable?  Or if that answer = isn’t absolute, what are the reasons or conditions for preferring one over the = other? 

 

Also, a specific question:  Does the = Information Schema offer any way to list the sequences that exist and their = attributes?  I can’t seem to find any.

 

~ TIA

~ Ken

------=_NextPart_000_0019_01C607C4.24E8D160--