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

Application compile file using Embeded SQL in Postgres4.7.2

From: Kevin Cowley <kevin(dot)cowley(at)alchemetrics(dot)co(dot)uk>
To: "'pgsql-interfaces(at)postgresql(dot)org'" <pgsql-interfaces(at)postgresql(dot)org>
Subject: Application compile file using Embeded SQL in Postgres4.7.2
Date: 2004-04-27 12:51:56
Message-ID: A170CC6BD457D3118EF800508B2C304805C366D4@mailhost.alchemetrics.co.uk (view raw or flat)
Thread:
Lists: pgsql-interfaces
 
I'm trying to build an embedded SQL app in Postgres 4.7.2 and failing at the
first hurdle - Postgres itself compiles, starts, executes with no problems.
 
We're using gcc 3.2.2 on SLES 8
 
The problem I'm getting is that ecpg doesn't appear to able to generate
compilable code for  something as simple as
 
EXEC SQL CONNECT TO :target USER :user;
 
/sandbox/cowleyke/src/SQL_Benchmarks/tst_postgres.pgc: In function
`Connect':
/sandbox/cowleyke/src/SQL_Benchmarks/tst_postgres.pgc:378: warning: passing
arg 2 of `ECPGconnect' makes integer from pointer without a cast
/sandbox/cowleyke/src/SQL_Benchmarks/tst_postgres.pgc:378: too few arguments
to function `ECPGconnect'
 
This is not the only place this type of error occurs. Elsewhere I have
 
EXCE SQL IMMEDIATE :stmt;
 
Which gives
 
/sandbox/cowleyke/src/SQL_Benchmarks/tst_postgres.pgc: In function
`ExecuteQuery':
/sandbox/cowleyke/src/SQL_Benchmarks/tst_postgres.pgc:447: warning: passing
arg 2 of `ECPGdo' makes integer from pointer without a cast
/sandbox/cowleyke/src/SQL_Benchmarks/tst_postgres.pgc:447: warning: passing
arg 3 of `ECPGdo' makes integer from pointer without a cast
/sandbox/cowleyke/src/SQL_Benchmarks/tst_postgres.pgc:447: warning: passing
arg 4 of `ECPGdo' makes pointer from integer without a cast
 
Kevin Cowley
R&D
 
Tel: 0118 902 9099 (direct line)
Email: kevin(dot)cowley(at)alchemetrics(dot)co(dot)uk
Web: http://www.alchemetrics.co.uk
 


**************************************************************************************
ALCHEMETRICS LIMITED (ALCHEMETRICS)
Mulberry Park, Fishponds Road, Wokingham, Berkshire, RG41 2GX
Tel:  +44 (0) 118 902 9000    Fax:  +44 (0) 118 902 9001
This e-mail is confidential and is intended for the use of the addressee only.
If you are not the intended recipient, you are hereby notified that you must 
not use, copy, disclose, otherwise disseminate or take any action based on 
this e-mail or any information herein.
If you receive this transmission in error, please notify the sender
immediately by reply e-mail or by using the contact details above and then
delete this e-mail.
Please note that e-mail may be susceptible to data corruption, interception 
and unauthorised amendment.  Alchemetrics does not accept any liability for 
any such corruption, interception, amendment or the consequences thereof.
**************************************************************************************

Responses

pgsql-interfaces by date

Next:From: Christoph HallerDate: 2004-04-27 15:04:45
Subject: Re: I hope I'm missing something...
Previous:From: Joe ConwayDate: 2004-04-26 17:05:07
Subject: Re: Tantalizing reference to passing data from NEW variable

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