At release 6.4.2, COPY does not respect column defaults:
junk=> create table testbed (
junk-> f1 int4 default 5,
junk-> f2 float default 7.34,
junk-> f3 datetime default now(),
junk-> f4 text default 'default');
CREATE
junk=> copy testbed from stdin;
Enter info followed by a newline
End with a backslash and a period on a line by itself.
>>
>> \.
junk=> select * from testbed;
f1|f2|f3|f4
--+--+--+--0| | |
(1 row)
INSERT works correctly, however.
Is this intentional, or a bug?
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver PGP key from public servers; key
ID32B8FAA1 ======================================== "Many are the afflictions of the righteous; but
the LORD delivereth him out of them all." Psalm 34:19