summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane2006-09-29 21:22:21 +0000
committerTom Lane2006-09-29 21:22:21 +0000
commit352a56ba68d00a4bce9944e1b0e6aeda8d3c021f (patch)
tree8d3801c892b019547435dcd21fbad3e3e2322561 /doc/src
parent673a573dcc1ef928a1047e75aba2926c692e76cc (diff)
Allow assignment to array elements not contiguous with those already
present; intervening positions are filled with nulls. This behavior is required by SQL99 but was not implementable before 8.2 due to lack of support for nulls in arrays. I have only made it work for the one-dimensional case, which is all that SQL99 requires. It seems quite complex to get it right in higher dimensions, and since we never allowed extension at all in higher dimensions, I think that must count as a future feature addition not a bug fix.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/array.sgml13
1 files changed, 7 insertions, 6 deletions
diff --git a/doc/src/sgml/array.sgml b/doc/src/sgml/array.sgml
index 55e4085d0dd..3ed8ce9c043 100644
--- a/doc/src/sgml/array.sgml
+++ b/doc/src/sgml/array.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/array.sgml,v 1.51 2006/05/09 23:12:54 momjian Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/array.sgml,v 1.52 2006/09/29 21:22:21 tgl Exp $ -->
<sect1 id="arrays">
<title>Arrays</title>
@@ -350,11 +350,12 @@ UPDATE sal_emp SET pay_by_quarter[1:2] = '{27000,27000}'
</para>
<para>
- A stored array value can be enlarged by assigning to an element adjacent to
- those already present, or by assigning to a slice that is adjacent
- to or overlaps the data already present. For example, if array
- <literal>myarray</> currently has 4 elements, it will have five
- elements after an update that assigns to <literal>myarray[5]</>.
+ A stored array value can be enlarged by assigning to element(s) not already
+ present. Any positions between those previously present and the newly
+ assigned element(s) will be filled with nulls. For example, if array
+ <literal>myarray</> currently has 4 elements, it will have six
+ elements after an update that assigns to <literal>myarray[6]</>,
+ and <literal>myarray[5]</> will contain a null.
Currently, enlargement in this fashion is only allowed for one-dimensional
arrays, not multidimensional arrays.
</para>