Re: Bulk inserts into two (related) tables

From: Francisco Olarte <folarte(at)peoplecall(dot)com>
To: Jeremy Finzel <finzelj(at)gmail(dot)com>
Cc: Rich Shepard <rshepard(at)appl-ecosys(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Bulk inserts into two (related) tables
Date: 2019-05-22 11:02:00
Message-ID: CA+bJJbyod_Foiv9JS0Q5j20mwJG+Xf2+7bBm7rrrVBmMRugnDg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jeremy:

On Tue, May 21, 2019 at 11:58 PM Jeremy Finzel <finzelj(at)gmail(dot)com> wrote:

> Then take Francisco's suggestion, only use an md5 of the organization fields to create yourself a unique identifier. Then you 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2019-05-22 12:40:16 Re: Bulk inserts into two (related) tables
Previous Message Francisco Olarte 2019-05-22 10:57:17 Re: Bulk inserts into two (related) tables