Received: from smtp7.atl.mindspring.net (smtp7.atl.mindspring.net [207.69.128.51]) by hub.org (8.9.3/8.9.3) with ESMTP id MAA86422 for ; Thu, 21 Oct 1999 12:27:05 -0400 (EDT) (envelope-from davidrugge@mindspring.com) Received: from localhost.mindspring.com (user-38ld3lt.dialup.mindspring.com [209.86.142.189]) by smtp7.atl.mindspring.net (8.8.5/8.8.5) with ESMTP id MAA22038; Thu, 21 Oct 1999 12:27:03 -0400 (EDT) Received: from localhost (localhost [[UNIX: localhost]]) by localhost.mindspring.com (8.9.3/8.9.3) id MAA16013; Thu, 21 Oct 1999 12:13:40 -0400 From: David Rugge Reply-To: davidrugge@mindspring.com To: Rodrigo Bernardo Pimentel , pgsql-sql@postgresql.org Subject: Re: [SQL] auto_increment? Date: Thu, 21 Oct 1999 12:12:26 -0400 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain References: <19991021134452.E25861@pobox.com> In-Reply-To: <19991021134452.E25861@pobox.com> MIME-Version: 1.0 Message-Id: <9910211213320C.02803@joplin> Content-Transfer-Encoding: 8bit On Thu, 21 Oct 1999, you wrote: > When I noticed MySQL didn't have sequences, I cursed a lot. When I >found this out, though, I kept wondering if Postgres also had it, but I >couldn't find any mention in the documentation. Does anyone know if something >similar exists? Am I doing thins the hard way? Is there any other way of >automagically getting unique ids? > TIA, Use the serial datatype. It automatically creates a sequence for you that increments each time you do an insert, -- -David Rugge http://www.mindspring.com/~davidrugge/index.html