Lists: | pgsql-committers |
---|
From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Use $INDENT rather than indent throughout the pgindent code |
Date: | 2011-02-18 01:23:03 |
Message-ID: | E1PqF3n-0003wX-7a@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers |
Use $INDENT rather than indent throughout the pgindent code
This allows the user to change the path to be used more easily.
Also, change URL in README.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/c4d124365b9b535e8c98e4568ade3e0c15b11810
Modified Files
--------------
src/tools/pgindent/README | 2 +-
src/tools/pgindent/pgindent | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | pgsql-committers(at)postgresql(dot)org |
Subject: | Re: pgsql: Use $INDENT rather than indent throughout the pgindent code |
Date: | 2011-02-18 02:48:18 |
Message-ID: | 4D5DDDF2.9030206@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers |
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"?
cheers
andrew
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | 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 02:51:33 |
Message-ID: | 201102180251.p1I2pXK23577@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers |
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.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
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 |
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
From: | Alvaro Herrera <alvherre(at)commandprompt(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>, pgsql-committers <pgsql-committers(at)postgresql(dot)org> |
Subject: | Re: pgsql: Use $INDENT rather than indent throughout the pgindent code |
Date: | 2011-02-18 15:44:28 |
Message-ID: | 1298043768-sup-8005@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers |
Excerpts from Tom Lane's message of vie feb 18 00:34:33 -0300 2011:
> 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.
Hey, you could have asked when I showed you the patch yesterday on IM.
> It doesn't. Anything 'which' would find could perfectly well be invoked
> by saying plain old "indent".
It helps because I can easily change the value in the script in a single
place to what I want. That's a bit less inconvenient than having to
edit more than one place. However ...
> 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
... this is certainly better. I'll change it to this.
--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-committers <pgsql-committers(at)postgresql(dot)org> |
Subject: | Re: pgsql: Use $INDENT rather than indent throughout the pgindent code |
Date: | 2011-02-18 15:52:15 |
Message-ID: | 4D5E95AF.5060704@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers |
On 02/18/2011 10:44 AM, Alvaro Herrera wrote:
>
>> 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
> ... this is certainly better. I'll change it to this.
>
maybe PGINDENT instead of INDENT?
cheers
andrew
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-committers <pgsql-committers(at)postgresql(dot)org> |
Subject: | Re: pgsql: Use $INDENT rather than indent throughout the pgindent code |
Date: | 2011-02-18 19:12:22 |
Message-ID: | 201102181912.p1IJCMv26122@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers |
Alvaro Herrera wrote:
> Excerpts from Tom Lane's message of vie feb 18 00:34:33 -0300 2011:
> > 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.
>
> Hey, you could have asked when I showed you the patch yesterday on IM.
I thought I was missing something; I figured there must be some reason.
> > It doesn't. Anything 'which' would find could perfectly well be invoked
> > by saying plain old "indent".
>
> It helps because I can easily change the value in the script in a single
> place to what I want. That's a bit less inconvenient than having to
> edit more than one place. However ...
>
> > 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
>
> ... this is certainly better. I'll change it to this.
OK.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +