Re: Bulk inserts into two (related) tables
От | Francisco Olarte |
---|---|
Тема | Re: Bulk inserts into two (related) tables |
Дата | |
Msg-id | CA+bJJbyod_Foiv9JS0Q5j20mwJG+Xf2+7bBm7rrrVBmMRugnDg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Bulk inserts into two (related) tables (Jeremy Finzel <finzelj@gmail.com>) |
Список | 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 по дате отправления: