Re: pg_restore --no-policies should not restore policies' comment

2025-09-18 Thread jian he
On Tue, Sep 9, 2025 at 12:00 PM Fujii Masao wrote: > > On Thu, Sep 4, 2025 at 6:00 PM jian he wrote: > > in _tocEntryRestorePass > > if we do > > > > if ((strcmp(te->desc, "COMMENT") == 0 || > > strcmp(te->desc, "SECURITY LABEL") == 0) && > > strncmp(te->tag, "EVENT TRIGGER "

Re: pg_restore --no-policies should not restore policies' comment

2025-09-17 Thread Fujii Masao
On Tue, Sep 16, 2025 at 5:04 PM Fujii Masao wrote: > > On Tue, Sep 9, 2025 at 4:56 PM Fujii Masao wrote: > > Thanks for the review! Unless there are any objections, > > I’ll run the tests again and then push the patches. > > I've pushed patches 0001, 0002, and 0003. I'll push 0004 later. I've pu

Re: pg_restore --no-policies should not restore policies' comment

2025-09-17 Thread Fujii Masao
On Tue, Sep 9, 2025 at 2:50 PM jian he wrote: > > On Tue, Sep 9, 2025 at 12:00 PM Fujii Masao wrote: > > > > On Thu, Sep 4, 2025 at 6:00 PM jian he wrote: > > > in _tocEntryRestorePass > > > if we do > > > > > > if ((strcmp(te->desc, "COMMENT") == 0 || > > > strcmp(te->desc, "SECURI

Re: pg_restore --no-policies should not restore policies' comment

2025-09-16 Thread Fujii Masao
On Tue, Sep 9, 2025 at 4:56 PM Fujii Masao wrote: > Thanks for the review! Unless there are any objections, > I’ll run the tests again and then push the patches. I've pushed patches 0001, 0002, and 0003. I'll push 0004 later. Buildfarm member petalura reported a failure at [1] after 0001 was bac

Re: pg_restore --no-policies should not restore policies' comment

2025-09-08 Thread Fujii Masao
On Thu, Sep 4, 2025 at 6:00 PM jian he wrote: > in _tocEntryRestorePass > if we do > > if ((strcmp(te->desc, "COMMENT") == 0 || > strcmp(te->desc, "SECURITY LABEL") == 0) && > strncmp(te->tag, "EVENT TRIGGER ", 14) == 0) > return RESTORE_PASS_POST_ACL; > > then Restore

Re: pg_restore --no-policies should not restore policies' comment

2025-09-04 Thread jian he
On Wed, Sep 3, 2025 at 7:50 PM Fujii Masao wrote: > > > > > 02: make pg_dump dump security label for shared database objects, like > > > > subscription, roles. > > As I understand it, shared objects like roles are handled by pg_dumpall, > which already dumps their security labels via pg_shseclabel

Re: pg_restore --no-policies should not restore policies' comment

2025-09-03 Thread Fujii Masao
On Wed, Aug 27, 2025 at 3:18 PM jian he wrote: > > Since --no-publications and --no-subscriptions have been around for a long > > time, > > while --no-policies was added in v18, I wonder if it makes sense to first > > fix > > the publications and subscriptions cases (and add tests for them) and

Re: pg_restore --no-policies should not restore policies' comment

2025-08-26 Thread jian he
On Tue, Aug 26, 2025 at 7:43 PM Fujii Masao wrote: > > > > > summary of attached patch: > > Thanks for the patches! > > > 01: make pg_restore not restore comments if comments associated > > objects are excluded. > > > TODO: need perl tests > > How about adding tests for pg_restore --no-policies in

Re: pg_restore --no-policies should not restore policies' comment

2025-08-26 Thread Fujii Masao
On Thu, Jul 3, 2025 at 11:32 PM jian he wrote: > > On Wed, Jul 2, 2025 at 5:18 PM Fujii Masao > wrote: > > > > > hi. > > > > > > I’ve tested the pg_restore options --no-policies, --no-publications, and > > > --no-subscriptions locally. > > > > Thanks for updating the patch! Could you add it to t

Re: pg_restore --no-policies should not restore policies' comment

2025-07-03 Thread jian he
On Wed, Jul 2, 2025 at 5:18 PM Fujii Masao wrote: > > > hi. > > > > I’ve tested the pg_restore options --no-policies, --no-publications, and > > --no-subscriptions locally. > > Thanks for updating the patch! Could you add it to the next CommitFest > so we don't forget about it? > sure. > > > Howe

Re: pg_restore --no-policies should not restore policies' comment

2025-07-02 Thread Fujii Masao
On 2025/07/02 11:17, jian he wrote: On Fri, Jun 27, 2025 at 1:34 PM Fujii Masao wrote: To do that, we need 1. we checked that COMMENTS on policies, the TocEntry->tag begins with "POLICY". which is true, see above code walk through. 2. We also need to make sure that no other dumpComment cal

Re: pg_restore --no-policies should not restore policies' comment

2025-07-01 Thread jian he
On Fri, Jun 27, 2025 at 1:34 PM Fujii Masao wrote: > > > To do that, we need > > 1. we checked that COMMENTS on policies, the TocEntry->tag begins with > > "POLICY". which is true, see above code walk through. > > 2. We also need to make sure that no other dumpComment call results in a > > COMMENT

Re: pg_restore --no-policies should not restore policies' comment

2025-06-26 Thread Fujii Masao
On 2025/06/27 13:08, jian he wrote: hi. first looking at function dumpPolicy (pg_dump.c): appendPQExpBuffer(polprefix, "POLICY %s ON", fmtId(polinfo->polname)); tag = psprintf("%s %s", tbinfo->dobj.name, polinfo->dobj.name); if (polinfo->dobj.dum

pg_restore --no-policies should not restore policies' comment

2025-06-26 Thread jian he
hi. first looking at function dumpPolicy (pg_dump.c): appendPQExpBuffer(polprefix, "POLICY %s ON", fmtId(polinfo->polname)); tag = psprintf("%s %s", tbinfo->dobj.name, polinfo->dobj.name); if (polinfo->dobj.dump & DUMP_COMPONENT_COMMENT) dumpCommen