Thread: pgsql: Clean up some sloppy coding in repl_gram.y.

pgsql: Clean up some sloppy coding in repl_gram.y.

From
Tom Lane
Date:
Clean up some sloppy coding in repl_gram.y.

Remove unused copy-and-pasted macro definitions, and improve formatting
of recently-added productions.

I got interested in this because buildfarm member protosciurus has been
crashing in "bison repl_gram.y" since commit 858ec11.  It's a long shot
that this will fix that, though maybe the missing trailing semicolon
has something to do with it?  In any case, there's no need to approve
of dead code, nor of code whose formatting isn't even self-consistent
let alone consistent with what's around it.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/46825d4978b63a0ae9637efbf6298220c833fa8d

Modified Files
--------------
src/backend/replication/repl_gram.y |   49 +++++++++++++++++------------------
1 file changed, 24 insertions(+), 25 deletions(-)


Re: pgsql: Clean up some sloppy coding in repl_gram.y.

From
Andres Freund
Date:
On 2014-02-02 17:51:21 +0000, Tom Lane wrote:
> I got interested in this because buildfarm member protosciurus has been
> crashing in "bison repl_gram.y" since commit 858ec11.  It's a long shot
> that this will fix that, though maybe the missing trailing semicolon
> has something to do with it?

Whoa? This seems to have fixed protosciurus. That's an odd cause for a
segfault in bison...

Thanks,

Andres Freund

--
 Andres Freund                       http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


Re: pgsql: Clean up some sloppy coding in repl_gram.y.

From
Tom Lane
Date:
Andres Freund <andres@2ndquadrant.com> writes:
> On 2014-02-02 17:51:21 +0000, Tom Lane wrote:
>> I got interested in this because buildfarm member protosciurus has been
>> crashing in "bison repl_gram.y" since commit 858ec11.  It's a long shot
>> that this will fix that, though maybe the missing trailing semicolon
>> has something to do with it?

> Whoa? This seems to have fixed protosciurus. That's an odd cause for a
> segfault in bison...

Hah, got lucky.

I have no idea why that fixed it.  bison 1.875 on my old HPUX box
wasn't having a problem with repl_gram.y, so there must be something
not quite right about protosciurus' version.

            regards, tom lane