Thread: Array like a foreign key

Array like a foreign key

From
"Cristian Custodio"
Date:
Hi,
 
I would like do build a select that could show me the constraints
and its columns.
 
I tried this way but it don't work.
select c.conname, c.contype, c.confkey,  a.attname
  from pg_constraint c inner join pg_attribute a on (a.attnum in c.confkey)
 
 
The problem is because the confkey is a array type.
 
How can I do that.
 
 Please,
 
Cristian