Files
harbour-core/harbour/contrib/hbpgsql
Viktor Szakats c2ae20191d 2008-06-05 02:30 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* hbpgsql/postgres.c
     ! Don't request windows.h.
     + Using hb_parptrGC() for PGconn()
     + PQCONNECT() larger buffer for connect string.
     ! PQCONNECT() not passing trash to PG API if no. of params != 5
     ! PQCONNECT() buffer overflow vulnerability.
     ! PQSETDBLOGIN() password could not be passed to PG API due 
       to typo.
     ! PQMETADATA() now returns empty array instead of NIL in case 
       of failure (so test.prg won't RTE).
     ! PQCREATETRACE(), PQCLOSETRACE(), PQTRACE() now only activated 
       in 'NODLL' (temp name) is defined, since passing 'FILE *' to 
       .dlls results in crash.
     ; TOFIX? added to PQESCAPEBYTEA()
     * Formatting.
     % Cleanup, optimizations.
     ; NOTE: I've tried test.prg and while it runs, it doesn't seem 
             to work properly for some reason.
     ; TOFIX: Use bh_parptrGC() for PGresult, FILE*.

   * hbpgsql/make_vc.bat
     + Now uses the .lib provided in the binary package.
       (This needs the current 8.3.1 version)
2008-06-05 00:45:08 +00:00
..
2008-06-05 00:08:04 +00:00
2008-06-05 00:08:04 +00:00
2008-06-05 00:08:04 +00:00

/*
 * $Id$
 */

README 23/12/2003 - Harbour Low Level api for Postgres RDBMS

It's to be seem like Harbour TMysql routines.


IMPORTANT
---------
The class TPostgres, only works with versions 7.4.x or greater, because some methods use information_schema and
New PQexecParams, which use protocol 3.0 and this protocol is only compatible with 7.4 versions.

BORLAND BCC
-----------
Using this library with bcc, you will need import library, ex: implib libpq.lib libpq.dll or (advice this) build your own
Postgres Library.

Go to postgres directory \postgresql-7.4.5\src\interfaces\libpq

Edit bcc32.mak and change the default borland directory for your needs. Example: BCB=c:\Borland\Bcc55

change postgresql-7.4.5\src\include\pg_config.h.win32 to pg_config.h

after this

make -f bcc32.mak

Now look at \postgresql-7.4.5\src\interfaces\libpq\Release, you will find the all .libs and .dlls

If want use the dll, link in your aplication blibpqdll.lib and send blibpq.dll together with your aplication

If you don't wanna use .dll link blibpq.lib, that's it.

LINUX GCC
----------
On Linux you will need link libpq or references by pq.
For full api documentation look at:
http://www.postgresql.org/docs/current/static/libpq.html

FILES:
postgres.c - Low level api
tpostgre.prg - Class implementation, it's to be seems like TMysql.
tests\simple.prg - Simple test class
tests\stress.prg - Stress test 
tests\cache.prg  - Show hot to use .dbf as pg cache, like TDataset for Delphi.

TODO:

That's all folks and sorry my poor english

Rodrigo Moreno - rodrigo_moreno@yahoo.com