Re: [SQL] aggregation of setof

2011-01-31 Thread Viktor Bojović
o:viktor.bojo...@gmail.com] > *Gesendet:* Samstag, 29. Januar 2011 09:28 > *An:* Andreas Gaab > *Betreff:* Re: [SQL] aggregation of setof > > > > i have never used that type but maybe you can try this; > > -create function which returns text[], and takse setof text as argument

Re: [SQL] aggregation of setof

2011-01-31 Thread Tom Lane
Andreas Gaab writes: > Could not the function regexp_matches(text, text) be defined to only return a > text[] not a setof text[]? It'd be pretty hard to change at this point, because of backwards-compatibility considerations, and because the two functions share a single implementation.

Re: [SQL] aggregation of setof

2011-01-31 Thread Andreas Gaab
while only receiving one row. Regards, Andreas -Ursprüngliche Nachricht- Von: Pavel Stehule [mailto:pavel.steh...@gmail.com] Gesendet: Montag, 31. Januar 2011 10:24 An: Andreas Gaab Cc: pgsql-sql@postgresql.org Betreff: Re: [SQL] aggregation of setof Hello use a array constructor instead

Re: [SQL] aggregation of setof

2011-01-31 Thread Pavel Stehule
;   RETURNS anyarray AS > > $BODY$ > > SELECT $1 LIMIT 1; > > $BODY$ > >   LANGUAGE 'sql' STABLE; > > > > à > > ERROR:  functions cannot accept set arguments > > > > > > > > Von: Viktor Bojović [mailto:viktor.bojo...@gmail.com] >

Re: [SQL] aggregation of setof

2011-01-31 Thread Andreas Gaab
o:viktor.bojo...@gmail.com] Gesendet: Samstag, 29. Januar 2011 09:28 An: Andreas Gaab Betreff: Re: [SQL] aggregation of setof i have never used that type but maybe you can try this; -create function which returns text[], and takse setof text as argument (if possible) -reach every text[] in set of

[SQL] aggregation of setof

2011-01-28 Thread Andreas Gaab
Hi all, I would like to write a query, which aggregates the results of regexp_matches(). The problem is that regexp_matches returnes setof text[] as documented even if I discard the global flag (http://www.postgresql.org/docs/8.4/static/functions-matching.html#FUNCTIONS-POSIX-REGEXP ). Thus re