Search Postgresql Archives

get referential values

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

 



Knowing only tablename (schema_name.table_name) how to retrieve foreign keys and related values. (using pg_catalog is preferred). I developing framework for adobe flex (on php and postgresql).
Already figured out how to get primary key, not null columns and column types, but kinda stuck here.
I can post these queries, if someone needs (it would be nice to have these in wiki - where I've seen the query for primary key retrieval).

I need following format:

select .... 'schema_name.table_name'::regclass....

no | fk_name| table_column_name | foreign_table_name | foreign_column_name

no is used for composite foreign keys.

Thanks!

Esmin.

[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