Array like a foreign key

From: "Cristian Custodio" <crstian(at)terra(dot)com(dot)br>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Array like a foreign key
Date: 2003-03-03 20:53:45
Message-ID: 001201c2e1c6$fe930f60$fb01a8c0@ttcristian
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2003-03-03 20:54:17 Re: almost there on a design
Previous Message Greg Stark 2003-03-03 20:36:32 Re: transparent use of pre-aggregated value for very large datasets