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.94.2) (envelope-from ) id 1qbNuO-00BtR3-V8 for pgsql-general@arkaria.postgresql.org; Wed, 30 Aug 2023 16:19:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qbNuN-000jJq-ID for pgsql-general@arkaria.postgresql.org; Wed, 30 Aug 2023 16:19:07 +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.94.2) (envelope-from ) id 1qbNuN-000jJS-4U for pgsql-general@lists.postgresql.org; Wed, 30 Aug 2023 16:19:06 +0000 Received: from mout-u-107.mailbox.org ([2001:67c:2050:101:465::107]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qbNuF-001oT1-9f for pgsql-general@lists.postgresql.org; Wed, 30 Aug 2023 16:19:05 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4RbTxl4XXdz9sQx; Wed, 30 Aug 2023 18:18:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ewie.name; s=MBO0001; t=1693412331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5/rkoBUovlSFJEFRHbAHRAy82QcoRQtSvIrt6937zbM=; b=gnXCrtU3vNkSsx+4yUZ1YF+BCF40uKnb6BmUGP54WNYtaagg9CoxkAoHWBcNZECoVd4rpL CInfKRQZEFP8bVB9lNvBfeVpRFOx8TYYmqFTvuJ2kqgPw8s1exISaXT+KXY7GiNR8Im9ep zv1pvtuqYtIXtFmaHaJlLW3xS9GQBRHIeaAXDjHtmLXQtnQMxAf3M3rt9SrANCVLiF8/2o 4M149uY0LOzvMAPFCvJsQOc1/H5jJVDdVdloMotgaU6XeUpp2V46zwcWTPUvNpIuxAR8Y9 sQzu85XFu55cFK6PL3JbgRuWuhfGT0gOE4kbnlTPxm+alwJg3XDVJ8Y5acNDhA== Date: Wed, 30 Aug 2023 18:18:51 +0200 (CEST) From: Erik Wienhold To: Marc Millas , "pgsql-general@lists.postgresql.org" Message-ID: <1721713174.17585.1693412331169@office.mailbox.org> In-Reply-To: References: Subject: Re: event trigger clarification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Priority: 3 Importance: Normal X-Rspamd-Queue-Id: 4RbTxl4XXdz9sQx List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 30/08/2023 17:12 CEST Marc Millas wrote: > > the doc v15 states: " pg_event_trigger_ddl_commands returns a list of DDL > commands executed by each user action, when invoked in a function attache= d > to a ddl_command_end event trigger." > When some ddl command is executed=C2=A0within a block, I would like to kn= ow if the > event trigger fires when the line is executed or at commit time. The event trigger fires just before[1]/after[2] executing a complete comman= d. So not at commit time. [1] https://git.postgresql.org/gitweb/?p=3Dpostgresql.git;a=3Dblob;f=3Dsrc/= backend/tcop/utility.c;h=3D6b0a8652622b26887ea2ccd15ced3300e951c5dc#l1120 [2] https://git.postgresql.org/gitweb/?p=3Dpostgresql.git;a=3Dblob;f=3Dsrc/= backend/tcop/utility.c;h=3D6b0a8652622b26887ea2ccd15ced3300e951c5dc#l1923 -- Erik