Re: PreparedStatement parameters and mutable objects

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: PreparedStatement parameters and mutable objects
Дата
Msg-id 3FFCF2A7.4090807@opencloud.com
обсуждение исходный текст
Ответ на Re: PreparedStatement parameters and mutable objects  (Dave Cramer <pg@fastcrypt.com>)
Ответы Re: PreparedStatement parameters and mutable objects
Список pgsql-jdbc
Dave Cramer wrote:
> Oliver,
>
> while I think the code snippet below has defined behaviour

What is the defined behaviour, then? It's not obvious to me whether
{1,2,3}, {42,2,3}, or a driver-dependent value (i.e. undefined
behaviour) gets inserted.

 > I think it is
> fraught with danger.

Yes :)

> As long as everyone knows that the code does this and writes code that
> does not break then yes it would work, however I don't believe this is
> the case.

I'm not sure what you mean here.

Are you saying that the driver would be incorrect to delay the
conversion, as there is existing (correct) code that expects other
behaviour?

Or are you saying that delaying the conversion is valid, but there is
existing (buggy) code that expects it not to be delayed, and we
shouldn't break that code?

Or something else entirely? :)

> Also reading the spec that you provided, I think the phrase "when it
> sends" refers to the actual conversion that takes place not the specific
> time that it is done.

Yeah .. the spec just doesn't seem to address this area at all.

-O

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

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: getTypeInfo() bug
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: PreparedStatement parameters and mutable objects