Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 94C682E2D6B for ; Fri, 21 Dec 2007 06:56:52 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 87026-04 for ; Fri, 21 Dec 2007 06:56:38 -0400 (AST) Received: from 137086.vserver.de (vs137086.vserver.de [62.75.137.86]) by postgresql.org (Postfix) with ESMTP id C336F2E2D75 for ; Fri, 21 Dec 2007 06:56:47 -0400 (AST) Received: from a-kretschmer.de (p54B3BD69.dip0.t-ipconnect.de [84.179.189.105]) (authenticated bits=0) by 137086.vserver.de (8.12.8/8.12.8) with ESMTP id lBLAui2W010082 for ; Fri, 21 Dec 2007 11:56:45 +0100 Received: from kretschmer by a-kretschmer.de with local (Exim 4.61) (envelope-from ) id 1J5fa1-0005K6-M7 for pgsql-sql@postgresql.org; Fri, 21 Dec 2007 11:58:13 +0100 Date: Fri, 21 Dec 2007 11:58:13 +0100 From: Andreas Kretschmer To: pgsql-sql@postgresql.org Subject: Re: Concatenation through SQL Message-ID: <20071221105813.GA18247@KanotixBox> References: <6C0CF58A187DA5479245E0830AF84F42337F97@poweredge.attiksystem.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6C0CF58A187DA5479245E0830AF84F42337F97@poweredge.attiksystem.ch> X-OS: Debian/GNU Linux - weil ich es mir Wert bin! X-GPG-Fingerprint: EE16 3C01 7B9C 10F7 2C8B 3B86 4DB3 D9EE 7F45 84DA X-Message-Flag: "Windows" is not the answer. "Windows" is the question and the answer is "no"! X-Lugdd: Gerd Kube X-Info: My name is root. Just root. And I am licensed to kill -9 User-Agent: mutt-ng 1.5.9i (Linux) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/107 X-Sequence-Number: 29799 Philippe Lang schrieb: 2 ways: * You can use something like this: test=*# select * from a; id | val ----+----- 1 | foo 2 | bar (2 rows) test=*# select array_to_string(array(select val from a), ', '); array_to_string ----------------- foo, bar (1 row) * comma-aggregate, see http://www.zigo.dhs.org/postgresql/#comma_aggregate Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with --enable-fly." (unknow) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°