Re: ECPG, two varchars with same name on same line

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ECPG, two varchars with same name on same line
Date: 2009-05-07 09:54:08
Message-ID: 20090507095408.GA29463@feivel.credativ.lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 01, 2009 at 03:49:47PM +0300, Heikki Linnakangas wrote:
> ECPG constructs internal struct names for VARCHAR fields using the field
> name and line number it's defined on. In a contrived example, though,
> that's not unique. Consider the following example:
> ...
> That hardly happens in practice, of course, but it's trivial to fix by
> just adding some more salt to the struct name, like a simple counter, so
> it seems we should.

In principle you're right. However, the change needs to be added in several
places like the internal variable structure that keeps the lineno anyway but
needs to add the counter too. BTW we can remove the lineno then I think.
Anyway, given that we are close to a release and the bug apparently never got
up in a real life usage for years I'd prefer to not change it now but wait
until the release has been done.

Comments anyone?

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
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes(at)jabber(dot)org
Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2009-05-07 10:34:16 Re: Serializable Isolation without blocking
Previous Message Albe Laurenz 2009-05-07 09:51:10 Re: Serializable Isolation without blocking