Re: Patch to make pgindent work cleanly - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Patch to make pgindent work cleanly
Date
Msg-id 20130412154458.GA28226@momjian.us
Whole thread Raw
In response to Patch to make pgindent work cleanly  (Gurjeet Singh <gurjeet@singh.im>)
Responses Re: Patch to make pgindent work cleanly
List pgsql-hackers
On Tue, Feb 19, 2013 at 04:50:45PM -0500, Gurjeet Singh wrote:
> Please find attached the patch for some cleanup and fix bit rot in pgindent
> script.
> 
> There were a few problems with the script.
> 
> .) It failed to use the $ENV{PGENTAB} even if it was set.
> .) The file it tries to download from Postgres' ftp site is no longer present.
>     ftp://ftp.postgresql.org/pub/dev/indent.netbsd.patched.tgz
> .) The tar command extracted the above-mentioned file to a child directory, but
> did not descend into it before running make on it.
>     I think it expected a tarbomb, but clearly the current .tgz file on ftp
> site is not a tarbomb.
> 
> I don't like the fact that it dies with a message "fetching xyz" rather than
> saying "Could not fetch xyz", but this patch does not address that since it
> doesn't really affect the output when script does work.
> 
> With this patch in place I could very easily run it on any arbitrary file,
> which seemed like a black-magic before the patch.
> 
> src/tools/pgindent/pgindent --build <your file path here>

I have applied this patch.  However, I modified the tarball name to
reference $INDENT_VERSION, rather than hard-coding "1.2".

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +



pgsql-hackers by date:

Previous
From: "Dickson S. Guedes"
Date:
Subject: Re: Analyzing bug 8049
Next
From: Andrew Dunstan
Date:
Subject: Re: Detach/attach table and index data files from one cluster to another