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

Commitfb279fc

Browse files
committed
Use correct symbol for minimum int64 value
The old code used SEQ_MINVALUE to get the smallest int64 value. Thiswas done as a convenience to avoid having to deal with INT64_IS_BUSTED,but that is obsolete now. Also, it is incorrect because the smallestint64 value is actually SEQ_MINVALUE-1. Fix by using PG_INT64_MIN.
1 parent884bae1 commitfb279fc

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

‎contrib/btree_gin/btree_gin.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,7 @@ GIN_SUPPORT(int4, false, leftmostvalue_int4, btint4cmp)
223223
staticDatum
224224
leftmostvalue_int8(void)
225225
{
226-
/*
227-
* Use sequence's definition to keep compatibility.
228-
*/
229-
returnInt64GetDatum(SEQ_MINVALUE);
226+
returnInt64GetDatum(PG_INT64_MIN);
230227
}
231228

232229
GIN_SUPPORT(int8, false,leftmostvalue_int8,btint8cmp)
@@ -250,10 +247,7 @@ GIN_SUPPORT(float8, false, leftmostvalue_float8, btfloat8cmp)
250247
staticDatum
251248
leftmostvalue_money(void)
252249
{
253-
/*
254-
* Use sequence's definition to keep compatibility.
255-
*/
256-
returnInt64GetDatum(SEQ_MINVALUE);
250+
returnInt64GetDatum(PG_INT64_MIN);
257251
}
258252

259253
GIN_SUPPORT(money, false,leftmostvalue_money,cash_cmp)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp