summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/src/extensions.rst7
-rw-r--r--doc/src/faq.rst18
2 files changed, 25 insertions, 0 deletions
diff --git a/doc/src/extensions.rst b/doc/src/extensions.rst
index 57c3e12..b0a68ce 100644
--- a/doc/src/extensions.rst
+++ b/doc/src/extensions.rst
@@ -105,6 +105,13 @@ functionalities defined by the |DBAPI|_.
.. |lo_truncate| replace:: `!lo_truncate()`
.. _lo_truncate: http://www.postgresql.org/docs/current/static/lo-interfaces.html#LO-TRUNCATE
+ .. warning::
+
+ If Psycopg is built with |lo_truncate| support (i.e. if the
+ :program:`pg_config` used during setup is version >= 8.3), but at
+ runtime an older libpq is found, Psycopg will fail to import. See
+ :ref:`the lo_truncate FAQ <faq-lo_truncate>` about the problem.
+
.. method:: close()
Close the object.
diff --git a/doc/src/faq.rst b/doc/src/faq.rst
index fbf68af..9c18642 100644
--- a/doc/src/faq.rst
+++ b/doc/src/faq.rst
@@ -161,6 +161,24 @@ I can't compile `!psycopg2`: the compiler says *error: libpq-fe.h: No such file
You need to install the development version of the libpq: the package is
usually called ``libpq-dev``.
+.. _faq-lo_truncate:
+.. cssclass:: faq
+
+`!psycopg2` raises `!ImportError` with message *_psycopg.so: undefined symbol: lo_truncate* when imported.
+ This means that Psycopg has been compiled with |lo_truncate|_ support,
+ which means that the libpq used at compile time was version >= 8.3, but at
+ runtime an older libpq library is found. You can use::
+
+ $ ldd /path/to/packages/psycopg2/_psycopg.so | grep libpq
+
+ to find what is the version used at runtime.
+
+ You can avoid the problem by using the same version of the
+ :program:`pg_config` at install time and the libpq at runtime.
+
+ .. |lo_truncate| replace:: `!lo_truncate()`
+ .. _lo_truncate: http://www.postgresql.org/docs/current/static/lo-interfaces.html#LO-TRUNCATE
+
Psycopg raises *ImportError: cannot import name tz* on import in mod_wsgi / ASP, but it works fine otherwise.
If `!psycopg2` is installed in an egg_ (e.g. because installed by
:program:`easy_install`), the user running the program may be unable to