[development] auto_increment

Piotr Krukowiecki piotr at mallorn.ii.uj.edu.pl
Tue Dec 13 14:21:59 UTC 2005

On Tue, Dec 13, 2005 at 09:10:51AM -0500, Rowan Kerr wrote:
> Requesting an ID in advance is also a database-dependent feature.
> MSSQL and others let you do it through their built-in support of
> sequences, but MySQL only has auto-increment as far as I know.

You can get a sequence just inserted. This also can be done with
PostgreSQL, and probably Oracle. Don't know about MSSQL.

> As convenient as auto-increment is, I think it will be harder to work
> around that if/when Drupal is moved to other databases than it is to
> use sequences.

The only other "database" that is considered (besides those 2) is
sqlite, so far. It seems it has autoincrement columns
(http://www.sqlite.org/autoinc.html) but I'm not sure if you can get the
inserted id safely.

irc: #debian.pl
Mors Drosophilis melanogastribus!

More information about the development mailing list