Received: from tina.andersenit.dk (tina.andersenit.dk [193.89.137.127] (may be forged)) by postgresql.org (8.11.3/8.11.4) with ESMTP id f9HDRpP99074 for ; Wed, 17 Oct 2001 09:27:52 -0400 (EDT) (envelope-from johnny@halfahead.dk) Received: from ([130.226.84.71]) by tina.andersenit.dk (Merak 4.00.40) with SMTP id BHB36607 for ; Wed, 17 Oct 2001 15:27:17 +0200 Message-ID: <200110171527170784.01357C60@mail.halfahead.dk> X-Mailer: Calypso Version 3.30.00.00 (4) Date: Wed, 17 Oct 2001 15:27:17 +0200 Reply-To: johnny@halfahead.dk From: =?ISO-8859-1?Q?=22Johnny_J=F8rgensen=22?= To: pgsql-php@postgresql.org Subject: last OID and connections? Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=====_10033252379859=_" X-Archive-Number: 200110/73 X-Sequence-Number: 626 --=====_10033252379859=_ Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Once I get a current project to production state, I'm going to get a heap o= f users performing updates simultaneously through the same update.php, and = that raises a few questions: 1. will pg_getlastoid() return the last oid inserted *by this user*, *on th= is page*, *on this connection*, or is there a possibility for them to get m= ixed up, because the database gets a connection from the same user (php), a= nd reuses connections or something? e.g. If a user changes his profile, and an administrator changes some other= row at the same time? 2. I find oid's pretty clever, but are they good for unique keys? It seems,= foreign key constraints won't use oid's in the current release, should i u= se serials instead? thanks, Mvh, Johnny J=F8rgensen johnny@halfahead.dk +45 6315 7328 --=====_10033252379859=_ Content-Type: text/html; charset="us-ascii"
Once I get a current project to production state, I'm going to get a heap of users performing updates simultaneously through the same update.php, and that raises a few questions:
 
1. will pg_getlastoid() return the last oid inserted *by this user*, *on this page*, *on this connection*, or is there a possibility for them to get mixed up, because the database gets a connection from the same user (php), and reuses connections or something?
 
e.g. If a user changes his profile, and an administrator changes some other row at the same time?
 
2. I find oid's pretty clever, but are they good for unique keys? It seems, foreign key constraints won't use oid's in the current release, should i use serials instead?
 
thanks,
 
 

Mvh,
 
Johnny Jørgensen
 
johnny@halfahead.dk
+45 6315 7328

--=====_10033252379859=_--