Re: [INTERFACES] FPK Pascal and Postgres - Mailing list pgsql-interfaces

From Ken J. Wright
Subject Re: [INTERFACES] FPK Pascal and Postgres
Date
Msg-id 3.0.32.19990902075023.00b41530@ren.cncware.com
Whole thread Raw
List 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



pgsql-interfaces by date:

Previous
From: PostgreSQL Admin
Date:
Subject: Access 2000 and PostODBC 6.04.000007
Next
From: "Jackson, DeJuan"
Date:
Subject: RE: [INTERFACES] Need an example