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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: wespvp(at)syntegra(dot)com
Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Solaris ecpg program doesn't work - pulling my hair out!
Date: 2004-03-24 02:28:03
Message-ID: 200403240228.i2O2S3c05449@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


If I had to take a guess, there is something wrong with the ecpg program
and the error is masked on Linux, but is visible on Solaris. I would
break the program down into small parts and test to see where there
error starts.

---------------------------------------------------------------------------

wespvp(at)syntegra(dot)com wrote:
> 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
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2004-03-24 02:28:59 Re: linked list rewrite
Previous Message Grace C. Unson 2004-03-24 01:43:28 Transaction Isolation Level returned