Re: Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102
| От | Vladimir Sitnikov |
|---|---|
| Тема | Re: Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102 |
| Дата | |
| Msg-id | CAB=Je-Ea77aCTYVQPURxuDV34099ZotXGstC5kXbvhaLq4yYmQ@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102 (Thomas Kellerer <spam_eater@gmx.net>) |
| Ответы |
Re: Re: 9.4-1207 behaves differently with server side prepared
statements compared to 9.2-1102
Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102 |
| Список | pgsql-jdbc |
The difference is as follows: 1202 can cache across statement.close() calls. 1201 can't do that. In other words, to use server-prepared statements in previous versions, you had to reuse the *same* PreparedStatement *object* again and again. As soon as you issue .close() you lose your shiny server-prepared statement. Typical applications are written in a form of PreparedStatement ps = con.prepareStatement(sql); ps.excuteQuery(); ps.close(); In other words, almost always developers just recreate PreparedStatement and close it. The improvement of 1202 was to identify such patterns and use server-prepared statement in such cases as well. Vladimir
В списке pgsql-jdbc по дате отправления: