Re: PreparedStatement parameters and mutable objects

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: PreparedStatement parameters and mutable objects
Дата
Msg-id 1073564452.1662.214.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: PreparedStatement parameters and mutable objects  (Oliver Jowett <oliver@opencloud.com>)
Ответы Re: PreparedStatement parameters and mutable objects  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-jdbc
On Thu, 2004-01-08 at 01:03, Oliver Jowett wrote:
> 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.
defined by who, I meant it was defined in that it didn't have any
surprises. If you implement your idea, then 42,2,3 will be inserted
otherwise 1,2,3

>
>  > 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? :)
I'm saying that doing it this way will likely expose buggy code, which
we will end up having to figure out why it doesn't work, when the user
says "my code used to work, and now it doesn't", plus they don't send us
code to look at.
>
> > 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
>
--
Dave Cramer
519 939 0336
ICQ # 1467551


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

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: PreparedStatement parameters and mutable objects
Следующее
От: "George Lessmann"
Дата:
Сообщение: Re: odd jdbc driver synchronization issue