X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 197DD4764F5 for ; Sun, 2 Mar 2003 00:47:50 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 68908-07 for ; Sun, 2 Mar 2003 00:47:49 -0500 (EST) Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id 4179147E789 for ; Sat, 1 Mar 2003 22:03:00 -0500 (EST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 3A5C0D617; Sat, 1 Mar 2003 19:03:03 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 25E5E5C04; Sat, 1 Mar 2003 19:03:03 -0800 (PST) Date: Sat, 1 Mar 2003 19:03:03 -0800 (PST) From: Stephan Szabo To: Natasa Bulatovic Cc: Subject: Re: Any limitation in size for return result from SELECT? In-Reply-To: <002e01c2dcd9$b887b2b0$e302b782@ipp.mpg.de> Message-ID: <20030301190150.E21955-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new X-Archive-Number: 200303/39 X-Sequence-Number: 12079 On Tue, 25 Feb 2003, Natasa Bulatovic wrote: > Select statement returns as a result concatenated all varchar, text > and char columns of a table as one single column ... > > select col1||col2||col3||.....||col100 from table > > However, when the number of concatenated columns is bigger than 22 no > result is given back (tested in psql, as well as from pgplsql).... > > Most of these columns for the test data are NULL...Datatypes of > columns are mixed text, varchar, char...Select statement does not > return any error...Just returns a row with a null result.... Any quick > suggestions would be very useful.... Anything concatenated with a NULL is NULL. You'll probably want to use COALESCE(col1,'')||... for each of the columns that can be null.