| From: | "Yilin Zhang" <jiezhilove(at)126(dot)com> |
|---|---|
| To: | "jian he" <jian(dot)universality(at)gmail(dot)com> |
| Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: COPY FROM with RLS |
| Date: | 2026-07-28 09:15:17 |
| Message-ID: | 1266b6dc.6689.19fa801caa0.Coremail.jiezhilove@126.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
At 2026-07-13 16:13:58, "jian he" <jian(dot)universality(at)gmail(dot)com> wrote:
>Hi.
>While v2 has extensive failure test cases, it doesn't have a single
>successful test case,
>that's why this issue wasn't found.
>The 2 issues you reported are fixed in the attached v3.
>
>Also, previously in v2:
>+COPY r1 FROM STDIN WITH (DELIMITER ','); -- fail
>+ERROR: new row violates row-level security policy "p2" for table "r1"
>+CONTEXT: COPY r1, line 1: "4"
>
>it's better to remove the CONTEXT line.
>because ExecWithCheckOptions has comments like:
>/*
> * For WITH CHECK OPTIONs coming from views, we might be
> * able to provide the details on the row, depending on
> * the permissions on the relation (that is, if the user
> * could view it directly anyway). For RLS violations, we
> * don't include the data since we don't know if the user
> * should be able to view the tuple as that depends on the
> * USING policy.
> */
Hi,
I have reviewed the latest version of the patch, LGTM.
Best regards,
--
Yilin Zhang
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2026-07-28 09:23:33 | Re: Fix RETURNING side effects for FOR PORTION OF leftover rows |
| Previous Message | shveta malik | 2026-07-28 09:08:42 | Re: Support EXCEPT for TABLES IN SCHEMA publications |