Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mpBRS-0005hW-P9 for pgsql-docs@arkaria.postgresql.org; Mon, 22 Nov 2021 15:41:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mpBRR-0002Tr-MX for pgsql-docs@arkaria.postgresql.org; Mon, 22 Nov 2021 15:41:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mpBRR-0002Tg-Aa for pgsql-docs@lists.postgresql.org; Mon, 22 Nov 2021 15:41:13 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mpBRO-0001d4-Lp for pgsql-docs@lists.postgresql.org; Mon, 22 Nov 2021 15:41:12 +0000 Received: by mail-wr1-x42b.google.com with SMTP id b12so33494557wrh.4 for ; Mon, 22 Nov 2021 07:41:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=THt96OxqHEEVrZBpCeqO5hgd6IPgOJsMnvEsgrEr4ts=; b=Rt608oQWR6xlv1Ki0M8AC+xbj1Brwcd6gzvQIa+2cOSy7NhRv9uUNiyYmJX8VFLJ8n 5MxWj82LpwIkwk4a1HB4pw60V09AgAI3puyJoWvGKWG50oPEKrjt8wykZ4rxCkksp76v /jpXfLYb7LKXfA0pxXxIssAQPyD3WAPzyVjmpjvkVkPqy24u4n9PxVzs2LuIasO2rgr4 s1pCyhHiwlM5Vn1HgJnc5FLXWOyW1s3mC6z7ariBX7xNzLg0cvDfWVAAdp3hY9rHUC+0 VhwlShpjKjWCmqAukx1X3zEFwmjAElHFs1sk2oe8Yqr+rcdbg7gAFzU2cNd3YPAeh6NT Peug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=THt96OxqHEEVrZBpCeqO5hgd6IPgOJsMnvEsgrEr4ts=; b=IaUvh7WCr8QwlNWupp4IkT0sGYWHryUvMCnm3Sw7sLmiGW6UtPOHpNHIQ8d1MSVxRl VBSU9DIDV8r7D1iklDJvY+LDlyfwTYpam31d/gfTI6G8EYNEYwawuhAUkgEuDhcSYIs7 2X2QIAbeCV5ltndB/jOultVnD9HvEoLYwzxmzy/5gbVk0gAIQLmcs6/HKR+yPw2s7r/d Sz+Jtxw66xO1jhBfG0VvYnExgAZLaa97Dh2LzeuYL/GcWwhZSDmVSDXFDjiZEkAL+mTo GzW2Ba336k+5E79trcYP4HdBS4HCubCBkqEyNB0VM6flOmrITnKAoXWJWlHCh7NPLZKN OpYw== X-Gm-Message-State: AOAM533cGA2hDlT5Tbu/DFKCT4VB+aSOKpw7grFQVuknbYrROXQ9jO5t 9Higs0UVvrz3VobfWlit+qiUZQ== X-Google-Smtp-Source: ABdhPJyP6/j2Icbh9GC9FeapLI9+7ISVC0wjz9GEe4god01pc8ueRaG8/aV1qqkLMHvuS5TVZ4FonA== X-Received: by 2002:a5d:64a2:: with SMTP id m2mr40334268wrp.248.1637595668283; Mon, 22 Nov 2021 07:41:08 -0800 (PST) Received: from localhost.localdomain (dynamic-edcf9wxfo1mlm4hl9-pd01.res.v6.highway.a1.net. [2001:871:5e:9b1c:2bb7:dfb8:1674:1c0d]) by smtp.gmail.com with ESMTPSA id o63sm9333107wme.2.2021.11.22.07.41.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Nov 2021 07:41:07 -0800 (PST) Message-ID: <2f54dbb7d59aacacbc4654b0bc56faaebe993e09.camel@cybertec.at> Subject: Re: Triggers on underlying tables of updatable views From: Laurenz Albe To: max.ziermann@htw-dresden.de, pgsql-docs@lists.postgresql.org Date: Mon, 22 Nov 2021 16:41:07 +0100 In-Reply-To: <163758281947.26190.10251137266467665332@wrigleys.postgresql.org> References: <163758281947.26190.10251137266467665332@wrigleys.postgresql.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-2.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2021-11-22 at 12:06 +0000, PG Doc comments form wrote: > "Note that the user performing the insert, update or delete on the view must > have the corresponding insert, update or delete privilege on the view. In > addition the view's owner must have the relevant privileges on the > underlying base relations, but the user performing the update does not need > any permissions on the underlying base relations (see Section 41.5)." > > Could it be made more clear that triggers on a underlying table of an > updatable view are still executed with the permissions of the user > performing an insert/update/delete on the view? But that is not the case: that trigger will be executed with the permissions of the owner of the underlying table. Yours, Laurenz Albe