Re: plpgsql function, comment with single quote, braces

From: David Johnston <polobo(at)yahoo(dot)com>
To: Роман Литовченко <roman(dot)lytovchenko(at)gmail(dot)com>
Cc: Florent Guillaume <fg(at)nuxeo(dot)com>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: plpgsql function, comment with single quote, braces
Date: 2012-01-20 14:22:43
Message-ID: 85EA3C73-B498-4D36-B2FF-DB51240B00FA@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Jan 20, 2012, at 8:33, Роман Литовченко <roman(dot)lytovchenko(at)gmail(dot)com> wrote:

>> Otherwise what's the problem if you just deactivate escape processing?
>
> Because it is alogical.
> I follow Postgresql documentation for writing sql code. I want to
> write comments in functions. I want to write braces in literals.
>
> Сan one of the developers answer me or register this bug?
>

Speaking without full knowledge here but...

This has nothing to do with PostgreSQL; in fact the database never even sees the original form of the query. In order to facilitate portability ODBC and JDBC have internal escape sequences for certain things. In this case you want to bypass that escaping and supply the raw SQL to the server and thus you need to follow the suggestion and turn off escape processing. If you do this and the problem does not go away then there is a bug otherwise things are working logically and as intended.

If you still do not like the solution take it up with the JDBC specification writers; the people on this mailing list are just following instructions.

David J.

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Vitalii Tymchyshyn 2012-01-20 14:50:08 Re: NIO support
Previous Message Dave Cramer 2012-01-20 14:06:35 Re: NIO support