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

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

pgsql-bugs by date

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

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