aboutsummaryrefslogtreecommitdiff
path: root/doc/src/sgml/array.sgml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/sgml/array.sgml')
-rw-r--r--doc/src/sgml/array.sgml11
1 files changed, 5 insertions, 6 deletions
diff --git a/doc/src/sgml/array.sgml b/doc/src/sgml/array.sgml
index 4f57f2f0e28..a6ea373d2a0 100644
--- a/doc/src/sgml/array.sgml
+++ b/doc/src/sgml/array.sgml
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/array.sgml,v 1.12 2001/09/09 17:21:44 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/array.sgml,v 1.13 2001/11/03 21:42:47 tgl Exp $ -->
<chapter id="arrays">
<title>Arrays</title>
@@ -23,15 +23,15 @@ CREATE TABLE sal_emp (
<structname>sal_emp</structname> with a <type>text</type> string
(<structfield>name</structfield>), a one-dimensional array of type
<type>integer</type> (<structfield>pay_by_quarter</structfield>),
- which shall represent the employee's salary by quarter, and a
+ which represents the employee's salary by quarter, and a
two-dimensional array of <type>text</type>
(<structfield>schedule</structfield>), which represents the
employee's weekly schedule.
</para>
<para>
- Now we do some <command>INSERT</command>s; note that when appending
- to an array, we enclose the values within braces and separate them
+ Now we do some <command>INSERT</command>s. Observe that to write an array
+ value, we enclose the element values within braces and separate them
by commas. If you know C, this is not unlike the syntax for
initializing structures.
@@ -200,8 +200,7 @@ SELECT * FROM sal_emp WHERE pay_by_quarter[1] = 10000 OR
However, this quickly becomes tedious for large arrays, and is not
helpful if the size of the array is unknown. Although it is not part
of the primary <productname>PostgreSQL</productname> distribution,
- in the contributions directory, there is an extension to
- <productname>PostgreSQL</productname> that defines new functions and
+ there is an extension available that defines new functions and
operators for iterating over array values. Using this, the above
query could be: