PostgreSQL is an open-source, object-relational database management system (ORDBMS) available for many platforms including Linux, UNIX, MS Windows and Mac OS X. Please mention your PostgreSQL version when asking questions.
0
votes
1answer
16 views
Combining PostgreSQL Enum with a TypeDecorator
I want to have an Enum type that automatically lowercases input before saving it in a PostgreSQL 9.x database. This first code block accomplishes that, but, unlike a normal Enum, the specific ...
0
votes
2answers
27 views
postgresql index on string column
Say, I have a table ResidentInfo, and in this table I have unique constraints HomeAddress, which is VARCHAR type. For future query, I gonna add an index on this column.
The query will only have ...
0
votes
1answer
11 views
Rails : Create a drop table cascade migration
How do I force a DROP TABLE CASCADE in a Rails 3.2 migration?
Is there an option to pass to drop_table("table_name")?
0
votes
0answers
10 views
Postgres/GIS: RULE does not affect all inserts
I have a rule for a table which simply checks if the new entry matches a name and intersects with that matching existing row using st_intersects from postgis library.
It seems that only a part are ...
0
votes
0answers
4 views
PostgreSQL point_ops with GiST Index
The 9.0 release notes for PostgreSQL states the following change:
Add point_ops operator class for GiST (Teodor Sigaev)
This feature permits GiST indexing of point columns. The index can be
...
0
votes
0answers
15 views
Can not write to PPAS logfile
Now, I am testing query from application to PPAS via PgPool.
When I query
select a.name, b.name from tb_01 a, tb_02 c where a.id = b.id_ref
... or update/insert, I have to wait for a long time ...
1
vote
0answers
19 views
Reconnecting to a postgres database after postgres restart from Java
I'm using postgres 9.1, org.apache.commons.dbcp.BasicDataSource (for my connection pool) and Java 1.7. When I restart my postgres server, I get exceptions like org.postgresql.util.PSQLException: ...
0
votes
0answers
26 views
Can Octopus keep a pool of database connections?
We switched to using Octopus for sharding in our rails2.3/postgresql/resque app because we were maxing out the disk I/O of our database server. We have ten databases, each with multiple shards. (A ...
-1
votes
2answers
36 views
Insert command without id postgreSQL
In mySQL i am able to do
INSERT INTO table_name (column_name1, column_name2) VALUES('John', 'Doe);
As you can see I do not have to mention the ID, how would I do this in postgreSQL.
Thank you
0
votes
2answers
24 views
SQL query, filtering based on last value in a connected table
I have a problem with a nested query (the problem beeing i have no idea how to do it)
I'm using PostgreSQL
I have 2 tables:
users
id name
1 x
2 y
3 z
call
id user_id time data
1 1 00:10 stat1
2 1 ...
1
vote
0answers
17 views
Updating status timespan and removing unneeded rows with SQL
let's say i have some servers, and they are constantly updating a database with their status.
i need to run some reports on the status of these servers. doing a little cleanup on the tables would ...
0
votes
0answers
16 views
Rails jquery datetime into PG
I'm using jquery (coffeescript) to update a record. When that happens I would like today's datetime to go into this field:
t.datetime "completed_at"
This is the coffeescript:
compdate = ...
0
votes
1answer
11 views
Upload only one table using heroku pg:transfer instead of whole database
I'm able to push my database from my local machine to my heroku app with pg:transfer like this:
heroku pg:transfer --from postgres://localhost/idx_map_development --to aqua
But I don't want to ...
0
votes
2answers
48 views
Futher optimization of Postgres Full-text search on a Cloud Server
I am running Postgres 9.1 on a cloud server (which I'm aware is far from ideal, we are hoping to migrate at some point this year). This server frequently performs full text queries on a table with ...
0
votes
0answers
9 views
Trouble building/starting sentry and its database
Sentry
I've been using this to setup the environment: Sentry Setup
But when I get to this command:
sentry --config=/etc/sentry.conf.py upgrade
It gives me this error:
...