Re: Can I trigger an action from a coalesce ?

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: stan <stanb(at)panix(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Can I trigger an action from a coalesce ?
Date: 2020-02-22 22:37:22
Message-ID: 1D8B4F65-D170-4200-9278-1670BDE50099@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Feb 22, 2020, at 14:36, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> The problem that I'm worried about is premature evaluation of the
> "immutable" function, causing the NOTICE to come out once during
> query planning, independently of whether/how many times it should
> come out during execution.

Ah, good point. My solution also does assume that a DEFAULT expression is only evaluated if the default is required, and that behavior isn't (afaik) a promise.

--
-- Christophe Pettus
xof(at)thebuild(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrus 2020-02-22 22:39:53 Re: How to fix 0xC0000005 exception in Postgres 9.0
Previous Message Andrus 2020-02-22 22:37:14 How to get error message details from libpq based psqlODBC driver (regression)