Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C53AB475D87 for ; Wed, 13 Nov 2002 23:37:46 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 28F22475BF9 for ; Wed, 13 Nov 2002 23:37:46 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id gAE4bnhR027213; Wed, 13 Nov 2002 23:37:49 -0500 (EST) To: Tim Perdue Cc: pgsql-sql@postgresql.org Subject: Re: Old "Feature" - Copy table ignores column defaults In-reply-to: <3DD2FF93.6060706@perdue.net> References: <3DD2FF93.6060706@perdue.net> Comments: In-reply-to Tim Perdue message dated "Wed, 13 Nov 2002 19:42:43 -0600" Date: Wed, 13 Nov 2002 23:37:49 -0500 Message-ID: <27212.1037248669@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/218 X-Sequence-Number: 10360 Tim Perdue writes: > I see there are a handful of reports of this, but it does seem broken to > me. If I am copying a table and a column is blank, surely it makes sense > to substitute the column default from the table? There is no such concept as "blank" in SQL. 7.3 does have the ability to COPY a subset of a column's tables and insert default values for the omitted columns. But if a column is provided in the input, there is no clean way to decide that a particular input value ought to be replaced by a default. regards, tom lane