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 1sGmNI-00H6gO-1P for pgsql-general@arkaria.postgresql.org; Mon, 10 Jun 2024 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 1sGmNG-00GLkl-Fd for pgsql-general@arkaria.postgresql.org; Mon, 10 Jun 2024 21:16:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sGmNG-00GLkd-5O for pgsql-general@lists.postgresql.org; Mon, 10 Jun 2024 21:16:19 +0000 Received: from mail-oa1-x32.google.com ([2001:4860:4864:20::32]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sGmNE-000ziy-K8 for pgsql-general@lists.postgresql.org; Mon, 10 Jun 2024 21:16:18 +0000 Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-2549c883c43so834040fac.1 for ; Mon, 10 Jun 2024 14:16:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718054175; x=1718658975; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=6wk9/ZBbAiseXx6cdBOwHyq8J+nsOGC2f7ijwfd2dUY=; b=HYRfOtpkA7zWIhQw3hK2s6E8Us01jRzLMt+xxkDnloo77dcGWmQutdnMEMTv9Nod4N QNRDBeItofpM5F88I96AOFOBuEKeiErNGhRLp4N0cUjYQDFkJIO5j+u0uyvEFfRhsuo1 dYYmAE+ge3WgPAzcaH62b4UtryIG/yiiL1HxvTUM4EhWzceJcS7tYzBJON2QOKymLd4W 0NRC8Du/n+EpcCZShrpIuoQHaYUPYV9mGcti1dpLz15tgaxZiCvRiY2fT8OFPtEURUm/ r+reAh6ZF5tfxjXt0JofqzyzpwNVRUZTi2T4/VfkkIgsDVW5RCFZLp2qbK3QWv1M1K18 sbDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718054175; x=1718658975; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6wk9/ZBbAiseXx6cdBOwHyq8J+nsOGC2f7ijwfd2dUY=; b=KfjUugkyjpj45U3BFPDYZp4sVm9TSWZ3/MtGVu5d7XM+0L+r+3ZxESubTWXsZi5stC o3Bl2s+nP8QFe2kolHcmHuF7+zVOEdWQr1KEX6T/weGLBP3XMbrgY5vzgNsxZv83RdL8 99nS38YfniaOSNjpGzbLoIHsxM8joHOVYpFWtVwQBJaokFuGZcq8AP0VpmKIg4SGQISs /A3tRh85o2BePT/wyKEs8wnCzvnpcc2SX0cebLnFARvuZ/0ftp3fmaaF3MSofzV08WeY 9gNO7scd1x/SQJItCIiVQdVCzBnVFNDUI/WCKcx1p6HvLccXMRHQugufE2ZDQOBWHaTk vLEg== X-Gm-Message-State: AOJu0YyyofOuaEo4LsFUzSngC0K8HOrNDW88rwR5X5kA37xDNtnNDy8S GePdyoYuftcfUkKeCJiJfP9SnL7k5+9GbSvkSb5IH/uOFin0JVuo2P7hXtxDFU0nqQxwZ+xtr34 jB2pPShVNftQ/lu/3cT5H0+hhedo= X-Google-Smtp-Source: AGHT+IETzN8kR2ezPCbfXakXohoeqeuxmmeFegKymyCRnGWZO9kUnI9jUcjT/VTWlfDN8q1OnGSNiEH2ZeSJskEa1+8= X-Received: by 2002:a05:6870:d182:b0:254:eda1:912c with SMTP id 586e51a60fabf-254eda19b9emr307302fac.5.1718054174641; Mon, 10 Jun 2024 14:16:14 -0700 (PDT) MIME-Version: 1.0 References: <7da8ec9-089-74ce-eb3-c88889b62c64@appl-ecosys.com> In-Reply-To: From: "David G. Johnston" Date: Mon, 10 Jun 2024 14:15:36 -0700 Message-ID: Subject: Re: Multiple tables row insertions from single psql input file To: Ron Johnson Cc: "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000c8d649061a8fa88e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000c8d649061a8fa88e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > > On Mon, Jun 10, 2024 at 12:43=E2=80=AFPM Ron Johnson > wrote: > Most useful to you will be some number of "ALTER TABLE DISABLE > TRIGGER ALL;" statements near the beginning of the file, and their "ALTER > TABLE ... ENABLE TRIGGER ALL;" counterparts near the end of the file. > > Have you just not heard of deferred constraints or is there some reason besides deferring constraints that you'd want to use alter table in transactional production code? David J. --000000000000c8d649061a8fa88e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Jun 10, 2024 at 12:43=E2=80=AFPM Ron = Johnson <ronljohnsonjr@gmail.= com> wrote:

Most useful to you will be some number of "ALTER TABLE <foo> DISABLE TRIGGER ALL;" statements n= ear the beginning of the file, and their "ALT= ER TABLE ... ENABLE TRIGGER ALL;" counterparts near the end of = the file.


Ha= ve you just not heard of deferred constraints or is there some reason besid= es=C2=A0deferring constraints that you'd want to use alter table in tra= nsactional production code?

David J.

--000000000000c8d649061a8fa88e--