diff options
| author | Alexander Korotkov <akorotkov@postgresql.org> | 2021-07-18 21:07:24 +0300 |
|---|---|---|
| committer | Alexander Korotkov <akorotkov@postgresql.org> | 2021-07-18 21:11:33 +0300 |
| commit | 244ad5415557812a6ac4dc5d6e2ae908361d82c3 (patch) | |
| tree | 6382563ed9e2ca0d971be26dd35d4afb822f2dfb /doc/src | |
| parent | d8f3b021c618bf58c19f88fb86476793fd650336 (diff) | |
Support for unnest(multirange)
It has been spotted that multiranges lack of ability to decompose them into
individual ranges. Subscription and proper expanded object representation
require substantial work, and it's too late for v14. This commit
provides the implementation of unnest(multirange), which is quite trivial.
unnest(multirange) is defined as a polymorphic procedure.
Catversion is bumped.
Reported-by: Jonathan S. Katz
Discussion: https://postgr.es/m/flat/60258efe-bd7e-4886-82e1-196e0cac5433%40postgresql.org
Author: Alexander Korotkov
Reviewed-by: Justin Pryzby, Jonathan S. Katz, Zhihong Yu, Tom Lane
Reviewed-by: Alvaro Herrera
Diffstat (limited to 'doc/src')
| -rw-r--r-- | doc/src/sgml/func.sgml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index ac6347a9711..4c1a2d794cc 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -19181,6 +19181,29 @@ SELECT NULLIF(value, '(none)') ... <returnvalue>{[1,2)}</returnvalue> </para></entry> </row> + + <row> + <entry role="func_table_entry"><para role="func_signature"> + <indexterm> + <primary>unnest</primary> + <secondary>for multirange</secondary> + </indexterm> + <function>unnest</function> ( <type>anymultirange</type> ) + <returnvalue>setof anyrange</returnvalue> + </para> + <para> + Expands a multirange into a set of ranges. + The ranges are read out in storage order (ascending). + </para> + <para> + <literal>unnest('{[1,2), [3,4)}'::int4multirange)</literal> + <returnvalue></returnvalue> +<programlisting> + [1,2) + [3,4) +</programlisting> + </para></entry> + </row> </tbody> </tgroup> </table> |
