Array like a foreign key

Started by Cristian Custodioabout 23 years ago1 messagesgeneral
Jump to latest
#1Cristian Custodio
crstian@terra.com.br

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