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

Commit327b257

Browse files
committed
Improve comment.
1 parent4448917 commit327b257

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎contrib/btree_gin/btree_gin.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,10 +394,11 @@ static TypeInfo TypeInfo_varbit = {true, leftmostvalue_varbit, bitcmp};
394394
GIN_SUPPORT(varbit)
395395

396396
/*
397-
* Numeric type hasn't applicable left-most value, so NULL
398-
* is used for that. NULL will never be an argument for a C-level
399-
* numeric function except gin_numeric_cmp and it will not be stored
400-
* somewhere and it could not be returned in any user SQL query.
397+
* Numeric type hasn't a real left-most value, so we use PointerGetDatum(NULL)
398+
* (*not* a SQL NULL) to represent that. We can get away with that because
399+
* the value returned by our leftmostvalue function will never be stored in
400+
* the index nor passed to anything except our compare and prefix-comparison
401+
* functions. The same trick could be used for other pass-by-reference types.
401402
*/
402403

403404
#defineNUMERIC_IS_LEFTMOST(x)((x) == NULL)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp