Re: Tools for moving normalized data around

Поиск
Список
Период
Сортировка
От Gavan Schneider
Тема Re: Tools for moving normalized data around
Дата
Msg-id 26DC1033-FC6F-40C4-8E92-D90506FF9AD9@pendari.org
обсуждение исходный текст
Ответ на Tools for moving normalized data around  (Peter <pmc@citylink.dinoex.sub.org>)
Ответы Re: Tools for moving normalized data around  (Rob Sargent <robjsargent@gmail.com>)
Список pgsql-general
On 19 Jan 2023, at 6:47, Peter wrote:

> Now I want to grab some part of the data, on a certain condition
> (let's say all records belonging to user 'Bob', if there is a "user"
> table somewhere at the tree-bottom), and move it to another database
> with the very same layout - which is already populated with data
> and runs a different instance of the same application.
>
> Grabbing the intended records is just some dead-simple Selects. But
> then inserting them into the other database is not fun, because some
> primary keys will likely collide.
>
A very small sliver in this problem:
The key collision problem could be avoided if the unique and arbitrary keys were UUID
Many of the other keys should be related to their respective “table of truth” so the migration is dependant on these
beingthe same across the locations 

The rest TBA down thread :)

Regards

Gavan Schneider
——
Gavan Schneider, Sodwalls, NSW, Australia
Explanations exist; they have existed for all time; there is always a well-known solution to every human problem —
neat,plausible, and wrong. 
— H. L. Mencken, 1920



В списке pgsql-general по дате отправления:

Предыдущее
От: Jeremy Smith
Дата:
Сообщение: Re: Tools for moving normalized data around
Следующее
От: Dominique Devienne
Дата:
Сообщение: Re: Tools for moving normalized data around