Re: why not type casting by default in prepared statements?
От | Harald Krake |
---|---|
Тема | Re: why not type casting by default in prepared statements? |
Дата | |
Msg-id | 200211161923.01447.harald@krake.de обсуждение исходный текст |
Ответ на | Re: why not type casting by default in prepared statements? (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-jdbc |
On Saturday 16 November 2002 05:20 pm, Tom Lane wrote: > This has been suggested, and rejected, repeatedly. ah! Sorry for the post. Obviously I used the wrong patterns searching through the archives. > It's not a good idea to apply a driver-side band-aid to mask a > server-side problem; agreed. > In other words, any driver-side solution > will fix some queries and break others. imho it will only break queries written by "postgres-aware" programmers. I suppose, most of the java/jdbc code written for other databases does not contain any casts (in prepared statements) because the programmers leave that up to the server backend and/or the driver. And if you look at setString(), even the postgres driver casts, respectively quotes. What happens if someone tries to move from XY-DB to postgres -- like me -- is that postgres performs very bad compared to XY-DB und thus might be considered as slow, which it isn't. In my case postgres now outperforms the former commercial database significantly (approx. 3-5 times faster!). > There will be a real solution in the backend someday soon, perhaps 7.4. until then, what about a switch, for instance as an option to the url, for those who don't want to change their code? (like me ;-) regards, harald.
В списке pgsql-jdbc по дате отправления: