![]() |
pgExpress Driver v0.96a
A PostgreSQL dbExpress Driver |
The pgExpress Driver and all it's components are Copyright © 2001-2002
Vita Voom Software.
This is the "readme" file for the pgExpress Driver.
Table of Contents:
The pgExpress Driver is a dbExpress Driver for Borland Delphi 6+/Kylix can access PostgreSQL 7.1+ databases, use almost all field types, and is complient to the Borland specifications of dbExpress drivers. It might access earlier PostgreSQL Server versions, but this was not tested. Since version 0.95, pgExpress includes support for stored procedures (emulated through PostgreSQL Functions).
The pgExpress Driver is the core of the pgExpress Suite of components, which provides the widest range of support to acessing PostgreSQL databases.
Asynchronous connections can't be supported by current Borland's dbExpress implementation; array and ADT (custom fields) support will be suported only by the full pgExpress Suite. It has support for all the most commonly used PostgreSQL field types (notably: int2, in4, int8, serial, char, varchar, text, date, datetime, time, BLOB (large objects), float, real, numeric and others).
This driver is the basis for a future pgExpress Suite of components, which is in late development, and should be released as soon as the driver reaches version 1.0.
You can see the ChangeLog for dbExpress Driver here.
The Vita Voom pgExpress Driver was born out of the lack of good PostgreSQL support for the Delphi community. I, Steve Howe, have also worked on the Zeos Library project for a couple months, but I have quit from it since I couldn't agree with many of the development directives.
The pgExpress Driver was developed months ago Borland released it's PostgreSQL Driver for Kylix, at the time it was written, it was the first non-Borland driver written to access a thirdy-party database server, and also the first driver in the world written using Borland Delphi itself.
The pgExpress PostgreSQL dbExPress Driver version can access PostgreSQL 7.1+ databases, use almost all field types, and is complient to the Borland specifications of dbExpress drivers. It might access earlier versions of the server, but this was not tested. Since version 0.95, pgExpress includes support for stored procedures (emulated through PostgreSQL Functions).
The pgExpress Driver is the core of the pgExpress Suite of components, which provides the widest range of support to acessing PostgreSQL databases.
Asynchronous connections can't be supported by current Borland's dbExpress implementation; arrays are mapped as strings (see Known Issues) and ADT (custom fields) support will be suported only by the full pgExpress Suite.
These are some of the features in the driver:
- 100% VCL/CLX implementation - unlike other drivers which are coded in C language, our driver is 100% coded using Delphi itself.
- Portability - both Delphi and Kylix are supported.
- FAST! - The pgExpress Driver is highly optimized, and is designed to minimize the traffic to the server as much as possible.
- Low Cost - pgExpress has NO RUNTIME FEES and does not need to be licensed in a per machine basis. PostgreSQL has the most unobstrusive license in the market - BSD (totally free). Thereby, we believe that PostgreSQL + Delphi/Kylix + pgExpress is the dream of all database developers.
- Exclusive features - the Vita Voom driver has much more features then the Borland's Kylix PostgreSQL driver, is available also for Delphi and has features not found on any other driver.
- Reability - Since the driver is based on dbExpress implementation, it minimizes the possibility of bugs, because many of the code that actually access the databases from Delphi is written by Borland itself.
- Full types support - All regular types from PostgreSQL are supported (see Known Issues)
- Database independence - you can switch for another database, just by replacing the driver for another driver. This is a main advantage of the dbExpress technology itself;
- Small - the packages version of the driver is 30Kb only.
- Support - Vita Voom primes for its custumers. We have a real great support system for ensuring our custumers have the best and fast possible support.
The pgExpress PostgreSQL dbXPress Driver installation procedure is much like any other dbExpress driver's installation.
If you want to try the driver for Delphi, the files are under the pgExpress installation's 'Delphi' directory; for the Kylix files, the directory is 'Kylix'.
If you're using the installer version (*.exe), it can perform the operations below for you, except configuring your connections parameters (what you can do manually or just double-clickcing a TSQLConnection). You can edit the default [PGEConnection] entry it creates.
The steps for manual installation are:
- Copy the driver 'dbexppge.dll' ('libdbexppge.so' on Kylix) to a folder in your path. If you prefer using the packages version of the driver, which is smaller, use the 'dbexppge_pkg.dll' file (libdbexppge_pkg.so on Kylix), and rename it back to 'dbexppge.dll' ('libdbexppge.so' on Kylix). The usual folder is $Delphi\bin on Windows (where $Delphi is the Delphi 6's installed folder), or $kylix/bin under Kylix/Kylix2, but as long as it's on your path, you can choose any other folder.
- Copy the 'libpq.dll' ('libpq.so' on Kylix) file to a dir on your PATH. This library in our is custom version of the PostgreSQL access library and is needed in order to connect to the database server. The pgExpress Driver won't work properly without this library, under Windows, because some functions needed by the pgExpress aren't exported by default (again - under Windows only). If you're under Kylix, the standard libpq.so from the PostgreSQL original installation should work.
Note for libpq incompatibilities: there could be some incompatilbility problems between the libpq.dll/libpq.so library provided in the distribution and other clients such as psql - specialy under Kylix. To solve this, you can either:
1) If under Kylix - use the standard 'libpq.so' file from the original PostgreSQL distribution, as it is, on your system;
2) Rename the 'libpq.so'/'libpq.dll' file from the pgExpress Driver distribution to something else, and update the entry on the 'dbxdrivers'/'dbxdrivers.ini' file (which is by default 'VendorLib=libpq.so' under Kylix or 'VendorLib=libpq.so' under Windows). If you rename the library to 'libpq_pge.so', for instance, your entry should become 'VendorLib=libpq_pge.so' accordingly. More instructions on the 'dbxdrivers'/'dbxdrivers.ini' file are below.
- Setup the entries on the dbxdrivers.ini and dbxconnections.ini dbExpress configuration files. These files are usually at the "$ProgramFiles\Common Files\Borland Shared\DBExpress" folder. The changes to be applied are the following:
- Edit the 'dbxdrivers.ini' file. On Kylix, this file is called 'dbxdrivers'.
On the [Installed Drivers] section, add the PostgreSQL=1 key and value:
[Installed Drivers]
DB2=1
Interbase=1
MYSQL=1
Oracle=1
PostgreSQL=1
Still on this file, add the [PostgreSQL] section:
[Oracle]
GetDriverFunc=getSQLDriverORACLE
LibraryName=dbexpora.dll
VendorLib=OCI.DLL
BlobSize=-1
DataBase=Database Name
ErrorResourceFile=
LocaleCode=0000
Password=password
Oracle TransIsolation=ReadCommited
User_Name=user[PostgreSQL]
GetDriverFunc=getSQLDriverPOSTGRESQL
LibraryName=dbexppge.dll
VendorLib=LIBPQ.DLL
NOTE: On Kylix, the PostgreSQL section is slightly different to reflect the linux library file names:
[PostgreSQL]
GetDriverFunc=getSQLDriverPOSTGRESQL
LibraryName=libdbexppge.so
VendorLib=libpq.so
Still on Kylix, you must add your driver's path to the LD_LIBRARY_PATH environment variable (or copy the driver to your Kylix's 'bin' subdirectory):
LD_LIBRARY_PATH=/home/steve/lib/
export LD_LIBRARY_PATH
Now, there is still the dbxconnections file to be edited.
Edit the 'dbxconnections.ini' file. On Kylix, this file is called 'dbxconnections'. This file can contain as many entries for the pgExpress driver as you might want. We supply here an example connection, but you should modify it to meet your own settings:
[PGEConnection]
BlobSize=32
HostName=host
Database=database_name
DriverName=PostgreSQL
Password=temp123
TransIsolation=ReadCommited
User_Name=steve
The only required fields are Database, DriverName, User_Name (and Password if you don't want a login prompt). You can use a more reduced form like the one below (you're encouraged to use this one):
[PGEConnection]
DriverName=PostgreSQL
Database=hostname/database_name
User_Name=steve
Password=temp123
The other parameters are optional (and only those listed above are supported by pgExpress) and their meaning is that on dbExpress documentation.
Pay special attention to the Database parameter. dbExpress only will load the HostName parameter if you set the TSQLConnection.LoadParamsOnConnect property to True. We at Vita Voom Software have used the following rules for the format of the database specifier that avoid that confusion and also adds support for a Port parameter. It seems like an URL:
host:port/database
Where:
- host is the Hostname (DNS or IP) of the machine. If you don't supply this parameter, it defaults to localhost.
- port is the port to connect to, on the database server host. This do not need to be supplied, if you use the default, 5432, port. But if you do supply this parameter, you need also specify the host name, and separate the host and port with a colon (':').
- database is the database name to connect to. This parameter must be supplied.
The following are valid Database parameters:
- Database = myserver.mydomain.com/database
- Database = myserver.mydomain.com:5432/database
- Database = 111.111.111.111:5432/database
- Database = database
Note that if you supply both the HostName and Database parameters with embedded hostname (as show above), the Database parameter will prevail.
Don't forget you can add as many sections to the dbxconnections file as you want, like this:
[PGEConnection]
DriverName=PostgreSQL
Database=hostname1/database_name
User_Name=steve
Password=temp123
[pgserver]
DriverName=PostgreSQL
Database=pgserver/database_name
User_Name=john
- That's it. The driver should be working now.
Please note that inside the distribution there are example dbxdrivers(.ini) and dbxconnections(.ini) for both Delphi and Kylix.
The pgExpress driver has a few special parameters that can be used to customize some behaviors.
These parameters go into the dbxdrivers.ini (dbxdrivers on Kylix) file, on the [PostgreSQL] (of course) section. Unhappyly, due to the way dbExpress was designed, they can't be used on a per connection basis (i.e., on the dbxconnections/dbxconnections file).
They are (red values mean default values):
Key Values MeaningTextAsBlob True/False If True, the PostgreSQL 'Text' field will be mapped as Blob; if False (deault), it will be mapped as string.
Obs: If mapped as string, it will be padded at the maximum string length (~32Kb).MapUnknownAsString True/False If True (default), unknown/unsupported field types (ex: 'point' type) will be mapped as strings. ArrayAsString True/False If True(default), arrays will be mapped as strings. If false, they will be ignored (hidden). Int8Mode AsBcd/AsString/AsInt4/Ignore AsString: the field will be mapped as string.
AsInt4: the field will be mapped as Int4 (value calculated as Int8 mod High(Int4)).
Ignore: the field will be ignored (hidden)
This is the license agreement for the pgExpress Driver ("Software"). BY INSTALLING, COPYING, OR OTHERWISE USING THE SOFTWARE, YOU AGREE TO BE BOUND BY
ALL OF THE TERMS AND CONDITIONS OF THE LICENSE AGREEMENT.Althought we are we know it works fine, and Vita Voom puts the maximum of its efforts to develop, support and enhance it, the Software provided under this License Agreement, including but not limited to libraries, source code, documentation, redistributables and other files are provided "as is," without warranties of any kind.
The Software is owned by Vita Voom Software and is protected by copyright law and international copyright treaty. Therefore, you must treat this Software like any other copyrighted material (e.g., a book), except that you may either make one copy of the Software solely for backup or archival purposes or transfer the Software to a single hard disk provided you keep the original solely for backup or archival purposes.
You may not alter any of the programs or accompanying files without Vita Voom Software's written permission. Any resale or commercial distribution of the Software is strictly prohibited, unless Vita Voom Software has given explicit written permission. You can, however, distribute the software as part of a program your company have produced.
You have the right to use the Software as set forth in this licensing agreement. You are not obtaining title to the Software or any copyrights. You may not sublicense, rent, lease, convey, modify, translate, convert to another programming language, decompile, or disassemble the Software for any purpose.
DEMO VERSION RESTRICTIONS
The following applies only to the demostration version of the driver.
This version of the Software is a demonstration version. This means that you may use the Software for evaluation purposes only. You may use the Software to test whether it meets you demands. You must not distribute materials produced by the Software to computer systems different from the computer on which the Software is installed, regardless of how such a distribution takes place. You must not modify any material produced by the Software, including but not limited to computer files which where created as a result of the usage of the Software. You are not allowed to sell, rent, lease or otherwise use commercially files or parts of files which where created by the Software. The
Software is equipped with a mechanism that prevents the usage of the Software after a certain period of time has elapsed. You agree that you will delete the
Software from all computer systems to which you have installed it when this date has been reached.DISCLAIMER
VITA VOOM SOFTWARE MAKES NO REPRESENTATIONS OR WARRANTIES AS TO THE TRUTH, ACCURACY OR COMPLETENESS OF ANY STATEMENTS, INFORMATION OR MATERIALS CONCERNING THE SOFTWARE THAT IS CONTAINED ON AND WITHIN ANY OF THE WEBSITES OWNED AND OPERATED BY VITA VOOM SOFTWARE.
THIS SOFTWARE IS PROVIDED TO YOU "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED INCLUDING BUT NOT LIMITED TO THE APPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. YOU ASSUME THE ENTIRE RISK AS TO THE ACCURACY AND THE USE OF THE SOFTWARE AND ALL OTHER RISK ARISING OUT OF THE USE OR PERFORMANCE OF THIS SOFTWARE AND DOCUMENTATION. VITA VOOM SOFTWARE SHALL NOT BE LIABLE FOR ANY DAMAGES WHATSOEVER ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF VITA VOOM SOFTWARE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL VITA VOOM SOFTWARE BE LIABLE FOR ANY CONSEQUENTIAL, INCIDENTAL, DIRECT, INDIRECT, SPECIAL, PUNITIVE, OR OTHER DAMAGES WHATSOEVER, INCLUDING BUT NOT LIMITED TO DAMAGES OR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS, EVEN IF VITA VOOM SOFTWARE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME STATES/JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE LIMITATION MAY NOT APPLY.
The entire contents of this this package is protected by Brazilian and International Copyright Laws. Unauthorized reproduction, reverse-engineering, "hacking" and redistribution of all or any portion of the code contained in this file is strictly prohibited and may result in severe civil and criminal penalties and will be prosecuted to the maximum extent possible under the law.
This package can be redistributed only under it's original form; no changes may be applied to it or it's contents.
If you disagree about any of these terms, you're not allowed to use any Vita Voom Software. Please remove the all copies of our software from your system.
It is forbidden to use the Vita Voom pgExpress Driver in products that in a way or other reproduce extend the functionality of any Vita Voom Product (namely but not restricted to the pgExpress Suite), unless they're for internal use of your own company. Distribution of such products based in pgExpress Driver is FORBIDDEN.For more details, please contact Vita Voom Software.
The pgExpress PostgreSQL dbExpress Driver and all it's related files are Copyright © 2001-2002 by Vita Voom Software.
You can purchase the Vita Voom pgExpress Driver and the other Vita Voom products through our reseller, SWREG, using your credit card or one among many other payment forms they support (Mastercard, Eurocard, VISA, Delta, JCB, Switch, Solo, Discover, American Express, Diner's Club, UK cheque, US check, Postcheque, International Money Order, Bank wire and PayPal). The purchase process is done through a secure web server; your personal details such as name, address and credit card number or bank account number won't be reveiled to anyone. We shall send you your product through download link and/or email (as you choose), as soon as SWREG both notifies us about your purchase and consider the transaction done.
To order the pgExpress Express Driver or any of our other products, please go to our Orders Page.
If you have any comments, problems or doubts about purchasing from us, we would like to hear from you at orders@vitavoom.com.
This driver is 100% coded by Vita Voom Software. We would like, however, to express our gratitude to the following people:
The pgExpress Suite is a set of components to develop client-server applications using Borland Kylix/Delphi 6+ and the PostgreSQL Database Server.
Along with an improved driver version, the following components will be available:
... and more advanced features that will be added in final version.
Do you have suggestions ? Please mail us at support@vitavoom.com.
You can find more info about Vita Voom and it's products on our Web site: http://www.vitavoom.com.
If you want to become a beta tester, please email to betatest@vitavoom.com
If want to contact us, have questions, report bugs, introduce comments, etc. - please use the following email: support@vitavoom.com
For comments about the website, please email to webmaster@vitavoom.com
Support for the Demo version is not official; you might write us, but there is no warranty that all questions are answered. We are also might be going to provide a newsgroups forum and/or mailing lists.Steve Howe
howe@vitavoom.com