On Tuesday, December 1, 2015 at 3:39:02 PM UTC-5, Chris Withers wrote: > > Indeed, but that's not quite what I asked ;-) > > I'm after setting the next value using, eg, setval: > > Ah, sorry. I saw "next value" and thought "nextval", not setval.
The `Sequence` object just seems to support a 'next_value()' http://docs.sqlalchemy.org/en/latest/core/defaults.html#sqlalchemy.schema.Sequence I looked in the source, and it looks like the postgres dialect only has a `nextval` operation. Sqlalchemy's compiler and dialects seem to only support `create sequence` and `nextval` (there's no "alter sequence [restart with]" or "setval" equivalents). It looks like you can only pass in a start value for the sequence on creation. I think you may need to handle this with literal sql, and create a ticket or try to patch. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.