ERROR: invalid input syntax for integer: ""

From: "Pit M(dot)" <fmi-soft(at)gmx(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: ERROR: invalid input syntax for integer: ""
Date: 2007-05-23 09:24:12
Message-ID: f3117o$27je$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2007-05-23 13:49:31 Re: ERROR: invalid input syntax for integer: ""
Previous Message Ferdinand 2007-05-23 06:03:05 BUG #3299: pgadmin3 explain partial object name displayed