Re: Willing to fix a PQexec() in libpq module

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Willing to fix a PQexec() in libpq module
Дата
Msg-id 20190319170233.bsju6p5tw2anv7q5@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Willing to fix a PQexec() in libpq module  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: Willing to fix a PQexec() in libpq module
Re: Willing to fix a PQexec() in libpq module
Список pgsql-hackers
Hi,

On 2019-03-19 13:59:34 -0300, Alvaro Herrera wrote:
> On 2019-Mar-19, Andres Freund wrote:
> > On 2019-03-19 12:51:39 -0400, Tom Lane wrote:
> > > David Fetter <david@fetter.org> writes:
> > > > I think the answer is "no," and we should deprecate this misfeature.
> > > > It's bad enough that we'll be supporting it for five years after
> > > > deprecating it, but it's worse to leave it hanging around our necks
> > > > forever. https://en.wikipedia.org/wiki/Albatross_(metaphor)
> > > 
> > > The problem with that approach is that not everybody agrees that
> > > it's a misfeature.
> > 
> > Yea, it's extremely useful to just be able to send a whole script to the
> > server. Otherwise every application wanting to do so needs to be able to
> > split SQL statements, not exactly a trivial task. And the result will be
> > slower, due to increased rountrips.
> 
> I suppose it can be argued that for the cases where they want that, it
> is not entirely ridiculous to have it be done with a different API call,
> say PQexecMultiple.

Sure, but what'd the gain be? Using PQexecParams() already enforces that
there's only a single command. Sure, explicit is better than implicit
and all that, but is that justification for breaking a significant
number of applications?

Greetings,

Andres Freund


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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: Willing to fix a PQexec() in libpq module
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Willing to fix a PQexec() in libpq module