PostgreSQL

From Robertjd

Jump to: navigation, search

Create Database

postgres@pool /home/robert/ride-the-stupid-bus $ createdb sfmuni

Export/Dump database

pg_dump dbname > outfile

psycopg

On a recent gentoo setup, I emerge'd postgres 8.0.15 and manually built psycopg2-2.0.11 and then was greeted with this surprise:

Python 2.5.4 (r254:67916, May  4 2009, 23:19:08)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import psycopg2.psycopg1 as Database
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/usr/lib64/python2.5/site-packages/psycopg2/__init__.py", line 60, in <module>
   from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
ImportError: /usr/lib64/python2.5/site-packages/psycopg2/_psycopg.so: undefined symbol: lo_create
>>>

blegh. per this thread:

http://lists.initd.org/pipermail/psycopg/2007-February/005345.html

I changed line 68 in psycopg2-2.0.11/psycopg/lobject_int.c to use lo_creat instead of lo_create.

Clean, rebuild, install. works fine

Personal tools