Interest IN problem on 7.4 - Mailing list pgsql-sql

From pginfo
Subject Interest IN problem on 7.4
Date
Msg-id 3FDABB58.69A785DA@t1.unisoftbg.com
Whole thread Raw
Responses Re: Interest IN problem on 7.4  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-sql
Hi,

I am using pg 7.4.

Pls, see this test:

tt07=# update a_cars set dog_or_free=0 where virtualen=0 and
dog_or_free=4 and ids NOT IN ( select oc.ids_car_real from a_oferti_cars
oc,a_oferti o where oc.IDS_oferti=o.ids  and o.date_valid>=9964)   AND
IDS = 'SOF_9989';
UPDATE 0
tt07=# update a_cars set dog_or_free=0 where virtualen=0 and
dog_or_free=4 and ids IN ( select oc.ids_car_real from a_oferti
_cars oc,a_oferti o where oc.IDS_oferti=o.ids  and o.date_valid>=9964)
AND IDS = 'SOF_9989';
UPDATE 0
tt07=# update a_cars set dog_or_free=0 where virtualen=0 and
dog_or_free=4 and ids NOT IN ( select oc.ids_car_real from a_oferti_cars
oc,a_oferti o where oc.IDS_oferti=o.ids  and o.date_valid>=9964 AND
OC.IDS_CAR_REAL IS NOT NULL)   AND IDS = 'SOF_9989';
UPDATE 1

I think IN is not working correct in this case.

In my case A_CARS.IDS is name and also OC.IDS_CAR_REAL.

It is interest that the last update is working well and the first one
not.

Pls, comment this problem.

regards,
ivan.



pgsql-sql by date:

Previous
From: Tomasz Myrta
Date:
Subject: Re: Skip dups on INSERT instead of generating an error ...
Next
From: Robert Treat
Date:
Subject: Re: Help converting Oracle instead of triggers to PostgreSQL