Re: ECPG, two varchars with same name on same line - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: ECPG, two varchars with same name on same line
Date
Msg-id 4A02C6FC.9020305@enterprisedb.com
Whole thread Raw
In response to Re: ECPG, two varchars with same name on same line  (Michael Meskes <meskes@postgresql.org>)
List pgsql-hackers
Michael Meskes wrote:
> 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.

Yeah, if the fix isn't trivial, it's not worth it.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: conditional dropping of columns/constraints
Next
From: Simon Riggs
Date:
Subject: Re: Serializable Isolation without blocking