Following query fails in pgAdmin which is OK because the field PLZZ contains characters:

select * from "PERSONEN" where (CAST("PERSONEN"."PLZZ" AS INTEGER) >= 70000 );

but if using the same query with a cursor ist works:

START TRANSACTION;

DECLARE c21112234 SCROLL CURSOR FOR select * from "PERSONEN" where (CAST("PERSONEN"."PLZZ" AS INTEGER) >= 70000;

COMMIT;


Why??
In my opinion this query should also fail with cursors.


I use libpq with PG 8.2.1.
The field PLZZ is of type varchar.

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

Reply via email to