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 1sGzl9-001qvm-9I for pgsql-general@arkaria.postgresql.org; Tue, 11 Jun 2024 11:33:52 +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 1sGzl7-005WBD-Pl for pgsql-general@arkaria.postgresql.org; Tue, 11 Jun 2024 11:33:50 +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 1sGzl7-005WB5-Cw for pgsql-general@lists.postgresql.org; Tue, 11 Jun 2024 11:33:50 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sGzl5-000mkd-Gb for pgsql-general@lists.postgresql.org; Tue, 11 Jun 2024 11:33:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date:Content-Transfer-Encoding: Content-ID:Content-Description; bh=lgBTd/G68y5mefU2Tt9DGs5fSf17SZWQBmncD/tzhrc=; b=N9nGmGlmogyGylDzvbLBzEZ0bB Go4Fe/4tdSwr2A29iYlLZh6Lv6krVCImHCYPNe1HmGs19jMx21pk8u3/kpwocwvZcHqhQo6huCCiZ RoAtuX0Jiy7eU+HLp19kiRBX8Q5798XZDhJgiqt4PXdc4UXmAMws/KDJEXj0ayr4qXOk=; Received: from depesz by depesz.com with local (Exim 4.96) (envelope-from ) id 1sGzl2-00CIGK-0J; Tue, 11 Jun 2024 13:33:44 +0200 Date: Tue, 11 Jun 2024 13:33:44 +0200 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: veem v Cc: pgsql-general Subject: Re: Does trigger only accept functions? Message-ID: Reply-To: depesz@depesz.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Jun 11, 2024 at 12:47:14AM +0530, veem v wrote: > to be called from ~50 triggers? or any other better approach exists to > handle this? pgaudit extension? Or just write all the changes to single table? Or use dynamic queries that will build the insert based on the name of table the event happened on? Or pass arguments? Best regards, depesz