ZPyGreSQLDA 0.03 README ----------------------- This is the Z PyGreSQL database adapter product for the Z Object Publishing Environment. It was produced by modifying ZMySQLDA's __init__.py, DA.py and db.py files to get pgmodule from PyGreSQL-2.3 to work with Zope. ***** IMPORTANT ***** This product is distributed as a NON-BINARY release! This product requires compiled Python extensions that are NOT included as binaries with this release. You must build or install the required extensions using the instructions below before the product will work properly! Installation ------------ The ZPyGreSQL database adapter product requires that the Python _pgmodule extension be installed. The source files and associated files required to build the required PyGreSQL module are included in this product distribution. Follow the steps below to build the extension on UNIX platforms. I do not know if the included files support building on win32 platforms. o Ensure that you have PostgeSQL installed on your machine, INCLUDING THE FILES AND LIBRARIES NECESSARY TO DEVELOP APPLICATIONS. If you do not have the developer files installed, you will need to download them from the PostgeSQL web site at http://www.postgresql.org. Please contact the maintainers with all questions pertaining to the use or installation of development files. Make sure that the postmaster has been started with the -i flag if you want to use a TCP/IP connection to the backend process. The flag is not necessary when using Unix sockets. o Ensure that you have extracted the ZPyGreSQLDA product distribution in your top-level Zope directory. This should have created a subdirectory named lib/python/Products/ZPyGreSQLDA containing the product files as well as this README file. o Change to the /src directory of your ZPyGreSQLDA product directory and issue the following commands: make -f Makefile.pre.in boot make Note 1. Add -DNO_PQSOCKET to the Setup file if you are using a version of PostgreSQL before 6.4 that does not have the PQsocket function. For example: _pg pgmodule.c -I/opt/postgres/include -L/opt/postgres/lib -lpq -lcrypt -DNO_PQSOCKET Note 2. On Solaris it may be necessary to add -R option to Setup file before running make. For example: _pg pgmodule.c -I/opt/postgres/include -L/opt/postgres/lib -R/opt/postgres/lib -lpq -lcrypt This should create the file _pgmodule.so in your src directory. If errors occur when trying to build the extension, you may need to modify the Setup file to ensure that the correct PostgreSQL include and lib directory options are being passed to the compiler. Finally, copy the output file _pgmodule.so up one directory into your ZPyGreSQLDA product directory and restart your Zope installation to complete the product installation. Sample Data ----------- The /data directory of the ZPyGreSQLDA directory includes some sample data. Issue the commands: createdb baseball psql -e baseball