Re: ECPG: "char*" instead of "const char*" in ecpglib.h

From: Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu>
To: Tomasz Ostrowski <tometzky(at)batory(dot)org(dot)pl>
Subject: Re: ECPG: "char*" instead of "const char*" in ecpglib.h
Date: 2005-11-12 22:16:42
Message-ID: Pine.LNX.4.58.0511121713520.8837@eon.cs
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, 9 Nov 2005, Tomasz Ostrowski wrote:
>
> Using "char*" as an argument type instead of "const char*" in ecpglib.h
> causes that for example the following sample program, basically
> copied from docmentation
> http://www.postgresql.org/docs/8.1/interactive/ecpg-dynamic.html ,
> does not compile using "gcc-4.0.1":
>
> $g++ test.c -lecpg
> test.pgc: In function 'int main()':
> test.pgc:11: error: invalid conversion from 'const char*' to 'char*'
> test.pgc:11: error: initializing argument 3 of 'bool ECPGprepare(int, char*, char*)'
>

Agreed. A patch has been submitted to pg-patches.

Regards,
Qingqing

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Qingqing Zhou 2005-11-12 23:07:08 Re: BUG #2030: Chinese character support error
Previous Message Qingqing Zhou 2005-11-12 20:50:27 Re: BUG #2038: fetch items truncated