Multiple database support

David Miller justdave at
Mon Sep 1 22:13:12 UTC 2003

On 9/2/2003 12:04 AM +0200, Jeroen Ruigrok/asmodai wrote:

> David,
> -On [20030901 03:52], David Miller (justdave at wrote:
>>Yeah, I'm still intending to use something like that here.  It seemed to
>>work very well at keeping the Sybase port running on both Sybase and MySQL
> I added the necessary PostgreSQL extentions to it and placed it under
> the bug # at
> I haven't tested it yet, but PostgreSQL requires correct ANSI SQL '
> placement.  Furthermore, one thing I cannot easily provide is the
> LAST_INSERT_ID()/@@identity stuff.  PostgreSQL requires use of its
> sequences for that and I'd reckon Oracle does as well (need to check).
> What do we use it for anyway?

Getting the just-created key number for the record inserted by the previous
INSERT statement (assuming the table has an auto_increment column in it).

We ended up not using @@identity on the Sybase port - Sybase's
implementation of it sucks, and it's not reliable, so we created a new
table to hold key numbers and do the lock/increment/select/unlock on the
appropriate row in that table to get key numbers (which means retrieving a
new key prior to doing an insert, and including the key in the insert
Dave Miller      Project Leader, Bugzilla Bug Tracking System   

More information about the developers mailing list