| From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
|---|---|
| To: | Andrey Rachitskiy <pl0h0yp1(at)gmail(dot)com> |
| Cc: | exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org, Peter Eisentraut <peter(at)eisentraut(dot)org> |
| Subject: | Re: BUG #19637: pg_event_trigger_ddl_commands can't process GRANT ON PROPERTY GRAPH |
| Date: | 2026-08-26 00:50:24 |
| Message-ID: | CAHGQGwH_uiUXf5X8s0Prrn+z-YtSz6tF7GE2QogH=UK0tyEyNw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On Mon, Aug 24, 2026 at 10:30 PM Andrey Rachitskiy <pl0h0yp1(at)gmail(dot)com> wrote:
> This is a leftover from commit 2f094e7ac
> The fix returns "PROPERTY GRAPH", matching the GRANT command spelling.
Thanks for the patch!
The code change looks good to me.
Regarding the test, how about simplifying it by reusing the existing
event_trigger_report_end() trigger instead of adding a new event
trigger function just for this case? We could also reuse the property
graph created earlier in event_trigger.sql. This would keep the added
test smaller and fit better with the existing tests.
For example,
----------------------------------------------------------------------------
diff --git a/src/test/regress/sql/event_trigger.sql
b/src/test/regress/sql/event_trigger.sql
index d0e6ba295fe..bbdac7db984 100644
--- a/src/test/regress/sql/event_trigger.sql
+++ b/src/test/regress/sql/event_trigger.sql
@@ -155,8 +155,6 @@ CREATE PROPERTY GRAPH gx
EDGE TABLES (te1 SOURCE tv1 DESTINATION tv2 LABEL e1 PROPERTIES (q as p1));
ALTER PROPERTY GRAPH gx ALTER EDGE TABLE te1 ALTER LABEL e1 DROP
PROPERTIES (p1);
-DROP PROPERTY GRAPH gx;
-DROP TABLE tv1, tv2, te1;
-- alter owner to non-superuser should fail
alter event trigger regress_event_trigger owner to regress_evt_user;
@@ -335,6 +333,12 @@ END; $$;
CREATE EVENT TRIGGER regress_event_trigger_report_end ON ddl_command_end
EXECUTE PROCEDURE event_trigger_report_end();
+-- GRANT/REVOKE ON PROPERTY GRAPH with pg_event_trigger_ddl_commands()
+GRANT SELECT ON PROPERTY GRAPH gx TO public;
+REVOKE SELECT ON PROPERTY GRAPH gx FROM public;
+DROP PROPERTY GRAPH gx;
+DROP TABLE tv1, tv2, te1;
+
CREATE SCHEMA evttrig
CREATE TABLE one (col_a SERIAL PRIMARY KEY, col_b text DEFAULT
'forty two', col_c SERIAL)
CREATE INDEX one_idx ON one (col_b)
----------------------------------------------------------------------------
Regards,
--
Fujii Masao
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrey Rachitskiy | 2026-08-26 03:08:06 | Re: BUG #19637: pg_event_trigger_ddl_commands can't process GRANT ON PROPERTY GRAPH |
| Previous Message | Fujii Masao | 2026-08-26 00:44:08 | Re: repack with verbose output: not showing the number of removable row versions when using USING INDEX or CONCURRENTLY option |