X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 5AE80D1B553 for ; Tue, 27 Apr 2004 12:37:47 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 47348-01 for ; Tue, 27 Apr 2004 12:37:44 -0300 (ADT) Received: from anchor-post-32.mail.demon.net (anchor-post-32.mail.demon.net [194.217.242.90]) by svr1.postgresql.org (Postfix) with ESMTP id 4C3F5D1B590 for ; Tue, 27 Apr 2004 12:37:43 -0300 (ADT) Received: from no-dns-yet.demon.co.uk ([80.176.179.58] helo=mailserver.computerpark.local) by anchor-post-32.mail.demon.net with esmtp (Exim 3.35 #1) id 1BIUeT-000Cej-0W; Tue, 27 Apr 2004 16:37:41 +0100 Received: (from root@localhost) by mailserver.computerpark.local (8.12.6/8.12.6/SuSE Linux 0.6) id i3RFbVDO029492; Tue, 27 Apr 2004 16:37:31 +0100 Received: from mailserver.computerpark.local (localhost [127.0.0.1]) by mailserver.computerpark.local (8.12.6/8.12.6/SuSE Linux 0.6) with SMTP id i3RFbT1i029454; Tue, 27 Apr 2004 16:37:29 +0100 Received: from 10.0.0.61 (SquirrelMail authenticated user pbreen) by mailserver.computerpark.local with HTTP; Tue, 27 Apr 2004 16:37:29 +0100 (BST) Message-ID: <35549.10.0.0.61.1083080249.squirrel@mailserver.computerpark.local> In-Reply-To: References: Date: Tue, 27 Apr 2004 16:37:29 +0100 (BST) Subject: Re: Application compile file using Embeded SQL in From: "Paul Breen" To: "Kevin Cowley" Cc: "'pgsql-interfaces@postgresql.org'" Reply-To: pbreen@computerpark.co.uk User-Agent: SquirrelMail/1.4.1 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-scanner: scanned by Inflex 1.0.12.3 - (http://pldaniels.com/inflex/) X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.8 tagged_above=0.0 required=5.0 tests=PRIORITY_NO_NAME X-Spam-Level: X-Archive-Number: 200404/66 X-Sequence-Number: 4887 Hello Kevin, Are you sure that target & user are declared as string pointers (char *)? The only way I could get similar errors to those you describe was by declaring target & user as simple char variables in ECPG's declare section. I'm using gcc 3.3, Postgres 7.3.2 on SuSE 8.2. Regards - Paul > > 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.cowley@alchemetrics.co.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. > ************************************************************************************** > > -- Paul M. Breen, Software Engineer - Computer Park Ltd. Tel: (01536) 417155 Email: pbreen@computerpark.co.uk --------------------------------------------------------- This private and confidential e-mail has been sent to you by Computer Park Ltd. If you are not the intended recipient of this e-mail and have received it in error, please notify us via the email address or telephone number below, and then delete it from your mailbox. Email: mailbox@computerpark.co.uk Tel: +44 (0) 1536 417155 Fax: +44 (0) 1536 417566 Head Office: Computer Park Ltd, Broughton Grange, Headlands, Kettering Northamptonshire NN15 6XA Registered in England: 3022961. Registered Office: 6 North Street, Oundle, Peterborough PE8 4AL =========================================================