Re: [GENERAL] 8.2/8.3 incompatibility

2008-02-08 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, Stephan Szabo <[EMAIL PROTECTED]> writes: > 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 forei

Re: [GENERAL] 8.2/8.3 incompatibility

2008-02-07 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > The query r_triggers.c is executing is (after simplifying a bit): >SELECT * > FROM t2 fk > LEFT OUTER JOIN t1 pk ON ( pk.id = fk.t1id::character) > WHERE pk.id IS NULL > AND fk.t1id IS NOT NULL > Note the cast. Real

Re: [GENERAL] 8.2/8.3 incompatibility

2008-02-07 Thread Stephan Szabo
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 presen

Re: [GENERAL] 8.2/8.3 incompatibility

2008-02-07 Thread Gregory Stark
"Harald Fuchs" <[EMAIL PROTECTED]> writes: > (Note the different column types.) > > 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" >

Re: [GENERAL] 8.2/8.3 incompatibility

2008-02-07 Thread Tom Lane
"Gregory Williamson" <[EMAIL PROTECTED]> writes: > Harald, >> (Note the different column types.) > Precisely -- there are a number of casts that have been removed from > this release. This isn't a casting problem, I don't think. 8.3 is definitely stricter about implicit casts with FKs, eg try ad

Re: [GENERAL] 8.2/8.3 incompatibility

2008-02-07 Thread Gregory Williamson
Harald, > > I've found an incompatibility between PostgreSQL 8.2.4 and 8.3.0 which > is not clearly documented. Here's a short example: <...> > > (Note the different column types.) > Precisely -- there are a number of casts that have been removed from this release. You can find details in t

[GENERAL] 8.2/8.3 incompatibility

2008-02-07 Thread Harald Fuchs
I've found an incompatibility between PostgreSQL 8.2.4 and 8.3.0 which is not clearly documented. Here's a short example: CREATE TABLE t1 ( id CHAR(5) NOT NULL, PRIMARY KEY (id) ); INSERT INTO t1 (id) VALUES ('t1id1'); INSERT INTO t1 (id) VALUES ('t1id2'); INSERT INTO t1 (id) V