From: | Tim Kane <tim(dot)kane(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Playing with 9.4devel - unnest |
Date: | 2014-03-10 15:26:52 |
Message-ID: | CF4388E9.645D6%tim.kane@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hmm. So it is.
My bad, thanks Tom.
I hadn’t noticed the documentation where it clearly says "This is only
allowed in the FROM clause”
xml_test=# select unnest(*) from (select array[1,2],array[1,2,3]) foo;
ERROR: function unnest() does not exist
And, yes.. I was expecting the function signature to change. Thanks for
setting me straight.
Tim
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Date: Monday, 10 March 2014 15:10
To: Tim Kane <tim(dot)kane(at)gmail(dot)com>
Cc: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: [GENERAL] Playing with 9.4devel - unnest
Tim Kane <tim(dot)kane(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | hubert depesz lubaczewski | 2014-03-10 15:32:43 | Re: 9.1.11 - many backends in "semtimedop" syscall |
Previous Message | Adrian Klaver | 2014-03-10 15:19:57 | Re: libpq - lack of support to set the fetch size |