Re: Documentation fix on pgbench \aset command - Mailing list pgsql-hackers

From Yugo Nagata
Subject Re: Documentation fix on pgbench \aset command
Date
Msg-id 20250925111224.d1e272c59a5d5375eba213d0@sraoss.co.jp
Whole thread Raw
In response to Re: Documentation fix on pgbench \aset command  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: Documentation fix on pgbench \aset command
List pgsql-hackers
On Mon, 22 Sep 2025 16:19:14 +0900
Fujii Masao <masao.fujii@gmail.com> wrote:

> 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.

Thank you for your suggestion and updating the patch.
I'm fine with your version since it is clearer.

Regards,
Yugo Nagata

-- 
Yugo Nagata <nagata@sraoss.co.jp>



pgsql-hackers by date:

Previous
From: Yugo Nagata
Date:
Subject: Re: Suggestion to add --continue-client-on-abort option to pgbench
Next
From: Yugo Nagata
Date:
Subject: Re: Suggestion to add --continue-client-on-abort option to pgbench