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

Commit6ad2532

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 parentc5e2333 commit6ad2532

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
@@ -912,12 +912,12 @@ range_overright_internal(TypeCacheEntry *typcache, RangeType *r1, RangeType *r2)
912912

913913
/* An empty range is neither before nor after any other range */
914914
if (empty1||empty2)
915-
PG_RETURN_BOOL(false);
915+
returnfalse;
916916

917917
if (range_cmp_bounds(typcache,&lower1,&lower2) >=0)
918-
PG_RETURN_BOOL(true);
918+
returntrue;
919919

920-
PG_RETURN_BOOL(false);
920+
returnfalse;
921921
}
922922

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp