diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-11-14 00:51:47 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-11-14 00:51:47 +0000 |
commit | c889ebce0aa5f848d680547e3af0aad8b9e577a7 (patch) | |
tree | f3c16122152d35861e50bfdbfc11ab998d00f290 /doc/src | |
parent | 5b9453bcd3b28561c33495199c61c81994c58398 (diff) | |
download | postgresql-c889ebce0aa5f848d680547e3af0aad8b9e577a7.tar.gz postgresql-c889ebce0aa5f848d680547e3af0aad8b9e577a7.zip |
Implement the basic form of UNNEST, ie unnest(anyarray) returns setof
anyelement. This lacks the WITH ORDINALITY option, as well as the multiple
input arrays option added in the most recent SQL specs. But it's still a
pretty useful subset of the spec's functionality, and it is enough to
allow obsoleting contrib/intagg.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/func.sgml | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index aee74366b01..67500340b0f 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.459 2008/11/13 23:01:09 tgl Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.460 2008/11/14 00:51:46 tgl Exp $ --> <chapter id="functions"> <title>Functions and Operators</title> @@ -9482,6 +9482,17 @@ SELECT NULLIF(value, '(none)') ... <entry><literal>string_to_array('xx~^~yy~^~zz', '~^~')</literal></entry> <entry><literal>{xx,yy,zz}</literal></entry> </row> + <row> + <entry> + <literal> + <function>unnest</function>(<type>anyarray</type>) + </literal> + </entry> + <entry><type>setof anyelement</type></entry> + <entry>expand an array to a set of rows</entry> + <entry><literal>unnest(ARRAY[1,2])</literal></entry> + <entry><literal>1</literal><para><literal>2</literal></para> (2 rows)</entry> + </row> </tbody> </tgroup> </table> |