1
votes

How to get exported keys (database metadata).Even though redshift does not support foreign keys and primary keys I am able to see them in system tables. The problem here is in the system table the multiple columns of a foreign key exist as an array in one column(though redshift doesn't support arrays). Is it possible to extract them in one query.

1
Redshift does support foreign keys and primary keys: docs.aws.amazon.com/redshift/latest/dg/… Can you post the query you used to look at the system table ? and the result?Jon Ekiz

1 Answers

2
votes

Use table_constraints table:

SELECT * FROM information_schema.table_constraints;