| From: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
|---|---|
| To: | Harald Fuchs <hari(dot)fuchs(at)googlemail(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: 8.2/8.3 incompatibility |
| Date: | 2008-02-07 17:57:53 |
| Message-ID: | 20080207095031.O22500@megazone.bigpanda.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Thu, 7 Feb 2008, Harald Fuchs wrote:
> This works fine in 8.2.4, but 8.3.0 rejects the ALTER TABLE with the
> following (somewhat misleading) error message:
>
> ERROR: insert or update on table "t2" violates foreign key constraint "t2_t1id_fk"
> DETAIL: Key (t1id)=(t1id1) is not present in table "t1".
If the types were considered not comparable, you should have gotten a
message to that effect rather than a not present message. More to the
point that comparison should have succeeded I think. What do the following
give?
select * from t1 where id=CAST('t1id1' as VARCHAR(5));
select * from ONLY t2 fk LEFT OUTER JOIN ONLY t1 pk ON
(pk.id = fk.t1id) WHERE pk.id IS NULL;
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2008-02-07 18:05:19 | Re: Fossology Install & Config Issues... |
| Previous Message | Gregory Stark | 2008-02-07 17:52:55 | Re: 8.2/8.3 incompatibility |