Skip site navigation (1) Skip section navigation (2)

Re: [COMMITTERS] pgsql: Use symbolic names not octal constants for file permission flags

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Use symbolic names not octal constants for file permission flags
Date: 2010-12-11 17:13:24
Message-ID: 4076.1292087604@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
Magnus Hagander <magnus(at)hagander(dot)net> writes:
> On Sat, Dec 11, 2010 at 17:55, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> 2. Why didn't the previously hard-wired constants passed to chmod
>> and umask fail on Windows? The M$ documentation I can find at the
>> moment suggests that *only* _S_IREAD and _S_IWRITE bits are allowed
>> in the inputs to those functions, which apparently is untrue or none
>> of this code would have executed successfully.

> Probably it ignores any flags it doesn't know about?

Maybe, but unless _S_IREAD and _S_IWRITE are defined as 0400 and 0200,
the code would have been doing the wrong thing altogether.

I'm not sure why you think the group/other macros couldn't be #define'd
as 0?  But in any case there's still the question of where S_IRWXU is
coming from, since it clearly does work in several places.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-12-11 17:46:23
Subject: Re: [COMMITTERS] pgsql: Use symbolic names not octal constants for file permission flags
Previous:From: Magnus HaganderDate: 2010-12-11 16:59:18
Subject: Re: [COMMITTERS] pgsql: Use symbolic names not octal constants for file permission flags

pgsql-committers by date

Next:From: Tom LaneDate: 2010-12-11 17:46:23
Subject: Re: [COMMITTERS] pgsql: Use symbolic names not octal constants for file permission flags
Previous:From: Magnus HaganderDate: 2010-12-11 16:59:18
Subject: Re: [COMMITTERS] pgsql: Use symbolic names not octal constants for file permission flags

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group