Thread

  1. Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement

    Ilmar Y <tanswis42@gmail.com> — 2026-05-30T12:14:33Z

    The following review has been posted through the commitfest application:
    make installcheck-world:  not tested
    Implements feature:       tested, passed
    Spec compliant:           not tested
    Documentation:            not tested
    
    Hi,
    
    I re-checked v11 against current origin/master at
    db5ed03217b9c238703df8b4b286115d6e940488.
    
    The patch applies cleanly, and git diff --check reports no issues.
    
    I built with:
    
    ./configure --prefix="$PWD/pg-install" --without-readline --without-zlib --without-icu
    make -s -j8
    make -s install
    
    make -C src/test/regress check TESTS=rowsecurity
    
    passed. The regression run completed successfully; all 245 tests passed,
    including rowsecurity.
    
    I also re-ran the two manual repro scripts from my previous review. Both now
    complete successfully.
    
    The non-pretty USING case now reconstructs:
    
    CREATE POLICY p_true ON public.t USING (true);
    
    and the generated statement executes successfully.
    
    The non-pretty WITH CHECK case now reconstructs:
    
    CREATE POLICY p_check ON public.t FOR INSERT WITH CHECK (false);
    
    and that generated statement also executes successfully.
    
    So the round-trip issue I reported for v10 is fixed for me in v11.
    
    Regards,
    Ilmar Yunusov