From 352a56ba68d00a4bce9944e1b0e6aeda8d3c021f Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 29 Sep 2006 21:22:21 +0000 Subject: 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. --- doc/src/sgml/array.sgml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'doc/src') 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 @@ - + Arrays @@ -350,11 +350,12 @@ UPDATE sal_emp SET pay_by_quarter[1:2] = '{27000,27000}' - 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 - myarray currently has 4 elements, it will have five - elements after an update that assigns to 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 + myarray currently has 4 elements, it will have six + elements after an update that assigns to myarray[6], + and myarray[5] will contain a null. Currently, enlargement in this fashion is only allowed for one-dimensional arrays, not multidimensional arrays. -- cgit v1.2.3