Bug or feature? COPY ignores column defaults

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: hackers(at)postgreSQL(dot)org
Subject: Bug or feature? COPY ignores column defaults
Date: 1999-01-28 13:28:33
Message-ID: 199901281328.NAA22202@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP key from public servers; key ID 32B8FAA1
========================================
"Many are the afflictions of the righteous; but the
LORD delivereth him out of them all."
Psalm 34:19

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vadim Mikheev 1999-01-28 14:11:51 Re: [HACKERS] Bug or feature? COPY ignores column defaults
Previous Message Oleg Broytmann 1999-01-28 12:45:05 Re: [HACKERS] Death!