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 1vHNR0-005O24-SL for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Nov 2025 14:27:27 +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 1vHNQy-00EV84-Jf for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Nov 2025 14:27:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vHNQy-00EV7v-7b for pgsql-hackers@lists.postgresql.org; Fri, 07 Nov 2025 14:27:24 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vHNQu-006VMs-36 for pgsql-hackers@postgresql.org; Fri, 07 Nov 2025 14:27:23 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5943d20f352so952414e87.0 for ; Fri, 07 Nov 2025 06:27:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1762525638; x=1763130438; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Sqp6uamYP/p7VQgXpjRuqLgpWdcvEMp0H8dKpjixJEA=; b=Es4m1zxQFx8bHAdgh30PXTEeEVgeVRRcE8kVi+o+cFbK2SdXa7qJEOHzemt6+pXbM3 a/m40Nya/OUSTDXsQIGnYCTe/PdqCENN12NxVSaYAqUHvwgfrZ4P/7quMQmBtjVwDPPJ MrasH4ZsAen2tsUeZ5YiOlXp4gHqz0kAoy7nPSTa1Yc5YJKYETUEbr+MY32uX5vNUIhh qM5pMSz8e5q69eI9GjmwS/RFSb/L1uMxE9Pa5qeRUdxpi+0UVThNHGBOA+6cm6rPc9Z2 xpy3+0l+u/T3deWjFquTcVOpaAj2dbb4SSIZCJyQ+ytgXaphrDTuqY4lx1gQ2liXWmyn +K1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762525638; x=1763130438; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Sqp6uamYP/p7VQgXpjRuqLgpWdcvEMp0H8dKpjixJEA=; b=mDnhhWdMHUpflvKO9wuQV24sWUY7bCG+W0oxXEZwBr8l2InUzcYLkTO9OIb20//NPY Bxblib8FPVReLS/GKf3ns4iLmjyaEqxWxP1FDf1QCG4mVfD4oUVskUn15gS1JtncRXFA o2ol+3DKcSnO4TVdK6w9/QQSKGBnaAVLFKK54ULEFrkc4r+1cVC1crFa0JCVbMviSBPZ Ofu8e+87trliwxKhY/0sTpBU8n1+Lhd8HHJOcMwgUFdLiKr0alfZEr6jyCIYwBL2lG2t Z0LVNBcWl3CCa6zpSDHtoQ6Nyd0edovyijRBQEqSjz3QGmv0MLsKZsXxhjy+C8seBi7h lskQ== X-Forwarded-Encrypted: i=1; AJvYcCXqb6z513SE2qrbLxfazCEXVRKGTTKSGXbrovE2nz1CimZ88WmJ6fZVRqUCAQu2iyXDYyRDpePDm8oVNEb5@postgresql.org X-Gm-Message-State: AOJu0YxYw1cSRgq/NoKs0AqDwrCqmMHsufSBGORAEtn3QfWW7KJZOvoW OTrHRjmgbdxU2aQMbPHIFrjPnxOVngXdrw1fCDqttiC+2raZUjVAQeq/uV0rOjvUsdQcZSDsehS TUtIYJpMaQdJV3n1pGZ4EOU5wdUxH17IO0PpKeE1N X-Gm-Gg: ASbGnct3k2PiSBrZbjlvPMRzb5ufvCmbhNEc7AbvzQHgpCi0c5pYWVUiu6w6/CMDYC+ 90dafddYA/i+fj9nbKDsn/+mqbCpSrqH/S0VBrmq3wMirWyJ5g0Z3FP5oP3ULPWF+/hl44jJ8Hj gbpzVm9kziGMAmhPTRUgBZOBc/SYUZ51ZLRu45/FrD1Mtkx4qQ4dVEv8WiFrGe+LFhzRe/DbKIp YnfJch4Q/NtCJ9UCgxM566j9vpiI6DLs4FjHE9VhHhkwdioGnpUiaZvim9TDhI= X-Google-Smtp-Source: AGHT+IGF3vLxsuzQjJt5NwkvYpRoc8+8CCLNFy/TmPrCtJsMET1I/Q61D2rCmuBFmGJsPFid6XD4Whj/dmUvx3CrWbI= X-Received: by 2002:a05:6512:4025:b0:594:282c:ba6b with SMTP id 2adb3069b0e04-59456b865bfmr932162e87.28.1762525638108; Fri, 07 Nov 2025 06:27:18 -0800 (PST) MIME-Version: 1.0 References: <202510151529.s3fpwsgben57@alvherre.pgsql> In-Reply-To: From: Akshay Joshi Date: Fri, 7 Nov 2025 19:57:06 +0530 X-Gm-Features: AWmQ_blEEecVZHvoCtKoMS89M5YQh6rri2A_7kHpzxXs4dTMzjyhGqRgdUYHGG8 Message-ID: Subject: Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement To: Marcos Pegoraro Cc: Mark Wong , =?UTF-8?Q?=C3=81lvaro_Herrera?= , pgsql-hackers Content-Type: multipart/alternative; boundary="000000000000913761064301faf4" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000913761064301faf4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Nov 7, 2025 at 6:45=E2=80=AFPM Marcos Pegoraro = wrote: > Em sex., 7 de nov. de 2025 =C3=A0s 09:21, Akshay Joshi < > akshay.joshi@enterprisedb.com> escreveu: > >> Attached is the v7 patch, which is ready for review. >> >>> >>>> >>>> For this functionality to be complete, the > ALTER TABLE ... ENABLE ROW LEVEL SECURITY > statement needs to be added to the command. > > Did you think about that ? > Maybe one more parameter ? > I don=E2=80=99t think we need that statement. Could you please elaborate on= where exactly it needs to be added? The purpose of this reconstruction DDL is to generate the DDL for an already created policy. The command you mentioned is used to enable row-level security on the table, which is a separate step. > > regards > Marcos > > > --000000000000913761064301faf4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Fri, Nov 7, = 2025 at 6:45=E2=80=AFPM Marcos Pegoraro <marcos@f10.com.br> wrote:
Em sex., 7 de= nov. de 2025 =C3=A0s 09:21, Akshay Joshi <akshay.joshi@enterprisedb.com>= escreveu:

Attached is the v7 patch, which= is ready for review.

For this functionality to be complete, th= e=C2=A0
ALTER TABLE ... ENABLE ROW LEVEL SECURITY
statement needs to be added= to the command.=C2=A0

Did you think about that ?
Maybe one more paramete= r ?

I don=E2=80=99t think we need that stat= ement. Could you please elaborate on where exactly it needs to be added? The purpose of this reconstruction DDL is to generate the DDL for an alread= y created policy. The command you mentioned is used to enable row-level sec= urity on the table, which is a separate step.=C2=A0

regards
Marcos


--000000000000913761064301faf4--