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

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: (view raw, whole thread or download thread mbox)
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

pgsql-jdbc by date

Next:From: Vitalii TymchyshynDate: 2012-01-20 14:50:08
Subject: Re: NIO support
Previous:From: Dave CramerDate: 2012-01-20 14:06:35
Subject: Re: NIO support

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