pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Роман Литовченко <roman.lytovchenko@gmail.com>
Cc: pgsql-jdbc@postgresql.org, Florent Guillaume <fg@nuxeo.com>
Cc: polobo@yahoo.com
Subject: Re: plpgsql function, comment with single quote, braces
Date: Fri, 20 Jan 2012 14:25:52 -0500 (EST)
Message-ID: <alpine.BSO.2.00.1201201414330.3468@leary.csoft.net> (raw)
In-Reply-To: <CALvaytnDOC+6tv1Hm8XEvG9eW8EP_vGF7uVQ6aeCZObEgoHrNw@mail.gmail.com>
References: <CALvaytkAZW2xPy4tGQms8HqUamWBwg904XKEXrH86VtRXgwR6w@mail.gmail.com>
	<011b01ccd630$c00a3350$401e99f0$@yahoo.com>
	<CALvaytn0xA7XCSzBdiPd8UraAe0ML4GFU_T4Kz4MkHo=zsuOrg@mail.gmail.com>
	<CALvayt=SeTnyO7Y=LY5muZjd2hQJHyunfJLa+LGm+9fA0D7V-Q@mail.gmail.com>
	<CAF-4BpO=i3C4JTNimH=c_HffZc-sHBVy4NYLyFo1drHdJdsq5A@mail.gmail.com>
	<CALvaytnDOC+6tv1Hm8XEvG9eW8EP_vGF7uVQ6aeCZObEgoHrNw@mail.gmail.com>



On Fri, 20 Jan 2012, ????? ?????????? wrote:

> [simple example code]
> 
> What about these?
> 

Yes, this is a bug.  The escape processor is getting confused about what 
it should process and is incorrectly modifying your code.  Escape 
processing should only occur in a raw SQL, never within a literal value.  
The escape processor should skip over the entire function body because it 
is within dollar quotes and is a literal, but it doesn't understand dollar 
quotes so it is examining the contents and is getting further confused by 
the single quotes within it.

The parameter locating code (looking for ?) knows about dollar quotes, so 
it would be nice to unify with that instead of having two partial query 
parsers.

Kris Jurka



view thread (9+ messages)

Message-ID: <alpine.BSO.2.00.1201201414330.3468@leary.csoft.net>
Permalink:  ../alpine.BSO.2.00.1201201414330.3468@leary.csoft.net/
Also on:    postgresql.org/message-id/alpine.BSO.2.00.1201201414330.3468@leary.csoft.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: books@ejurka.com, roman.lytovchenko@gmail.com, fg@nuxeo.com, polobo@yahoo.com
  Subject: Re: plpgsql function, comment with single quote, braces
  In-Reply-To: <alpine.BSO.2.00.1201201414330.3468@leary.csoft.net>
  References: <CALvaytkAZW2xPy4tGQms8HqUamWBwg904XKEXrH86VtRXgwR6w@mail.gmail.com> <011b01ccd630$c00a3350$401e99f0$@yahoo.com> <CALvaytn0xA7XCSzBdiPd8UraAe0ML4GFU_T4Kz4MkHo=zsuOrg@mail.gmail.com> <CALvayt=SeTnyO7Y=LY5muZjd2hQJHyunfJLa+LGm+9fA0D7V-Q@mail.gmail.com> <CAF-4BpO=i3C4JTNimH=c_HffZc-sHBVy4NYLyFo1drHdJdsq5A@mail.gmail.com> <CALvaytnDOC+6tv1Hm8XEvG9eW8EP_vGF7uVQ6aeCZObEgoHrNw@mail.gmail.com> <alpine.BSO.2.00.1201201414330.3468@leary.csoft.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox