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.