Re: Postgres problem - Mailing list pgsql-interfaces

From Ludek Finstrle
Subject Re: Postgres problem
Date
Msg-id 20010420185830.C23123@anxur.fi.muni.cz
Whole thread Raw
In response to Postgres problem  ("Prof. L M Patnaik" <lalit@micro.iisc.ernet.in>)
List pgsql-interfaces
Prof. L M Patnaik napsal(a):
> 
> Hello:
> 
> I am having problem interfacing the postgres database with the 
> frontend(libpq),i.e using C.Database runs fine.
> 
>  PROBLEMS ARE:
>             1)When compiling the C-program given in the 
>              example for connecting the database to the
>              frontend using
>        $gcc -I /home/guest/pgsql/include test.c

Try something like this       $gcc -I /home/guest/pgsql/include -L /home/guest/pgsql/lib -lpq test.c

I think that postgres libraries are stored in /home/guest/pgsql/lib.

> ...............................................................
>             
>             2)When I want to use the command
>               $createlang c (dbname)
>             OUTPUT:
>                    createlang:missing required argument PGLIB directory.            

You don't have specified the path to PGLIB. createlang can't find them.
Try set environment variable PGLIB (e.g. in bash:
export PGLIB=/home/guest/pgsql/lib). Or append this path to environment
variable LD_LIBRARY_PATH.

Regards

Luf


pgsql-interfaces by date:

Previous
From: Lonnie Cumberland
Date:
Subject: Client/Server Security question
Next
From: Tom Lane
Date:
Subject: Re: Re: Now for the VARDATA, VARSIZE, and VARHDRSZ stuff