Re: Replace open mode with PG_BINARY_R/W/A macros - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Replace open mode with PG_BINARY_R/W/A macros
Date
Msg-id 2271354.1650292892@sss.pgh.pa.us
Whole thread Raw
In response to Replace open mode with PG_BINARY_R/W/A macros  (Japin Li <japinli@hotmail.com>)
Responses Re: Replace open mode with PG_BINARY_R/W/A macros  (Japin Li <japinli@hotmail.com>)
List 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 by date:

Previous
From: Andres Freund
Date:
Subject: Re: TRAP: FailedAssertion("HaveRegisteredOrActiveSnapshot()", File: "toast_internals.c", Line: 670, PID: 19403)
Next
From: Robert Haas
Date:
Subject: Re: TRAP: FailedAssertion("HaveRegisteredOrActiveSnapshot()", File: "toast_internals.c", Line: 670, PID: 19403)