Solaris ecpg program doesn't work - pulling my hair out!

From: <wespvp(at)syntegra(dot)com>
To: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Solaris ecpg program doesn't work - pulling my hair out!
Date: 2004-03-23 23:25:22
Message-ID: BC862382.BBAF%wespvp@syntegra.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have an ecpg program that runs perfectly on Linux (PostgreSQL 7.4.1). I
recompile it on Solaris and when I try to run it the results are total
gibberish. When I connect:

EXEC SQL WHENEVER SQLERROR GOTO sql_error;
EXEC SQL CONNECT TO :dbTarget USER :user USING :pw;

Where dbTarget = mydb(at)host(dot)my(dot)domain
user = xxxuser
pw = xxxpassword

The GOTO is not taken and sqlca.sqlcode is set to 0 (no error).

Similarly, when I try to fetch records, either using SELECT or with a
DECLARE CURSOR/FETCH, I get no records and sqlcl.sqlcode is zero (no error).
Since I get no record, but no error is detected, the variables are garbage
and the program SEGV's trying to manipulate the variables.

The above problems occur whether I use valid information for host/user/pw,
or put in totally bogus values. Again, the program works perfectly on
Linux.

Psql works, and handles errors properly. Yet here, nothing works but no
error codes are set.

Any ideas what could be going on? Is ecpg broken on Solaris? Since psql
works, it would seem that the build is valid.

Wes

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2004-03-23 23:50:44 Re: linked list rewrite
Previous Message Tom Lane 2004-03-23 23:11:08 Re: partial VACUUM FULL