COPY command and serial columns

From: "Wm(dot)A(dot)Stafford" <stafford(at)marine(dot)rutgers(dot)edu>
To: PostgreSQL List - Novice <pgsql-novice(at)postgresql(dot)org>
Subject: COPY command and serial columns
Date: 2010-11-05 20:06:07
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-novice

I am trying to use COPY to load some data. I am not using a list of
column names in the COPY command. The table I am loading has 80
character varying columns and a primary key defined as: id serial

The id field is not in the data being loaded so COPY gives the message:
ERROR: missing data for column "id"

I don't want to use a column list because this table is subject to a lot
of change and a column list would be yet another possible point of
failure if it has to be changed to keep up with table changes.

Is there anyway to load this data without specifying a column list?

Thanks for any help or advice,


Browse pgsql-novice by date

  From Date Subject
Next Message Chris Browne 2010-11-05 21:25:58 Re: COPY command and serial columns
Previous Message Jean-Yves F. Barbier 2010-11-05 16:52:43 Re: Data Types