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 1sGtJA-000j34-Eo for pgsql-general@arkaria.postgresql.org; Tue, 11 Jun 2024 04:40:33 +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 1sGtJ8-0026XG-O4 for pgsql-general@arkaria.postgresql.org; Tue, 11 Jun 2024 04:40:31 +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 1sGtJ8-0026X8-B0 for pgsql-general@lists.postgresql.org; Tue, 11 Jun 2024 04:40:31 +0000 Received: from mail-oi1-x234.google.com ([2607:f8b0:4864:20::234]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sGtJ2-0012sD-O8 for pgsql-general@postgresql.org; Tue, 11 Jun 2024 04:40:30 +0000 Received: by mail-oi1-x234.google.com with SMTP id 5614622812f47-3d226c5a157so1286205b6e.2 for ; Mon, 10 Jun 2024 21:40:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718080823; x=1718685623; darn=postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=c76YoQLKBkaB2uOlLg1lrAYkuMuIFFidDNfgpW4GGrY=; b=NIBQKd5UEAe3Z8ZlohP5NZO6Ocy1yIt0yu/hyVont2EP54QrcBRd9b8JLYp9yXAKVE weMecCpCJaCHcy0RTmXfngF/bx2SxaSpZVPv4uEKskrjQfFCH2207P/3DC8aFssZeLrY f4i3bcqtDInoQX5raCVkVVB08Th0naLMgWQsbA3RyZ3J7N2jRELC/SDNmTy3QFpL0Hm7 2V5Da+0aEYYY06v+EhBImcs4HLVEVw0Cz4TjtoZunz8t2370epM09dSNWarlMAyHPxmZ Av866S2VpiOKTa6652H/ogCN/pWDOHijM3Tb6qaoXg6sPWaN+WG7cTLyhdTJ0iJC/5hU o9PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718080823; x=1718685623; h=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=c76YoQLKBkaB2uOlLg1lrAYkuMuIFFidDNfgpW4GGrY=; b=Mn87hroUxQNl1sjKe/ZoR/KYw6tZqIfFiI/6i69lS5Mpwnf9UWpbDYiYTsZOz2nQ8f doOFSRZBrNC3piTtIPe3lzZrYlrvI0tp/xvrJcZBhx2gyNKbCxOI7MmZwq1CckuKkQqV sALsk+9ZFs13478XEfT6VGI0sbNYFR9XfmW1F/n7lSe12QDZ5jd3frf6LD6ZRi3CV0rb FfMsx/lF1CTLtKI2uQtC+JY36L8qYBgBSjI8fLtDhCv5q8qEpIy7JLNXmfMibtwk1+TJ iSG+/7xpHuIR1ICWSNRPAXaqrv0cVOc7NRTyug6etvYsvPVqtXHnoVXQt9ohquzG8Ky3 JKxQ== X-Gm-Message-State: AOJu0YzJznnba+fPNI0+APt7uVqnzTz5Y85cA6t/xovkiPq5UyCNN6tI 4Z0awwBH25EzP+sjhgYwF1yLUSGVLYDcOJwTydgszS3NRNP+qR937YFkOO7AkCD4s1xXW6OJMV9 4O6TKQ6VNd+rauED2XYEToVrtcdjGig== X-Google-Smtp-Source: AGHT+IG7hjz4BKEflBBl9+GSaXqfDbc8Kkm3HfLFnNyLPcp7GCbf4BjSbVnOnbp4R6YnGlfAlsVioA+Cbp0vN44dUqw= X-Received: by 2002:a05:6871:82a:b0:254:b5b9:354e with SMTP id 586e51a60fabf-254b5b9367bmr6723338fac.19.1718080822454; Mon, 10 Jun 2024 21:40:22 -0700 (PDT) MIME-Version: 1.0 References: <7da8ec9-089-74ce-eb3-c88889b62c64@appl-ecosys.com> In-Reply-To: From: Ron Johnson Date: Tue, 11 Jun 2024 00:40:11 -0400 Message-ID: Subject: Re: Multiple tables row insertions from single psql input file To: pgsql-general Content-Type: multipart/alternative; boundary="0000000000001e31c9061a95dd4d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000001e31c9061a95dd4d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jun 10, 2024 at 5:16=E2=80=AFPM David G. Johnston < david.g.johnston@gmail.com> wrote: > 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 "ALTE= R >> 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? > I mentioned bulk loading of data. Occasionally that's useful, even in a prod database. --0000000000001e31c9061a95dd4d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Jun 10, 2024 at 5:16=E2=80=AFPM D= avid G. Johnston <david.g.= johnston@gmail.com> wrote:
= 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 T= ABLE <foo> DISABLE TRIGGER ALL;" statements near the begi= nning of the file, and their "ALTER TABLE ...= ENABLE TRIGGER ALL;" counterparts near the end of the file.


Have you just not heard of deferred co= nstraints or is there some reason besides=C2=A0deferring constraints that y= ou'd want to use alter table in transactional production code?

I mentioned bulk loading of data.= =C2=A0 Occasionally that's useful, even in a prod database.
= =C2=A0
--0000000000001e31c9061a95dd4d--