Received: from ford.rutgersinsurance.com ([38.138.71.203]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f9GCpjP28129 for ; Tue, 16 Oct 2001 08:51:45 -0400 (EDT) (envelope-from aalang@rutgersinsurance.com) Received: (from root@localhost) by ford.rutgersinsurance.com (8.11.2/8.11.2) id f9GCfbA11684 for pgsql-php@postgresql.org.KAV; Tue, 16 Oct 2001 08:41:37 -0400 Received: from nj012 ([10.10.10.51]) by ford.rutgersinsurance.com (8.11.2/8.11.2) with SMTP id f9GCfbq11676 for ; Tue, 16 Oct 2001 08:41:37 -0400 Message-ID: <001d01c15641$333bbae0$330a0a0a@rutgersinsurance.com> From: "Adam Lang" To: References: Subject: Re: Nextval Date: Tue, 16 Oct 2001 08:50:57 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200110/66 X-Sequence-Number: 619 Ummm... no. Cross posting is a BAD thing. Post to one list and if you don't get an answer there, then post to another list. Adam Lang Systems Engineer Rutgers Casualty Insurance Company http://www.rutgersinsurance.com ----- Original Message ----- From: "Josh Berkus" To: "Zavier Sheran" ; Sent: Friday, October 12, 2001 12:49 PM Subject: Re: [PHP] Nextval > Zavier, > > In the future, cross-post this sort of request to pgsql-novice. More of > us DB Engine / Query Parser developers subscribe to that list than this > one. > > > Fetch a SERIAL field (ie. record_id) and get the > > highest value currently stored (ie. 1000), increment > > the value by 1 and store a record that will have the > > same value (1001) in record_id. So there must be a way > > with concurrency control. > > > > I went through the manuals and found the solution with > > NEXTVAL('serial'), but you have to create a sequence > > for that, and I don't know if it is the right way to > > do for what I want. > > Well, that depends on what you want to do, don't it? How about > describing what you're trying to accomplish rather than making us guess? > :-) > > -Josh