RE: sequences and tables
От | Michael Davis |
---|---|
Тема | RE: sequences and tables |
Дата | |
Msg-id | 01C0756A.21B61C60.mdavis@sevainc.com обсуждение исходный текст |
Ответ на | sequences and tables (Nelio Alves Pereira Filho <nelio@ifx.com.br>) |
Список | pgsql-general |
Try: --This shows all default values for columns SELECT DISTINCT c.relname, a.attname, t.typname, pa.adsrc, a.atttypid FROM pg_attribute a, pg_class c, pg_type t, pg_attrdef pa WHERE a.attrelid = c.oid AND a.atttypid = t.oid AND c.oid = pa.adrelid AND a.attnum = pa.adnum AND upper(c.relname) = 'TABLE_NAME'; --This shows all columns that reference a sequence SELECT DISTINCT c.relname, a.attname, t.typname, pa.adsrc, a.atttypid FROM pg_attribute a, pg_class c, pg_type t, pg_attrdef pa WHERE a.attrelid = c.oid AND a.atttypid = t.oid AND c.oid = pa.adrelid AND a.attnum = pa.adnum AND upper(pa.adsrc) like '%SEQUENCE_NAME%'; -----Original Message----- From: Nelio Alves Pereira Filho [SMTP:nelio@ifx.com.br] Sent: Wednesday, January 03, 2001 7:13 AM To: pgsql-general@postgresql.org Subject: sequences and tables Where do I find information about a sequence? I'd like to know what are the table and column referenced by a sequence. As its name may be truncated, it's not a consistent place to look for. The system tables didn't seem to help. Thanks -- Nelio Alves Pereira Filho IFX Networks - www.ifx.com.br +55 11 3365-5863 nelio@ifx.com.br
В списке pgsql-general по дате отправления: