From: Kris Jurka <books@ejurka.com>
To: Michael Paesold <mpaesold@gmx.at>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: JDBC Support for standard_conforming_strings
Date: Mon, 6 Nov 2006 01:36:04 -0500 (EST)
Message-ID: <Pine.BSO.4.63.0611060130450.23864@leary2.csoft.net> (raw)
In-Reply-To: <454E4DA7.8030603@gmx.at>
References: <454E4DA7.8030603@gmx.at>
On Sun, 5 Nov 2006, Michael Paesold wrote:
> Regarding standard_conforming_strings, I am currently reading through the
> code and looking at all places that need to understand string escaping rules.
>
> I have found two issues where I need more advice:
>
> arrays (org.postgresql.jdbc2.AbstractJdbc2Array)
> bytea (org.postgresql.util.PGbytea)
>
> As far as I understand, quoting in arrays and bytea only changes as far as
> the types are passing through the backend parser as string-literals. Correct?
>
> Since the result of AbstractJdbc2Array.toString() and PGbytea.toPGString()
> will be fed to PreparedStatement.setString() in the end, we do not have to
> change the array or bytea code. Is this reasoning valid?
Right. The parameters will either be sent out of line which won't require
escaping or for the V2 path they will be sent in the query, but it isn't
the array or bytea codes' responsibility to escape them correctly. The
code in core.v2.SimpleParameterList@setStringParameter should handle that
for us.
Kris Jurka
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, mpaesold@gmx.at
Subject: Re: JDBC Support for standard_conforming_strings
In-Reply-To: <Pine.BSO.4.63.0611060130450.23864@leary2.csoft.net>
References: <454E4DA7.8030603@gmx.at> <Pine.BSO.4.63.0611060130450.23864@leary2.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