Received: from draco.over-yonder.net ([63.147.13.14]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0C3KGp77700 for ; Thu, 11 Jan 2001 22:20:16 -0500 (EST) (envelope-from gh@over-yonder.net) Received: by draco.over-yonder.net (Postfix, from userid 1012) id 251A062D06; Thu, 11 Jan 2001 21:20:08 -0600 (CST) Date: Thu, 11 Jan 2001 21:20:08 -0600 From: GH To: "Julio Cuz, Jr." Cc: pgsql-php@postgresql.org Subject: Re: Automatic increment Message-ID: <20010111212008.A76801@over-yonder.net> References: <4.3.2.7.2.20010111190805.00b4b6a0@rccd.cc.ca.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <4.3.2.7.2.20010111190805.00b4b6a0@rccd.cc.ca.us>; from jcuz@rccd.cc.ca.us on Thu, Jan 11, 2001 at 07:09:08PM -0800 X-OS: FreeBSD X-Archive-Number: 200101/44 X-Sequence-Number: 109 On Thu, Jan 11, 2001 at 07:09:08PM -0800, some SMTP stream spewed forth: > Hi-- > > Some of you guys suggested to use the 'SERIAL' type for a field that needs > to be AUTOMATICALLY INCREASED BY 1 by PGSQL without user intervention, but > it doesn't seem to work. What am I doing wrong? I know obviously not what query you are using, but here is an example: create table example (col1 serial col2 ); insert into example (col2) values ('whatever'); select * from example; example col1 | col2 -----+------------ 1 | whatever The initial value of a serial column is "1". gh > > Julio Cuz, Jr. > Riverside Community College > jcuz@rccd.cc.ca.us >