Re: [HACKERS] Recently added typedef "string" is a horrid idea

2016-02-08 Thread Tom Lane
Peter Geoghegan writes: > On Sun, Feb 7, 2016 at 7:47 AM, Tom Lane wrote: >> Works for me. > Attached patch is what I came up with. It required only minimal > additional changes for consistency. I'd already run into some trouble with pgindent messing up on

Re: [HACKERS] Recently added typedef "string" is a horrid idea

2016-02-08 Thread Peter Geoghegan
On Sun, Feb 7, 2016 at 7:47 AM, Tom Lane wrote: > Works for me. Attached patch is what I came up with. It required only minimal additional changes for consistency. -- Peter Geoghegan From 01d8cb278cecb995ecc30cda0125d10c98f4d05c Mon Sep 17 00:00:00 2001 From: Peter

Re: [HACKERS] Recently added typedef "string" is a horrid idea

2016-02-07 Thread Robert Haas
On Sun, Feb 7, 2016 at 8:03 AM, Peter Geoghegan wrote: > On Sat, Feb 6, 2016 at 2:11 PM, Tom Lane wrote: >> Remember that the effects of typedef names are >> *global*, so far as pgindent is concerned; not only varlena.c will >> be affected. > > I'll remember

Re: [HACKERS] Recently added typedef "string" is a horrid idea

2016-02-07 Thread Peter Geoghegan
On Sat, Feb 6, 2016 at 2:11 PM, Tom Lane wrote: > Remember that the effects of typedef names are > *global*, so far as pgindent is concerned; not only varlena.c will > be affected. I'll remember that in the future. > Please rename this typedef with some less-generic name.

Re: [HACKERS] Recently added typedef "string" is a horrid idea

2016-02-07 Thread Tom Lane
Peter Geoghegan writes: > On Sat, Feb 6, 2016 at 2:11 PM, Tom Lane wrote: >> Please rename this typedef with some less-generic name. Probably >> some of the other identifiers added in the same commit should be >> adjusted to match. > I suggest "VarString".

[HACKERS] Recently added typedef "string" is a horrid idea

2016-02-06 Thread Tom Lane
I see that commit b47b4dbf6 added this to varlena.c: typedef struct varlena string; This is a remarkably bad idea. It will cause pgindent to do strange things anywhere it sees a variable or field named "string", of which we have quite a few. Remember that the effects of typedef names

Re: [HACKERS] Recently added typedef "string" is a horrid idea

2016-02-06 Thread Robert Haas
On Sat, Feb 6, 2016 at 5:11 PM, Tom Lane wrote: > I see that commit b47b4dbf6 added this to varlena.c: > > typedef struct varlena string; > > This is a remarkably bad idea. It will cause pgindent to do strange > things anywhere it sees a variable or field named