summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Herrera2008-04-27 04:33:27 +0000
committerAlvaro Herrera2008-04-27 04:33:27 +0000
commitbbe8b32d65ae368289f7c59764b6db326b67e252 (patch)
tree2c19491b9123694fd9978efc505d7c95085a75cf
parentf0e51a6a10d9fe2f86e19d7797828b1274ea6b11 (diff)
Add SGML ID attributes to the arrays subsections, and a few index entries for
them.
-rw-r--r--doc/src/sgml/array.sgml37
1 files changed, 31 insertions, 6 deletions
diff --git a/doc/src/sgml/array.sgml b/doc/src/sgml/array.sgml
index caea47c802..6601cbaa8d 100644
--- a/doc/src/sgml/array.sgml
+++ b/doc/src/sgml/array.sgml
@@ -15,9 +15,14 @@
Arrays of domains are not yet supported.
</para>
- <sect2>
+ <sect2 id="arrays-declaration">
<title>Declaration of Array Types</title>
+ <indexterm>
+ <primary>array</primary>
+ <secondary>declaration</secondary>
+ </indexterm>
+
<para>
To illustrate the use of array types, we create this table:
<programlisting>
@@ -77,7 +82,7 @@ CREATE TABLE tictactoe (
</para>
</sect2>
- <sect2>
+ <sect2 id="arrays-input">
<title>Array Value Input</title>
<indexterm>
@@ -189,9 +194,14 @@ ERROR: multidimensional arrays must have array expressions with matching dimens
</para>
</sect2>
- <sect2>
+ <sect2 id="arrays-accessing">
<title>Accessing Arrays</title>
+ <indexterm>
+ <primary>array</primary>
+ <secondary>accessing</secondary>
+ </indexterm>
+
<para>
Now, we can run some queries on the table.
First, we show how to access a single element of an array at a time.
@@ -315,9 +325,14 @@ SELECT array_upper(schedule, 1) FROM sal_emp WHERE name = 'Carol';
</para>
</sect2>
- <sect2>
+ <sect2 id="arrays-modifying">
<title>Modifying Arrays</title>
+ <indexterm>
+ <primary>array</primary>
+ <secondary>modifying</secondary>
+ </indexterm>
+
<para>
An array value can be replaced completely:
@@ -489,9 +504,14 @@ SELECT array_cat(ARRAY[5,6], ARRAY[[1,2],[3,4]]);
</para>
</sect2>
- <sect2>
+ <sect2 id="arrays-searching">
<title>Searching in Arrays</title>
+ <indexterm>
+ <primary>array</primary>
+ <secondary>searching</secondary>
+ </indexterm>
+
<para>
To search for a value in an array, you must check each value of the
array. This can be done by hand, if you know the size of the array.
@@ -533,9 +553,14 @@ SELECT * FROM sal_emp WHERE 10000 = ALL (pay_by_quarter);
</tip>
</sect2>
- <sect2>
+ <sect2 id="arrays-io">
<title>Array Input and Output Syntax</title>
+ <indexterm>
+ <primary>array</primary>
+ <secondary>I/O</secondary>
+ </indexterm>
+
<para>
The external text representation of an array value consists of items that
are interpreted according to the I/O conversion rules for the array's