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

Bug #840: Query with null string

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Bug #840: Query with null string
Date: 2002-12-06 21:49:15
Message-ID: 20021206214915.42AEC475CBC@postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
Stphane Brub (sirber(at)webernic(dot)com) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Query with null string

Long Description
When I do a query (SELECT or INSERT) with null vars (see example) I get warnings from php:

Warning: pg_query() query failed: ERROR: pg_atoi: zero-length string in /var/www/include/fr/sub/info/news/newdisplay.php on line 27

Warning: pg_fetch_object(): supplied argument is not a valid PostgreSQL result resource in /var/www/include/fr/sub/info/news/newdisplay.php on line 28

because the WHERE was empty. This code worked fine on PostGreSQL 7.2.x. Now I'm on 7.3rel-4.

Any idea?

Thanks

Stphane Brub

Sample Code
SELECT * FROM tbluser WHERE userid = ""


No file was uploaded with this report


Responses

pgsql-bugs by date

Next:From: Stephan SzaboDate: 2002-12-06 21:58:08
Subject: Re: Bug #840: Query with null string
Previous:From: Stéphane BérubéDate: 2002-12-06 21:29:59
Subject: Debian, postgresql 7.3a4

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