Re: [Bug Fix] ECPG: could not use set xxx to default statement

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
Cc: Michael Meskes <meskes(at)postgresql(dot)org>, "Higuchi, Daisuke" <higuchi(dot)daisuke(at)jp(dot)fujitsu(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [Bug Fix] ECPG: could not use set xxx to default statement
Date: 2019-02-22 19:36:32
Message-ID: 22431.1550864192@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> writes:
> On 2/19/19 9:29 AM, Tom Lane wrote:
>> Probably, somebody who's a better Perl programmer than me
>> ought to take point on improving that.

> Agreed.

Not seeing any motion on this, here's a draft patch to make these
scripts complain about missing semicolons. Against the current
gram.y (which contains 2 such errors, as Michael noted) you
get output like

'/usr/bin/perl' ./parse.pl . < ../../../backend/parser/gram.y > preproc.y
unterminated rule at ./parse.pl line 370, <> line 1469.
make: *** [preproc.y] Error 255
make: *** Deleting file `preproc.y'

That's not *super* friendly, but it does give you the right line number
to look at in gram.y. We could adjust the script (and the Makefile)
further so that the message would cite the gram.y filename, but I'm not
sure if it's worth the trouble. Thoughts?

regards, tom lane

Attachment Content-Type Size
complain-about-missing-grammar-semicolons-1.patch text/x-diff 2.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2019-02-22 19:52:08 Re: Pluggable Storage - Andres's take
Previous Message Euler Taveira 2019-02-22 19:31:25 Re: Temporal Table Proposal