Re: WAIT FOR NO_THROW option could use some documentation - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: WAIT FOR NO_THROW option could use some documentation
Date
Msg-id 7c60d54c-7640-43f5-8bbf-6df789406e6d@eisentraut.org
Whole thread
Responses Re: PGQ catalog representation and pg_dump support
List pgsql-hackers
On 01.09.26 08:28, Xuneng Zhou wrote:
> 'NO_THROW' was added to make those statuses available for ordinary
> application control flow. Without it, 'timeout' and 'not in recovery'
> are raised as SQL errors. With it, they are returned as status values,
> allowing the application to retry, report replication lag, refresh its
> routing information, or direct a subsequent read to the primary. In
> that sense, 'NO_THROW' selects how these expected wait outcomes are
> reported: through the error channel or through the result row.

This just explains the technical distinction, not why it's needed. 
Applications or client frameworks could just as well inspect an error 
return with for example an appropriate error code.  That's what they'd d 
for any other command.



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: auto-vectorize varbit bitwise operators
Next
From: Sami Imseih
Date:
Subject: Re: PGQ catalog representation and pg_dump support