projects
/
users
/
andresfreund
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f18451
)
Note on binary search
author
Peter Geoghegan
<
[email protected]
>
Wed, 12 Mar 2014 02:33:03 +0000
(19:33 -0700)
committer
Peter Geoghegan
<
[email protected]
>
Wed, 12 Mar 2014 02:33:03 +0000
(19:33 -0700)
src/backend/utils/adt/jsonb_support.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/adt/jsonb_support.c
b/src/backend/utils/adt/jsonb_support.c
index 5428e5a9ec0bf0b3f7bcebb2cd5e4733becc4b95..828a56830067a539932c307f8ec8ae7d54683459 100644
(file)
--- a/
src/backend/utils/adt/jsonb_support.c
+++ b/
src/backend/utils/adt/jsonb_support.c
@@
-140,6
+140,8
@@
JsonbValueToJsonb(JsonbValue * v)
*
* This is a special qsort_arg() comparator used to sort strings in certain
* internal contexts where it is sufficient to have a well-defined sort order.
+ * In particular, objects are sorted according to this criteria to facilitate
+ * cheap binary searches where we don't care about lexical sort order.
*
* a and b are first sorted based on their length. If a tie-breaker is
* required, only then do we consider string binary equality.