Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i99XG-0002Vc-NL for pgsql-general@arkaria.postgresql.org; Sat, 14 Sep 2019 15:00:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i99XF-0008Et-FI for pgsql-general@arkaria.postgresql.org; Sat, 14 Sep 2019 15:00:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i99XF-0008ER-2k for pgsql-general@lists.postgresql.org; Sat, 14 Sep 2019 15:00:25 +0000 Received: from mail-ot1-x32b.google.com ([2607:f8b0:4864:20::32b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i99XC-0000gY-RX for pgsql-general@lists.postgresql.org; Sat, 14 Sep 2019 15:00:24 +0000 Received: by mail-ot1-x32b.google.com with SMTP id y39so32059081ota.7 for ; Sat, 14 Sep 2019 08:00:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=46iF8gl7dGYBWmH7pFQidhMOXNQYVsQgnfKGDT2pENY=; b=O2rKZAF0Xa1Ug965gGL+jqXQIVtaYCdMsT+dCl3rZVeFCebGWtycjL8C5BXGsINX4j Lr9iZUqYpFKSzlg7aDGpl+3RIrdY5aWn0BSn5SjjdEanDY0ft8eF0+4hQ4Rq8nNEFYp1 G9PlqNDUmaZmPUxn1IFJ5sdB/KhPCTTuseZ6e8rFy5X3HT95463ZJQuH+bphFb1c0ZJQ /4SuUFk32pN9KXXFKUo1jPpf1JVdd3ThpyR3OWA2o9ig/YOh9qJ7jp/rw/KM3wvs+grD ZtrT3+zFzAIiiileVw/7KpuUBRp4ezRaAzsbkhyWtG/5Vf5o2wWFQx3IiMxWeqfGMvcB hC3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=46iF8gl7dGYBWmH7pFQidhMOXNQYVsQgnfKGDT2pENY=; b=F5RUqWmmhNIBoXpD8sN1figfXx+zCPh2bLtucepwqRXHcgKoxrOsixlreYdU1jQ/oX FnROMCKdnI0b6SplO0dzWeIJZ2I5bTMgi697FNpbVgzBNNCVUzRwGk3kDEdrSDovk1Kl B69I27foUmYBTXetMihuQzUdXTQqM+O6EjKyj4gFmTu9rLWTK+l80CsUtMSY6t0lYNKA ucT9eX17zvk+zw/p7ZduVrbxcRZpKx8QrWa5SLU/gOxOY4HzqWbakP2fMnRkfBUQX1hf V5GPu2/MrgXFIAgD9a3oSVTO6wO5kU/n2TkcaYCAuBz1oCLbtZ9pQmVCFOlpt2D80Cp4 MBlA== X-Gm-Message-State: APjAAAWWH2kbHB8+IhUY3TYD4+uZVtN0ajn9dSmaLgoklsJyiFM3rVbp TOC4o09Btag1m5cFKxGTfJFNIv3BpMIxXQ== X-Google-Smtp-Source: APXvYqxSTigZ6GtiGxnxrN1k+VuiMrbcOZBdDz6zq1xgoPHzAOFCBLfa+/czjyFInyqkwf2xxJL+ag== X-Received: by 2002:a05:6830:128b:: with SMTP id z11mr7710024otp.79.1568473220199; Sat, 14 Sep 2019 08:00:20 -0700 (PDT) Received: from [192.168.1.10] (ip70-186-126-197.no.no.cox.net. [70.186.126.197]) by smtp.googlemail.com with ESMTPSA id v6sm1999892oie.4.2019.09.14.08.00.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Sep 2019 08:00:19 -0700 (PDT) Subject: Re: Cascade Trigger Not Firing To: pgsql-general@lists.postgresql.org References: <21219.1568401729@sss.pgh.pa.us> <20933.1568408581@sss.pgh.pa.us> <583b352c-f22a-e5b6-3ddc-40e298267b4d@aklaver.com> <22653.1568472885@sss.pgh.pa.us> From: Ron Message-ID: <5bbfe578-6f0a-0f33-b9ef-01ac4eb0c811@gmail.com> Date: Sat, 14 Sep 2019 10:00:18 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <22653.1568472885@sss.pgh.pa.us> Content-Type: multipart/alternative; boundary="------------4854470701829BC17D07FEF4" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------4854470701829BC17D07FEF4 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 9/14/19 9:54 AM, Tom Lane wrote: [snip > The only mention of this feature in 38.1 "Overview of Trigger Behavior" > is > > UPDATE triggers*can* moreover be set to fire only if certain columns > are mentioned in the SET clause of the UPDATE statement. > > which seems to me to be plenty specific enough --- it is carefully > *not* saying that the trigger will fire if the column changes value. > The CREATE TRIGGER man page never says that, either. Given that the UPDATE "*can* ... be set to fire only if certain columns are mentioned in the SET clause of the UPDATE statement", it logically follows that the default behavior is something else (for example, if the field value changes for whatever reason. -- Angular momentum makes the world go 'round. --------------4854470701829BC17D07FEF4 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit On 9/14/19 9:54 AM, Tom Lane wrote:
[snip
The only mention of this feature in 38.1 "Overview of Trigger Behavior"
is 

    UPDATE triggers can moreover be set to fire only if certain columns
    are mentioned in the SET clause of the UPDATE statement.

which seems to me to be plenty specific enough --- it is carefully
*not* saying that the trigger will fire if the column changes value.
The CREATE TRIGGER man page never says that, either.

Given that the UPDATE "*can* ... be set to fire only if certain columns are mentioned in the SET clause of the UPDATE statement", it logically follows that the default behavior is something else (for example, if the field value changes for whatever reason.

--
Angular momentum makes the world go 'round.
--------------4854470701829BC17D07FEF4--