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 1sp14E-00Ff1y-OB for pgsql-general@arkaria.postgresql.org; Fri, 13 Sep 2024 07:50:11 +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 1sp14E-00Ex2a-FO for pgsql-general@arkaria.postgresql.org; Fri, 13 Sep 2024 07:50: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.94.2) (envelope-from ) id 1sp14E-00Ex2S-4E for pgsql-general@lists.postgresql.org; Fri, 13 Sep 2024 07:50:10 +0000 Received: from sm-r-002-dus.org-dns.com ([89.107.70.11]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sp14A-000vk4-Kt for pgsql-general@lists.postgresql.org; Fri, 13 Sep 2024 07:50:08 +0000 Received: from smarthost-dus.org-dns.com (localhost [127.0.0.1]) by smarthost-dus.org-dns.com (Postfix) with ESMTP id 8C503A0B76 for ; Fri, 13 Sep 2024 09:50:03 +0200 (CEST) Received: by smarthost-dus.org-dns.com (Postfix, from userid 1001) id 7F5A2A0DDC; Fri, 13 Sep 2024 09:50:03 +0200 (CEST) X-Spam-Status: No, score=0.7 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE, KAM_INFOUSMEBIZ,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 Received: from ha01s018.org-dns.com (ha01s018.org-dns.com [62.108.32.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smarthost-dus.org-dns.com (Postfix) with ESMTPS id 28E6FA0B76 for ; Fri, 13 Sep 2024 09:50:03 +0200 (CEST) Authentication-Results: ha01s018.org-dns.com; spf=pass (sender IP is 46.253.189.53) smtp.mailfrom=thiemo@gelassene-pferde.biz smtp.helo=dummy.faircode.eu Received-SPF: pass (ha01s018.org-dns.com: connection is authenticated) Date: Fri, 13 Sep 2024 09:49:59 +0200 (GMT+02:00) From: Thiemo Kellner To: pgsql-general@lists.postgresql.org Message-ID: <0fcc526e-752d-455d-936a-3ccc97cb95e3@gelassene-pferde.biz> In-Reply-To: References: Subject: Manual query vs trigger during data load MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_13_113409210.1726213799781" X-Correlation-ID: <0fcc526e-752d-455d-936a-3ccc97cb95e3@gelassene-pferde.biz> X-PPP-Message-ID: <172621380299.523359.15695365081573260118@ha01s018.org-dns.com> X-PPP-Vhost: gelassene-pferde.biz X-POWERED-BY: wint.global - AV:CLEAN SPAM:OK List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------=_Part_13_113409210.1726213799781 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi To me it seems possible to create an insert select, e.g. Insert into tab1 (val1, val2) Select valA, valB From tab2 Where valC = :param1 Cheers Thiemo ------=_Part_13_113409210.1726213799781 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi

To me it seems possible to create an insert select, e.g.

Insert into tab1 (val1, val2)
Select valA, valB
From tab2
Where valC = :param1

Cheers

Thiemo
------=_Part_13_113409210.1726213799781--