Re: Any limitation in size for return result from SELECT?

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Natasa Bulatovic <n(dot)bulatovic(at)zim(dot)mpg(dot)de>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Any limitation in size for return result from SELECT?
Date: 2003-03-02 03:03:03
Message-ID: 20030301190150.E21955-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


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.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Joe Conway 2003-03-02 03:41:51 Re: Any limitation in size for return result from SELECT?
Previous Message Bruno Wolff III 2003-03-02 01:54:06 Re: OUTER JOIN with filter