Re: help - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: help
Date
Msg-id 20050826152946.GC16546@wolff.to
Whole thread Raw
In response to Re: help  ("Matt A." <survivedsushi@yahoo.com>)
List pgsql-general
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.)

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Resore PG-Data from Files after crash
Next
From: Peter Wilson
Date:
Subject: Re: bytea or large objects?