Re: case when evaluating else condition anyway? - Mailing list pgsql-general

From Tom Lane
Subject Re: case when evaluating else condition anyway?
Date
Msg-id 8925.1227713350@sss.pgh.pa.us
Whole thread Raw
In response to Re: case when evaluating else condition anyway?  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
List pgsql-general
Ivan Sergio Borgonovo <mail@webthatworks.it> writes:
> Still why does the else condition get evaluated anyway when at least
> one of the "when" condition is true?

Because 'literal'::type is a literal of that type; it does not represent
a run-time conversion.  I think we document that under the discussion
of constants in the syntax chapter.

            regards, tom lane

pgsql-general by date:

Previous
From: Sam Mason
Date:
Subject: Re: case when evaluating else condition anyway?
Next
From: Jeff MacDonald
Date:
Subject: Re: pg_get_serial_sequence Strangeness/Unreliable?