postgres/contrib/test_decoding
Peter Eisentraut 0f5ade7a36 Fix varatt versus Datum type confusions
Macros like VARDATA() and VARSIZE() should be thought of as taking
values of type pointer to struct varlena or some other related struct.
The way they are implemented, you can pass anything to it and it will
cast it right.  But this is in principle incorrect.  To fix, add the
required DatumGetPointer() calls.  Or in a couple of cases, remove
superfluous PointerGetDatum() calls.

It is planned in a subsequent patch to change macros like VARDATA()
and VARSIZE() to inline functions, which will enforce stricter typing.
This is in preparation for that.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/928ea48f-77c6-417b-897c-621ef16685a6%40eisentraut.org
2025-08-05 12:11:36 +02:00
..
expected Fix re-distributing previously distributed invalidation messages during logical decoding. 2025-06-16 17:36:01 -07:00
specs Fix re-distributing previously distributed invalidation messages during logical decoding. 2025-06-16 17:36:01 -07:00
sql Skip logical decoding of already-aborted transactions. 2025-02-12 16:31:34 -08:00
t Update copyright for 2025 2025-01-01 11:21:55 -05:00
.gitignore Improve isolation tests infrastructure. 2017-03-14 15:56:17 -07:00
logical.conf Stabilize streaming tests in test_decoding. 2022-04-20 08:59:55 +05:30
Makefile Fix typo in test file name added in commit 4909b38af0. 2025-04-25 12:46:02 +05:30
meson.build Fix typo in test file name added in commit 4909b38af0. 2025-04-25 12:46:02 +05:30
test_decoding.c Fix varatt versus Datum type confusions 2025-08-05 12:11:36 +02:00