On Wed, 23 Oct 2002, Gareth Kirwan wrote:

> Gareth StationeryFurther information:
>
> I've now tried this ( I would have tried it first but the server was having
> it's nappy changed.
> It seems to have a problem with the notion that the individual items of the
> array are the references to the id, rather than the array itself.
> How can I tell it this?
> Am I missing something in the documentation that tells me how to do this?

You can't tell it that. The types on both sides of a foreign key
constraint need to be of comparable types (in this case defined as
having an = operator).  int[] and int aren't comparable.  There's
occasionally been talk about making type[]->type foreign keys
use element in array rather than equality, but since type[] could
be a multidimensional array I'm not sure that's well defined.

> Raw Error:
> ERROR:  Unable to identify an operator '=' for types 'integer[]' and
> 'integer'
>         You will have to retype this query using an explicit cast



---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to