Skip site navigation (1) Skip section navigation (2)

ecpg problem

From: Steve Clark <sclark(at)netwolves(dot)com>
To: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: ecpg problem
Date: 2008-02-29 15:19:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugspgsql-general
Hello List,

Don't know whether anyone here can help but... We have some code that 
has compiled and ran just
fine from postgresql 7.3.x thru 8.2.6. It uses embedded sql. I just 
yesterday upgraded our test system to
8.3.0 and this code will no longer compile. Below is a standalone code 
fragment in which I have removed
everything but what is causing the problem. Any help or ideas would be 

exec sql include sqlca;


// this array is grown as messages from new units are received
// it is sorted by unit_serial_no ascending to support binary searches

int getUnitData()

     exec sql begin declare section;

         VARCHAR h_unit_serial_no  [ 15+1];
         // we do an array fetch on these 30 is the max number for these
         int     h_remote_int_netmask    [4096];
         int     h_local_int_netmask     [4096];
         VARCHAR h_tunnel_active         [4096][   1+1];
         VARCHAR h_tunnel_config_type    [4096][   1+1];
         VARCHAR h_local_vpn_int_ip      [4096][  20+1];
         VARCHAR h_local_vpn_ext_ip      [4096][  20+1];
         VARCHAR h_remote_vpn_int_ip     [4096][  20+1];
         VARCHAR h_remote_vpn_ext_ip     [4096][  20+1];

     exec sql end declare section;

         exec sql select tunnel_active,
                 into    :h_tunnel_active,
                 from t_vpn_tunnel_status
                 where unit_serial_no = :h_unit_serial_no
             order by oid;
             /*limit 30;*/
     return TRUE;
gmake -k ecpg_test.o
/usr/local/bin/ecpg -I/usr/local/include/pgsql -I/usr/local/include 
mkdep -O2 -Wall -DDEBUG -I../include -I/usr/local/include/pgsql 
-I/usr/local/include -I../common crypt_file.c mailuser.c 
srm2_monitor_server.c putfiles.c srm2_server_funcs.c escalate.c 
packet_loss.c srm2_cron.c srm2_db_funcs.c srm2_monitor_db.c ecpg_test.c
g++ -O2 -Wall -DDEBUG -I../include -I/usr/local/include/pgsql 
-I/usr/local/include -I../common -c ecpg_test.c
ecpg_test.pgc: In function `int getUnitData()':
ecpg_test.pgc:36: error: invalid application of `sizeof' to incomplete 
type `varchar_h_tunnel_active'
ecpg_test.pgc:38: error: invalid application of `sizeof' to incomplete 
type `varchar_h_tunnel_config_type'
ecpg_test.pgc:40: error: invalid application of `sizeof' to incomplete 
type `varchar_h_local_vpn_int_ip'
ecpg_test.pgc:42: error: invalid application of `sizeof' to incomplete 
type `varchar_h_local_vpn_ext_ip'
ecpg_test.pgc:44: error: invalid application of `sizeof' to incomplete 
type `varchar_h_remote_vpn_int_ip'
ecpg_test.pgc:46: error: invalid application of `sizeof' to incomplete 
type `varchar_h_remote_vpn_ext_ip'
gmake: *** [ecpg_test.o] Error 1

Compilation exited abnormally with code 2 at Fri Feb 29 09:59:10


pgsql-bugs by date

Next:From: Tom LaneDate: 2008-02-29 15:42:17
Subject: Re: BUG #3999: Panic with "invalid string enlargement request size" after a strange request from JDBC
Previous:From: Stephen ClarkDate: 2008-02-29 15:12:42
Subject: BUG #4001: ecpg produces code that won't compile

pgsql-general by date

Next:From: Dan ArmbrustDate: 2008-02-29 15:40:44
Subject: Re: errors in pg_restore on windows?
Previous:From: Scara MaccaiDate: 2008-02-29 15:04:02
Subject: Re: partitioning using dblink

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group