Re: Playing with 9.4devel - unnest - Mailing list pgsql-general

From Tom Lane
Subject Re: Playing with 9.4devel - unnest
Date
Msg-id 738.1394464214@sss.pgh.pa.us
Whole thread Raw
In response to Playing with 9.4devel - unnest  (Tim Kane <tim.kane@gmail.com>)
Responses Re: Playing with 9.4devel - unnest  (Tim Kane <tim.kane@gmail.com>)
List pgsql-general
Tim Kane <tim.kane@gmail.com> writes:
> I decided to have a play with postgresql-9.4devel as I wanted to explore the
> functionality provided by
> unnest (anyarray, anyarray [, …])
> I’ve taken the nightly snpahost, compiled, installed.. All good.  (Obtained
> from http://ftp.postgresql.org/pub/snapshot/dev/ )
> However it seems the expected multi-argument unnest function doesn’t exist.

> Have I missed something?

It's there:

regression=# select * from unnest(array[1,2], array[3,4]);
 unnest | unnest
--------+--------
      1 |      3
      2 |      4
(2 rows)

If you were expecting this to change, it didn't:

regression=# \df unnest
                           List of functions
   Schema   |  Name  | Result data type | Argument data types |  Type
------------+--------+------------------+---------------------+--------
 pg_catalog | unnest | SETOF anyelement | anyarray            | normal
(1 row)

because the new functionality arises from a parser transformation,
not from a simple function.

            regards, tom lane


pgsql-general by date:

Previous
From: matshyeq
Date:
Subject: Re: libpq - lack of support to set the fetch size
Next
From: Adrian Klaver
Date:
Subject: Re: libpq - lack of support to set the fetch size