Re: Rewritten queries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jaime Casanova <systemguards(at)yahoo(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Rewritten queries
Date: 2004-12-27 19:42:25
Message-ID: 22066.1104176545@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Jaime Casanova <systemguards(at)yahoo(dot)com> writes:
> What version of postgres are u using?
> I don't see that particular behavior in coalesce.

> someone knows if this is the behavior in any older
> version of pg?

Yes. Since about 7.4 COALESCE is a first-class expression node type,
but before that the parser expanded it into a CASE construct.

The CASE implementation is lacking in that it may evaluate the arguments
more than once, which could be wrong if they are volatile values.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jaime Casanova 2004-12-27 19:48:45 Re: Rewritten queries
Previous Message Jaime Casanova 2004-12-27 19:04:29 Re: Rewritten queries