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

Commit64fb645

Browse files
committed
Doc: minor clarifications in xindex.sgml.
I noticed some slightly confusing or out-of-date verbiage herewhile working on the window RANGE patch. Seems worth committingseparately.
1 parent4ac583f commit64fb645

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

‎doc/src/sgml/xindex.sgml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,9 @@
458458
<row>
459459
<entry>
460460
Compute the 64-bit hash value for a key given a 64-bit salt; if
461-
the salt is 0, the low 32 bits will match the value that would
462-
have been computed by function 1
461+
the salt is 0, the low 32 bits of the result must match the value
462+
that would have been computed by function 1
463+
(optional)
463464
</entry>
464465
<entry>2</entry>
465466
</row>
@@ -1139,16 +1140,11 @@ ALTER OPERATOR FAMILY integer_ops USING btree ADD
11391140
ordering.
11401141
</para>
11411142

1142-
<para>
1143-
Comparison of arrays of user-defined types also relies on the semantics
1144-
defined by the default B-tree operator class.
1145-
</para>
1146-
11471143
<para>
11481144
If there is no default B-tree operator class for a data type, the system
11491145
will look for a default hash operator class. But since that kind of
1150-
operator class only provides equality,in practiceit is onlyenough
1151-
to support array equality.
1146+
operator class only provides equality, it is onlyable to support grouping
1147+
not sorting.
11521148
</para>
11531149

11541150
<para>
@@ -1168,7 +1164,25 @@ ALTER OPERATOR FAMILY integer_ops USING btree ADD
11681164
</note>
11691165

11701166
<para>
1171-
Another important point is that an operator that
1167+
Sorting by a non-default B-tree operator class is possible by specifying
1168+
the class's less-than operator in a <literal>USING</literal> option,
1169+
for example
1170+
<programlisting>
1171+
SELECT * FROM mytable ORDER BY somecol USING ~&lt;~;
1172+
</programlisting>
1173+
Alternatively, specifying the class's greater-than operator
1174+
in <literal>USING</literal> selects a descending-order sort.
1175+
</para>
1176+
1177+
<para>
1178+
Comparison of arrays of a user-defined type also relies on the semantics
1179+
defined by the type's default B-tree operator class. If there is no
1180+
default B-tree operator class, but there is a default hash operator class,
1181+
then array equality is supported, but not ordering comparisons.
1182+
</para>
1183+
1184+
<para>
1185+
Another important point is that an equality operator that
11721186
appears in a hash operator family is a candidate for hash joins,
11731187
hash aggregation, and related optimizations. The hash operator family
11741188
is essential here since it identifies the hash function(s) to use.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp