Re: ECPG: "char*" instead of "const char*" in ecpglib.h - Mailing list pgsql-bugs

From Qingqing Zhou
Subject Re: ECPG: "char*" instead of "const char*" in ecpglib.h
Date
Msg-id Pine.LNX.4.58.0511121713520.8837@eon.cs
Whole thread Raw
In response to ECPG: "char*" instead of "const char*" in ecpglib.h  (Tomasz Ostrowski <tometzky@batory.org.pl>)
List 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

pgsql-bugs by date:

Previous
From: "Qingqing Zhou"
Date:
Subject: Re: BUG #2038: fetch items truncated
Next
From: "Qingqing Zhou"
Date:
Subject: Re: BUG #2030: Chinese character support error