Isn't it dangerous to get a pkid from the db before commit? Consider a situation where UserA gets a pkid "2564' for a table "tbl1". Before this change is committed, UserB inserts a record to tbl1 & gets "2564".
Wouldn't is cause a mess? -- Vineet On Fri, May 4, 2012 at 6:37 AM, <[email protected]> wrote: > Send Dabo-users mailing list submissions to > [email protected] > FYI - postgres does not work as you suggest. > You are able to retrieve the PK without commit (within the same session). > > So if I insert a record I can retrieve the PK without a commit. > > see Currval() > > Johnf > > > We were talking about retrieving the pk before biz.save(), which is before > the > database knows anything about the new record. > > Paul > > > I was just commenting on your post not on Dabo. > > Postgres can provide the PK from a record before it is committed. > > transaction > begin > insert record > retrieve PK (I will assume that is a serial data type). > insert record > retrieve PK > continue > > commit or rollback > > I realize that Dabo does not do it but I do it all the time with Dabo temp > cursors. > > Johnf > > ------------------------------ > --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/CAP5=7ooAu13uganP=BOHt5=7cvx_ubtuyhhcqno_pdrenke...@mail.gmail.com
