¡@

Home 

python Programming Glossary: postgres

Deploying Django to Heroku (Psycopg2 Error)

http://stackoverflow.com/questions/10596893/deploying-django-to-heroku-psycopg2-error

gets your there. Details below Make sure you have Postgres on your Heroku heroku addons add heroku postgresql dev Step..

psycopg2 mapping Python : “list of dicts” to Postgres : “array of composite type” for an INSERT statement

http://stackoverflow.com/questions/11957925/psycopg2-mapping-python-list-of-dicts-to-postgres-array-of-composite-type

mapping Python &ldquo list of dicts&rdquo to Postgres &ldquo array of composite type&rdquo for an INSERT statement.. array of composite type&rdquo for an INSERT statement Postgres version 9.1.x. Say I have the following Schema DROP TABLE IF..

How to set up Django models with two types of users with very different attributes

http://stackoverflow.com/questions/12926922/how-to-set-up-django-models-with-two-types-of-users-with-very-different-attribut

Webfaction to Heroku and from Amazon's SimpleDB to Heroku Postgres though testing locally on Sqllite3 when developing . A lot of..

Django unique together constraint failure?

http://stackoverflow.com/questions/17510261/django-unique-together-constraint-failure

foreign_key slug I even checked the table description in Postgres 9.1 and the constraint was put into the database table. something.. django postgresql share improve this question In Postgresql NULL isn't equal any other NULL . Therefore the rows you create..

Recreating Postgres COPY directly in Python?

http://stackoverflow.com/questions/1869973/recreating-postgres-copy-directly-in-python

Postgres COPY directly in Python I have a block of data currently as.. the format is pretty flexible that I'd like to append to a Postgres table in this case each n tuple corresponds to a row in the.. from within python to replicate the COPY type bulk load in Postgres python postgresql psycopg2 share improve this question ..

Escape SQL “LIKE” value for Postgres with psycopg2

http://stackoverflow.com/questions/2106207/escape-sql-like-value-for-postgres-with-psycopg2

SQL &ldquo LIKE&rdquo value for Postgres with psycopg2 Does psycopg2 have a function for escaping the.. a function for escaping the value of a LIKE operand for Postgres For example I may want to match strings that start with the..

Classifying Documents into Categories

http://stackoverflow.com/questions/3113428/classifying-documents-into-categories

into Categories I've got about 300k documents stored in a Postgres database that are tagged with topic categories there are about..

Postgres - how to return rows with 0 count for missing data?

http://stackoverflow.com/questions/346132/postgres-how-to-return-rows-with-0-count-for-missing-data

how to return rows with 0 count for missing data I have unevenly..

Postgres: INSERT if does not exist already

http://stackoverflow.com/questions/4069718/postgres-insert-if-does-not-exist-already

INSERT if does not exist already I'm using Python to write..

Storing a binary hash value in a Django model field

http://stackoverflow.com/questions/517349/storing-a-binary-hash-value-in-a-django-model-field

I'm assuming if you were writing raw SQL you'd be using a Postgres bytea or a MySQL VARBINARY. There's a ticket with a patch marked..

Cannot install psycopg2 on OSX 10.6.7 with XCode4

http://stackoverflow.com/questions/5427157/cannot-install-psycopg2-on-osx-10-6-7-with-xcode4

have any idea what can I do to get it installed I have Postgres installed and it seems to work fine. I ™ve tried both easy_install..

Mixing PostgreSQL and MongoDB (as Django backends)

http://stackoverflow.com/questions/5743605/mixing-postgresql-and-mongodb-as-django-backends

thinking about shifting my site's backend to Mongo from Postgres for performance reasons but key parts of the site rely on the.. of the site running on Mongo but those key areas using Postgres for storage Is this painful and or error prone Is there an all..

What's a good lightweight Python MVC framework? [closed]

http://stackoverflow.com/questions/68986/whats-a-good-lightweight-python-mvc-framework

tickets database abstraction for GAE SQLite MSSQL MySQL Postgres Oracle FireBird etc. It does not need installation just unzip..

Complex foreign key constraint in SQLAlchemy

http://stackoverflow.com/questions/8394177/complex-foreign-key-constraint-in-sqlalchemy

to have it at the database level if possible. I'm using Postgres 9.1. Is this possible python sql postgresql database design..

Optimizing performance of Postgresql database writes in Django?

http://stackoverflow.com/questions/9423539/optimizing-performance-of-postgresql-database-writes-in-django

performance of Postgresql database writes in Django I've got a Django 1.1 app that.. is over 100 Mb and has 90K entries that are imported to a Postgresql database. The problem I'm experiencing is that it takes really.. a 100 MB JSON file .. minus the JSON overhead plus some Postgres overhead 128 MB may or may not be enough. But you don't have..

Deploying Django to Heroku (Psycopg2 Error)

http://stackoverflow.com/questions/10596893/deploying-django-to-heroku-psycopg2-error

