Nick Reinking wrote:
On Thu, Mar 27, 2003 at 06:36:29AM +0100, Thomas Corell wrote:
Oh, they call that an extention. Well. There's a serial/serial8 type in Postgres, which implicitly creates a sequence and you can use the functions nextval() and currval(). So a definition of e.g. "cur_id serial8 PRIMARY KEY" should handle this.
Or just serial, which would be considerably faster than serial8, unless you think that you will end up with more than 2147483648 rows (2^31).
Only to meassure my expectations for wikipedia ;) But keep in mind that reusing serials is not part of the pg concept, but as far as I know mysql does. E.g. deleting articles may spend a serial.
Smurf