Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vAxmh-008Lkv-MJ for pgsql-general@arkaria.postgresql.org; Mon, 20 Oct 2025 21:51:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1vAxmg-004nkP-2U for pgsql-general@arkaria.postgresql.org; Mon, 20 Oct 2025 21:51:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vAxmf-004nk2-7Y for pgsql-general@lists.postgresql.org; Mon, 20 Oct 2025 21:51:16 +0000 Received: from fhigh-b5-smtp.messagingengine.com ([202.12.124.156]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1vAxmY-002rV0-2Y for pgsql-general@lists.postgresql.org; Mon, 20 Oct 2025 21:51:15 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfhigh.stl.internal (Postfix) with ESMTP id C64617A00F6; Mon, 20 Oct 2025 17:51:09 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Mon, 20 Oct 2025 17:51:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1760997069; x=1761083469; bh=3wUIk/VPQBQbvigNp0Id7QFxc0tG/IQwx4rdNbmUfhk=; b= Iqlo/pTATSwU3WZmkGO7aJE7XkJ88JNykESiio/fZaazAaVsxlYW7Hj3sg+6P/Pb JiPX7nm4lmnJLIzQdidjwFPlxgbG4V+xg5km9Ts0Wm8tqHUXeDq6fmoqJCvgxBk8 D6lFHS/iasByZ9mwO8m81/pK9aXmt/XH3LMkY2YxvrMO3toNpyJ76QyltuM/l9vy NoG721c0F+ID0nuK0Gs0m2T65/CxOr3K7e4PGwljzRkIrg9hmtsUff9vhFBJT+at lzneeikvK8z349fhZU54angsA14YNTKoQ5CgwXsVNjaEIP/DXa+C18xcuNR+EAC/ lGz8La3ic9lYqJpX5QInlw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1760997069; x=1761083469; bh=3 wUIk/VPQBQbvigNp0Id7QFxc0tG/IQwx4rdNbmUfhk=; b=leUNoGFnf5JUo0i9w XvBIp9io1wt/4pUbohgoPYVJ0zcaKLKb65CYzkK/VNzrx6CmNPAPsUYlLaaWavKa QVUircOs8uoHI84I8b0qLzRLJLFucrzLl/o8ThBHuGbzGSs3yT75r+X6LNmAap+H JTM0A99T9pnDOupShVEkl56EXeVrtZBmHHAVIeWkf5Qm5MGbXOjhUG+Tl3weE7nr 7Z3PK6ZsV5DzGZVaWDnPGOHmoOtRKujuLmpPZbbOiimeuwy50ydrgd0TkwzpqWSf uiQ4RETDyJnm1UO1p9g20257n8FmK9MzjMRzUGmtxkxOlzSWs46yOsmzmTQwgHDu IG4kQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddufeekleehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepkfffgggfuffvfhfhjggtgfesthekredttddvjeenucfhrhhomheptegurhhirghn ucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmqe enucggtffrrghtthgvrhhnpeffleegieefgfevudehtdfhkeeutdffjeevgeffgeejvedt hefgudeiteefheejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmpdhnsggp rhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehprghulhdrrg hushhtihhnsegruhhtohhmuhhtrghtihhordgtohhmpdhrtghpthhtohepphhgshhqlhdq ghgvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 20 Oct 2025 17:51:08 -0400 (EDT) Message-ID: <91c8bea5-b966-4cea-a303-c904feb5fd72@aklaver.com> Date: Mon, 20 Oct 2025 14:51:08 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Extend CREATE POLICY to add IF EXISTS To: Paul Austin , "pgsql-general@lists.postgresql.org" References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/20/25 14:49, Paul Austin wrote: > I forgot DROP POLICY already has IF EXISTS I take it that works for you? > > *From:*Paul Austin > *Sent:* October 20, 2025 2:46 PM > *To:* pgsql-general@lists.postgresql.org > *Subject:* Extend CREATE POLICY to add IF EXISTS > > Many (but not all) DDL statements use the pattern IF EXISTS or IF NOT > EXISTS. This is really useful if you want to create a re-start-able data > model update script without needing to have PL/pgSQL blocks that has > checks to see if it exists. > > An example of a statement that doesn’t implement this pattern in the > CREATE POLICY statement. > > Is there a plan to add this pattern to the rest of the DDL statements? > Or could it be added to the CREATE/DROP POLICY statements? > > Thanks, > > Paul > -- Adrian Klaver adrian.klaver@aklaver.com