Re: bug in COPY
От | Bruce Momjian |
---|---|
Тема | Re: bug in COPY |
Дата | |
Msg-id | 200207290245.g6T2jYm06821@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: bug in COPY (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
Tom Lane wrote: > nconway@klamath.dyndns.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@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: