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