Re: Try to fix endless loop in ecpg with informix mode

From: 高增琦 <pgf00a(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Try to fix endless loop in ecpg with informix mode
Date: 2017-11-01 11:22:04
Message-ID: CAFmBtr3TakdMnCFXjqN9PtCKCkaUuA+GCNz34Jw-k3CsDJUEjQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Any comments?

2017-10-26 16:03 GMT+08:00 高增琦 <pgf00a(at)gmail(dot)com>:

> Hi,
>
> 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.
>
> --
> GaoZengqi
> pgf00a(at)gmail(dot)com
> zengqigao(at)gmail(dot)com
>

--
GaoZengqi
pgf00a(at)gmail(dot)com
zengqigao(at)gmail(dot)com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2017-11-01 11:38:33 strange relcache.c debug message
Previous Message Lætitia Avrot 2017-11-01 10:24:06 Re: Adding column_constraint description in ALTER TABLE synopsis