Re: Duplication of Postgres sequence values

2007-04-04 Thread Mike Axiak
If this does get reasonably fixed, can this be applied to 0.96.1? This is a bug-fix and the bug it fixes makes testing with fixtures (one of the 0.96's tauted features) a pain. -Mike Axiak On Apr 4, 8:42 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 4/4/07, Jeremy Dunck <[EMAIL PROTE

Re: Duplication of Postgres sequence values

2007-04-04 Thread Russell Keith-Magee
On 4/4/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > On 4/4/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > ... > > AFAICT, the problem only exists with > > Postgres, because it's the only backend that uses sequences for > > primary key allocation. > > Oracle does too, if/when that branch l

Re: Duplication of Postgres sequence values

2007-04-04 Thread Russell Keith-Magee
On 4/4/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > All we can do is set the > next sequence value to one greater than the largest existing pk value; > there's no way to tell the automatic sequence to skip a particular value > in PostgreSQL. That's the solution I was hinting at without t

Re: Duplication of Postgres sequence values

2007-04-04 Thread Jeremy Dunck
On 4/4/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: ... > AFAICT, the problem only exists with > Postgres, because it's the only backend that uses sequences for > primary key allocation. Oracle does too, if/when that branch lands. --~--~-~--~~~---~--~~ You r

Re: Duplication of Postgres sequence values

2007-04-04 Thread James Bennett
On 4/4/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > I can work around this problem in a messy way in the deserializer by > manually resetting the sequence to the largest PK value that was found > during deserialization, but that isn't really clean, and doesn't fix > the manual allocation p

Re: Duplication of Postgres sequence values

2007-04-04 Thread Malcolm Tredinnick
Hey Russ, On Wed, 2007-04-04 at 22:07 +0800, Russell Keith-Magee wrote: > Hi all, > > I've been hunting bug #3915, and I think I've found the cause, but I > can't see an obvious solution. AFAICT, the problem only exists with > Postgres, because it's the only backend that uses sequences for > pri

Duplication of Postgres sequence values

2007-04-04 Thread Russell Keith-Magee
Hi all, I've been hunting bug #3915, and I think I've found the cause, but I can't see an obvious solution. AFAICT, the problem only exists with Postgres, because it's the only backend that uses sequences for primary key allocation. Here's a sample Django session. MyModel is a some random model