Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit97969a6

Browse files
author
Nikita Glukhov
committed
Fix PG_FREE_IF_COPY() macro for expanded objects
1 parent5f4e1b2 commit97969a6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/include/fmgr.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,9 @@ extern struct varlena *pg_detoast_datum_packed(struct varlena * datum);
226226
*/
227227
#definePG_FREE_IF_COPY(ptr,n) \
228228
do { \
229-
if ((Pointer) (ptr) != PG_GETARG_POINTER(n)) \
229+
if ((Pointer) (ptr) != PG_GETARG_POINTER(n) && \
230+
(!VARATT_IS_EXTERNAL_EXPANDED(PG_GETARG_POINTER(n)) || \
231+
(Pointer) DatumGetEOHP(PG_GETARG_DATUM(n)) != (Pointer)(ptr))) \
230232
pfree(ptr); \
231233
} while (0)
232234

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp