Re: [HACKERS] psql \ir filename normalization

2011-11-26 Thread Bruce Momjian
Bruce Momjian wrote: > Robert Haas wrote: > > On Mon, Nov 21, 2011 at 2:30 PM, Bruce Momjian wrote: > > > Robert Haas wrote: > > >> On Mon, Nov 21, 2011 at 1:05 PM, Bruce Momjian wrote: > > >> > Robert Haas wrote: > > >> >> Argh. ?The root of the problem here seems to be that > > >> >> join_path_

Re: [HACKERS] psql \ir filename normalization

2011-11-21 Thread Bruce Momjian
Robert Haas wrote: > On Mon, Nov 21, 2011 at 2:30 PM, Bruce Momjian wrote: > > Robert Haas wrote: > >> On Mon, Nov 21, 2011 at 1:05 PM, Bruce Momjian wrote: > >> > Robert Haas wrote: > >> >> Argh. ?The root of the problem here seems to be that > >> >> join_path_components() feels entitled to arbi

Re: [HACKERS] psql \ir filename normalization

2011-11-21 Thread Robert Haas
On Mon, Nov 21, 2011 at 2:30 PM, Bruce Momjian wrote: > Robert Haas wrote: >> On Mon, Nov 21, 2011 at 1:05 PM, Bruce Momjian wrote: >> > Robert Haas wrote: >> >> Argh. ?The root of the problem here seems to be that >> >> join_path_components() feels entitled to arbitrarily insert a pathname >> >>

Re: [HACKERS] psql \ir filename normalization

2011-11-21 Thread Bruce Momjian
Robert Haas wrote: > On Mon, Nov 21, 2011 at 1:05 PM, Bruce Momjian wrote: > > Robert Haas wrote: > >> Argh. ?The root of the problem here seems to be that > >> join_path_components() feels entitled to arbitrarily insert a pathname > >> separator at the front of the output string even if its first

Re: [HACKERS] psql \ir filename normalization

2011-11-21 Thread Robert Haas
On Mon, Nov 21, 2011 at 1:05 PM, Bruce Momjian wrote: > Robert Haas wrote: >> Argh.  The root of the problem here seems to be that >> join_path_components() feels entitled to arbitrarily insert a pathname >> separator at the front of the output string even if its first input >> didn't begin with o

Re: [HACKERS] psql \ir filename normalization

2011-11-21 Thread Bruce Momjian
Robert Haas wrote: > Argh. The root of the problem here seems to be that > join_path_components() feels entitled to arbitrarily insert a pathname > separator at the front of the output string even if its first input > didn't begin with one originally. Lame! The attached patch fixes this report,

Re: [HACKERS] psql \ir filename normalization

2011-11-15 Thread Robert Haas
On Tue, Nov 15, 2011 at 6:54 PM, Josh Kupershmidt wrote: > Commit c7f23494c1103f87bcf1ef7cbfcd626e73edb337 editorialized a bit on > Gurjeet Singh's patch to implement \ir for psql, particularly in > process_file(). Unfortunately, it looks like it broke the common case > of loading a .SQL file in p

[HACKERS] psql \ir filename normalization

2011-11-15 Thread Josh Kupershmidt
Hi all, Commit c7f23494c1103f87bcf1ef7cbfcd626e73edb337 editorialized a bit on Gurjeet Singh's patch to implement \ir for psql, particularly in process_file(). Unfortunately, it looks like it broke the common case of loading a .SQL file in psql's working directory. Consider the following test case