Re: Review: psql include file using relative path - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Review: psql include file using relative path
Date
Msg-id BANLkTikG58nG5S=sP7+Rw2zjAhfJPDMoEg@mail.gmail.com
Whole thread Raw
In response to Review: psql include file using relative path  (Josh Kupershmidt <schmiddy@gmail.com>)
Responses Re: Review: psql include file using relative path  (Gurjeet Singh <singh.gurjeet@gmail.com>)
List pgsql-hackers
On Sat, May 14, 2011 at 5:03 PM, Josh Kupershmidt <schmiddy@gmail.com> wrote:
> I had a chance to give this patch a look. This review is of the second
> patch posted by Gurjeet, at:
> http://archives.postgresql.org/message-id/AANLkTi=YJb_A+GGt_pXmRqhBhyiD6aSWWB8h-Lw-KVi0@mail.gmail.com

Cool.  I see you (or someone) has added this to the entry for that
patch on commitfest.postgresql.org as well, which is great.  I have
updated that entry to list you as the reviewer and changed the status
of the patch to "Waiting on Author" pending resolution of the issues
you observed.

> == General  ==
> The patch applies cleanly to HEAD. No regression tests are included,
> but I don't think they're needed here.

I agree.

> == Documentation ==
> The patch includes the standard psql help output description for the
> new \ir command. I think ./doc/src/sgml/ref/psql-ref.sgml needs to be
> patched as well, though.

I agree with this too.

> Tangent: AFAICT we're not documenting the long form of psql commands,
> such as \print, anywhere. Following that precedent, this patch doesn't
> document \include_relative. Not sure if we want to document such
> options anywhere, but in any case a separate issue from this patch.

And this.

[...snip...]
> 5.) I tried the patch out on Linux and OS X; perhaps someone should
> give it a quick check on Windows as well -- I'm not sure if pathname
> manipulations like:
>            last_slash = strrchr(pset.inputfile, '/');
> work OK on Windows.

Depends if canonicalize_path() has already been applied to that path.

> 6.) The indentation of these lines in tab-complete.c around line 2876 looks off:
>          strcmp(prev_wd, "\\i") == 0 || strcmp(prev_wd, "\\include") == 0 ||
>          strcmp(prev_wd, "\\ir") == 0 || strcmp(prev_wd,
> "\\include_relative") == 0 ||
>
> (I think the first of those lines was off before the patch, and the
> patch followed its example)

pgindent likes to move things backward to make them fit within 80 columns.

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


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: use less space in xl_xact_commit patch
Next
From: Dean Rasheed
Date:
Subject: 9.1 support for hashing arrays