Lists: | pgsql-hackers |
---|
From: | "Simon Riggs" <simon(at)2ndquadrant(dot)com> |
---|---|
To: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Tabs or Spaces |
Date: | 2007-01-04 12:40:54 |
Message-ID: | 1167914454.20749.67.camel@silverbirch.site |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Minor request for clarification:
I read in the Developer's FAQ that tabs should be interpreted as 4
spaces. ...and also that pgindent replaces tabs as spaces.
Trouble is, there are tabs throughout the code. What gives?
Should I be replacing tabs as spaces, or leaving them alone? At all?
Only in patches I submit? Everywhere?
I have no opinion either way as to what should be done. Please advise.
--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Simon Riggs" <simon(at)2ndquadrant(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Tabs or Spaces |
Date: | 2007-01-04 15:26:50 |
Message-ID: | 17083.1167924410@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
"Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> Minor request for clarification:
> I read in the Developer's FAQ that tabs should be interpreted as 4
> spaces. ...and also that pgindent replaces tabs as spaces.
No, it does the opposite (or I would hope so anyway).
regards, tom lane
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Tabs or Spaces |
Date: | 2007-01-04 16:13:32 |
Message-ID: | 459D27AC.4020008@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Tom Lane wrote:
> "Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
>
>> Minor request for clarification:
>> I read in the Developer's FAQ that tabs should be interpreted as 4
>> spaces. ...and also that pgindent replaces tabs as spaces.
>>
>
> No, it does the opposite (or I would hope so anyway).
>
>
Sure looks that way in the code. In fact it detabifies and then
retabifies, from what I can see.
cheers
andrew
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Tabs or Spaces |
Date: | 2007-01-04 21:00:17 |
Message-ID: | 200701042100.l04L0Hn28484@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Andrew Dunstan wrote:
> Tom Lane wrote:
> > "Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> >
> >> Minor request for clarification:
> >> I read in the Developer's FAQ that tabs should be interpreted as 4
> >> spaces. ...and also that pgindent replaces tabs as spaces.
> >>
> >
> > No, it does the opposite (or I would hope so anyway).
> >
> >
>
> Sure looks that way in the code. In fact it detabifies and then
> retabifies, from what I can see.
>
> cheers
>
> andrew
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Tabs or Spaces |
Date: | 2007-01-04 21:01:20 |
Message-ID: | 200701042101.l04L1KV28629@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Tom Lane wrote:
> "Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> > Minor request for clarification:
> > I read in the Developer's FAQ that tabs should be interpreted as 4
> > spaces. ...and also that pgindent replaces tabs as spaces.
>
> No, it does the opposite (or I would hope so anyway).
Sorry, the mistake was in a reference to entab. It now reads:
entab converts spaces to tabs, used by pgindent
--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From: | "Simon Riggs" <simon(at)2ndquadrant(dot)com> |
---|---|
To: | "Bruce Momjian" <bruce(at)momjian(dot)us> |
Cc: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Tabs or Spaces |
Date: | 2007-01-04 21:48:36 |
Message-ID: | 1167947317.20749.251.camel@silverbirch.site |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Thu, 2007-01-04 at 16:01 -0500, Bruce Momjian wrote:
> Tom Lane wrote:
> > "Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> > > Minor request for clarification:
> > > I read in the Developer's FAQ that tabs should be interpreted as 4
> > > spaces. ...and also that pgindent replaces tabs as spaces.
> >
> > No, it does the opposite (or I would hope so anyway).
>
> Sorry, the mistake was in a reference to entab. It now reads:
>
> entab converts spaces to tabs, used by pgindent
S'OK, just thought it was funny I'd been doing it backwards all this
time: Actively been replacing tabs with spaces. :-)
--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com
From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Tabs or Spaces |
Date: | 2007-01-05 00:41:19 |
Message-ID: | 20070105004119.GD3792@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Simon Riggs wrote:
> On Thu, 2007-01-04 at 16:01 -0500, Bruce Momjian wrote:
> > Tom Lane wrote:
> > > "Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> > > > Minor request for clarification:
> > > > I read in the Developer's FAQ that tabs should be interpreted as 4
> > > > spaces. ...and also that pgindent replaces tabs as spaces.
> > >
> > > No, it does the opposite (or I would hope so anyway).
> >
> > Sorry, the mistake was in a reference to entab. It now reads:
> >
> > entab converts spaces to tabs, used by pgindent
>
> S'OK, just thought it was funny I'd been doing it backwards all this
> time: Actively been replacing tabs with spaces. :-)
That explains why your patches always seemed to be so weird to me
spacing-wise :-)
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
From: | "Simon Riggs" <simon(at)2ndquadrant(dot)com> |
---|---|
To: | "Alvaro Herrera" <alvherre(at)commandprompt(dot)com> |
Cc: | "Bruce Momjian" <bruce(at)momjian(dot)us>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Tabs or Spaces |
Date: | 2007-01-05 00:54:45 |
Message-ID: | 1167958485.20749.265.camel@silverbirch.site |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Thu, 2007-01-04 at 21:41 -0300, Alvaro Herrera wrote:
> Simon Riggs wrote:
> > S'OK, just thought it was funny I'd been doing it backwards all this
> > time: Actively been replacing tabs with spaces. :-)
>
> That explains why your patches always seemed to be so weird to me
LOL
> spacing-wise :-)
Nobody ever said... laughs/rolls eyes/sighs
--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Tabs or Spaces |
Date: | 2007-01-05 04:02:15 |
Message-ID: | 200701050402.l0542Fg19078@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Simon Riggs wrote:
> On Thu, 2007-01-04 at 16:01 -0500, Bruce Momjian wrote:
> > Tom Lane wrote:
> > > "Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> > > > Minor request for clarification:
> > > > I read in the Developer's FAQ that tabs should be interpreted as 4
> > > > spaces. ...and also that pgindent replaces tabs as spaces.
> > >
> > > No, it does the opposite (or I would hope so anyway).
> >
> > Sorry, the mistake was in a reference to entab. It now reads:
> >
> > entab converts spaces to tabs, used by pgindent
>
> S'OK, just thought it was funny I'd been doing it backwards all this
> time: Actively been replacing tabs with spaces. :-)
It was a little more complex because entab does conversion to/from tabs,
but pgindent uses it in the "to tabs" mode.
--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From: | Jim Nasby <decibel(at)decibel(dot)org> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, "Bruce Momjian" <bruce(at)momjian(dot)us>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Tabs or Spaces |
Date: | 2007-01-05 21:12:02 |
Message-ID: | 1E063BA9-B97E-4C8E-8DDE-039E171E00BD@decibel.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Jan 4, 2007, at 7:54 PM, Simon Riggs wrote:
> On Thu, 2007-01-04 at 21:41 -0300, Alvaro Herrera wrote:
>> Simon Riggs wrote:
>>> S'OK, just thought it was funny I'd been doing it backwards all this
>>> time: Actively been replacing tabs with spaces. :-)
>>
>> That explains why your patches always seemed to be so weird to me
>
> LOL
>
>> spacing-wise :-)
>
> Nobody ever said... laughs/rolls eyes/sighs
I just figured you were using British tabs instead of American ones. ;P
--
Jim Nasby jim(at)nasby(dot)net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)