Re: WIP pgindent replacement

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP pgindent replacement
Date: 2012-08-03 14:48:17
Message-ID: CA+Tgmobs7Fh4uSqznuDOd=TUE3Td+zAGVJwC0-QeHQ3UONd6qQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 3, 2012 at 10:33 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
>> On Fri, Aug 3, 2012 at 08:26:50AM -0400, Andrew Dunstan wrote:
>>> I think we generally don't put file type extensions on commands, so
>>> this should probably just be renamed pgindent. If someone wants to
>>> go back to the old shell script they can still get it from git.
>
>> Of course. I was just noticing that most of the Perl scripts in
>> /src/tools and src/tools/msvc have a .pl extension on the file name, so
>> I was following that style. Is that valid?
>
> Well, you're replacing the old script, so it has to keep the same name.
>
> IMO adding such an extension to an executable script isn't a terribly
> good practice, because it turns what ought to be an implementation
> detail into part of the script's API. Had the shell script been named
> pgindent.sh to begin with, we'd now be stuck with the unpalatable
> alternatives of changing the name or using an extension that lies
> about the implementation language. I don't much care for putting
> in an assumption that the Perl implementation will never be replaced,
> either.

+1.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2012-08-03 14:51:21 Re: WIP pgindent replacement
Previous Message Tom Lane 2012-08-03 14:33:21 Re: WIP pgindent replacement