From: Bruno Wolff III <bruno@wolff.to>
To: Matt A. <survivedsushi@yahoo.com>
Cc: pgsql-general@postgresql.org
Subject: Re: help
Date: Fri, 26 Aug 2005 10:29:46 -0500
Message-ID: <20050826152946.GC16546@wolff.to> (raw)
In-Reply-To: <20050826084112.65128.qmail@web35204.mail.mud.yahoo.com>
References: <20050826065045.GA4848@svana.org>
<20050826084112.65128.qmail@web35204.mail.mud.yahoo.com>
On Fri, Aug 26, 2005 at 01:41:12 -0700,
> All I need is integer columns evaluting in a
>
> nullif('1','') returns int = 1
> nullif('','') returns int = null
> nullif('0','') returns int = 0
>
> fashion upon inserting to an INTEGER column. Forget
> booleans. Forget text. Just integers. Is this
> possible? Nothing is impossible. Tell me it can be
> done!
Casting the parameters won't work since '' isn't a valid representation of
an integer. But it looks like casting the output to int works. (It seemed
to work in 8.0.3.)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: bruno@wolff.to, survivedsushi@yahoo.com
Subject: Re: help
In-Reply-To: <20050826152946.GC16546@wolff.to>
References: <20050826065045.GA4848@svana.org> <20050826084112.65128.qmail@web35204.mail.mud.yahoo.com> <20050826152946.GC16546@wolff.to>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox