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 1u9fyq-004qtN-Pb for pgsql-general@arkaria.postgresql.org; Tue, 29 Apr 2025 08:06:17 +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 1u9fyo-005mpZ-Ik for pgsql-general@arkaria.postgresql.org; Tue, 29 Apr 2025 08:06:15 +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 1u9fyo-005mpN-8C for pgsql-general@lists.postgresql.org; Tue, 29 Apr 2025 08:06:15 +0000 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u9fyn-0009JJ-0O for pgsql-general@lists.postgresql.org; Tue, 29 Apr 2025 08:06:14 +0000 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5e61a18c05aso1038493a12.1 for ; Tue, 29 Apr 2025 01:06:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745913971; x=1746518771; darn=lists.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=DzoknVyiUYIPeAq3YQ2G+A52ZKd4dA6po5HHs1lPbQ8=; b=ae+wZLeceBM9EtvIvUav94PQalBvGnhAOkOPXBxImw67xEWbTEXQHGUlG1abQy/wFC 4PkeMx/U6+3nDI5dnLLSG4fYPgjt+Aon7/hODnz1xEy4MS8Lv30jX7ddwwMiPxvocdNu wSpREAcnta+QbXTqR8VUxEMRLnmDQ8C+QfrqKx6DG1PRsjPLD6cEtKFOXwwdJovXqkDD BzJfLo6EukxiGS/DTr1oQIy5HPFO+sv5vTazXUragaE0cFWpyu6BU5Jfx7lq8Gy9A2q9 HP9/DSUQ7awSHFJTJ8SlCqQ6Z532Gp66XkngdDhv3j/lKTxdc6FASoXPxx3aqQG1anBc MvZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745913971; x=1746518771; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DzoknVyiUYIPeAq3YQ2G+A52ZKd4dA6po5HHs1lPbQ8=; b=hnyDazBZQAFysK7zg0v2wKps1JGhl6hrMGUUNWIArzdIWboBTnXbzf+jwYViwApn17 itbA0RNGvT8B89I/p5uOapJVAn+EkY6UlWGivVZuZ89kEdV0x1U74AMhs2w57ZNlgBgL jm0Sskp8u1l/MKwnIepKv+2DiRkMNP7GU/PHwWkHLsFrTgKa/J9dQYcHxLBl7KrPf8uP U5zRZVDqkUdZrEyhNhqaiv0POfQUU8MixPEwc31j5wg/RpIP4U9U5piOkCEwSqFtrmeW bTNtYf40JWKAC9iFD8PtLYx1vX9DnF1htky6zwl+YNYGcy1qL2eef1bcChgHsET8eZ2Y iAkA== X-Forwarded-Encrypted: i=1; AJvYcCX+d4Zn+CvEAG04LbyzJRrtVHiKbEwwx+3J/6hgTV1Mdz5xJkXdfuHYn4fFA9GLd4puaz1V7aVrSR5rrzEw@lists.postgresql.org X-Gm-Message-State: AOJu0YxtL1Ce/ZHi8ojpjFoyZX9+EfhcPYsOtxP+OYQveAnytxNdKQ9h bcHCodMCTzWzYTtDsl1UfyRIWcA4BIXzxWWMs3hvMAzXH4jVM+nL8VSO+Z2EOo/dDyhUT84SE+B 2IcijNGLbmPEiGsV+PHlxsUk+xGo= X-Gm-Gg: ASbGncsY5qdK3iowjQJfzhzt0P+yxrqopfheLoOHwsw/JKzsIfvqdvIN4YM9SC2ORBn oT748EUE/wyD9VNkcUs0aT4U/ZIDr0iu1ZUH5yIem9E6FxU8DBYqraJAX+t3pV3btPaOZsywczM yXmfhL1iAovgl/6g9IU1MfbQ== X-Google-Smtp-Source: AGHT+IH7XQsilBFZp2O43qFzBi20Y38oo+hd72QKJCspIV+IQUEQSXaKHjOevehzIwriuP7pULzERWgxJGnF0vGWk/8= X-Received: by 2002:a17:907:d22:b0:acb:1cb4:9d9c with SMTP id a640c23a62f3a-acec6a8d482mr75074566b.7.1745913970676; Tue, 29 Apr 2025 01:06:10 -0700 (PDT) MIME-Version: 1.0 References: <88804c921b425d37a3072b5698b558a763d80d63.camel@cybertec.at> In-Reply-To: From: Vydehi Ganti Date: Tue, 29 Apr 2025 13:35:59 +0530 X-Gm-Features: ATxdqUF4m3yHnqO6oSl08utAMEql5nhrF9ho2143lcKOdj3HqRI4r_HgROSrlTQ Message-ID: Subject: Re: Clarification on RLS policy To: Dominique Devienne Cc: Laurenz Albe , pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000007d93d0633e64666" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000007d93d0633e64666 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Checking the documents . Post fetching Boolean can we have a trigger or function which can build up the where filter clause? Or can i have a case statement in the Using which can return such statements? On Fri, Apr 25, 2025 at 7:02=E2=80=AFPM Dominique Devienne wrote: > On Fri, Apr 25, 2025 at 3:29=E2=80=AFPM Vydehi Ganti = wrote: > > Can i know if there is any scenario or ref document for the design you > suggested above? > > Some docs: > https://www.postgresql.org/docs/current/ddl-rowsecurity.html > https://satoricyber.com/postgres-security/postgres-row-level-security/ > > Your Oracle function converted to PostgreSQL, FWIW. Use at your own risk. > https://chatgpt.com/share/680b8e36-b4ac-800e-9e0e-2601aecd2aee > --00000000000007d93d0633e64666 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

Checking the documents .=C2=A0
Post fetching Boolean can we have a trigger or function which can bui= ld up the where filter clause?
Or can i have a case statement in = the Using which can return such statements?



On Fri, Apr 25, 2025 at 7:02=E2=80=AFPM Dominique= Devienne <ddevienne@gmail.com> wrote:
On = Fri, Apr 25, 2025 at 3:29=E2=80=AFPM Vydehi Ganti <rayudugs@gmail.com> wrote:
> Can i know if there is any scenario or ref document for the design you= suggested above?

Some docs:
https://www.postgresql.org/docs/current/= ddl-rowsecurity.html
https://satoricyber.com/postgr= es-security/postgres-row-level-security/

Your Oracle function converted to PostgreSQL, FWIW. Use at your own risk. https://chatgpt.com/share/680b8e36-b4a= c-800e-9e0e-2601aecd2aee
--00000000000007d93d0633e64666--