Re: Insert/select union bug

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Peter <peter(at)greatnowhere(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Insert/select union bug
Date: 2006-09-27 12:23:39
Message-ID: 20060927122339.GC13693@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Sep 27, 2006 at 02:39:13PM +0300, Peter wrote:
> COPY wont work... my list of columns for insert is also dynamically
> built and will never cover all fields in table.

You don't have to include all columns for copy, just the fields you
copy into, the rest should get the default.

COPY table (fields) FROM STDIN;

The only restriction is that you can't use expressions.

Hope this helps,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Filip Rembiałkowski 2006-09-27 13:50:46 dbi-link questions + patch
Previous Message Michael Glaesemann 2006-09-27 11:55:29 Re: Insert/select union bug