pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Färber, Franz-Josef (StMUK) <Franz-Josef.Faerber@stmuk.bayern.de>
To: Adrian Klaver <adrian.klaver@aklaver.com>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: AW: pg_event_trigger_ddl_commands after GRANT is quite empty
Date: Mon, 12 Oct 2026 14:36:54 +0000
Message-ID: <dd47a5ab92fa4939970ea9f982de8d7b@stmuk.bayern.de> (raw)
In-Reply-To: <3da46e1d-2c3e-40e4-b464-05fce7949730@aklaver.com>
References: <e76825ec4a93422aacf3b64f521c4ed5@stmuk.bayern.de>
	<3da46e1d-2c3e-40e4-b464-05fce7949730@aklaver.com>

SELECT version();
--PostgreSQL 18.6 (Debian 18.6-1.pgdg13+2) on x86_64-pc-linux-gnu, compiled by gcc (Debian 14.2.0-19) 14.2.0, 64-bit

CREATE FUNCTION ddl_command_end_trigger_func() RETURNS event_trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
    RAISE NOTICE USING MESSAGE = (
        SELECT concat_ws(', ', classid, objid, objsubid, command_tag, object_type, schema_name, object_identity)
        FROM pg_event_trigger_ddl_commands()
    );
END
$$;

CREATE EVENT TRIGGER ddl_command_end_trigger ON ddl_command_end EXECUTE FUNCTION ddl_command_end_trigger_func();

CREATE TABLE t();

GRANT SELECT ON TABLE t TO postgres;



Regards,
Franz-Josef Färber


-----Ursprüngliche Nachricht-----
Von: Adrian Klaver <adrian.klaver@aklaver.com> 
Gesendet: Montag, 12. Oktober 2026 16:18
An: Färber, Franz-Josef (StMUK) <Franz-Josef.Faerber@stmuk.bayern.de>; pgsql-general@postgresql.org
Betreff: Re: pg_event_trigger_ddl_commands after GRANT is quite empty

On 10/12/26 1:47 AM, Färber, Franz-Josef (StMUK) wrote:
> Dear Postgres Community,
> 
> pg_event_trigger_ddl_commands after GRANT is quite empty.
> 
> If I execute: GRANT SELECT ON TABLE t TO r;
> 
> . and in a trigger function I have:
> 
>          SELECT classid, objid, objsubid, command_tag, object_type, schema_name, object_identity
>          FROM pg_event_trigger_ddl_commands();
> 
> This gives me:
> 
> 	null, null, null, GRANT, TABLE, null, null
> 

Postgres version?

What is the complete trigger and trigger function definition?

> 
> How to find out the table involved and the privileges?
> 
> 
> Regards,
> Franz-Josef Färber
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com


view thread (3+ messages)  latest in thread

Message-ID: <dd47a5ab92fa4939970ea9f982de8d7b@stmuk.bayern.de>
Permalink:  ../dd47a5ab92fa4939970ea9f982de8d7b@stmuk.bayern.de/
Also on:    postgresql.org/message-id/dd47a5ab92fa4939970ea9f982de8d7b@stmuk.bayern.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: Franz-Josef.Faerber@stmuk.bayern.de, adrian.klaver@aklaver.com
  Subject: Re: pg_event_trigger_ddl_commands after GRANT is quite empty
  In-Reply-To: <dd47a5ab92fa4939970ea9f982de8d7b@stmuk.bayern.de>
  References: <e76825ec4a93422aacf3b64f521c4ed5@stmuk.bayern.de> <3da46e1d-2c3e-40e4-b464-05fce7949730@aklaver.com> <dd47a5ab92fa4939970ea9f982de8d7b@stmuk.bayern.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox