Re: BUG #4012: bug in pg_query

From: Bill Moran <wmoran(at)collaborativefusion(dot)com>
To: "Renato Gravino Neto" <renato(dot)gravino(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4012: bug in pg_query
Date: 2008-03-05 18:58:25
Message-ID: 20080305135825.e0313522.wmoran@collaborativefusion.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

In response to "Renato Gravino Neto" <renato(dot)gravino(at)gmail(dot)com>:

>
> The following bug has been logged online:
>
> Bug reference: 4012
> Logged by: Renato Gravino Neto
> Email address: renato(dot)gravino(at)gmail(dot)com
> PostgreSQL version: 8.2.3
> Operating system: Linux 2.6.24.3
> Description: bug in pg_query
> Details:
>
> in pg_query($con,'select * from cliente where age >= 10;');
> translate to select * from cliente where age &gt;= 10
>
> but not execute query

It looks like you're using PHP. I doubt this is a bug in pg_query()
(as I'm using it heavily without problem) but I suspect it's a bug
somewhere else in your code that's mangling the query string prior
to giving it to pg_query().

Please describe the version of PHP you're using, as well as provide
a complete example of code that reproduces the problem. I suspect
that the command
pg_query($con,'select * from cliente where age >= 10;');
is what you're actually executing. I suspect it's something more
like
pg_query($con, $querystring);
and that the actual problem is that $querystring is already broken
before you give it to pg_query().

In any event, it's unlikely that this is a bug in PostgreSQL. If you
can provide a reproducible test case, it's probably a bug in PHP.

--
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/

wmoran(at)collaborativefusion(dot)com
Phone: 412-422-3463x4023

****************************************************************
IMPORTANT: This message contains confidential information and is
intended only for the individual named. If the reader of this
message is not an intended recipient (or the individual
responsible for the delivery of this message to an intended
recipient), please be advised that any re-use, dissemination,
distribution or copying of this message is prohibited. Please
notify the sender immediately by e-mail if you have received
this e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or
error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The
sender therefore does not accept liability for any errors or
omissions in the contents of this message, which arise as a
result of e-mail transmission.
****************************************************************

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Edwin Groothuis 2008-03-05 20:49:22 Re: [BUGS] BUG #3975: tsearch2 index should not bomb out of 1Mb limit
Previous Message Bruce Momjian 2008-03-05 18:36:26 Re: Re: [BUGS] BUG #3965: UNIQUE constraint fails on long column values