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
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
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."
pgsql-hackers by date
|Next:||From: Tom Lane||Date: 1999-01-28 15:41:45|
|Subject: Re: [HACKERS] Bug or feature? COPY ignores column defaults |
|Previous:||From: Jan Wieck||Date: 1999-01-28 14:37:03|
|Subject: Re: [HACKERS] Bug or feature? COPY ignores column defaults|