Re: refactoring basebackup.c (zstd workers)
От | Robert Haas |
---|---|
Тема | Re: refactoring basebackup.c (zstd workers) |
Дата | |
Msg-id | CA+TgmoayB4R7SDZBWS9TQ0Ti90voyOoLBcKRNXG_a8cjDqULmg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: refactoring basebackup.c (zstd workers) (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
On Sun, Mar 20, 2022 at 9:32 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Robert Haas <robertmhaas@gmail.com> writes: > > I think I'm guilty of verbal inexactitude here but not bad coding. > > Checking for *endptr != '\0', as I did, is not sufficient to detect > > "whether an error occurred," as I alleged. But, in the part of my > > response you didn't quote, I believe I made it clear that I only need > > to detect garbage, not out-of-range values. And I think *endptr != > > '\0' will do that. > > Hmm ... do you consider an empty string to be valid input? No, and I thought I had checked properly for that condition before reaching the point in the code where I call strtol(), but it turns out I have not, which I guess is what Justin has been trying to tell me for a few emails now. I'll send an updated patch tomorrow after looking this all over more carefully. -- Robert Haas EDB: http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: