Re: CVS JDBC driver will try to use server-side-prepare on unpreparable SQL
От | Tom Lane |
---|---|
Тема | Re: CVS JDBC driver will try to use server-side-prepare on unpreparable SQL |
Дата | |
Msg-id | 18109.1060956393@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | CVS JDBC driver will try to use server-side-prepare on unpreparable SQL (Oliver Jowett <oliver@opencloud.com>) |
Ответы |
Re: CVS JDBC driver will try to use server-side-prepare on
|
Список | pgsql-jdbc |
Oliver Jowett <oliver@opencloud.com> writes: > It looks like the driver is trying to use server-side prepare on SQL that it > won't work on: Note that if you use the new-protocol Parse message, you can prepare any SQL command. I was thinking yesterday that it would not take very much more work to make the PREPARE SQL command accept any SQL command after it, too. But that's close enough to a new feature that I wasn't gonna do it for 7.4. If you feel it's important for the JDBC driver then we can talk about it. (Neither of these things would help you on a pre-7.4 server, of course, so maybe you need a different approach anyhow.) > Should we only be doing PREPARE on queries that are known to be safe (e.g. > single-statement SELECTs), or is it better to try to catch the errors and > abandon the prepare? (more general, but sounds a bit hairy). Uh, don't you have to be prepared to catch errors in PREPARE anyway? What if the command is syntactically or semantically wrong? regards, tom lane
В списке pgsql-jdbc по дате отправления: