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 1tgVi0-00BJaz-08 for pgsql-general@arkaria.postgresql.org; Fri, 07 Feb 2025 21:16:20 +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 1tgVhw-005njY-KB for pgsql-general@arkaria.postgresql.org; Fri, 07 Feb 2025 21:16:16 +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 1tgVhv-005njP-OG for pgsql-general@lists.postgresql.org; Fri, 07 Feb 2025 21:16:16 +0000 Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tgVhr-003pvI-1p for pgsql-general@lists.postgresql.org; Fri, 07 Feb 2025 21:16:14 +0000 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id 24C8313801E2; Fri, 7 Feb 2025 16:16:10 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Fri, 07 Feb 2025 16:16:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1738962970; x=1739049370; bh=zPF2XDaijl8kTxd7ed5jEKuGaJm8IS7nJuQnspMSN/I=; b= E7fPTdFV29gPVrpRZtfp6KlXqqzRTKEupCwfv82N0cnIdk4Ka3lzizKnIqfIOgcT duIURVz7ti/GNKK59Vgu88GoriMx+k7zKofWh66REPogcX7He5VvkXpTLOrfL7o9 zhqBHMnYJFsLPzLPneFxjYJ+KZpHBgjZ8vvhy1OU8jYQlFGyBy0/UOu+P/IV7tey ZteL/3+KkkFTh8ZCJjbzDRleZ836+9dCfbxLAFhQYrvFhcjIVM6ytqoCVpNbcyFw PgM4CQOa5dSbtuGmVqojEn/bODTr1+15QSfPAt/G0yOzS2RijC0WgR8Gesgh55eb wbLSw6yHWv9jIrUROzhOIQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1738962970; x= 1739049370; bh=zPF2XDaijl8kTxd7ed5jEKuGaJm8IS7nJuQnspMSN/I=; b=W UmDsF5rkb+zHFj/ozSklx7JPA/Xdo2fvmkdn1VZUbVV2tYMxQyDqbX0/saxvBDHf Eqo33GetXAFcXlE1shKAjz65RAWkxR0AvmhCcb9uq20W473r2VA7xhi9g9THNxyo b4erIDOziqZ7ohj1LSujmqdOKVYWc6QSE81hFjIokpuPDoETURu7tGvfyZF2Kf/v B/kyQsw4IHAm12dRVnEBQCV0RbXbMJ4eDxs3P3G3yPWntOQDxpy8QCvgKz7iVNoZ Ss5FdUdy1aR6EQ73dqqcU1GYsa5JRvYPZTSYxSbBF8pdyBCINbymryGcWj2jWDOI 7NN4RD+oWhxp1qm1Ui/ug== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeftdefgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddv jeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvg hrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpedtjeefjefghfehteeh vdeujeehffevgedtfefhheeludfgvdekhefghffgjefhheenucffohhmrghinhepughutg hkughutghkghhordgtohhmpdhsthgrtghkohhvvghrfhhlohifrdgtohhmpdhpohhsthhg rhgvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmpdhnsggp rhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehikhhorhhoth dtudesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhgvghnvghrrghlsehl ihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 7 Feb 2025 16:16:09 -0500 (EST) Message-ID: <411904ee-d747-49c2-a10d-f0b8eae49ed1@aklaver.com> Date: Fri, 7 Feb 2025 13:16:08 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: How to get a notification To: Igor Korot Cc: "pgsql-generallists.postgresql.org" References: <5949efc2-64a0-4bb3-b837-2c7b90c3745b@aklaver.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2/7/25 11:43, Igor Korot wrote: > Hi, Adrian, > > > > It is not about the interface it is about, from link above: > > "pg_event_trigger_ddl_commands returns a list of DDL commands executed > by each user action, when invoked in a function attached to a > ddl_command_end event trigger." > > > Is there a sample code i can look at? Search: https://duckduckgo.com/?q=pg_event_trigger_ddl_commands+example&t=ffab&ia=web and ye shall find: https://stackoverflow.com/questions/23488228/how-to-get-sql-text-from-postgres-event-trigger > Also what is PostgreSQL version this function is introduced? At top of Postgres doc pages are version specific links. Go to: https://www.postgresql.org/docs/current/functions-event- triggers.html#PG-EVENT-TRIGGER-DDL-COMMAND-END-FUNCTIONS and click back on versions until you don't find it. > > Thank you. -- Adrian Klaver adrian.klaver@aklaver.com