From: Chris N. <pu...@po...> - 2001-03-28 15:16:19
|
At 10:56 +0300 2001.03.28, Alessio Bragadini wrote: >James Edward Marca wrote: > >> seems like Slash/DB/MySql.pm, line 3068, is calling a sql_select >> for LAST_INSERT_ID(), a MySQL extension that I can't find an >> analog for in PostgreSQL. But I don't have much experience with >> either database. > >It's SELECT currval('templates_tpid_seq'), i.e. the latest sequence >number assigned to templates.tpid, which is a SERIAL (auto-increments). Is this per-connection, like last_insert_id is in MySQL? So if two separate httpds do inserts at the same time, would they both get back the same value if they then asked for currval('templates_tpid_seq')? If so, that's a problem. >I would provide a patch, but PostgreSQL.pm has much less code than >MySql.pm! :-( Means most of the routines are still to be written? No, not at all. PostgreSQL inherits from MySQL. So where the code does not need to be changed for PostgreSQL (which is most places), there is no need to write that code in the PostgreSQL module. It will just pick it up from MySQL.pm if it is not in PostgreSQL.pm. That said, there are places, like this one, that do need porting, and haven't yet been ported. I think the best course of action is for PostgreSQL users to work with us (especially Brian, when he has the time) to do the porting, if they can. It is, unfortunately, not a high priority to get PostgreSQL support in 2.0 finished; however, the code is all there, and that's what Open Source is about. :-) Again, we'll work with developers who want to get this done, we just can't spend much time on it ourselves. -- Chris Nandor pu...@po... http://pudge.net/ Open Source Development Network pu...@os... http://osdn.com/ |