Specifying text to substitute for NULLs in selects

From: pcreso(at)pcreso(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: Specifying text to substitute for NULLs in selects
Date: 2008-11-07 01:44:42
Message-ID: 494662.65727.qm@web33206.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi,

I can specify the text used to represent a null value in output from copy, but I'd like to do something similar is select output, eg: all NULL values are represented by NA or NaN.

I can't find anything in the docs about this.

This could be managed using case statements around all the columns in the query, but is there a simpler way, like setting a system variable to specify this?

Thanks,

Brent Wood

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gerhard Heift 2008-11-07 08:44:28 restruct cash table
Previous Message Berend Tober 2008-11-07 01:34:35 Re: serial data type usage