| From: | Michael Meskes <meskes(at)postgresql(dot)org> | 
|---|---|
| To: | 高增琦 <pgf00a(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: Try to fix endless loop in ecpg with informix mode | 
| Date: | 2017-11-01 12:35:52 | 
| Message-ID: | [email protected] | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
> Any comments?
Sorry, I've been working through the backlog of three weeks of
traveling.
> > I tried some tests with ecpg informix mode.
> > When trying to store float data into a integer var, I got endless
> > loop.
> > 
> > The reason is: 
> > In informix mode, ecpg can accept
> > string form of float number when processing query result.
> > During checking the string form of float number, it seems
> > that ecpg forgot to skip characters after '.'.
> > Then outer loop will never stop because it hopes to see '\0'.
> > 
> > The first patch will reproduce the problem in ecpg's regress test.
> > The second patch tries to fix it in simple way.
Thanks for spotting and fixing. I changed your patch slightly and made
it check if the rest of the data is indeed digits, or else it would
accept something like "7.hello" as "7". 
Committed.
Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ashutosh Bapat | 2017-11-01 12:36:55 | Re: Account for cost and selectivity of HAVING quals | 
| Previous Message | Julien Rouhaud | 2017-11-01 12:21:21 | Re: Try to fix endless loop in ecpg with informix mode |