| From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: bug in COPY |
| Date: | 2002-07-29 02:45:34 |
| Message-ID: | 200207290245.g6T2jYm06821@candle.pha.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Tom Lane wrote:
> nconway(at)klamath(dot)dyndns(dot)org (Neil Conway) writes:
> > This behavior doesn't look right:
>
> It's not, but I believe the correct point of view is that the input
> data is defective and should be rejected. See past discussions
> leading up to the TODO item that mentions rejecting COPY input rows
> with the wrong number of fields (rather than silently filling with
> NULLs as we do now).
>
> A subsidiary point here is that pg_atoi() explicitly takes a zero-length
> string as valid input of value 0. I think this is quite bogus myself,
> but I don't know why that behavior was put in or whether we'd be breaking
> anything if we tightened it up.
Yea, I found the atoi zero-length behavior when I tried to clean up the
use of strtol() recently. If you remove that behavior, the regression
tests fail.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Larry Rosenman | 2002-07-29 02:47:40 | Re: Virus Emails |
| Previous Message | Marc G. Fournier | 2002-07-29 02:44:50 | Re: Virus Emails |