Tagged Questions
0
votes
2answers
57 views
python postgres can I ftechall() 1 million rows?
I am using psycopg2 module in python to read from postgres database, I need to some operation on all rows in a column, that has more than 1 million rows.
I would like to know would cur.fetchall() ...
0
votes
0answers
21 views
SQLAlchemy Inheritance not working with Postrgres
My Postgres database does not reflect the SQLAlchemy inheritance in my models.py file.
The database only recognizes SportTeam, SoccerTeam and BasketballTeam are not in the database.
In PGAdmin, the ...
0
votes
1answer
23 views
COPY to Postgres using glob result in Python
I'm trying to create a python script that will copy a glob result into postgres. This is what I have:
import psycopg2, glob
sitesizetemp = glob.glob('C:/Data/Sheltered BLPUs/CSVs/sitesize*.csv')
...
0
votes
1answer
24 views
Python value conversion to string representation of postgres procedure parameter including type casting
I'm trying to look for a method with the following:
IN: <SOME_PYTHON_VALUE>
OUT: val::type_cast
and...
IN: [<SOME_PYTHON_VAL>,<SOME_PYTHON_VAL>]
OUT: '{val,val}'::type_cast[]
0
votes
1answer
12 views
Using imdbpy2sql.py to populate PostgreSQL
I'm trying to use imdbpy2sql.py documented at http://imdbpy.sourceforge.net/docs/README.sqldb.txt but I am having trouble with syntax & directories. To simplify things I loaded the IMDb files in a ...
0
votes
1answer
49 views
Where does the name `Psycopg` come from? [on hold]
Psycopg is the most popular PostgreSQL adapter for the Python programming language.
The name Psycopg does not make sense to me.
I understand the last pg means Postgres, but what about Psyco?
0
votes
1answer
44 views
Python: Can dumpdata cannot loaddata back. UnicodeDecodeError
I am using Python 2.7 , django1.5 and POstgreSQL 9.2 for two weeks.
Never saw it before.
Everything is freshly installed on my Win7 so it should have default settings.
Djungo beautifully generates ...
1
vote
0answers
55 views
why postgreSQL can't find foreign key
Why django reports a "missing foreign key error" when creating a record referencing a key just created ?
have a look a this code:
def doRegister(request,username, email, password):
user = ...
1
vote
1answer
34 views
Is it possible to add a datetime column to a manytomany field?
I was wondering if there was a way to add a datetime auto_now_add=True column to a manytomany field.
I have the following model.
class Photographer(models.Model):
user = ...
4
votes
1answer
58 views
Python/Django Writes u'' String To Postgresql (with UTF8 DB) and Munges Entry
I'm sure that I've misconfigured something here, but I can't see what it is.
In Django, I've got a model field that says this:
short_url_slug = AutoSlugField(slugify=short_url_slugify, ...
2
votes
1answer
46 views
Django admin encoding error
I am trying to add new user with admin interface and get this error:
IntegrityError at /admin/main/customuser/add/
������������: INSERT ������ UPDATE �� ��������������
"django_admin_log" ...
2
votes
2answers
33 views
Target database is not up to date
I'd like to make a migration for a Flask app. I am using Alembic.
However, I receive the following error.
Target database is not up to date.
Online, I read that it has something to do with this.
...
0
votes
1answer
26 views
sqlalchemy PK from raw SQL insert
I'm trying to get new entrie PK id from insert with raw SQL query with SQLalchemy like this
https://gist.github.com/greggyNapalm/6045595
>>> sys.version
'2.7.3 (default, Aug 1 2012, ...
1
vote
1answer
16 views
Generate Python Class and SQLAlchemy code from XSD to store XML on Postgres
I have some very complex XSD schemas to work with. By complex I mean that each of these XSD would correspont to about 20 classes / tables in a database, with each table having approximately 40 fields. ...
3
votes
1answer
63 views
Timing Django DB Queries
I'm attempting to benchmark the speed of several different queries which return the same thing on Django 1.4 with Postgres. Unfortunately, if I use:
import logging
l = ...