Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xGaOa-00000002UQe-2NE6 for pgsql-general@arkaria.postgresql.org; Tue, 13 Oct 2026 11:10:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xGaOY-0000000DYSi-3H36 for pgsql-general@arkaria.postgresql.org; Tue, 13 Oct 2026 11:10:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xGaOY-0000000DYSa-1w5f for pgsql-general@lists.postgresql.org; Tue, 13 Oct 2026 11:10:10 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1xGaOW-00000001mwi-1neU for pgsql-general@postgresql.org; Tue, 13 Oct 2026 11:10:09 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4a020e65269so17814655e9.2 for ; Tue, 13 Oct 2026 04:10:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1791889807; x=1792494607; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:to:from:subject:message-id:from:to:cc :subject:date:message-id:reply-to:content-type; bh=j47sTCLus2CpPl/pYP3WTiHhtuWhV3rmEoOXJRec5HA=; b=J35DfA/5vH6iy81VlwrnoLM1ZRzba82A6L3oH5dIj76VjWhlA1bxRV5rQzc3NIPNmd t5wUkG702t7jmQXokMuC1m3EBaWUiTsl18l3DkHDj1wnGknQS06ThjshhxXiEP2DU/lQ zqyMXPlh1Wfpk+pZcBwrRf5zPfocySSwuWfYpMgJY7NwhHheaDp8U6VRQs67Hfo5JVHB qfqGDk2kxOs2msptPSsbCL71txk4MgR0/hABI21BrtK55nmk4HZArVk80AqG0y846Ax2 /9f0XsglodcPopPVctvO8f5zR1gBCI+TIV1eLCG6euU2iTZSv0Lzx/ZCrJgEqj3pqPOg iXUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791889807; x=1792494607; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=j47sTCLus2CpPl/pYP3WTiHhtuWhV3rmEoOXJRec5HA=; b=BnUfhm9N9Dxx5ZKunifT+pjRK9BJTaezvsV09UUUIz1gbmjBNjcKWXgtfCloOh/UbT /v0U0WN/Y4ucwsAHmAAxIZpXUidhM1Lps50f5KaUHt6iugzSWDOj3mkMyLOT8tdD5eSK dbPXbVfkTPbk3KlwMxp7pP4D93DR0ojGQvVb+KxS+fPf7EHHwyXAy4lue0CaYy7BONk7 gdQrvO5Q+GHxnQvFCj3IOGotuV+hsNF557n0k4GBnPtbFmjsZeu2r2zEJ81lYMJW343H ywuraVJPPhUWRQhBchuQOu82rKgRZpZR4R4uvk5fXNZ9V733O1Wp/z0PGIuyKTtXaWdO F+tA== X-Forwarded-Encrypted: i=1; AKwUvBxJULpS5tPRRCVPsz8a5fb+DEeVtKNTFTJAHad2MC2Bjtq+e1lW/HAq7ARFJRXTgg22I+0+t5MKxC9EDKWc@postgresql.org X-Gm-Message-State: AFq9FYLOZz8HgmOzSvRUuPdyE+Nfj5zGVcWVUWALQVK+dR8hJGGS/0dv xVpS+CcKN93smw+fkova/pObUv/nUd5AqRIerDHELMyq0wqwTr9J6so6jbWEsmcT2R6w7pdGG0y GmpIR X-Gm-Gg: AYBFou0soXoMtuqL5F9XIvmhHo63rMP1UjWS64SbIVbf0xBPzdrGCKGtVn33zrnYBFl 9lK7bjRXKlFIQuSY5YJgYdTspQ4t3HcC771t68IrfII8tO1lEXjxf7Cd7oJB8ASyxNQxPiMX9e/ Kq4EQVt2n07/q/x4jUmPUQvPQlmgoCWLqG54lnp0NLbrJFz1TN/w2yz5txHLffuRc2RflA4sEqs kX/JtmGjhMBFtAFh/W/MyKt8GM4U5zDCWSRqBZS3Ttytes79ubZceZ33O1NOyO8CF+RGiOZmo/P YZstCdys/cKo1gDapKeim0eXADLB2JhwAxMNgBi0n9/GcwMkhjsFwdkNpOiWWEH7vVr+u+ZYk05 hqTDZFMX4BuZ4zkRvY98fxJI3dz3uW9QN5GQ6ewInk+ylpBF8kNchAi+CJoHN3E8Ad58UzswkG2 x8lbpvTnavMtI5nkEy5Sgl42Ng2GvgIqqB8SvW15BtPS2cFLTC0cVMaQUPWd/qEPe7akqeXa2XH eLgLiZrBnRk/IC/eDmHrj/8rFz6cjLUmm5e X-Received: by 2002:a05:600c:3e8f:b0:4a0:1c0e:b057 with SMTP id 5b1f17b1804b1-4a18e44653cmr245729045e9.4.1791889806825; Tue, 13 Oct 2026 04:10:06 -0700 (PDT) Received: from laurenz.albe-K4N0CV00F97414D ([2001:871:70:a6bb:bf5f:4d69:766:a65]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a195b300f5sm134497675e9.1.2026.10.13.04.10.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Oct 2026 04:10:06 -0700 (PDT) Message-ID: <410d484fe9afbac8dd2c67c67db5fd73a589da3e.camel@cybertec.at> Subject: Re: AW: pg_event_trigger_ddl_commands after GRANT is quite empty From: Laurenz Albe To: =?ISO-8859-1?Q?F=E4rber=2C?= "Franz-Josef (StMUK)" , "pgsql-general@postgresql.org" Date: Tue, 13 Oct 2026 13:10:05 +0200 In-Reply-To: <8e850cfaad58479faf774cab55ece2f5@stmuk.bayern.de> References: <47ec6533d8da7e176b8e6bb167feb3d82313eed8.camel@cybertec.at> <8e850cfaad58479faf774cab55ece2f5@stmuk.bayern.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.60.2 (3.60.2-2.fc44) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2026-10-12 at 14:36 +0000, F=C3=A4rber, Franz-Josef (StMUK) wrote: > > > 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, sc= hema_name, object_identity > > > FROM pg_event_trigger_ddl_commands(); > > > > > > This gives me: > > > > > > null, null, null, GRANT, TABLE, null, null > > > > > > > > > How to find out the table involved and the privileges? > > > > I think you have to write a C function that can do something with pg_dd= l_command. >=20 > A solution usable from SQL or plpgsql would've been nice. Indeed. I am surprised that the table is not reported for a GRANT statement. Perhaps it is because GRANT operates on all kinds of objects, not sure. You could write a patch for PostgreSQL to improve that. Yours, Laurenz Albe