Patch to make pgindent work cleanly

From: Gurjeet Singh <gurjeet(at)singh(dot)im>
To: PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Patch to make pgindent work cleanly
Date: 2013-02-19 21:50:45
Message-ID: CABwTF4WJG_QWaGruphXdVbOgysO5br9ad5pNk2bp1eFswHHkbw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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>

--
Gurjeet Singh

http://gurjeet.singh.im/

EnterprsieDB Inc.

Attachment Content-Type Size
pgindent.patch application/octet-stream 1.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Erik Rijkers 2013-02-19 22:09:13 Re: Materialized views WIP patch
Previous Message Tomas Vondra 2013-02-19 21:42:43 Re: PATCH: Split stats file per database WAS: autovacuum stress-testing our system