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 1u8Iwj-000ctf-Qu for pgsql-general@arkaria.postgresql.org; Fri, 25 Apr 2025 13:18:26 +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 1u8Iwh-00As8O-G7 for pgsql-general@arkaria.postgresql.org; Fri, 25 Apr 2025 13:18:24 +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 1u8Iwh-00As8G-4t for pgsql-general@lists.postgresql.org; Fri, 25 Apr 2025 13:18:23 +0000 Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u8Iwf-001tU1-33 for pgsql-general@lists.postgresql.org; Fri, 25 Apr 2025 13:18:23 +0000 Received: by mail-oi1-x231.google.com with SMTP id 5614622812f47-3f6dccdcadaso1787672b6e.2 for ; Fri, 25 Apr 2025 06:18:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745587101; x=1746191901; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=3+yFZQ2lWHPjELI6rwsh4flWDjXd6PnIkReR+O5smjs=; b=ZrDor1VaapaXxTSyKSyB/I9P9e1Ng+w1tTtiDuBUW3QJ+5Zg90lds78CsyObAHyIfk yalgipWqj7znf8HrB/Mu6v/259az6fgARMxyGfU22ig4+Ci38RCgTxTVHQetbHwYYuc4 6t9V1NapTLoK3I5KfMk0yEeWEdmgiJXRcYFnlqwLLGVppSGmvoB2AblIFQxaXu97ThHs GyVw7ayzAIQz4kOrXYBal/2oMWHgk28ss77pe3nqB0V5MKtGHSLRnanpx3orckYCHBLF czYPAx4W8KlztrywoTJp9byc1ksqE0d4SKWs1iK8I+7AnSU7C/MwBY6BKO+KCu79ahW1 9dbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745587101; x=1746191901; h=content-transfer-encoding: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=3+yFZQ2lWHPjELI6rwsh4flWDjXd6PnIkReR+O5smjs=; b=YCn1s5a/9qbZr1MjNcucJjRi4mOQ0wyWCfTzfCFT/f9tXeO2vu05mqSWyOUrwKePOA PWeIH2HK1UF0wF7Y5iM1vo7QoFzY2YepX2rYRqwSRnXY/xvHxARAsrisi6MTYQtLzQhP kZlgXgAsD8w+33KhVW3mXPA04A+BG0/H13vCb6aO+hgI8NZnDsOq5dupKYnyG1ngxuAz n72vRDjENslivakwQsJNx1SzEJZ1f1jg8+vfeHuCupWMl6gHCvnciFnAkjp1Jixp/lD9 1gM0K2LDFbG+YqKU4/cf+DEKEkuyG5cQeFQ7NCRp8/oKAF7G42+xKkIlZPCfy5QvRW/w 2YRQ== X-Forwarded-Encrypted: i=1; AJvYcCUo1pS0bvQDUVze+zVeZQWKbm40vk9iJOMcNdHvxGqeg1TQ9XrQJ3EgyUQWriyk2hQi4EqLKYm0f6Ij82Az@lists.postgresql.org X-Gm-Message-State: AOJu0YwcnsNDPsSDxFJE8XY9eW4GHDfq5vLV8PCSGlqNmp8At0gBQTUt 7p4x7N0ysxUvDsYRTM5R8BL76W/GpZmz9IYD6irHYpYlLMMXVmN0jo3PmnKh2Ic4U7+5G3+YD3Y sD0hspSfEmF4gMKF0YrT304thuvg= X-Gm-Gg: ASbGncsGl2IiV+DzQa/k3x+6+N0dVsdH1i41zs9hmf0e/fLurHt0X/ZNiMGNQof2aos I0UhTEitfj8Zs6GAvoQhuIzNW/vkIF+S56/iaRwWIEwH8QuxmuBkY/jjKyOyUu9xIo6hM/vTtXU HooBM0b3Y0irUgdwle8od9ZFAr X-Google-Smtp-Source: AGHT+IG92sUY7rTfF8LuZUFvtt2oswoG1E5thGiko409KrDyXa+HGkRMGkffDW3yO4nkBWm6FDJBKj6QEuZPwvKgbhs= X-Received: by 2002:a05:6808:22a6:b0:3fa:ca26:6295 with SMTP id 5614622812f47-401f2ad072bmr1244889b6e.31.1745587101186; Fri, 25 Apr 2025 06:18:21 -0700 (PDT) MIME-Version: 1.0 References: <88804c921b425d37a3072b5698b558a763d80d63.camel@cybertec.at> In-Reply-To: From: Dominique Devienne Date: Fri, 25 Apr 2025 15:17:48 +0200 X-Gm-Features: ATxdqUEtHr7msSpFeP-O949PEBJ5atr1RQG607Un30KsXeRZiSgCLXYUZqKzbSg Message-ID: Subject: Re: Clarification on RLS policy To: Vydehi Ganti Cc: Laurenz Albe , pgsql-general@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Apr 25, 2025 at 3:01=E2=80=AFPM Vydehi Ganti w= rote: > Then it should build up the lPredicate with the filter condition and appe= nd to the query user runs on the Activity table. You're not reading us, and asking us to do the work for you... RLS Predicates don't return strings in PostgreSQL, but a boolean. Write your function to do your check, and return TRUE or FALSE.