Re: pgsql: Use $INDENT rather than indent throughout the pgindent code

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Use $INDENT rather than indent throughout the pgindent code
Date: 2011-02-18 03:34:33
Message-ID: 5023.1298000073@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> Andrew Dunstan wrote:
>> On 02/17/2011 08:23 PM, Alvaro Herrera wrote:
>>> Use $INDENT rather than indent throughout the pgindent code
>>> +INDENT=`which indent`

>> How universally available is "which"?

> I have 'which'. I am unclear how 'which' helps in this case.

It doesn't. Anything 'which' would find could perfectly well be invoked
by saying plain old "indent". What would actually be useful here is a
convenient way to override the script's default value of INDENT, but
this coding doesn't offer that. I'd suggest something more like

if [ -z "$INDENT" ]; then
INDENT=indent
fi

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Itagaki Takahiro 2011-02-18 05:14:54 pgsql: Add transaction-level advisory locks.
Previous Message Bruce Momjian 2011-02-18 02:51:33 Re: pgsql: Use $INDENT rather than indent throughout the pgindent code