postgresql/src
Tom Lane bd037dc928 Make XLogRecGetBlockTag() throw error if there's no such block.
All but a few existing callers assume without checking that this
function succeeds.  While it probably will, that's a poor excuse for
not checking.  Let's make it return void and instead throw an error
if it doesn't find the block reference.  Callers that actually need
to handle the no-such-block case must now use the underlying function
XLogRecGetBlockTagExtended.

In addition to being a bit less error-prone, this should also serve
to suppress some Coverity complaints about XLogRecGetBlockRefInfo.

While at it, clean up some inconsistency about use of the
XLogRecHasBlockRef macro: make XLogRecGetBlockTagExtended use
that instead of open-coding the same condition, and avoid calling
XLogRecHasBlockRef twice in relevant code paths.  (That is,
calling XLogRecHasBlockRef followed by XLogRecGetBlockTag is now
deprecated: use XLogRecGetBlockTagExtended instead.)

Patch HEAD only; this doesn't seem to have enough value to consider
a back-branch API break.

Discussion: https://postgr.es/m/425039.1649701221@sss.pgh.pa.us
2022-04-11 17:43:53 -04:00
..
backend Make XLogRecGetBlockTag() throw error if there's no such block. 2022-04-11 17:43:53 -04:00
bin Make XLogRecGetBlockTag() throw error if there's no such block. 2022-04-11 17:43:53 -04:00
common Add color support for new frontend detail/hint messages 2022-04-11 17:36:44 +02:00
fe_utils Improve frontend error logging style. 2022-04-08 14:55:14 -04:00
include Make XLogRecGetBlockTag() throw error if there's no such block. 2022-04-11 17:43:53 -04:00
interfaces libpq: Fix pkg-config without OpenSSL 2022-04-01 17:15:24 +02:00
makefiles Refactor DLSUFFIX handling 2022-03-25 08:56:02 +01:00
pl Keep plpgsql.h C++-clean. 2022-03-31 18:29:10 -04:00
port Simplify coding around path_contains_parent_reference(). 2022-01-31 13:53:38 -05:00
template Refactor DLSUFFIX handling 2022-03-25 08:56:02 +01:00
test Add timestamp and elapsed time decorations to TAP test logs 2022-04-10 09:19:09 -04:00
timezone Update copyright for 2022 2022-01-07 19:04:57 -05:00
tools Avoid re-writing files unnecessarily in src/tools/copyright.pl. 2022-04-11 11:20:20 -04:00
tutorial Update copyright for 2022 2022-01-07 19:04:57 -05:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Update Unicode data to CLDR 41 2022-04-06 08:17:33 +02:00
Makefile.shlib AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS. 2021-09-06 11:27:59 -07:00
nls-global.mk Improve frontend error logging style. 2022-04-08 14:55:14 -04:00