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

Commit737cdc2

Browse files
committed
Fix bogus return macros in range_overright_internal().
PG_RETURN_BOOL() should only be used in functions following the V1 SQLfunction API. This coding accidentally fails to fail since letting thecompiler coerce the Datum representation of bool back to plain booldoes give the right answer; but that doesn't make it a good idea.Back-patch to older branches just to avoid unnecessary code divergence.
1 parenta068b5b commit737cdc2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/backend/utils/adt/rangetypes.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -917,12 +917,12 @@ range_overright_internal(TypeCacheEntry *typcache, RangeType *r1, RangeType *r2)
917917

918918
/* An empty range is neither before nor after any other range */
919919
if (empty1||empty2)
920-
PG_RETURN_BOOL(false);
920+
returnfalse;
921921

922922
if (range_cmp_bounds(typcache,&lower1,&lower2) >=0)
923-
PG_RETURN_BOOL(true);
923+
returntrue;
924924

925-
PG_RETURN_BOOL(false);
925+
returnfalse;
926926
}
927927

928928
/* does not extend to left of? */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp