[Wellington-pm] Perl database stuff....

Andrew McMillan andrew at catalyst.net.nz
Mon Dec 25 18:42:24 PST 2006


On Tue, 2006-12-26 at 00:27 +1300, michael at diaspora.gen.nz wrote:
> >(c) In the perl you can make it "select, select, insert" as:
> > 1. select the record (and fail).
> > 2. select the sequence nextval
> > 3. insert the row using the sequence.
> 
> There is of course a race condition here; between the select record
> and select the sequence nextval, another thread could perform the full
> process.

Ah, no.  We're talking about PostgreSQL here, so there isn't.

Cheers,
					Andrew.

-------------------------------------------------------------------------
Andrew @ Catalyst .Net .NZ  Ltd,  PO Box 11-053, Manners St,  Wellington
WEB: http://catalyst.net.nz/            PHYS: Level 2, 150-154 Willis St
DDI: +64(4)803-2201      MOB: +64(272)DEBIAN      OFFICE: +64(4)499-2267
                        Chess tonight.
-------------------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.pm.org/pipermail/wellington-pm/attachments/20061226/af26e9e2/attachment.bin 


More information about the Wellington-pm mailing list