0

In oracle:

select owner, constraint_name, table_name, column_name, position 
from dba_cons_columns;

Is there any table like dba_cons_columns in PostgreSQL database that we get the same information?

0

PostgreSQL has the SQL_standard information_schema which is actually a bunch of views backed by the pg_catalog schema.

information_schema has a fixed structure as mandated by the standard, pg_catalog is liable to change between major PostgreSQL versions.

For the information you want it's probably the table information_schema.constraint_table_usage.

2
  • Where i get the position(Original position of column or attribute in definition) information? @jasen
    – Mojib
    Aug 6 '18 at 9:26
  • I don't know. I'd have to look in the docuimentation,
    – Jasen
    Aug 6 '18 at 10:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.