469,081 Members | 1,817 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,081 developers. It's quick & easy.

Pb with ecpg and include file on PG 8.0.0


I have a set of libraries and C/C++ programs with embedded access to
a PG database. I'm using ecpg. I'm working on a Linux RedHat9 platform.

Until now I was in PG 7.4.2 :
[clipg@li SrcLib]$ ecpg --version
ecpg (PostgreSQL 7.4.2) 3.1.1
[clipg@li SrcLib]$ g++ --version
g++ (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Copyright (C) 2002 Free Software Foundation, Inc.

and without any problem.

I installed PG 8.0.0beta2 :
[clipg@li SrcLib]$ ecpg --version
ecpg (PostgreSQL 8.0.0beta2) 3.2.0

And if I try to recompile I find pre-compiled errors, variables which
are defined in an include file are not "seen".
Is there any known problem or bug about this ?

Detail :
======= Precompiling DbTablesFk.pgc =======

ecpg DbTablesFk.pgc -I/VALE/users/clipg/Server/Include -o DbTablesFk.cc
DbTablesFk.pgc:144: ERROR: trying to access an undeclared cursor MAX_FK

DbTablesFk.pgc:144: ERROR: syntax error at or near "IN"
and in the program :

EXEC SQL FETCH MAX_FK IN C_FK_COL INTO :fk_id_L , :valid_L, :target_t_L;

with MAX_FK a variable defined in the file
/VALE/users/clipg/Server/Include/DbTablesUtilPg.hh :
exec sql define MAX_FK 100;

If I replace the MAX_FK variable by its value it's OK.
If I define the MAX_FK variable directly in the program (and not
in an include file) it's OK.

Any idea ? Thanks for all, Valerie.

************************************************** ******************
* Les points de vue exprimes sont strictement personnels et *
* n'engagent pas la responsabilite de METEO-FRANCE. *
************************************************** ******************
* Valerie SCHNEIDER Tel : +33 (0)5 61 07 81 91 *
* METEO-FRANCE / DSI/DEV Fax : +33 (0)5 61 07 81 09 *
* 42, avenue G. Coriolis Email : Va***************@meteo.fr *
* 31057 TOULOUSE Cedex - FRANCE http://www.meteo.fr *
************************************************** ******************
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #1
0 1254

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Slava Gorski | last post: by
2 posts views Thread by Thierry Missimilly | last post: by
3 posts views Thread by Carmen Gloria Sepulveda Dedes | last post: by
3 posts views Thread by Lynn.Tilby | last post: by
3 posts views Thread by Lynn.Tilby | last post: by
1 post views Thread by George Gensure | last post: by
reply views Thread by Christian Rank | last post: by
reply views Thread by Valerie Schneider DSI/DEV | last post: by
1 post views Thread by Richard Connamacher | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.