Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hTSiB-0005rY-Ty for pgsql-general@arkaria.postgresql.org; Wed, 22 May 2019 14:59:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hTSiA-00067v-MX for pgsql-general@arkaria.postgresql.org; Wed, 22 May 2019 14:59:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hTSiA-00067o-DQ for pgsql-general@lists.postgresql.org; Wed, 22 May 2019 14:59:22 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hTSi8-0004x5-7B for pgsql-general@lists.postgresql.org; Wed, 22 May 2019 14:59:22 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 224C199387 for ; Wed, 22 May 2019 07:59:17 -0700 (PDT) Date: Wed, 22 May 2019 07:59:17 -0700 (PDT) From: Rich Shepard To: "pgsql-generallists.postgresql.org" Subject: Re: Bulk inserts into two (related) tables In-Reply-To: <3aaf1f2f-bdbc-de9a-72a8-4e1f4558d078@aklaver.com> Message-ID: References: <3aaf1f2f-bdbc-de9a-72a8-4e1f4558d078@aklaver.com> User-Agent: Alpine 2.20 (LNX 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, 22 May 2019, Adrian Klaver wrote: > So does the people data have an organization attribute? Adrian, Yes. It's the FK to the organization table. > If so why not just assign the org_id while cleaning up the data? That's what I thought to do based on your suggestion yesterday. It would make life simpler. Regards, Rich