File tree 1 file changed +14
-2
lines changed 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 1
- <!-- $PostgreSQL: pgsql/doc/src/sgml/array.sgml,v 1.42 2004/12/23 05:37:39 tgl Exp $ -->
1
+ <!-- $PostgreSQL: pgsql/doc/src/sgml/array.sgml,v 1.43 2005/02/06 20:59:30 tgl Exp $ -->
2
2
3
3
<sect1 id="arrays">
4
4
<title>Arrays</title>
@@ -149,7 +149,7 @@ INSERT INTO sal_emp
149
149
A limitation of the present array implementation is that individual
150
150
elements of an array cannot be SQL null values. The entire array
151
151
can be set to null, but you can't have an array with some elements
152
- null and some not.
152
+ null and some not. (This is likely to change in the future.)
153
153
</para>
154
154
155
155
<para>
@@ -261,6 +261,18 @@ SELECT schedule[1:2][2] FROM sal_emp WHERE name = 'Bill';
261
261
</programlisting>
262
262
</para>
263
263
264
+ <para>
265
+ Fetching from outside the current bounds of an array yields a
266
+ SQL null value, not an error. For example, if <literal>schedule</>
267
+ currently has the dimensions <literal>[1:3][1:2]</> then referencing
268
+ <literal>schedule[3][3]</> yields NULL. Similarly, an array reference
269
+ with the wrong number of subscripts yields a null rather than an error.
270
+ Fetching an array slice that
271
+ is completely outside the current bounds likewise yields a null array;
272
+ but if the requested slice partially overlaps the array bounds, then it
273
+ is silently reduced to just the overlapping region.
274
+ </para>
275
+
264
276
<para>
265
277
The current dimensions of any array value can be retrieved with the
266
278
<function>array_dims</function> function:
You can’t perform that action at this time.
0 commit comments