mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-16 17:10:32 +03:00
Added more information about the case of the missing lo_truncate
After some ML message and ticket #104.
This commit is contained in:
parent
550130b19e
commit
5473d50a09
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user