| От | Bob Gobeille |
|---|---|
| Тема | Re: combining db's- importing primary keys |
| Дата | |
| Msg-id | DC7E876B-454F-4EC3-AB62-240475B00B74@hp.com обсуждение |
| Ответ на | Re: combining db's- importing primary keys (Jasen Betts <jasen@xnet.co.nz>) |
| Список | pgsql-general |
On Jul 29, 2009, at 7:02 AM, Jasen Betts wrote: > On 2009-07-27, Bob Gobeille <bob.gobeille@hp.com> wrote: >> I would like to combine multiple databases (same schema) into one >> master db. Does anyone know how I can reconcile all my primary and >> foreign keys to maintain referential integrity. > > prefix them all with something that's unique to their source database. > > easy to say, hard to do. I can't believe this didn't occur to me. All my primary keys are bigint's, but I could add a second field, a unique server number or name, and change my primary (and foreign) keys to the two column combination. This would make it easy for new db's but I need to give some thought to see if there will be any hiccups migrating all the db's. Many thanks Jasen. Bob
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера