am Thu, dem 21.06.2007, um 16:00:05 +0300 mailte Loredana Curugiu folgendes: > So Andreas, would you please give some more explanations > on your solution? I didn't work with functions and aggregate till > now.
I will try it, but i'm not a nativ english speaker and thats why i have some problems... > > I don't understand how this comma_aggregate works. I can see that this > function it is defined with two arguments, but the aggredate it is called > with a single argument. An aggregate needs among others a so called 'SFUNC' with 2 parameters: internal-state and next data item. It returns the next-internal-state. This is explained here: http://www.postgresql.org/docs/8.1/interactive/sql-createaggregate.html > > And what is LANGUAGE sql IMMUTABLE STRICT ? An IMMUTABLE function can't modify the database http://www.postgresql.org/docs/current/static/xfunc-volatility.html STRICT: http://www.postgresql.org/docs/8.2/static/xfunc-c.html ,----[ ] | Notice that we have specified the functions as "strict", meaning that | the system should automatically assume a null result if any input value | is null. `---- Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match