Re: Using host variables -- segmentation fault

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Yadnyesh Joshi <yadnyesh_joshi(at)yahoo(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Using host variables -- segmentation fault
Date: 2006-10-17 04:49:35
Message-ID: 20061017044935.GA8686@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Mon, Oct 16, 2006 at 10:02:12AM -0700, Yadnyesh Joshi wrote:
> I found out what was the problem.
> I had not set LD_LIBRARY_PATH environment variable.
> But I didn't see anything in documentation which says that if I don't set
> the environment variable, I won't be able to use host variables in C.

That's because setting LD_LIBRARY_PATH has nothing to do with using
host variables, at least not directly. Apparently the library the
runtime linker was finding was incompatible with your object code
but the problem only manifested itself under certain conditions.
What version of ecpg did you use (ecpg --version)? What version
of libecpg were you linking against? What does "ldd the_program"
show both with and without LD_LIBRARY_PATH set?

--
Michael Fuhr

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Felix Zhang 2006-10-17 07:39:21 How to split a table?
Previous Message Yadnyesh Joshi 2006-10-17 03:48:29 Inserting arrays from C program