[Nitro] Og, adapting postgresql to reorgnaization

Jonathan Buch john at oxyliquit.de
Wed Feb 21 17:41:17 EST 2007


Hi,

> I just sent George a patch to fix that issue.  Basically, the SQL for
> inserts and updates is pulled out to a method in SqlStore, so that
> Postgres overrides that.

only the sql?  No way to override the implementation itself to provide
more flexibility?

> As a sidenote, I altered the last_insert_id so that it returns
> currval(#{seq}) and explicitly put a nextval() in the insert_sql
> method.  Which looks right to me...

Which has the (assumed) disadvantage of not being 'thread safe'.

Assume 2 connections to the database, inserting into the same table.
When those inserts happen too close to each other it may be that
the currval() returns the wrong value.  I see the same problem with
the mysql adapter.  Is this a non-issue?

Jo

-- 
Feel the love
http://pinkjuice.com/pics/ruby.png


More information about the Nitro-general mailing list