Search Postgresql Archives

Getting the column to a which a sequence belongs.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm trying to extend the Postgres support in my SQL tool. I'm trying to recreate the SQL for a sequence, and I wonder if there is a way to find out the column to which a sequence "belongs".
I'm talking either about sequences that are created automatically by PG when using the serial datatype or sequences that have been changed using ALTER SEQUENCE ... OWNED BY ...

I know I can get the sequence that belongs to a column using pg_get_serial_sequence() (although only in 8.4), but I'm looking for the other way: given a sequence find out if it's "owned" by a column.
So far "debugging" psql using the -E option didn't show up anything and I couldn't find any hints in the system catalogs documentation.

Is this possible at all? As neither psql nor pgAdmin display this information, I suspect it's not.

Regards
Thomas


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux