On Mon, Oct 28, 2013 at 3:06 PM, Anze Staric <[email protected]> wrote:
> On Mon, Oct 28, 2013 at 6:54 PM, Olemis Lang <[email protected]> wrote: > > I have a doubt about `update_sequence` method in > `trac.db.postgres_backend` > > [1]_. In there I notice that `column` argument value defaults to `'id'`. > It > > is expanded to build sequence name in SQL query definition but it is hard > > coded inside `MAX(id)` . Should it be transformed into `MAX(%s)` so as to > > insert the value supplied in `column` arg? > > Nice catch! I guess the field passed as a parameter should be used in > MAX as well. > > > I'm using the same Python virtual env for both ... so I wonder how does > > this work for PostgreSQL ? Is it a bug ? > > Postgres does auto increments with sequences. We create two sequences, > one for uid and one for id, so both of them are incremented and filled > in on the server. Ok , I see . However how is it that product-specific ticket IDs are consecutive in product context ? Or is it that product-specific ticket IDs are no longer consecutive in product context using PostgreSQL ? Sqlite on the other hand only support one auto > increment field so id field needs to be incremented manually. > > Yes , in that case I do obtain consecutive ticket IDs in product context Thanks for your reply . :) -- Regards, Olemis - @olemislc
