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

Commit805f2bb

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 writing out the constantthe long way, as it is done elsewhere in the code.
1 parent16e28fc commit805f2bb

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
@@ -213,10 +213,7 @@ GIN_SUPPORT(int4)
213213
staticDatum
214214
leftmostvalue_int8(void)
215215
{
216-
/*
217-
* Use sequence's definition to keep compatibility.
218-
*/
219-
returnInt64GetDatum(SEQ_MINVALUE);
216+
returnInt64GetDatum(-INT64CONST(0x7FFFFFFFFFFFFFFF)-1);
220217
}
221218
staticTypeInfoTypeInfo_int8= {false,leftmostvalue_int8,btint8cmp};
222219

@@ -243,10 +240,7 @@ GIN_SUPPORT(float8)
243240
staticDatum
244241
leftmostvalue_money(void)
245242
{
246-
/*
247-
* Use sequence's definition to keep compatibility.
248-
*/
249-
returnInt64GetDatum(SEQ_MINVALUE);
243+
returnInt64GetDatum(-INT64CONST(0x7FFFFFFFFFFFFFFF)-1);
250244
}
251245
staticTypeInfoTypeInfo_money= {false,leftmostvalue_money,cash_cmp};
252246

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp