Re: how to adjust auto increment id offset?

Поиск
Список
Период
Сортировка
От Bèrto ëd Sèra
Тема Re: how to adjust auto increment id offset?
Дата
Msg-id CAKwGa_-6GqdEr4Nx6qP_KYEqzKU38mVSPd6UU4pS+UXnDAunOQ@mail.gmail.com
обсуждение исходный текст
Ответ на how to adjust auto increment id offset?  (Yan Chunlu <springrider@gmail.com>)
Ответы Re: how to adjust auto increment id offset?  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
Hi

On 15 November 2011 11:44, Yan Chunlu <springrider@gmail.com> wrote:
I would like to implement two master db with even-odd id sharding.   in mysql it is fairly easy by using the configuration:

auto_increment_offset = 1
auto_increment_increment = 2


but I have searched a lot didn't find anything related to this, some users doing this via trigger like "rubyrep". 

is there an easy way to do this?  thanks!

http://www.postgresql.org/docs/8.1/static/sql-createsequence.html

--
==============================
If Pac-Man had affected us as kids, we'd all be running around in a darkened room munching pills and listening to repetitive music.

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

Предыдущее
От: Yan Chunlu
Дата:
Сообщение: how to adjust auto increment id offset?
Следующее
От: Robins Tharakan
Дата:
Сообщение: Re: Client SQL Tool