Re: Replace open mode with PG_BINARY_R/W/A macros

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Replace open mode with PG_BINARY_R/W/A macros
Дата
Msg-id 2271354.1650292892@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Replace open mode with PG_BINARY_R/W/A macros  (Japin Li <japinli@hotmail.com>)
Ответы Re: Replace open mode with PG_BINARY_R/W/A macros  (Japin Li <japinli@hotmail.com>)
Список pgsql-hackers
Japin Li <japinli@hotmail.com> writes:
> I found we defined PG_BINARY_R/W/A macros for opening files, however,
> there are some places use the constant strings.  IMO we should use
> those macros instead of constant strings.  Here is a patch for it.
> Any thoughts?

A lot of these changes look wrong to me: they are substituting "rb" for
"r", etc, in places that mean to read text files.  You have to think
about the Windows semantics.

If you think any of those changes are correct, then they are bug fixes
that need to be considered separately from cosmetic tidying.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: TRAP: FailedAssertion("HaveRegisteredOrActiveSnapshot()", File: "toast_internals.c", Line: 670, PID: 19403)
Следующее
От: Robert Haas
Дата:
Сообщение: Re: TRAP: FailedAssertion("HaveRegisteredOrActiveSnapshot()", File: "toast_internals.c", Line: 670, PID: 19403)