pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedFPK Pascal and Postgres
7+ messages / 3 participants
[nested] [flat]
* FPK Pascal and Postgres
@ 1999-09-01 15:30 Robert Hiltibidal <rob@y2k.state.il.us>
1999-09-01 16:12 ` Re: [INTERFACES] FPK Pascal and Postgres Ken J. Wright <ken@ori-ind.com>
1999-09-01 16:26 ` Re: [INTERFACES] FPK Pascal and Postgres The Hermit Hacker <scrappy@hub.org>
1999-09-01 17:56 ` Re: [INTERFACES] FPK Pascal and Postgres Robert Hiltibidal <rob@y2k.state.il.us>
1999-09-01 18:18 ` Re: [INTERFACES] FPK Pascal and Postgres Ken J. Wright <ken@ori-ind.com>
1999-09-02 13:58 ` Re: [INTERFACES] FPK Pascal and Postgres Robert Hiltibidal <rob@y2k.state.il.us>
0 siblings, 5 replies; 7+ messages in thread
From: Robert Hiltibidal @ 1999-09-01 15:30 UTC (permalink / raw)
To: pgsql-interfaces
Morning,
I have been experimenting with the FPK Pascal for linux found at
http://tfdec1.fys.kuleuven.ac.be/~michael/fpc/ and postgres 6.5.1
I noticed the latest version of FPK includes a postgres unit. Coolnesssss....
I downloaded the postgres tar file from the FPK site and am trying to
understand how the pascal interface works.
I created a db called robpas. I ran the mkdb program included in the
tarfile adn it created a table with various email addresses.
So... I know this much is working.
When I run either the testemail or the testpg examples I get the following
errors:
/y2k/pascal/postgres -- 10:17am
y2k{rob}192 ->testpg
testpg: error in loading shared libraries
libpq.so.2.0: cannot open shared object file: No such file or directory
/y2k/pascal/postgres -- 10:17am
y2k{rob}193 ->testemail
testemail: error in loading shared libraries
libpq.so.2.0: cannot open shared object file: No such file or directory
libpq.so.2.0 exists in /y2k/pgsql/lib. I have a symbolic link in
/usr/local/pgsql that points to /y2k/pgsql. In short they both point to the
same place. Both /y2l/pgsql/lib and /usr/local/pgsql/lib are listed
specifically in my path environment.
Any help would be greatly appreciated.
Thanks,
-Rob
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [INTERFACES] FPK Pascal and Postgres
1999-09-01 15:30 FPK Pascal and Postgres Robert Hiltibidal <rob@y2k.state.il.us>
@ 1999-09-01 16:12 ` Ken J. Wright <ken@ori-ind.com>
4 siblings, 0 replies; 7+ messages in thread
From: Ken J. Wright @ 1999-09-01 16:12 UTC (permalink / raw)
To: Robert Hiltibidal <rob@y2k.state.il.us>; pgsql-interfaces
Hi Rob,
>/y2k/pascal/postgres -- 10:17am
>y2k{rob}192 ->testpg
>testpg: error in loading shared libraries
>libpq.so.2.0: cannot open shared object file: No such file or directory
Make sure you have an entry in /etc/ld.so.conf,
/usr/local/pgsql/lib
then run /sbin/ldconfig to register the postgres library with the so loader
cache.
ldconfig -p will show what's currently in the cache.
Also, in your /etc/ppc386.cfg you may need to have an entry also,
# Search path for libraries
-Fl/usr/local/pgsql/lib
Ken
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [INTERFACES] FPK Pascal and Postgres
1999-09-01 15:30 FPK Pascal and Postgres Robert Hiltibidal <rob@y2k.state.il.us>
@ 1999-09-01 16:26 ` The Hermit Hacker <scrappy@hub.org>
4 siblings, 0 replies; 7+ messages in thread
From: The Hermit Hacker @ 1999-09-01 16:26 UTC (permalink / raw)
To: Robert Hiltibidal <rob@y2k.state.il.us>; +Cc: pgsql-interfaces
On Wed, 1 Sep 1999, Robert Hiltibidal wrote:
> Morning,
>
> I have been experimenting with the FPK Pascal for linux found at
> http://tfdec1.fys.kuleuven.ac.be/~michael/fpc/ and postgres 6.5.1
>
> I noticed the latest version of FPK includes a postgres unit. Coolnesssss....
>
> I downloaded the postgres tar file from the FPK site and am trying to
> understand how the pascal interface works.
>
> I created a db called robpas. I ran the mkdb program included in the
> tarfile adn it created a table with various email addresses.
>
> So... I know this much is working.
>
> When I run either the testemail or the testpg examples I get the following
> errors:
>
>
> /y2k/pascal/postgres -- 10:17am
> y2k{rob}192 ->testpg
> testpg: error in loading shared libraries
> libpq.so.2.0: cannot open shared object file: No such file or directory
>
> /y2k/pascal/postgres -- 10:17am
> y2k{rob}193 ->testemail
> testemail: error in loading shared libraries
> libpq.so.2.0: cannot open shared object file: No such file or directory
>
>
> libpq.so.2.0 exists in /y2k/pgsql/lib. I have a symbolic link in
> /usr/local/pgsql that points to /y2k/pgsql. In short they both point to the
> same place. Both /y2l/pgsql/lib and /usr/local/pgsql/lib are listed
> specifically in my path environment.
Did you 'ldconfig' so that the linker knows where to find the library?
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [INTERFACES] FPK Pascal and Postgres
1999-09-01 15:30 FPK Pascal and Postgres Robert Hiltibidal <rob@y2k.state.il.us>
@ 1999-09-01 17:56 ` Robert Hiltibidal <rob@y2k.state.il.us>
4 siblings, 0 replies; 7+ messages in thread
From: Robert Hiltibidal @ 1999-09-01 17:56 UTC (permalink / raw)
To: The Hermit Hacker <scrappy@hub.org>; +Cc: pgsql-interfaces@postgreSQL.org, "Ken J. Wright" <ken@ori-ind.com>
My thanks to you and Ken who offered the following ideas:
>Did you 'ldconfig' so that the linker knows where to find the library?
also, in your /etc/ppc386.cfg you may need to have an entry also,
# Search path for libraries
-Fl/usr/local/pgsql/lib
When I did those alteration and rebuilt the postgres.ppu it didn't work.
I then made the following change in the postgres.pp file
{ $include "/usr/include/libpq/pqcomm.h"}
Well that didn't work either. You guys will laugh at this...
I added a make install, just on a whim. I wasn't sure if I'd be replacing a
more modern unit as the site says its for postgres 6.3.1 and we're running
6.5.1. The rule of thumb round here being make sure it works before you
replace....
It worked.
Now I can tackle the tackle the fun of relearning....
Thanks again,
-Rob
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [INTERFACES] FPK Pascal and Postgres
1999-09-01 15:30 FPK Pascal and Postgres Robert Hiltibidal <rob@y2k.state.il.us>
@ 1999-09-01 18:18 ` Ken J. Wright <ken@ori-ind.com>
4 siblings, 0 replies; 7+ messages in thread
From: Ken J. Wright @ 1999-09-01 18:18 UTC (permalink / raw)
To: Robert Hiltibidal <rob@y2k.state.il.us>; +Cc: pgsql-interfaces
>I added a make install, just on a whim. I wasn't sure if I'd be replacing a
>more modern unit as the site says its for postgres 6.3.1 and we're running
>6.5.1.
The unit is good for 6.5.x as well. Also if you do Delphi, this unit has
been modified slightly to wrap around libpq.dll for win32. You can find it
at http://www.clubdelphi.com/nico
Cheers!
Ken
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [INTERFACES] FPK Pascal and Postgres
1999-09-01 15:30 FPK Pascal and Postgres Robert Hiltibidal <rob@y2k.state.il.us>
@ 1999-09-02 13:58 ` Robert Hiltibidal <rob@y2k.state.il.us>
4 siblings, 0 replies; 7+ messages in thread
From: Robert Hiltibidal @ 1999-09-02 13:58 UTC (permalink / raw)
To: The Hermit Hacker <scrappy@hub.org>; +Cc: ken@ori-ind.com; pgsql-interfaces
Morning,
I installed FPK Pascal on another host last night. I ran into a similar
problem where the error message was:
testpg: error in loading shared libraries
libpq.so.2.0: cannot open shared object file: No such file or directory
I checked both the /etc/ld.so.conf files and the /etc/ppc386.cfg file. I
had the proper enteries in both files.
The problem was in the postgress.pp file. The include statement was
originally:
{ $include "libpq/pqcomm.h"}
By changing it to the absolute path as listed below everything works great.
Its a bit early for benchmarks but I'm guestimating I'm seeing somewhere's
around 40% speed improvement over Perl. Perhaps today I'll make a benchmark
program and compare the results.
Although I will say it takes about 20 lines of code in perl and about 70
lines in pascal... tradeoff's...gotta love 'em.
{ $include "/usr/include/libpq/pqcomm.h"}
-Rob
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [INTERFACES] FPK Pascal and Postgres
@ 1999-09-02 14:50 Ken J. Wright <ken@ori-ind.com>
0 siblings, 0 replies; 7+ messages in thread
From: Ken J. Wright @ 1999-09-02 14:50 UTC (permalink / raw)
To: Robert Hiltibidal <rob@y2k.state.il.us>; +Cc: pgsql-interfaces
>testpg: error in loading shared libraries
>libpq.so.2.0: cannot open shared object file: No such file or directory
>
>I checked both the /etc/ld.so.conf files and the /etc/ppc386.cfg file. I
>had the proper enteries in both files.
>
>The problem was in the postgress.pp file. The include statement was
>originally:
>{ $include "libpq/pqcomm.h"}
>
>By changing it to the absolute path as listed below everything works great.
There's something wrong with this. The { $include ..... statement above is
interpreted by the compiler as a comment! Even with the space remove,
{$include..., the compiler would complain, as it does not read in 'c'
source code! There is something else going on here with regard to your
success vs. failure with loading the library.
>Its a bit early for benchmarks but I'm guestimating I'm seeing somewhere's
>around 40% speed improvement over Perl. Perhaps today I'll make a benchmark
>program and compare the results.
>
>Although I will say it takes about 20 lines of code in perl and about 70
>lines in pascal... tradeoff's...gotta love 'em.
Remember that the pascal unit is just a straight translation wrapper for
libpq. If you were writing in 'c', you'd have about those same 70 lines.
The perl interface just handles more for you under the hood. With FPC or
Delphi (supporting classes) you could extend further to reduce the required
amount of code for a pascal application.
Cheers!
Ken
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~1999-09-02 14:50 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-09-01 15:30 FPK Pascal and Postgres Robert Hiltibidal <rob@y2k.state.il.us>
1999-09-01 16:12 ` Ken J. Wright <ken@ori-ind.com>
1999-09-01 16:26 ` The Hermit Hacker <scrappy@hub.org>
1999-09-01 17:56 ` Robert Hiltibidal <rob@y2k.state.il.us>
1999-09-01 18:18 ` Ken J. Wright <ken@ori-ind.com>
1999-09-02 13:58 ` Robert Hiltibidal <rob@y2k.state.il.us>
1999-09-02 14:50 Re: [INTERFACES] FPK Pascal and Postgres Ken J. Wright <ken@ori-ind.com>
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