Soft errors and ThrowErrorData() comment updates

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Soft errors and ThrowErrorData() comment updates
Date: 2024-10-16 20:19:53
Message-ID: 901ab7cf01957f92ea8b30b6feeb0eacfb7505fc.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The comments around ThrowErrorData() and how it might apply to soft
errors is slightly confusing. Attached a patch which hopefully
clarifies things.

From a distance, ThrowErrorData() is somewhat like ReThrowError(), but
it's actually quite different. The former is expecting a free-standing
ErrorData that hasn't been processed at all; while the latter is for an
ERROR specifically, for which errstart() and errfinish() have already
been called.

We also might consider adding some asserts.

Regards,
Jeff Davis

Attachment Content-Type Size
v1-0001-Improve-ThrowErrorData-comments-for-use-with-soft.patch text/x-patch 2.5 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2024-10-16 20:39:01 Re: POC, WIP: OR-clause support for indexes
Previous Message Masahiko Sawada 2024-10-16 19:25:40 Re: Using per-transaction memory contexts for storing decoded tuples