Avoid casting NULLs in UNION...

From: Marko Rihtar <rihtar(dot)marko(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Avoid casting NULLs in UNION...
Date: 2013-02-01 09:43:32
Message-ID: CABSSDoH3A7qfFnY6UExqjYKOTxox0=r0jt4_PWrhL4-u0yP2kQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

maybe you can help me with this issue.
Here is an example

SELECT NULL*::integer*

UNION ALL

SELECT NULL

UNION ALL
SELECT 123

For this sql to work i have to cast NULL to integer.
I was wondering if there exists some configuration parameter at database
level that can be used to avoid this need for explicit casting?

thanks for help,
Marko

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Albe Laurenz 2013-02-01 10:26:07 Re: Avoid casting NULLs in UNION...
Previous Message Gunnar "Nick" Bluth 2013-01-30 21:19:05 Re: postgres 9.0 - unable to bind to localhost.