Thanks for patches, Please find couple of comments for v59-0001 and v59-0002 :

1) Noticed an unexpected behavior in pg_conflict privilege checks.
A combined privilege check (CREATE, USAGE) on the pg_conflict schema
returns 'true', even though both privileges are revoked from the
role/user. Please see the example below -

-- by default, for 'nisha' - CREATE is false and USAGE is true, hence
combined check is true (OK)
  CREATE ROLE nisha;
  SELECT has_schema_privilege('nisha', 'pg_conflict', 'CREATE, USAGE'); -- true

-- Now revoke USAGE
  REVOKE USAGE ON SCHEMA pg_conflict FROM PUBLIC;

-- Single privilege checks
  SELECT has_schema_privilege('nisha', 'pg_conflict', 'USAGE');   -- false (OK)

-- Combined mask check
  SELECT has_schema_privilege('nisha', 'pg_conflict', 'CREATE,
USAGE');  -- true (not OK)

-- Other way to look at the problem -
postgres=# set role nisha;
postgres=> SELECT schema_name FROM information_schema.schemata;
    schema_name
--------------------
 pg_conflict          --> should not be here
 information_schema
 public
(3 rows)
~~~

2) Couple of minor typos in patch-001

2a) conflict.c
+ * scalar columns(relid, conflict_type, commit timestamp) while these JSON
/scalar columns(relid, / scalar columns (relid,

2b) subscription.sql
+-- this should generate an conflict log table named pg_conflict_log_$subid$
+CREATE SUBSCRIPTION regress_conflict_test1 CONNECTION 'db...

/generate an conflict/generate a conflict

--
Thanks,
Nisha


Reply via email to