pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedPostgres problem
5+ messages / 5 participants
[nested] [flat]
* Postgres problem
@ 2001-04-20 01:33 Prof. L M Patnaik <lalit@micro.iisc.ernet.in>
0 siblings, 2 replies; 5+ messages in thread
From: Prof. L M Patnaik @ 2001-04-20 01:33 UTC (permalink / raw)
To: pgsql-interfaces
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
output:
/tmp/ccwWFbHo.o:In function 'exit_nicely':
/tmp/ccwWFbHo.o(.text+0x8):undefined referance to 'PQfinish'
/tmp/ccwWFbHo.o:In function 'main':
/tmp/ccwWFbHo.o(.text+0x66):undefined referance to
'PQsetdblogin'
/tmp/ccwWFbHo.o(.text+0x66):undefined referance to 'PQstatus'
...............................................................
2)When I want to use the command
$createlang c (dbname)
OUTPUT:
createlang:missing required argument PGLIB directory.
...............................................................
I shall be grateful if you reply giving me suggestion to solve
the problems.
Thanking you
With regards
Simanchal
c/o Prof L M Patnaik
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Postgres problem
@ 2001-04-20 16:58 Ludek Finstrle <xfinstrl@informatics.muni.cz>
parent: Prof. L M Patnaik <lalit@micro.iisc.ernet.in>
1 sibling, 0 replies; 5+ messages in thread
From: Ludek Finstrle @ 2001-04-20 16:58 UTC (permalink / raw)
To: Prof. L M Patnaik <lalit@micro.iisc.ernet.in>; +Cc: 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
^ permalink raw reply [nested|flat] 5+ messages in thread
* RE: Postgres problem
@ 2001-05-21 20:41 Erny <aerd@mx3.redestb.es>
parent: Prof. L M Patnaik <lalit@micro.iisc.ernet.in>
1 sibling, 0 replies; 5+ messages in thread
From: Erny @ 2001-05-21 20:41 UTC (permalink / raw)
To: pgsql-interfaces
> Hello:
Hi,
>
> 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
>
> output:
> /tmp/ccwWFbHo.o:In function 'exit_nicely':
> /tmp/ccwWFbHo.o(.text+0x8):undefined referance to 'PQfinish'
>
> /tmp/ccwWFbHo.o:In function 'main':
> /tmp/ccwWFbHo.o(.text+0x66):undefined referance to
> 'PQsetdblogin'
>
> /tmp/ccwWFbHo.o(.text+0x66):undefined referance to 'PQstatus'
I had the same problem. You have to include -lq on the command line.
Futhermore, I had to put it on the end of the line, because the compiler
collects unknown symbols first and then resolves it with the -l library
switch. So I made a little Makefile like this one:
#Little Makefile for making whatever source file directly to an executable.
override CFLAGS += -I/usr/include/postgresql
% : %.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lpq
% : %.c++
g++ $(CFLAGS) $(LDFLAGS) -o $@ $< -lpq++
#end
Erny
^ permalink raw reply [nested|flat] 5+ messages in thread
* Postgres problem
@ 2003-05-19 15:15 sanjivan <sanjivan.khedkar@e-zest.net>
0 siblings, 1 reply; 5+ messages in thread
From: sanjivan @ 2003-05-19 15:15 UTC (permalink / raw)
To: david@wheeler.net; +Cc: barwick@gmx.net; pgsql-interfaces; dbi-dev@perl.org; pgman@candle.pha.pa.us
Hi
I am trying to take a backup through phppgadmin. I have installed a postgres server 7.3. It gives me a pg_relcheck error. Can you suggest me..how to remove that error. is there any patch to install..or from where i get that.
Please suggest me..
Thanks in advance
San
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Postgres problem
@ 2003-05-19 19:33 Ian Barwick <barwick@gmx.net>
parent: sanjivan <sanjivan.khedkar@e-zest.net>
0 siblings, 0 replies; 5+ messages in thread
From: Ian Barwick @ 2003-05-19 19:33 UTC (permalink / raw)
To: sanjivan <sanjivan.khedkar@e-zest.net>; +Cc: pgsql-interfaces; david@wheeler.net; dbi-dev@perl.org; pgman@candle.pha.pa.us
On Monday 19 May 2003 17:15, sanjivan wrote:
> Hi
> I am trying to take a backup through phppgadmin. I have installed a
> postgres server 7.3. It gives me a pg_relcheck error. Can you suggest
> me..how to remove that error. is there any patch to install..or from where
> i get that. Please suggest me..
> Thanks in advance
> San
Err,
1: please post this kind of question to the appropriate list
(dbi-dev has _nothing_ to do with this);
2: please post to the list first, not to a semi-random group
of individuals as well; because
3: speaking for myself I have no working knowledge of phppgadmin.
Having said that it looks like some kind of version mismatch is taking place.
IIRC pg_relcheck does not exist in PostreSQL 7.3. google or a search
of the Postgres mailing list archives might help you further.
Please follow up to pgsql-interfaces only (try subscribing if you're not
already).
Ian Barwick
barwick@gmx.net
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2003-05-19 19:33 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-04-20 01:33 Postgres problem Prof. L M Patnaik <lalit@micro.iisc.ernet.in>
2001-04-20 16:58 ` Ludek Finstrle <xfinstrl@informatics.muni.cz>
2001-05-21 20:41 ` Erny <aerd@mx3.redestb.es>
2003-05-19 15:15 Postgres problem sanjivan <sanjivan.khedkar@e-zest.net>
2003-05-19 19:33 ` Ian Barwick <barwick@gmx.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox