From: Giles Lean on

Tom Lane <tgl(a)sss.pgh.pa.us> wrote:

> Yeah. If we were to go with Greg's suggestion of inventing a separate
> is_relative_to_cwd test function, I'd expect that to insist on no ".."
> while it was at it.

So it's now two problems, and I think this is my final comment:

1. is_relative_to_cwd() I continue to think is a bad name for something
concerned about ".." (plus on Windows not having a drive letter other
than the current one); the "normal" meaning of "relative path" is
merely "not absolute"

2. if this proposed new function is to replace some uses of
is_absolute_path() then I'm afraid I'd not picked up on that (as
Bruce did) and have no opinion on whether it's a good idea or not,
and am not qualified to be the one doing the code investigation (not
enough knowledge of the code, it's beta time, and I'm frantically
short of time just now as well, sorry)

Giles

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Robert Haas on
On Tue, Jun 1, 2010 at 3:20 PM, Giles Lean <giles.lean(a)pobox.com> wrote:
> 1. is_relative_to_cwd() I continue to think is a bad name for something
>   concerned about ".." (plus on Windows not having a drive letter other
>   than the current one); the "normal" meaning of "relative path" is
>   merely "not absolute"

Maybe something like is_under_cwd()?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Bruce Momjian on
Robert Haas wrote:
> On Tue, Jun 1, 2010 at 3:20 PM, Giles Lean <giles.lean(a)pobox.com> wrote:
> > 1. is_relative_to_cwd() I continue to think is a bad name for something
> > ? concerned about ".." (plus on Windows not having a drive letter other
> > ? than the current one); the "normal" meaning of "relative path" is
> > ? merely "not absolute"
>
> Maybe something like is_under_cwd()?

Yeah, is_below_cwd?

--
Bruce Momjian <bruce(a)momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ None of us is going to be here forever. +

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Tom Lane on
Bruce Momjian <bruce(a)momjian.us> writes:
> Robert Haas wrote:
>> Maybe something like is_under_cwd()?

> Yeah, is_below_cwd?

Hm. Neither of these obviously exclude the case of an absolute path
that happens to lead to cwd. I'm not sure how important that is,
but still ...

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Bruce Momjian on
Tom Lane wrote:
> Bruce Momjian <bruce(a)momjian.us> writes:
> > Robert Haas wrote:
> >> Maybe something like is_under_cwd()?
>
> > Yeah, is_below_cwd?
>
> Hm. Neither of these obviously exclude the case of an absolute path
> that happens to lead to cwd. I'm not sure how important that is,
> but still ...

We currently do that with path_is_prefix_of_path(). Maybe that needs to
be called as well.

--
Bruce Momjian <bruce(a)momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ None of us is going to be here forever. +

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers