X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id AA982D1B4EE for ; Sat, 20 Sep 2003 06:23:10 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 80460-01 for ; Sat, 20 Sep 2003 03:22:59 -0300 (ADT) Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by svr1.postgresql.org (Postfix) with ESMTP id 35779D1B522 for ; Sat, 20 Sep 2003 03:22:58 -0300 (ADT) Received: from lfix.demon.co.uk ([80.177.205.209] helo=cerberus.lfix.co.uk) by anchor-post-34.mail.demon.net with esmtp (Exim 3.35 #1) id 1A0b90-000IIw-0Y; Sat, 20 Sep 2003 07:22:58 +0100 Received: from linda.lfix.co.uk ([192.168.1.1]) by cerberus.lfix.co.uk with esmtp (Exim 4.22) id 1A0b8n-0005Yd-QG; Sat, 20 Sep 2003 07:22:45 +0100 Subject: Re: auto_increment From: Oliver Elphick To: "Muhyiddin A.M Hayat" Cc: pgsql-sql@postgresql.org In-Reply-To: <008501c37f35$832e26e0$1f00a8c0@middinkcomp> References: <008501c37f35$832e26e0$1f00a8c0@middinkcomp> Content-Type: text/plain Organization: LFIX Limited Message-Id: <1064038995.5359.70.camel@linda.lfix.co.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Sat, 20 Sep 2003 07:23:15 +0100 Content-Transfer-Encoding: 7bit X-LFIX-MailScanner: Found to be clean X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/213 X-Sequence-Number: 15191 On Sat, 2003-09-20 at 06:10, Muhyiddin A.M Hayat wrote: > How to Create auto_increment field in PostreSQL. > Can I create them using Trigger. Use the SERIAL datatype. See also the functions nextval(), currval() and setval(). -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight, UK http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C ======================================== "But my God shall supply all your need according to his riches in glory by Christ Jesus." Philippians 4:19