Re: Documentation fix on pgbench \aset command

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: Documentation fix on pgbench \aset command
Дата
Msg-id CAHGQGwGY+0QnDU2at3FmnX8PE_1ZXu+7m2zkwUg4augMWHsgNg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Documentation fix on pgbench \aset command  (Yugo Nagata <nagata@sraoss.co.jp>)
Ответы Re: Documentation fix on pgbench \aset command
Список pgsql-hackers
On Fri, Jun 27, 2025 at 10:37 AM Yugo Nagata <nagata@sraoss.co.jp> wrote:
> This will work if we assume that the query never returns the initial value.
> I've attached a updated patch that fix the documentation as below:
>
>  If a query returns no rows, no assignment is made. You can detect
>  this by initializing the variable beforehand with a value that the query is
>  assumed never to return, and then checking whether it changes.

Thanks for updating the patch!

While reviewing the descriptions for \gset and \aset, I noticed they're listed
as a single term. I think it would be clearer to list them separately.
Also, there's no explanation of what happens if the query with \gset returns
zero or multiple rows, so I'd like to add that too. Thought?

I've attached an updated version of the patch with these changes applied.

Regards,

--
Fujii Masao

Вложения

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