1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Add array_fill() to create arrays initialized with a value.

Pavel Stehule
This commit is contained in:
Bruce Momjian
2008-07-16 00:48:54 +00:00
parent 2fa42cc9ee
commit 2c773296f8
7 changed files with 371 additions and 8 deletions

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.440 2008/07/15 18:24:59 momjian Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.441 2008/07/16 00:48:53 momjian Exp $ -->
<chapter id="functions">
<title>Functions and Operators</title>
@ -9371,6 +9371,19 @@ SELECT NULLIF(value, '(none)') ...
<entry><literal>array_dims(ARRAY[[1,2,3], [4,5,6]])</literal></entry>
<entry><literal>[1:2][1:3]</literal></entry>
</row>
<row>
<entry>
<literal>
<function>array_fill</function>(<type>anyelement</type>, <type>anyarray</type>,
<optional>, <type>anyarray</type></optional>)
</literal>
</entry>
<entry><type>anyarray</type></entry>
<entry>returns an array initialized with supplied value,
dimensions, and lower bounds</entry>
<entry><literal>array_fill(7, ARRAY[3], ARRAY[2])</literal></entry>
<entry><literal>[2:4]={7,7,7}</literal></entry>
</row>
<row>
<entry>
<literal>