Interest IN problem on 7.4

From: pginfo <pginfo(at)t1(dot)unisoftbg(dot)com>
To: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: Interest IN problem on 7.4
Date: 2003-12-13 07:10:16
Message-ID: 3FDABB58.69A785DA@t1.unisoftbg.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Robert Treat 2003-12-13 14:55:33 Re: Help converting Oracle instead of triggers to PostgreSQL
Previous Message Tomasz Myrta 2003-12-12 21:33:36 Re: Skip dups on INSERT instead of generating an error ...