Bug in file access functions

Started by Dave Pageabout 21 years ago3 messagespatches
Jump to latest
#1Dave Page
dpage@pgadmin.org

The attached patch fixes a couple of minor issues in the file access
functions added for 8.1. These seem to have been introduced in recent
changes following the original patch.

1) Stop them rejecting paths that use Windows backslash directory
seperators.

2) Allow absolute paths to files into the data dir, as we already do for
the log dir. This allows queries like the following to work:

select pg_stat_file((select setting from pg_settings where name =
'config_file'));

Without, a relative path must be constructed which is obviously
non-trivial in SQL.

Please apply for beta 2.

Regards, Dave

Attachments:

genfile.c.diffapplication/octet-stream; name=genfile.c.diffDownload+11-4
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Dave Page (#1)
Re: Bug in file access functions

"Dave Page" <dpage@vale-housing.co.uk> writes:

1) Stop them rejecting paths that use Windows backslash directory
seperators.

Hmm, seems like it should be using is_absolute_path(). Will fix.

2) Allow absolute paths to files into the data dir, as we already do for
the log dir.

Seems reasonable, given that we expose the data dir path anyway.

regards, tom lane

#3Dave Page
dpage@pgadmin.org
In reply to: Tom Lane (#2)
Re: Bug in file access functions

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: 29 August 2005 20:15
To: Dave Page
Cc: PostgreSQL-patches
Subject: Re: [PATCHES] Bug in file access functions

"Dave Page" <dpage@vale-housing.co.uk> writes:

1) Stop them rejecting paths that use Windows backslash directory
seperators.

Hmm, seems like it should be using is_absolute_path(). Will fix.

2) Allow absolute paths to files into the data dir, as we

already do for

the log dir.

Seems reasonable, given that we expose the data dir path anyway.

Thanks Tom.

Regards, Dave.