X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 5A30247631A for ; Tue, 25 Feb 2003 03:21:22 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 20851-10 for ; Tue, 25 Feb 2003 03:20:54 -0500 (EST) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id B3478476494 for ; Mon, 24 Feb 2003 23:30:15 -0500 (EST) Received: by news.hub.org (Postfix, from userid 8) id 9E07E43A94A; Mon, 24 Feb 2003 23:30:15 -0500 (EST) From: Edmund Lian X-Newsgroups: comp.databases.postgresql.sql Subject: Re: Denormalizing during select Message-ID: References: <200302241433.49502.josh@agliodbs.com> X-Newsreader: Forte Agent 1.91/32.564 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 24 Date: Tue, 25 Feb 2003 03:44:02 GMT X-Complaints-To: abuse@cox.net Organization: Cox Communications To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new X-Archive-Number: 200303/29 X-Sequence-Number: 12069 Jeff and Josh, I found this example in "Practical PostgreSQL"... will it do the job? """ The following example defines an aggregate function named sum(), for use with the text data type. This aggregate calls the textcat(text,text) function built into PostgreSQL to return a concatenated "sum" of all the text found in its input values: booktown=# CREATE AGGREGATE sum ( BASETYPE = text, booktown(# SFUNC = textcat, booktown(# STYPE = text, booktown(# INITCOND = '' ); CREATE booktown=# SELECT sum(title || ' ') FROM books WHERE title ~ '^L'; sum ------------------------------- Little Women Learning Python (1 row) """ ...Edmund.