Tagged Questions
2
votes
7answers
53 views
Sort list of real numbers mixed with letters
I have a list of data that I must sort, and sadly the naming scheme for these objects are not very consistent. The data is a list of strings that are most often real numbers, but sometimes have a ...
3
votes
1answer
49 views
Effective query merging more than 2 subqueries
I have a database with
books (primary key: bookID)
characterNames (foreign key: books.bookID)
locations (foreign key: books.bookID)
The in-text-position of character names and ...
1
vote
1answer
24 views
psycopg2 out of shared memory and hints of increase max_pred_locks_per_transaction
While inserting a lot of data into postgresql 9.1. using a Python script, we are getting the following error on this query:
X: psycopg2.ProgrammingError in /home/hosting/apps/X
X_psycopg.py:162 in ...
2
votes
2answers
67 views
How do I build an efficient email filter against large ruleset (5000+ and growing)
I'm building an email filter and I need a way to efficiently match a single email to a large number of filters/rules. The email can be matched on any of the following fields:
From name
From address
...
1
vote
4answers
51 views
Open ERP: insert Data code
I am new in openerp, i have installed Openerp v6 .I want to know how can I insert data in database ? which files I have to modify to do the job ? ( files for the sql code )
I hope someone can help me ...
0
votes
2answers
54 views
Importing postgres data to mysql
I have a requirement where I need to insert the postgres data into mysql. Suppose I have user table in postgres. I have user table also in mysql. I tried to do something like this:
gts = 'cd ...
1
vote
0answers
39 views
Linking a 'table view' object to a Postgres table
I posted a similar question to this yesterday and dschulz kindly responded, directing me towards a number of online articles. Unfortunately, I'm still struggling because either example code is in C++, ...
0
votes
2answers
60 views
Forming an insert statement with single quotes in Python with Postgres
I am having a field called comments.
I am effectively trying to read values from one large table into multiple tables.
Hence, my select query fetches the comment field for me.
I am constructing a ...
1
vote
0answers
61 views
In need of a python postgresql rest api
Death to the middle-tier!!!
Seriously though, I'm probably asking for too much here but does such a thing exist.
I'm thinking something similar to restsql (Java) but for python.
I'm planning on ...
1
vote
1answer
46 views
Fabric and Sudo as Another User
Using Fabric to spin up a server, everything works great, except for my attempt to start postgresql.
sudo("/usr/lib/postgresql/9.1/bin/pg_ctl -D /mnt/ebs/postgresql/data -l /mnt/ebs/logfile start", ...
1
vote
2answers
54 views
Install libpq-dev on Mac OS X
I'm trying to run Django with a Postgresql backend on my local Mac OS X. I've installed Django using pip:
sudo pip install Django
I've installed Postgresql with one of the binary installers here.
...
2
votes
1answer
82 views
How can i get id of cascade deleted (or marked for delete) items in sqlalchemy?
When I cascade delete one item, I want get list of all deleted items id (primary key) including ids of deleted children. Is it possible?
My class looks like:
class Example(Base):
__tablename__ = ...
1
vote
2answers
62 views
How to change postgresql requiring “other” permission to import csv files
I have recently changed to ubuntu from windows and am having difficulty with the permissions on my postgresql database which I am trying to recreate.
My problem is as follows:
I have a script which ...
0
votes
2answers
72 views
plpgsql associative array argumnent
I once read this entry in mailing list http://archives.postgresql.org/pgsql-hackers/2005-06/msg01481.php
SELECT *
FROM foo_func(
c => current_timestamp::timestamp with time zone,
a => ...
1
vote
1answer
62 views
Django test fails when creating test database
It fails with a number of related_name-related issues. Of course when running the actual dev server (with ./manage.py runserver) this doesn't happen, I'm guessing maybe the models are being generated ...