From: | "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk> |
---|---|
To: | Vadim Mikheev <vadim(at)krs(dot)ru> |
Cc: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk>, hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] Bug or feature? COPY ignores column defaults |
Date: | 1999-01-28 15:07:33 |
Message-ID: | 199901281507.PAA24198@linda.lfix.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Vadim Mikheev wrote:
>Oliver Elphick wrote:
>>
>> At release 6.4.2, COPY does not respect column defaults:
>>
>> INSERT works correctly, however.
>>
>> Is this intentional, or a bug?
>
>This is standard behaviour. DEFAULT value is substituted
>only if column value (including NULL) is not specified in
>INSERT statement.
Well, isn't that the case here?
junk=> copy testbed from stdin;
Enter info followed by a newline
End with a backslash and a period on a line by itself.
>>
>> \.
I haven't specified \N; there is no value at all for the column, so
surely the default should be used?
If that is not the case, I will add an explanation to the documentation for
COPY.
--
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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 1999-01-28 15:41:45 | Re: [HACKERS] Bug or feature? COPY ignores column defaults |
Previous Message | Jan Wieck | 1999-01-28 14:37:03 | Re: [HACKERS] Bug or feature? COPY ignores column defaults |