Hi All,
I would like to concatenate results of a single column query, something
like the futurable (dev docs for 7.5)
SELECT
p.name, ARRAY(SELECT nicknames FROM people WHERE people.id = p.id)
FROM people AS p
Any suggestions?
Thanks
Marco
---(end of broadcast)
hi,
Christoph Haller wrote:
Interesting feature, but I cannot find function array_append:
ERROR: AggregateCreate: function array_append(integer[], integer) does not exist
try with pg 7.4
C.
---(end of broadcast)---
TIP 9: the planner will ignore
Christoph Haller <[EMAIL PROTECTED]> writes:
> Interesting feature, but I cannot find function array_append:
> ERROR: AggregateCreate: function array_append(integer[], integer) does not exist
It's new in Postgres 7.4
I think you could do this in 7.3 though, it would just be more awkward. Try |
>
>
> Marco Lazzeri <[EMAIL PROTECTED]> writes:
>
> > SELECT
> > p.name, ARRAY(SELECT nicknames FROM people WHERE people.id = p.id)
> > FROM people AS p
>
> > Any suggestions?
>
> Something like:
>
> db=> create aggregate array_aggregate (basetype = integer, sfunc = array_append,
> stype =
Marco Lazzeri <[EMAIL PROTECTED]> writes:
> SELECT
> p.name, ARRAY(SELECT nicknames FROM people WHERE people.id = p.id)
> FROM people AS p
> Any suggestions?
Something like:
db=> create aggregate array_aggregate (basetype = integer, sfunc = array_append, stype
= integer[], initcond = '{}');
Hi All,
I would like to concatenate results of a single column query using
PostgreSQL 7.3.
Something like the coming feature
SELECT
p.name, ARRAY(SELECT nicknames FROM people WHERE people.id = p.id)
FROM people AS p
(devel docs for 7.5:
http://developer.postgresql.org/docs/postgres/sql-express