Re: INSERT requires SERIAL column? - Mailing list pgsql-sql

From D'Arcy J.M. Cain
Subject Re: INSERT requires SERIAL column?
Date
Msg-id 20020227085151.EB2131BB4@druid.net
Whole thread Raw
In response to Re: INSERT requires SERIAL column?  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-sql
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 <darcy@{druid|vex}.net>   |  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.


pgsql-sql by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Re: INSERT requires SERIAL column?
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: Err. compiling func. with SET TRANS...