Re: ERROR: invalid input syntax for integer: "" - Mailing list pgsql-bugs

From Tom Lane
Subject Re: ERROR: invalid input syntax for integer: ""
Date
Msg-id 19725.1179928171@sss.pgh.pa.us
Whole thread Raw
In response to ERROR: invalid input syntax for integer: ""  ("Pit M." <fmi-soft@gmx.de>)
Responses Re: ERROR: invalid input syntax for integer: ""  ("Pit M." <fmi-soft@gmx.de>)
List pgsql-bugs
"Pit M." <fmi-soft@gmx.de> writes:
> 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;

> In my opinion this query should also fail with cursors.

It would have failed if you had run the cursor far enough to fetch one
of the bad rows.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Pit M."
Date:
Subject: ERROR: invalid input syntax for integer: ""
Next
From: Joshua Kramer
Date:
Subject: Re: [ADMIN]