Re: help

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: "Matt A(dot)" <survivedsushi(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: help
Date: 2005-08-26 15:29:46
Message-ID: 20050826152946.GC16546@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.)

In response to

  • Re: help at 2005-08-26 08:41:12 from Matt A.

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-08-26 15:30:27 Re: Resore PG-Data from Files after crash
Previous Message Howard Cole 2005-08-26 15:29:10 bytea or large objects?