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

Re: is_absolute_path incorrect on Windows

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Magnus Hagander" <magnus(at)hagander(dot)net>
Cc: "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: is_absolute_path incorrect on Windows
Date: 2010-04-09 17:28:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Magnus Hagander <magnus(at)hagander(dot)net> wrote: 
> On Fri, Apr 9, 2010 at 16:02, Kevin Grittner
>> I assume we reject anything where what precedes the colon doesn't
>> match the current drive's designation?
> Define reject?
I guess I made that comment thinking about the example of usage
farther down.
> We're just answering the question "is absolute path?".  It's then
> up to the caller. For example, in the genfiles function, we will
> take the absolute path and compare it to the path specified for
> the data directory, to make sure we can't go outside it.
I would say that a function which tells you whether a path is
absolute should, under Windows, return false if there isn't a
leading slash or backslash after any drive specification.  Whether
lack of a drive specification should cause it to return false or
whether that should be a separate test doesn't seem like it makes a
big difference, as long as it's clear and documented.

In response to

pgsql-hackers by date

Next:From: Ɓukasz DejnekaDate: 2010-04-09 17:35:11
Subject: Re: How to modify default Type (TSQuery) behaviour?
Previous:From: Robert HaasDate: 2010-04-09 17:19:11
Subject: Re: extended operator classes vs. type interfaces

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