Re: Use of PG_BINARY_R and "r"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Use of PG_BINARY_R and "r"
Date: 2002-03-22 19:04:19
Message-ID: 2919.1016823859@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> My assumption is that text files should use "r" and binary files use
> PG_BINARY_R.

I believe that's correct. It seems kinda inconsistent though.

> For example, in 7.2 I see pg_hba.conf opened with "r" and pg_ident.conf
> opened with PG_BINARY_R.

The latter is clearly wrong, since pg_ident.conf is not binary.

Is there any interest in defining
#define PG_TEXT_R "r"
#define PG_TEXT_W "w"
so that AllocateFile is always called with one of this set of macros?
Or is that just silly?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-03-22 19:07:54 Re: SET NULL / SET NOT NULL
Previous Message Ross J. Reedstrom 2002-03-22 19:00:37 Re: SET NULL / SET NOT NULL