Re: Copy from and serial columns

From: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
To: Postgres Newbie <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Copy from and serial columns
Date: 2007-09-05 02:48:15
Message-ID: 46DE18EF.3000702@mail.nih.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Sean Davis wrote:
> I have a client (psycopg2) that only allows copies of the entire table
> (not specific rows). I would like to use a SERIAL column on tables,
> but I cannot seem to figure out how to apply the default. Trying to
> insert a NULL does not do it. Is there another way, or should I do
> what is probably better and ask the client author to provide
> functionality for allowing subsets of columns to be passed to the copy
> command?

Sorry. psycopg2 has a "columns" argument that I was not aware of. This
will alleviate the problem.

Sean

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Maximilian Tyrtania 2007-09-05 14:43:16 Using column references in default expression
Previous Message Sean Davis 2007-09-05 01:28:07 Copy from and serial columns