Andreas Seltenreich writes:
> Ketema Harris writes:
>
>> If I have a column that is of type int4[] (array of integers) is it possible
>> to require that each integer within that array is a foreign key?
>
> I'm afraid you'll have to define a custom check-constraint to do that.
>
> E.g.
>
[...]
> scratch=# create function valid_array(a int4[]) returns boolean as $$
[...]
...and of course you'll need the appropriate trigger function on the
referenced table to maintain referential integrity, but I hope the
example will get you going.
regards,
Andreas
--