pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Meskes <meskes@postgresql.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Meskes <meskes@postgresql.org>
Cc: alexsav23@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #8611: ECPG: unclosed comment "/*"
Date: Mon, 25 Nov 2013 09:36:44 +0100
Message-ID: <20131125083644.GB16770@feivel.credativ.lan> (raw)
In-Reply-To: <21130.1385309397@sss.pgh.pa.us>
References: <E1Vj5nW-0001fr-Hi@wrigleys.postgresql.org>
	<20131122184613.GA13590@feivel.credativ.lan>
	<24807.1385151550@sss.pgh.pa.us>
	<20131124113010.GC28081@feivel.credativ.lan>
	<21130.1385309397@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On Sun, Nov 24, 2013 at 11:09:57AM -0500, Tom Lane wrote:
> 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

Yes, it does. Everything between EXEC SQL and the semicolon is SQL by
definition, the rest is C. 

> 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.

I don't agree. Please keep in mind that ecpg can spit out illegal C-code as it
is now. It accepts and outputs nested comments that the C compiler obviously
does not accept. Or in other words, I cannot see that people have code that's
broken by the change I made.

BTW I did notice that the patch is incomplete, though. I need to add another
another check or the nested comments still get put into the C file.

> 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.

I'm absolutely willing to check and update the docs, but didn't so far because
I see this as a bug that got fixed and not a new or changed feature.

So far there is nothing about comments in the docs at all AFAICT. I'd expect
people to expect standard C behaviour.

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
Jabber: michael.meskes at gmail dot com
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (11+ messages)  latest in thread

Message-ID: <20131125083644.GB16770@feivel.credativ.lan>
Permalink:  ../20131125083644.GB16770@feivel.credativ.lan/
Also on:    postgresql.org/message-id/20131125083644.GB16770@feivel.credativ.lan

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: meskes@postgresql.org, tgl@sss.pgh.pa.us, alexsav23@gmail.com
  Subject: Re: BUG #8611: ECPG: unclosed comment "/*"
  In-Reply-To: <20131125083644.GB16770@feivel.credativ.lan>
  References: <E1Vj5nW-0001fr-Hi@wrigleys.postgresql.org> <20131122184613.GA13590@feivel.credativ.lan> <24807.1385151550@sss.pgh.pa.us> <20131124113010.GC28081@feivel.credativ.lan> <21130.1385309397@sss.pgh.pa.us> <20131125083644.GB16770@feivel.credativ.lan>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox