Re: [pgsql-es-ayuda] Re: [pgsql-es-ayuda] Cómo listar secuencias?

From: juan <juanramirez(at)cajazacate(dot)com(dot)sv>
To: Mario Burdman <mburdman(at)gmail(dot)com>
Cc: pgsql-es-ayuda <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: [pgsql-es-ayuda] Re: [pgsql-es-ayuda] Cómo listar secuencias?
Date: 2009-01-30 21:11:57
Message-ID: 49836D1D.1090904@cajazacate.com.sv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Mario Burdman escribió:
> SELECT n.nspname as "Schema",
> c.relname as "Name",
> CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'i' THEN
> 'index' WHEN 'S' THEN 'sequence' WHEN 's' THEN 'special' END as "Type",
> u.usename as "Owner"
> FROM pg_catalog.pg_class c
> LEFT JOIN pg_catalog.pg_user u ON u.usesysid = c.relowner
> LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
> WHERE *c.relkind IN ('S','')* <===================================para
> secuencia, ojo con el case
> AND n.nspname NOT IN ('pg_catalog', 'pg_toast')
> AND pg_catalog.pg_table_is_visible(c.oid)
> ORDER BY 1,2;

Muchas gracias Mario, es lo que necesitaba. Se te agradece mucho

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message juan 2009-01-30 21:36:07 Hay relación entre una tabla y la Secuencia
Previous Message Mario Burdman 2009-01-30 21:02:47 Re: [pgsql-es-ayuda] Cómo listar secuencias?