Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3d71035

Browse files
author
Nikita Glukhov
committed
Fix XXX comment about returning value of HashCompareFunc
1 parent c8d6c9c commit 3d71035

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/backend/utils/adt/jsonb_typanalyze.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,11 @@ typedef struct JsonAnalyzeContext
189189
* JsonPathMatch
190190
* Determine when two JSON paths (list of JsonPathEntry) match.
191191
*
192+
* Returned int instead of bool, because it is an implementation of
193+
* HashCompareFunc.
194+
*
192195
* XXX Sould be JsonPathEntryMatch as it deals with JsonPathEntry nodes
193196
* not whole paths, no?
194-
*
195-
* XXX Seems a bit silly to return int, when the return statement only
196-
* really returns bool (because of how it compares paths). It's not really
197-
* a comparator for sorting, for example.
198197
*/
199198
static int
200199
JsonPathMatch(const void *key1, const void *key2, Size keysize)

0 commit comments

Comments
 (0)