From: Michael Paesold <mpaesold@gmx.at>
To: pgsql-jdbc@postgresql.org
Cc: Dave Cramer <pg@fastcrypt.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement fails
Date: Tue, 03 Oct 2006 23:47:02 +0200
Message-ID: <4522DA56.4070105@gmx.at> (raw)
In-Reply-To: <451FC6CD.6060904@gmx.at>
References: <53F8133C991FEC4BA0872D19BAD9694C3B6A70@ADV-SBS.advestigo.loc>
<451BAE61.6070802@gmx.at>
<11DE4B3E-F76F-42C8-A5A6-2C63E14458AD@fastcrypt.com>
<451EBBCF.1030902@gmx.at>
<451FC6CD.6060904@gmx.at>
Michael Paesold wrote:
> Here is a first version of the patch. It works well for me so far, so
> I am asking for comments now.
Before everyone forgets about my patch in the discussion about the later
patch by Jure Koren...
I have already spent some hours on doing research, coding, creating the
test case. So I am willing to improve my work, of course. It just much
easier with input from the community. I would really welcome any
suggestions or criticism.
While at it, don't you think that we should handle SQL comments in
parseQuery? For example when loading a schema from a file using JDBC,
there might be comments in it that will break the current code. Does the
JDBC spec say anything about that matter?
One other thing that I wanted to try is to not parse the whole query in
a single loop, but instead split up the parsing a bit more, in the style of:
case '"': scan for next '"';
case '\'': scan for matching '\'';
case '$': if dollar-quote, scan for end of dollar-quote
It would simplify the other branches of the switch statement and we
could get rid of the if (!in... && !in...) stuff, then.
Do you think that would be an improvement?
Best Regards
Michael Paesold
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: mpaesold@gmx.at, pg@fastcrypt.com, tgl@sss.pgh.pa.us
Subject: Re: [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement fails
In-Reply-To: <4522DA56.4070105@gmx.at>
References: <53F8133C991FEC4BA0872D19BAD9694C3B6A70@ADV-SBS.advestigo.loc> <451BAE61.6070802@gmx.at> <11DE4B3E-F76F-42C8-A5A6-2C63E14458AD@fastcrypt.com> <451EBBCF.1030902@gmx.at> <451FC6CD.6060904@gmx.at> <4522DA56.4070105@gmx.at>
* 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