Re: how to adjust auto increment id offset?

From: Bèrto ëd Sèra <berto(dot)d(dot)sera(at)gmail(dot)com>
To: Yan Chunlu <springrider(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: how to adjust auto increment id offset?
Date: 2011-11-15 08:56:00
Message-ID: CAKwGa_-6GqdEr4Nx6qP_KYEqzKU38mVSPd6UU4pS+UXnDAunOQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

On 15 November 2011 11:44, Yan Chunlu <springrider(at)gmail(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tarlika Elisabeth Schmitz 2011-11-15 08:59:28 all non-PK columns from information schema
Previous Message Robins Tharakan 2011-11-15 08:50:00 Re: Client SQL Tool