Arrays and foreign keys - Mailing list pgsql-hackers

From Kaare Rasmussen
Subject Arrays and foreign keys
Date
Msg-id 00080822074400.00770@bering
Whole thread Raw
Responses Re: Arrays and foreign keys
List pgsql-hackers
Seems that it's not possible to combine arrays and foreign keys ?

CREATE TABLE table1 (      fld1               integer NOT NULL,      number          integer,      level
integer,PRIMARYKEY (fld1)
 
);

CREATE TABLE table2 (     pkey             integer NOT NULL,     arvar              integer[],PRIMARY KEY
(pkey),FOREIGNKEY (arvar) REFERENCES table1(fld1)
 
);


This works, but the following insert complains that 

ERROR:  Unable to identify an operator '=' for types 'int4' and '_int4'       You will have to retype this query using
anexplicit cast
 

-- 
Kaare Rasmussen            --Linux, spil,--        Tlf:        3816 2582
Kaki Data                tshirts, merchandize      Fax:        3816 2582
Howitzvej 75               �ben 14.00-18.00        Email: kar@webline.dk
2000 Frederiksberg        L�rdag 11.00-17.00       Web:      www.suse.dk


pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: VERY strange query plan (LONG)
Next
From: Stephan Szabo
Date:
Subject: Re: Arrays and foreign keys