primary keys
От | Grant Maxwell |
---|---|
Тема | primary keys |
Дата | |
Msg-id | F981E855-9C54-491F-B702-3EDFFBB79C63@maxan.com.au обсуждение исходный текст |
Ответы |
Re: primary keys
Re: primary keys Re: primary keys |
Список | pgsql-general |
Hi Folks I'm looking for a bit of advice regarding alpha primary keys. I have a table (designed by someone else) that has a numeric primary key and also a unique non-null email address field. The use of the primary key is causing me some headaches in that in multiple database server environment each server allocates a unique number from a range (and that works fine) but when the table is replicated (master-master- master) the exception handling is a bit tricky because each database server may have records that are duplicate at the email address field - with a different primary key number. I don't know why it was done this way but it seems to me that the email addresses are unique, non null and could be used as the primary key. This would make the replication much faster and simpler. Does anyone out there think the change (number to email address as primary key) would be a bad idea ? your thoughts would be appreciated. regards Grant
В списке pgsql-general по дате отправления: