From 5e45211a64149b3c659b90ff2de6fa982a5a93ed Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 14:17:33 +0200 Subject: Adding upstream version 15.5. Signed-off-by: Daniel Baumann --- doc/src/sgml/html/indexes-collations.html | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 doc/src/sgml/html/indexes-collations.html (limited to 'doc/src/sgml/html/indexes-collations.html') diff --git a/doc/src/sgml/html/indexes-collations.html b/doc/src/sgml/html/indexes-collations.html new file mode 100644 index 0000000..32221f1 --- /dev/null +++ b/doc/src/sgml/html/indexes-collations.html @@ -0,0 +1,31 @@ + +11.11. Indexes and Collations

11.11. Indexes and Collations

+ An index can support only one collation per index column. + If multiple collations are of interest, multiple indexes may be needed. +

+ Consider these statements: +

+CREATE TABLE test1c (
+    id integer,
+    content varchar COLLATE "x"
+);
+
+CREATE INDEX test1c_content_index ON test1c (content);
+

+ The index automatically uses the collation of the + underlying column. So a query of the form +

+SELECT * FROM test1c WHERE content > constant;
+

+ could use the index, because the comparison will by default use the + collation of the column. However, this index cannot accelerate queries + that involve some other collation. So if queries of the form, say, +

+SELECT * FROM test1c WHERE content > constant COLLATE "y";
+

+ are also of interest, an additional index could be created that supports + the "y" collation, like this: +

+CREATE INDEX test1c_content_y_index ON test1c (content COLLATE "y");
+

+

\ No newline at end of file -- cgit v1.2.3