Joe Conway <[EMAIL PROTECTED]> writes: > Greg Stark wrote: > > So where are the new array functions and syntaces documented? > > Mainly here: > http://developer.postgresql.org/docs/postgres/arrays.html
excellent. thank you. > > Specifically I want to know how to replace my int_array_aggregate(int) and > > int_array_enum(_int) calls. > > I have no idea what those are -- are they from contrib? indeed in contrib/intagg > You can create an aggregate to turn arbitrary datatype elements into arrays > like this: > > CREATE AGGREGATE array_aggregate > ( > BASETYPE = anyelement, > SFUNC = array_append, > STYPE = anyarray, > INITCOND = '{}' > ); Hm, perhaps there should be a standard name for this, rather than have everyone's code do their own thing. > If int_array_enum() is supposed to take '{1,2,3}' and produce three rows, that > function was proposed but rejected. Subsequently Peter Eisentraut pointed out a > SQL99 syntax that does this, but I did not get it done for 7.4. Perhaps for 7.5. That's exactly what it does. Hm, I guess I misinterpreted that post. Hm I have some work to do. Thanks. And thanks a LOT for doing the work, it'll makes a big difference and make arrays much more practical to use. -- greg ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly