Tom,
I am sure you are right.
The last part of my message should have read:
I am running 7.2.3
Time to plan an upgrade...
JLL
Tom Lane wrote:
>
> Jean-Luc Lachance <jllachan@nsd.ca> writes:
> > It seems that a field declared with a default is not being set when
> > executing copy from with less field then the table has.
>
> I think you are mistaken. This works in 7.3:
>
> regression=# create table foo (f1 int, f2 text, f3 int default 42);
> CREATE TABLE
> regression=# \copy foo(f1,f2) from stdin
> 1 first
> 2 second
> \.
> regression=# select * from foo;
> f1 | f2 | f3
> ----+--------+----
> 1 | first | 42
> 2 | second | 42
> (2 rows)
>
> regards, tom lane