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.92) (envelope-from ) id 1j9Gd3-0004VV-Ee for pgsql-general@arkaria.postgresql.org; Tue, 03 Mar 2020 23:07:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j9Gd1-0007i2-Hp for pgsql-general@arkaria.postgresql.org; Tue, 03 Mar 2020 23:07:07 +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 1j9Gd1-0007ht-6B for pgsql-general@lists.postgresql.org; Tue, 03 Mar 2020 23:07:07 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j9Gcy-0006Re-C5 for pgsql-general@postgresql.org; Tue, 03 Mar 2020 23:07:06 +0000 Received: by mail-pg1-x544.google.com with SMTP id u12so12504pgb.10 for ; Tue, 03 Mar 2020 15:07:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GSYdvSJCAhwJb49wZLjOET/x/T0UP0RZylclD/bSnX8=; b=GrPfySu2VSzV3fd5O25uI2a7QD/zcWaU+rRkOwavhf+9GoKIDpgsD8xcHqwjHhNgJE yWumRcPAhcbWai7y7eHWpvkTjn/f3R95AxybYWmY71dlor1U9GMxK7jRv1DEMtXPO8b/ j+GxPyeOUC7eXNsZ3ouzugdh6VHRqjoFUxp/GIYKlQ1WE8VgTNqJPCzUvtJJeKrU/su6 4iNIyBSwz2ka8bahr+ry5fwnERTdNFK2m+1pyDm6pFG5kzTl0sTD2LB9StT4FzOOib6Q YFucsxprG1rGfB7ZSQYX3+pJm0foyr1aisV06316tVr5qDKcZegf/L/9oPF1tTPXg8dx Ejew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GSYdvSJCAhwJb49wZLjOET/x/T0UP0RZylclD/bSnX8=; b=FtMRFP8V63EbO3rBdiZo8LuliXGyX918QyPrrWf4XtjveUj3c5D0WPyLE+mf/1L/4R ju4O9oqIIw97pY+GJWHcVDhhkHVvlZLNKbw1UDsQvcuFsCDIL3JspqoZp3Z+Dhc1JKh/ qf/4fxlUSDwKwdh1bQultmkUoN85vnohPkvNnTH2N/PbHC8xXupFl623kmyBgGx66Sh2 iSIuPPAhqLa69oAjhERcRijwoOSmFDUZPmPS+FN6/08fHw6Fkf3O62LKvjUwkS/YEIA2 uBfF4WsQa189TqobSCJjeYlYxelNIwgGI/wbC6PhcJANMp1S8LO8LB7cLg1u5fihwFHP PLjA== X-Gm-Message-State: ANhLgQ16O6/9cYD6gaDBrTkBogFMWy7ZcZ0FrNLXRdJUrypTc5oEmzNU DnEsHJKXb4JmRmLQ3KpYpVZHos4PShynsSIozLk= X-Google-Smtp-Source: ADFU+vv38FLAdLjqc//y4mh1rplCVCX+LIuhHnmsjQyTIU0NaSqVPo3ilqnrINXcuRP7Efa26CbVEk2KSyR8DjRsyuk= X-Received: by 2002:a62:7c17:: with SMTP id x23mr63815pfc.200.1583276821227; Tue, 03 Mar 2020 15:07:01 -0800 (PST) MIME-Version: 1.0 References: <20200302185904.GA6528@panix.com> <30c3c06e-61fa-3210-666d-1696af320a75@aklaver.com> <20200302202829.GA19161@panix.com> <20200303174248.GB5019@panix.com> <7ac6f67e-f330-1825-02e3-fa5b5a1a2940@aklaver.com> <20200303213215.GA2023@panix.com> <5574e3a6-2245-42c4-77fd-6e51a7a65e0c@aklaver.com> In-Reply-To: <5574e3a6-2245-42c4-77fd-6e51a7a65e0c@aklaver.com> From: "David G. Johnston" Date: Tue, 3 Mar 2020 16:06:44 -0700 Message-ID: Subject: Re: Detecting which columns a query will modify in a function called by a trigger To: Adrian Klaver Cc: stan , pgsql-general Content-Type: multipart/alternative; boundary="00000000000082ac98059ffb5cc2" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --00000000000082ac98059ffb5cc2 Content-Type: text/plain; charset="UTF-8" On Tue, Mar 3, 2020 at 3:48 PM Adrian Klaver wrote: > The link was for automatically updateable views. If you want to do > something more involved then see: > > https://www.postgresql.org/docs/12/rules-views.html#RULES-VIEWS-UPDATE CREATE TRIGGER works with views; I usually see recommendations to start there and avoid rules if at all possible. David J. --00000000000082ac98059ffb5cc2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Mar 3, 2020 at 3:48 PM Adrian Klaver <adrian.klaver@aklaver.com> wro= te:
The link was for automatically updateable views= . If you want to do
something more involved then see:

https://www.postgresql.org/doc= s/12/rules-views.html#RULES-VIEWS-UPDATE

= CREATE TRIGGER works with views; I usually see recommendations to start the= re and avoid rules if at all possible.

David J.
<= div class=3D"gmail_default" style=3D"font-family:arial,helvetica,sans-serif= ">
--00000000000082ac98059ffb5cc2--