Re: Paranthesis and Driver JDBC

From: Thomas Burdairon <tburdairon(at)entelience(dot)com>
To: Albert <alberto(dot)molteni(at)libero(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Paranthesis and Driver JDBC
Date: 2007-03-28 12:28:01
Message-ID: 97E782A8-A0A2-4785-B813-99E1D045B245@entelience.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Alberto

You should upgrade to the most recent version of the jdbc driver :

see the change log details ( http://jdbc.postgresql.org/
changes.html#version_8.0-315 )

> When performing replace processing we must continue processing
> until we hit the end of a user supplied query, not just once we've
> detected the end of a valid query. Consider the example: SELECT a
> FROM t WHERE (1>0)) ORDER BY a; We must send the whole query to the
> backend, not just the section before the last closing parenthesis.
> (jurka) Thanks to Senden Kris.

Thomas

On Mar 28, 2007, at 14:02, Albert wrote:

> Hi all!
>
> I use postgresql 8.0 and its driver for JDBC.A strange thing happens:
> when my application creates a query it is created always with a
> parenthesis more than expected, that is a query like this one:
>
> SELECT * FROM table_x WHERE (table_x.afield='a' and
> table_x.bfield='b')) order by table_x.a
>
> This query is NOT executed using pgadmin, which detects the error, but
> this does not happen in the application : the query isexecuted and the
> correct resultis sent back by the database.
>
> Is there some functionality in the driver that permits the correction
> of this type of error? How could you explain this behaviour?
>
> Thanks!
>
>
> Alberto
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ferdinand Gassauer 2007-03-28 12:50:58 coalesce for null AND empty strings
Previous Message Albert 2007-03-28 12:02:57 Paranthesis and Driver JDBC