Re: Insert/select union bug - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Insert/select union bug
Date
Msg-id 20060927122339.GC13693@svana.org
Whole thread Raw
In response to Re: Insert/select union bug  (Peter <peter@greatnowhere.com>)
List 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@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-general by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: Insert/select union bug
Next
From: Jim Nasby
Date:
Subject: Re: Documenting stored procedures and functions