pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mario Soto Cordones <msotocl@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@dcc.uchile.cl>
Cc: pgsql-admin@postgresql.org
Subject: Re: catalog of postgres
Date: Wed, 27 Apr 2005 15:57:41 -0400
Message-ID: <e9b17cde0504271257313a0ff0@mail.gmail.com> (raw)
In-Reply-To: <24929.1114626587@sss.pgh.pa.us>
References: <e9b17cde050427110228170cf3@mail.gmail.com>
	<20050427180931.GC27525@dcc.uchile.cl>
	<e9b17cde050427111471ef2bb3@mail.gmail.com>
	<24929.1114626587@sss.pgh.pa.us>

OK  i have a big mistake, i saw bad, now my new query is

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
  
  select * from pg_class
  where relkind = 'i'

but not you where they stay the functions

thank you for all



2005/4/27, Tom Lane <tgl@sss.pgh.pa.us>:
> Mario Soto Cordones <msotocl@gmail.com> writes:
> > OK but views and tables for example have the same one relkind
> 
> Not for many years now (certainly not in any release that has pg_namespace).
> 
>                         regards, tom lane
> 


-- 
cordialmente,

Ing. Mario Soto Cordones



view thread (8+ messages)  latest in thread

Message-ID: <e9b17cde0504271257313a0ff0@mail.gmail.com>
Permalink:  ../e9b17cde0504271257313a0ff0@mail.gmail.com/
Also on:    postgresql.org/message-id/e9b17cde0504271257313a0ff0@mail.gmail.com

 · 

reply

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-admin@postgresql.org
  Cc: msotocl@gmail.com, tgl@sss.pgh.pa.us, alvherre@dcc.uchile.cl
  Subject: Re: catalog of postgres
  In-Reply-To: <e9b17cde0504271257313a0ff0@mail.gmail.com>
  References: <e9b17cde050427110228170cf3@mail.gmail.com> <20050427180931.GC27525@dcc.uchile.cl> <e9b17cde050427111471ef2bb3@mail.gmail.com> <24929.1114626587@sss.pgh.pa.us> <e9b17cde0504271257313a0ff0@mail.gmail.com>

* 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