Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group