Re: Bulk inserts into two (related) tables - Mailing list pgsql-general

From Francisco Olarte
Subject Re: Bulk inserts into two (related) tables
Date
Msg-id CA+bJJbyod_Foiv9JS0Q5j20mwJG+Xf2+7bBm7rrrVBmMRugnDg@mail.gmail.com
Whole thread Raw
In response to Re: Bulk inserts into two (related) tables  (Jeremy Finzel <finzelj@gmail.com>)
List pgsql-general
Jeremy:

On Tue, May 21, 2019 at 11:58 PM Jeremy Finzel <finzelj@gmail.com> wrote:

> Then take Francisco's suggestion, only use an md5 of the organization fields to create yourself a unique identifier.
Thenyou can use ctid (unique internal identifier for each row) to join back.  You use SQL like this:
 

Sadly my suggestion only works if you can ( manually ) assign an
organization line to a people line, md5, field concatenation,
everything else is just optimization.

From what the OP has already told you have a heap of people, a heap of
organizations and a magic device to assign one to the others, the
org_id assignment ( using an unknown algorithm, we do not know if he
wants sequences, texts or cat gifs as IDs ) is easy, the pairing part
is unsolvable with the data we have.

At this moment I think the only useful link for this is
http://xyproblem.info/ ( for the OP, not for U ).

Francisco Olarte.



pgsql-general by date:

Previous
From: Francisco Olarte
Date:
Subject: Re: Bulk inserts into two (related) tables
Next
From: Rich Shepard
Date:
Subject: Re: Bulk inserts into two (related) tables