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:07:41
Message-ID: 1B2A9F19-0477-473F-B6E6-7CBE393C8D38@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Feb 22, 2020, at 14:02, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> It's a really bad idea to mark a function that has side-effects
> (i.e., emitting a NOTICE) as immutable, especially if the occurrence
> of the side-effect at well-defined times is exactly what you're
> desirous of.

True, and it doesn't actually need to be immutable here; just cut and pasted from the wrong example.

(That being said, I'm not coming up with a specific bad thing that a RAISE NOTICE in an immutable function will cause. Is there one?)

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Klaus Darilion 2020-02-22 22:25:25 Re: Logical replication lag in seconds
Previous Message Tom Lane 2020-02-22 22:02:33 Re: Can I trigger an action from a coalesce ?