From 32cc9e553323c40beba4a98a5859fafe6e4e1855 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 14 Nov 2008 19:58:45 +0000 Subject: Reduce contrib/intagg to a thin wrapper around the new core functions array_agg() and unnest(). We could drop it entirely in the future, but let's keep it for a release or two as a compatibility assist. --- doc/src/sgml/intagg.sgml | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/intagg.sgml b/doc/src/sgml/intagg.sgml index b6f37f752cf..b33e7c62de7 100644 --- a/doc/src/sgml/intagg.sgml +++ b/doc/src/sgml/intagg.sgml @@ -1,4 +1,4 @@ - + intagg @@ -9,7 +9,10 @@ The intagg module provides an integer aggregator and an - enumerator. + enumerator. intagg is now obsolete, because there + are built-in functions that provide a superset of its capabilities. + However, the module is still provided as a compatibility wrapper around + the built-in functions. @@ -20,38 +23,19 @@ int_array_aggregate(integer) that produces an integer array containing exactly the integers it is fed. - Here is a not-tremendously-useful example: + This is a wrapper around array_agg, + which does the same thing for any array type. - -test=# select int_array_aggregate(i) from -test-# generate_series(1,10,2) i; - int_array_aggregate ---------------------- - {1,3,5,7,9} -(1 row) - - The enumerator is a function int_array_enum(integer[]) that returns setof integer. It is essentially the reverse operation of the aggregator: given an array of integers, expand it - into a set of rows. For example, + into a set of rows. This is a wrapper around unnest, + which does the same thing for any array type. - -test=# select * from int_array_enum(array[1,3,5,7,9]); - int_array_enum ----------------- - 1 - 3 - 5 - 7 - 9 -(5 rows) - - -- cgit v1.2.3