Received: from druid.net (druid.net [216.126.72.98]) by postgresql.org (Postfix) with ESMTP id 49FF24758F2 for ; Wed, 27 Feb 2002 03:51:46 -0500 (EST) Received: by druid.net (Postfix, from userid 1000) id EB2131BB4; Wed, 27 Feb 2002 03:51:51 -0500 (EST) Content-Type: text/plain; charset="iso-8859-1" From: "D'Arcy J.M. Cain" To: "Christopher Kings-Lynne" , Subject: Re: INSERT requires SERIAL column? Date: Wed, 27 Feb 2002 03:51:51 -0500 X-Mailer: KMail [version 1.3.2] References: In-Reply-To: Cc: pgsql-sql@PostgreSQL.org MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20020227085151.EB2131BB4@druid.net> X-Archive-Number: 200202/426 X-Sequence-Number: 6847 On February 27, 2002 02:50 am, Christopher Kings-Lynne wrote: > > Question: > > Is this really necessary or am I missing something? > > I thought specifying SERIAL columns is not neccessary in INSERT > > statements. > > You need to specify the columns to insert into, skipping over the SERIAL > column: Good advice for any INSERT statement except perhaps one time queries typed directly into the monitor. Databases change and INSERT statements in code that assume otherwise can bite you on the ass in hard to find ways. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/ | and a sheep voting on +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.