| От | Tom Lane |
|---|---|
| Тема | Re: TIL: In pg_dump, beware the combo of "-Fd" and "-Z" |
| Дата | |
| Msg-id | 784982.1611174438@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: TIL: In pg_dump, beware the combo of "-Fd" and "-Z" (Ron <ronljohnsonjr@gmail.com>) |
| Список | pgsql-admin |
Ron <ronljohnsonjr@gmail.com> writes:
> On 1/19/21 10:54 PM, Adrian Ho wrote:
>> A quick look at the `pg_dump` source code indicates that:
>>
>> * `-Z` requires an argument, and
>>
>> * the argument is converted to an integer with the `atoi()` C function
>>
>> This means that `-Z` actually took `-v` as its argument, which `atoi()`
>> converts to integer 0. That explains what you saw, and I'm also guessing
>> you did NOT get verbose output from your second command.
> That's right.
Using atoi or siblings without any error checking is not unusual in our
programs (or lots of others, I imagine). I recall some past discussion
of tightening up parsing of integer arguments to complain if they
didn't look like integers. But evidently nobody's pushed that forward.
regards, tom lane
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера