Re: Solaris ecpg program doesn't work - pulling my hair out! - Mailing list pgsql-general

From Bruce Momjian
Subject Re: Solaris ecpg program doesn't work - pulling my hair out!
Date
Msg-id 200403240228.i2O2S3c05449@candle.pha.pa.us
Whole thread Raw
In response to Solaris ecpg program doesn't work - pulling my hair out!  (<wespvp@syntegra.com>)
Responses Re: Solaris ecpg program doesn't work - pulling my hair
List 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@syntegra.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@host.my.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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-general by date:

Previous
From: Joan Picanyol
Date:
Subject: Re: rule as on insert to view with multiple fk referencing the same table
Next
From: Wes Palmer
Date:
Subject: Re: Solaris ecpg program doesn't work - pulling my hair