0
votes
1answer
31 views

Django 1.5 : OperationalError in windows when running “python manage.py syncdb” using postgresql-psycopg2

This is my settings.py file in my Django project. OS : Windows, hosting : localhost DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': ...
0
votes
0answers
39 views

pgdb.connect() causes segmentation error in python 2.7.3

I just compiled and installed an instance of postgres 9.2.1. And python 2.7.3. On OpenSuSE 12.2, running on a xeon server. I then downloaded pygresql and tried to connect to database using pgdb but ...
1
vote
1answer
21 views

How to return resultset with Plpython3 in Postgres

How can a plpython function return result set as a normal sql query resultset (not as text). Here is function definition - DROP FUNCTION IF EXISTS demo_report(); CREATE OR REPLACE FUNCTION ...
0
votes
0answers
39 views

Using postgresql xml data type with sqlalchemy

SqlAlchemy supports most database specific data types via dialects, but I could not find anything to work with the postgresql xml column type. Does somebody know a working solution. Idealy it should ...
0
votes
2answers
75 views

Remove all data from table but last N entries

I'm using psycopg2 with Python. I'd like to periodically flush data from my db. I've set up a task with Timer for this. I had asked this question before, but using the answer listed there freezes ...
0
votes
1answer
35 views

find data that corresponds to newest entry

I'm working on a db via psycopg2, and I want to find the 'newest' entry in the database. It doesn't seem that I should have to do any sorting to obtain this, as I literally just want the newest. The ...
0
votes
2answers
67 views

psql - how to flush database content without dropping table

I have a table in my db called 'mytable'. I'd like to clear it so that I can continue to collect and analyze 'fresh data' from it. Something like conn = psycopg2.connect(database = mydb_name, host ...
0
votes
1answer
53 views

Prefetch column sequence SQLAlchemy

My model is quite complex and I'm trying to take logic from existing stored procedures and convert them to SQLAlchemy (for portability reasons). I'm struggling however with uncommitted data. I have ...
0
votes
1answer
101 views

ImportError: Cannot load specified object - psycopg2

OpenBSD, PostgreSQL9.2, python2.7 Trying to import psycopg2 module from python command line: Python 2.7.3 (default, Aug 3 2012, 05:33:56) [GCC 4.2.1 20070719 ] on openbsd5 Type "help", "copyright", ...
0
votes
1answer
119 views

executing PL/PGSQL blocks using python without storing them into database

Am working to build Django application using python, the application is expected to receive large volume of data, I've worked on some PL/PGSQL procedures that can enhance the performance. Those ...
0
votes
1answer
386 views

Trying to use Tweepy/Twitters Streaming API and psycopg2 to populate a PostgreSQL database. Very close, one line off

I've been working on trying to populate a table in a PostreSQL database using Tweepy and Twitter's Streaming API. I'm extremely close, I believe I'm just one line away from getting it. I've looked at ...