From: | "Todd A(dot) Cook" <tcook(at)blackducksoftware(dot)com> |
---|---|
To: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | is 8.4 array_agg() supposed to work with array values? |
Date: | 2009-01-19 21:22:21 |
Message-ID: | 4974EF0D.8030605@blackducksoftware.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
The docs at http://developer.postgresql.org/pgdocs/postgres/functions-aggregate.html
don't prohibit using array values with array_arg(), so I assumed that it would work.
However, with CVS HEAD from Friday afternoon, I get
test=> select version() ;
version
----------------------------------------------------------------------------------------------------------------------
PostgreSQL 8.4devel on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20070502 (Red Hat 4.1.2-12), 64-bit
(1 row)
test=> select v.a, pg_typeof(v.a) from (values (array[1,2]), (array[3,4])) as v(a) ;
a | pg_typeof
-------+-----------
{1,2} | integer[]
{3,4} | integer[]
(2 rows)
test=> select array_agg(v.a) from (values (array[1,2]), (array[3,4])) as v(a) ;
ERROR: could not find array type for data type integer[]
test=>
If this is expected behavior, the docs should mention the restriction.
-- todd
From | Date | Subject | |
---|---|---|---|
Next Message | Brendan Jurd | 2009-01-19 22:26:27 | Re: Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp) |
Previous Message | Bernd Helmle | 2009-01-19 21:02:11 | Re: WIP: Automatic view update rules |