X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4390553873 for ; Wed, 27 Apr 2005 17:41:14 -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 60523-03 for ; Wed, 27 Apr 2005 20:41:09 +0000 (GMT) Received: from sunsite.dcc.uchile.cl (sunsite.dcc.uchile.cl [192.80.24.2]) by svr1.postgresql.org (Postfix) with ESMTP id 9C1DD5380D for ; Wed, 27 Apr 2005 17:41:02 -0300 (ADT) Received: from anakena.dcc.uchile.cl (anakena [192.80.24.6]) by sunsite.dcc.uchile.cl (8.13.4/8.13.4) with ESMTP id j3RKf1cd006916; Wed, 27 Apr 2005 16:41:01 -0400 (CLT) Received: by anakena.dcc.uchile.cl (Postfix, from userid 4151) id 35D19533A6; Wed, 27 Apr 2005 16:41:01 -0400 (CLT) Date: Wed, 27 Apr 2005 16:41:01 -0400 From: Alvaro Herrera To: Mario Soto Cordones Cc: Tom Lane , pgsql-admin@postgresql.org Subject: Re: catalog of postgres Message-ID: <20050427204101.GD27525@dcc.uchile.cl> References: <20050427180931.GC27525@dcc.uchile.cl> <24929.1114626587@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.8i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.34 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE X-Spam-Level: X-Archive-Number: 200504/393 X-Sequence-Number: 17406 On Wed, Apr 27, 2005 at 03:57:41PM -0400, Mario Soto Cordones wrote: > SELECT nspname as esquema, relname as objeto, > (CASE relkind > WHEN 'v' THEN 'Vista' > WHEN 'i' THEN 'Indice' > WHEN 'S' THEN 'Secuencia' > WHEN 'r' THEN 'Tabla' > WHEN 'c' THEN 'Tipo' > END) as tipo > FROM > pg_class bc, > pg_attribute ta, > pg_namespace ns, > pg_type ty > WHERE > ta.attrelid = bc.oid > and ta.attnum > 0 > and not ta.attisdropped > and nspname <> 'information_schema' and nspname not like 'pg_%' > ----and relam = 0 > and bc.relnamespace = ns.oid > and bc.relname not like 'pg_%' > and ta.atttypid = ty.oid > group by nspname, relname, relkind > order by tipo desc Why are you using a group by here? It's unnecesary. > but not you where they stay the functions See the pg_proc catalog. I wonder if I have pointed you to the documentation before? See the "system catalogs" section in the internals chapter. Also, maybe you should take a look at whether the information_schema gives you what you want. -- Alvaro Herrera () Y una voz del caos me habló y me dijo "Sonríe y sé feliz, podría ser peor". Y sonreí. Y fui feliz. Y fue peor.