Re: ERROR: invalid input syntax for integer: ""

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Pit M(dot)" <fmi-soft(at)gmx(dot)de>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: ERROR: invalid input syntax for integer: ""
Date: 2007-05-23 13:49:31
Message-ID: 19725.1179928171@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Pit M." <fmi-soft(at)gmx(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message filipe paiva 2007-05-23 13:56:29
Previous Message Pit M. 2007-05-23 09:24:12 ERROR: invalid input syntax for integer: ""