Skip site navigation (1) Skip section navigation (2)

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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Michael Meskes <meskes(at)postgresql(dot)org>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ECPG, two varchars with same name on same line
Date: 2010-02-27 03:23:19
Message-ID: 201002270323.o1R3NJs24865@momjian.us (view raw or flat)
Thread:
Lists: 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.

Was this fixed?

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com
  PG East:  http://www.enterprisedb.com/community/nav-pg-east-2010.do
  + If your life is a hard drive, Christ can be your backup. +

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-02-27 03:27:16
Subject: Re: plpgsql: numeric assignment to an integer variable errors out
Previous:From: Tom LaneDate: 2010-02-27 03:18:25
Subject: Re: Testing of parallel restore with current snapshot

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group