I still get the same error. What gives python django postgresql deployment heroku share improve this question EDITED As.. you have Postgres on your Heroku heroku addons add heroku postgresql dev Step 1 figure out your database url heroku config grep.. will look something like this HEROKU_POSTGRESQL__URL postgres user password@host 5432 blabla Step 2 Grab the setting name..

Postgresql failed to start

http://stackoverflow.com/questions/11562590/postgresql-failed-to-start

so I tried an online guide to do it. I proceeded to stop postgresql create a new empty directory and give it permissions by using.. new empty directory and give it permissions by using chown postgres postgres my dir path That worked fine too. Then I used initdb.. directory and give it permissions by using chown postgres postgres my dir path That worked fine too. Then I used initdb D my dir..

Postgresql socket error when running Django's syncdb (mac OS 10.7.5)

http://stackoverflow.com/questions/13114411/postgresql-socket-error-when-running-djangos-syncdb-mac-os-10-7-5

localhost in my settings.py file for Django user is set to postgres with correct password in settings.py I restarted the postgresql.. with correct password in settings.py I restarted the postgresql server after each step. I've also checked my pg_hba.conf file.. with the bare minimum of modules installed. python django postgresql share improve this question Found the answer courtesy..

matplotlib: how to prevent x-axis labels from overlapping each other

http://stackoverflow.com/questions/13515471/matplotlib-how-to-prevent-x-axis-labels-from-overlapping-each-other

each other. Here an example Here is some sample SQL for a postgres 9.1 database drop table if exists mytable create table mytable..

Django unique together constraint failure?

http://stackoverflow.com/questions/17510261/django-unique-together-constraint-failure

but also maintains the unique constraint python django postgresql share improve this question In Postgresql NULL isn't equal.. NULL . Therefore the rows you create are not the same from postgres perspective . Update You have a few ways to deal with it Forbid..

Debugging (displaying) SQL command sent to the db by SQLAlchemy

http://stackoverflow.com/questions/2950385/debugging-displaying-sql-command-sent-to-the-db-by-sqlalchemy

.setLevel logging.INFO engine create_engine 'postgres postgres pwd@localhost port dbname' echo True Edit2 common module.. .setLevel logging.INFO engine create_engine 'postgres postgres pwd@localhost port dbname' echo True Edit2 common module sets..

DatabaseError: current transaction is aborted, commands ignored until end of transaction block

http://stackoverflow.com/questions/2979369/databaseerror-current-transaction-is-aborted-commands-ignored-until-end-of-tra

just dont know where those errors are from. python django postgresql psycopg2 psycopg share improve this question This is what.. psycopg share improve this question This is what postgres does when a query produces an error and you try to run another..

python adds “E” to string

http://stackoverflow.com/questions/3382234/python-adds-e-to-string

back in the error message. I'm using psycopg2 to access my postgres database. The real code looks like this conn psycopg2.connect.. CREATE USER s PASSWORD s user pw conn.commit python postgresql psycopg share improve this question Not only the E but..

Postgres: INSERT if does not exist already

http://stackoverflow.com/questions/4069718/postgres-insert-if-does-not-exist-already

if does not exist already I'm using Python to write to a postgres database sql_string INSERT INTO hundred name name_slug status.. how can I execute one of those as a simple string python postgresql share improve this question How can I write an 'INSERT..

Storing a binary hash value in a Django model field

http://stackoverflow.com/questions/517349/storing-a-binary-hash-value-in-a-django-model-field

Ticket 2417 Support for binary type fields aka bytea in postgres and VARBINARY in mysql . Otherwise you could probably try your..

Nodejs: Where or How to write complicated business logic?

http://stackoverflow.com/questions/7033844/nodejs-where-or-how-to-write-complicated-business-logic

native https github.com christkv node mongodb native node postgres https github.com brianc node postgres There's also a host of.. mongodb native node postgres https github.com brianc node postgres There's also a host of ORMs out there if thats your bag. Things..

python subprocess and unicode execv() arg 2 must contain only strings

http://stackoverflow.com/questions/7612727/python-subprocess-and-unicode-execv-arg-2-must-contain-only-strings

The string u'Wiadomo u015b u0107' is coming from a postgres db. This example is using polish words. When I run it using..

Use binary COPY table FROM with psycopg2

http://stackoverflow.com/questions/8144002/use-binary-copy-table-from-with-psycopg2

import StringIO conn psycopg2.connect dbname mydb user postgres curs conn.cursor # Convert floating point numbers to text write.. as the example use SET extra_float_digits '2' python postgresql bulkinsert binary data psycopg2 share improve this question.. 2494827.949375 conn psycopg2.connect dbname mydb user postgres curs conn.cursor # Determine starting value for sequence curs.execute..

Django - How to change the name of an App?

http://stackoverflow.com/questions/8408046/django-how-to-change-the-name-of-an-app

have models you will have to rename the model tables. For postgres use ALTER TABLE oldAppName _modelName RENAME TO newAppName _modelName..