X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 93C389FB3F4 for ; Fri, 22 Sep 2006 16:14:51 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 53916-02 for ; Fri, 22 Sep 2006 16:14:43 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from e-cocreate.com (ottawa-hs-206-191-28-238.s-ip.magma.ca [206.191.28.238]) by postgresql.org (Postfix) with ESMTP id 209F89FB3A7 for ; Fri, 22 Sep 2006 16:14:40 -0300 (ADT) Received: from laptop [192.168.1.101] by e-cocreate.com with ESMTP (SMTPD32-6.06) id A45168013C; Fri, 22 Sep 2006 15:06:57 -0400 From: "Doug Hyde" To: Subject: How to autoincrement a primary key... Date: Fri, 22 Sep 2006 15:13:46 -0400 Message-ID: <000001c6de7b$3a211c70$6501a8c0@laptop> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <1158936962.5218.4.camel@localhost.localdomain> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 Thread-Index: AcbeVoI5uLZmcNaFR8G/fIhfrzWBmgAJDLQg X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200609/157 X-Sequence-Number: 26368 I am sure this is simple, but I don't get it. I am new to PGSQL, coming from MySQL - in mysql, you can autoincrement the primary key; in postgre, I am not sure how to do this. I have read the documentation, and tried "nextval" as the default - I have searched for the datatype SERIAL, but I am using navicat and this datatype is not supported. Can someone tell me how to do this - I just want the integer value for a primary key to autoincrement by one. Thanks, Doug