| From: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> |
|---|---|
| To: | Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com> |
| Cc: | elena(at)cedardb(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: BUG #19359: Row level security: Upserts require insert policies in the update path |
| Date: | 2025-12-19 23:12:34 |
| Message-ID: | CAEZATCUTCQYaZzFY+uJQR=YwdhVbm0AqmbahW-P30v1j2oLz-Q@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On Fri, 19 Dec 2025, 17:41 Srinath Reddy Sadipiralla, <srinath2133(at)gmail(dot)com>
wrote:
> Hi, Thanks for reporting!
>
> On Fri, Dec 19, 2025 at 2:50 AM PG Bug reporting form <
> noreply(at)postgresql(dot)org> wrote:
>
>> The following bug has been logged on the website:
>>
>> Bug reference: 19359
>> Logged by: Elena Krippner
>> Email address: elena(at)cedardb(dot)com
>> PostgreSQL version: 18.1
>> Operating system: Ubuntu 25.10
>> Description:
>>
>> The documentation on policies
>> (https://www.postgresql.org/docs/current/sql-createpolicy.html) says for
>> upserts:
>> Note that INSERT with ON CONFLICT DO UPDATE checks INSERT policies' WITH
>> CHECK expressions only for rows appended to the relation by the INSERT
>> path.
>>
>> In this case, the update path is taken, but the values can only be
>> upserted
>> after adding an insert policy
>>
>
> I don’t think this is a bug in RLS
>
Yes, I think RLS is behaving correctly here, and it was the documentation
that was misleading. This was addressed as part of commit 7dc4fa9. The new
version of that documentation, which will be part of the next set of
releases, can be seen here:
https://www.postgresql.org/docs/devel/sql-createpolicy.html
Regards,
Dean
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | PG Bug reporting form | 2025-12-22 08:55:15 | BUG #19360: Bug Report: Logical Replication initial sync fails with "conflict=update_origin_differs" PG12 toPG18 |
| Previous Message | Srinath Reddy Sadipiralla | 2025-12-19 17:40:43 | Re: BUG #19359: Row level security: Upserts require insert policies in the update path |