Re: Old "Feature" - Copy table ignores column defaults

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tim Perdue <tim(at)perdue(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Old "Feature" - Copy table ignores column defaults
Date: 2002-11-14 04:37:49
Message-ID: 27212.1037248669@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Tim Perdue <tim(at)perdue(dot)net> 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2002-11-14 04:44:50 Re: Old "Feature" - Copy table ignores column defaults
Previous Message greg 2002-11-14 02:31:51 Re: Press Release -- Numbers