Received: from ncc1701.cistron.net (ncc1701.cistron.net [195.64.68.38]) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2MDf6t61709 for ; Thu, 22 Mar 2001 08:41:06 -0500 (EST) (envelope-from news@uucp.cistron.nl) Received: from news by ncc1701.cistron.net with local (Exim 3.20 #1 (Debian)) id 14g5Kp-0000Zq-00 for ; Thu, 22 Mar 2001 14:41:03 +0100 From: jdassen@cistron.nl (J.H.M. Dassen (Ray)) Subject: Re: creating "job numbers" Date: Thu, 22 Mar 2001 13:41:02 +0000 (UTC) Organization: Cistron Internet Services B.V. Lines: 13 Message-ID: References: <200103221311.f2MDB0t56270@mail.postgresql.org> X-Trace: ncc1701.cistron.net 985268462 31476 195.64.65.236 (22 Mar 2001 13:41:02 GMT) X-Complaints-To: abuse@cistron.nl To: pgsql-sql@postgresql.org Errors-To: news@news.cistron.nl X-Archive-Number: 200103/442 X-Sequence-Number: 2110 postgresql wrote: >I can not first ask with the number will be, and asking for the previous >oid after the fact can also lead to the same problem. If you use sequences and the currval() and nextval() functions, you can. See e.g. http://www.postgresql.org/docs/aw_pgsql_book/node85.html . HTH, Ray -- "a infinite number of monkeys typing into GNU emacs would never make a good program" .../linux/Documentation/CodingStyle