Re: WIP pgindent replacement - Mailing list pgsql-hackers

From Tom Lane
Subject Re: WIP pgindent replacement
Date
Msg-id 16727.1344004401@sss.pgh.pa.us
Whole thread Raw
In response to Re: WIP pgindent replacement  (Bruce Momjian <bruce@momjian.us>)
Responses Re: WIP pgindent replacement
Re: WIP pgindent replacement
List pgsql-hackers
Bruce Momjian <bruce@momjian.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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump custom format without timestamp?
Next
From: Robert Haas
Date:
Subject: Re: WIP pgindent replacement