Re: BUG #8611: ECPG: unclosed comment "/*" - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #8611: ECPG: unclosed comment "/*"
Date
Msg-id 21130.1385309397@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #8611: ECPG: unclosed comment "/*"  (Michael Meskes <meskes@postgresql.org>)
Responses Re: BUG #8611: ECPG: unclosed comment "/*"
Re: BUG #8611: ECPG: unclosed comment "/*"
List pgsql-bugs
Michael Meskes <meskes@postgresql.org> writes:
> On Fri, Nov 22, 2013 at 03:19:10PM -0500, Tom Lane wrote:
>> I don't see any way to "fix" it --- the best you can do is have a
>> different set of users complaining, because C and SQL aren't consistent
>> about this, and it's not obvious which convention should be followed
>> where.

> Well, I think we can in ecpg as ecpg knows whether it's parsing C code or SQL
> code.

Does it?  In the example at hand, the questionable comment was after some
C code and before some SQL code.  I'd say it's just about exactly 50-50
odds as to whether the user will think that C or SQL conventions should
apply at that spot.  I remain of the opinion that changing behavior here
will annoy more people than it will help.

In any case, you won't make any friends at all unless you can document
exactly what the behavior is (and I'm disappointed to see that your
behavior-changing commit did not touch the documentation).  There might
be some reason to change if the new behavior is more easily explainable
than the old.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Boszormenyi Zoltan
Date:
Subject: Re: BUG #8608: ECPG: sizeof() in EXEC SQL DECLARE SECTION
Next
From: Stephen Frost
Date:
Subject: Re: BUG #8611: ECPG: unclosed comment "/*"