Re: Unable to prepare a statement when the object names contain more than one $ symbol

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: Unable to prepare a statement when the object names contain more than one $ symbol
Дата
Msg-id Pine.BSO.4.64.0710160420230.644@leary.csoft.net
обсуждение исходный текст
Ответ на Re: Unable to prepare a statement when the object names contain more than one $ symbol  (Michael Paesold <mpaesold@gmx.at>)
Ответы Re: Unable to prepare a statement when the object names contain more than one $ symbol  (Michael Paesold <mpaesold@gmx.at>)
Список pgsql-jdbc

On Tue, 10 Jul 2007, Michael Paesold wrote:

> Tom Lane schrieb:
>> Kris Jurka <books@ejurka.com> writes:
>>> On Mon, 9 Jul 2007, Altaf Malik wrote:
>>>> PreparedStatement pstmt = con.prepareStatement("insert into a$b$c values(
>>>> ? , ?)");
>>
>>> This is a bug in dollar quote parsing.  It assumes that any potential
>>> dollar quote start will have an end tag.
>>
>> If it thinks that's a dollar quote start, it's wrong already... that's
>> a perfectly valid table name.  (Although personally I'd suggest that the
>> OP avoid dollar signs in identifiers, since they're none too portable.)
>
> I guess I missed that case when implementing dollar quoting in the driver. I
> will have a look at it shortly.
>

Did you ever get a chance to look at this?  The attached patch fixes the
original complaint by ensuring that the ending tag exists, but as Tom
pointed out that's still not good enough as the second attached test case
demonstrates.

Kris Jurka

Вложения

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: text metadata
Следующее
От: Tore Halset
Дата:
Сообщение: Re: text metadata