2 DBD::Pg -- the DBI PostgreSQL interface for Perl
4 # $Id: README,v 1.1 2004-04-29 09:21:28 ivan Exp $
9 This is version 1.21 of DBD-Pg. The web site for this interface is at:
11 http://gborg.postgresql.org/project/dbdpg/projdisplay.php
13 For further information about DBI look at:
17 For information about PostgreSQL, visit:
19 http://www.postgresql.org/
24 Portions Copyright (c) 1994,1995,1996,1997 Tim Bunce
25 Copyright (c) 1997,1998,1999,2000 Edmund Mergl
26 Copyright (c) 2002 Jeffrey W. Baker
27 Copyright (c) 2002 PostgreSQL Global Development Group
29 You may distribute under the terms of either the GNU General Public
30 License or the Artistic License, as specified in the Perl README file.
33 HOW TO GET THE LATEST VERSION:
34 ------------------------------
36 Use the following URL to look for new versions of this module:
38 http://gborg.postgresql.org/project/dbdpg/projdisplay.php
42 http://www.perl.com/CPAN/modules/by-module/DBD/
44 Note, that this request will be redirected automatically to the
51 Please send comments and bug-reports to <dbd-general@gborg.postgresql.org>
53 Please include the output of perl -v and perl -V, the version of PostgreSQL,
54 the version of DBD-Pg, the version of DBI, and details about your platform
61 build, test, and install Perl 5 (at least 5.005)
62 build, test, and install the DBI module (at least 1.30)
63 build, test, and install PostgreSQL (at least 7.3)
64 build, test, and install Test::Simple (at least 0.17)
69 By default Makefile.PL uses App:Info to find the location of the
70 PostgreSQL library and include directories. However, if you want to
71 control it yourself, define the environment variables POSTGRES_INCLUDE
72 and POSTGRES_LIB, or POSTGRES_HOME.
79 Do steps 1 to 3 as normal user, not as root!
85 The tests are designed to connect to a live database. The following
86 environment variables must be set for the tests to run:
88 DBI_DSN=dbi:Pg:dbname=<database>
92 If you are using the shared library libpq.so check if your dynamic
93 loader finds libpq.so. With Linux the command /sbin/ldconfig -v should
94 tell you, where it finds libpq.so. If ldconfig does not find libpq.so,
95 either add an appropriate entry to /etc/ld.so.conf and re-run ldconfig
96 or add the path to the environment variable LD_LIBRARY_PATH.
98 A typical error message resulting from not finding libpq.so is:
100 install_driver(Pg) failed: Can't load './blib/arch/auto/DBD/Pg/Pg.so'
101 for module DBD::Pg: File not found at
103 If you get an error message like:
105 perl: error while loading shared libraries:
106 /usr/lib/perl5/site_perl/5.6.0/i386-linux/auto/DBD/Pg/Pg.so: undefined
109 when you call DBI->connect, then your libpq.so was probably not seen at
110 build-time. This should have caused 'make test' to fail; did you really
111 run it and look at the output? Check the setting of POSTGRES_LIB and
114 Some linux distributions have incomplete perl installations. If you have
115 compile errors like "XS_VERSION_BOOTCHECK undeclared", do:
117 find .../lib/perl5 -name XSUB.h -print
119 If this file is not present, you need to recompile and re-install perl.
121 SGI users: if you get segmentation faults make sure, you use the malloc
122 which comes with perl when compiling perl (the default is not to).
123 "David R. Noble" <drnoble@engsci.sandia.gov>
125 HP users: if you get error messages like:
127 can't open shared library: .../lib/libpq.sl
128 No such file or directory
130 when running the test script, try to replace the 'shared' option in the
131 LDDFLAGS with 'archive'. Dan Lauterbach <danla@dimensional.com>
134 FreeBSD users: if you get during make test the error message:
136 'DBD driver has not implemented the AutoCommit attribute'
138 recompile the DBI module and the DBD-Pg module and disable optimization.
139 This error message is due to the broken optimization in gcc-2.7.2.1.
141 If you get compiler errors like:
142 In function `XS_DBD__Pg__dr_discon_all_'
143 `sv_yes' undeclared (first use in this function)
145 It may be because there is a 'patchlevel.h' file from another package
146 (such as 'hdf') in your POSTGRES_INCLUDE dir. The presence of this file
147 prevents the compiler from finding the perl include file
148 'mach/CORE/patchlevel.h'. Do 'pg_config --includedir' to identify the
149 POSTGRES_INCLUDE dir. Rename patchlevel.h whilst you build DBD::Pg.
152 Sun Users: if you get compile errors like:
154 /usr/include/string.h:57: parse error before `]'
156 then you need to remove from pgsql/include/libpq-fe.h the define for
157 strerror, which clashes with the definition in the standard include
160 Win32 Users: Running DBD-Pg scripts on Win32 needs some configuration work
163 o add a postgres user with the same name as the NT-User
165 o make sure, that your pg_hba.conf on the server is configured,
166 such that a connection from another host will be accepted