Re: Prepared statements considered harmful

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: Prepared statements considered harmful
Дата
Msg-id 87lkp45wyg.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: Prepared statements considered harmful  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: Prepared statements considered harmful
Список pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:

> > Then you would be going very much against the user's expectations. 
> > 
> > Driver interfaces expose very clearly to the user an explicit interface to
> > prepare and execute a query separately. What your proposing is to go behind
> > the user's back and do what he's gone out of his way to tell you not to do.
> > You can always choose to prepare your queries immediately before use. Most
> > drivers even supply an interface to do so in a single step for convenience.
> 
> Is that really so? Under Perl DBI, the only way to get a statement
> handle is to "prepare" it. 

Sure, but you can prepare it right before you use it and throw it away instead
of keeping it around.

The server has to prepare the query sometime. The v3 protocol just gives you
control over when that happens, but it doesn't force you to do it at any
particular time.


-- 
greg



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Win32 hard crash problem
Следующее
От: Dave Page
Дата:
Сообщение: Re: Win32 hard crash problem