Re: improve PQexec documentation

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: improve PQexec documentation
Дата
Msg-id 20190412131211.GA7287@alvherre.pgsql
обсуждение исходный текст
Ответ на improve PQexec documentation  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: improve PQexec documentation  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
On 2019-Apr-12, Fabien COELHO wrote:

> I'm looking at psql's use of PQexec for implementing some feature.
> 
> When running with multiple SQL commands, the doc is not very helpful.
> 
> From the source code I gathered that PQexec returns the first COPY results
> if any, and if not the last non-empty results, unless all is empty in which
> case an empty result is returned.

I'm not sure we necessarily want to document this behavior.  If it was
super helpful for some reason, or if we thought we would never change
it, then it would make sense to document it in minute detail.  But
otherwise I think documenting it sets a promise that we would (try to)
never change it in the future, which I don't necessarily agree with --
particularly since it's somewhat awkward to use.

I'm inclined to reject this patch.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: Calling pgstat_report_wait_end() before ereport(ERROR)
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: PostgreSQL pollutes the file system