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 1mM9im-000495-7i for pgsql-docs@arkaria.postgresql.org; Fri, 03 Sep 2021 13:59:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mM9ik-0003LJ-UD for pgsql-docs@arkaria.postgresql.org; Fri, 03 Sep 2021 13:59:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mM9ik-0003LB-Kv for pgsql-docs@lists.postgresql.org; Fri, 03 Sep 2021 13:59:06 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mM9ig-0001ZJ-2r for pgsql-docs@lists.postgresql.org; Fri, 03 Sep 2021 13:59:06 +0000 Received: by mail-wm1-x32c.google.com with SMTP id j17-20020a05600c1c1100b002e754875260so3636995wms.4 for ; Fri, 03 Sep 2021 06:59:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=GxJ0BiAHKuLqNWlAtP+rro9RjthZEcEmiY2TCJ4YDls=; b=DLEff5pQWN4N1DXulpSsLmdyMR29IEk1awzb8w4zp78cCd8k4nkE4Fu3hN+8q3vg/E ZM92KA4tPmJbymu8i6Ry/cW4R34YnxDsJ5R7m3yojRg4kJuO2WnR49hZyBeixvili5O5 dN2xEZyKKfdHzw/5yvTbHjIhL1JAsDhNwGwrz0qlAr/Y6/zJ2D7s40f6J6jfrXww5YTF IvH/gYd0RsQU8//L03I6ditqDM1BPita+2AETikc9nMZkYnK/ODhkS0787gSweekuNgP 5lIny1lMQC3N4O8+mEUfVyprGUNX4f6Wqwlv1qbov5UbPGSr9IXUQlglQ/5x1u3YvhM0 VlFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=GxJ0BiAHKuLqNWlAtP+rro9RjthZEcEmiY2TCJ4YDls=; b=nfFa4pT5dj2kJ79KsVAZ0fjVQQF1LzrjBBNHFyND+IM9/M1s5vJeBKKCx/hj+4tuMf lS+uAJ5KW+xVdZ7sGF8rBJDJ8IKvT/9d2A/+uxSIsNBaDRRSOWn6vUM3yTbXpadGsdAK QO5JEtz57YOP+Dho4CTu94Tjwfn1h4DRUzx5X21BqNHt7WojFhnjEXZVkp9D7c5c3Ghr smK+l+kxL7qPJIXHd1EcbbRneryftNySOlcXJh6ROrWfZPruktCf7Y3M+HiKDoHE7Vp8 72QjBerdcNm0YMmD+cHcHCIqtM652reb4sP+bol01IVhJgvHa/HLQup0B5MwFRiz2qMb lxPQ== X-Gm-Message-State: AOAM531fgZPS3rrSxWQlzBildXpE4c+ME/46Vx9bsLdh3qO2CVSd0lwb 4AIhHQVMCQOiBIM8PzVmuh8HWzAXHrv6pw== X-Google-Smtp-Source: ABdhPJz/IYdq6qSCVmR8R1vLB6aJusS5q/fcrwJoP9y5c5t4zrzGnGLxEZGTdVARtGUtcUHrmTNNcg== X-Received: by 2002:a1c:f414:: with SMTP id z20mr8560240wma.94.1630675715127; Fri, 03 Sep 2021 06:28:35 -0700 (PDT) Received: from localhost.localdomain (dynamic-e0ro5ogsw26t9w95c-pd01.res.v6.highway.a1.net. [2001:871:5c:4e5a:16f9:dfc3:5c9:1350]) by smtp.gmail.com with ESMTPSA id i5sm3849547wmq.17.2021.09.03.06.28.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 06:28:34 -0700 (PDT) Message-ID: <936ab0d51b6ab2c83b7021bd0552ac096b952eca.camel@cybertec.at> Subject: Re: create rule From: Laurenz Albe To: joosthelberg@gmail.com, pgsql-docs@lists.postgresql.org Date: Fri, 03 Sep 2021 15:28:33 +0200 In-Reply-To: <163065867426.693.13530965660326653108@wrigleys.postgresql.org> References: <163065867426.693.13530965660326653108@wrigleys.postgresql.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-1.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 Fri, 2021-09-03 at 08:44 +0000, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/12/rules-views.html > Description: > > Nowhere in the documentation is mentioned that rules can only be made on > tables without dropped columns and, much to my suprise, on empty tables > only. I wanted to use rules on existing tables to cater for > column-redaction, but this seems only possible by creating a new (empty) > table for all user to use and to hide the original table from everyone. > 1. the documentation should state this (and not start with an example of use > of rules in views, which is a special case, I though). > 2. the implementation should fix the only-on-empty tables issue (avoiding > having to change the documentation). I just tried, and both rules on columns with dropped columns and rules on non-empty tables can be created and used without problems. Perhaps you are using a mutilated fork of PostgreSQL. Yours, Laurenz Albe