Re: case when evaluating else condition anyway?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: case when evaluating else condition anyway?
Date: 2008-11-26 14:02:01
Message-ID: 7182.1227708121@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> writes:
> I've
> case when ''=extinput then null else extinput::timestamp end
> now when extinput='' it seems that else extinput::timestamp get
> evaluated anyway and I get:
> invalid input syntax for type timestamp: ""

I think you are leaving off a large percentage of the truth.
Is "extinput" actually a variable, or do you mean that you are
substituting a literal string there?

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2008-11-26 14:18:44 Re: case when evaluating else condition anyway?
Previous Message Ivan Sergio Borgonovo 2008-11-26 13:53:07 case when evaluating else condition anyway?