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
0answers
2 views
Postgres array handling in Doctrine 2, Symfony 2.2
I'm trying to use an integer array data type in a postgres DB, using Doctrine 2 as the ORM. Initially, I was creating the form field as an entity type in Symfony and assumed the entities were the ...
0
votes
1answer
3 views
Hook django up with postgresql using psycopg2
I am trying to hook my website up to use postgresql. I installed postgresql and psycopg2. In settings.py, I placed the following, and then got the error shown afterwards. I should mention that I ...
0
votes
0answers
5 views
Removing COMMENT ON from all objects in PostgreSQL
In the same vein as pg_dump without comments on objects?, is anyone aware of a command to quickly get rid of the comments (created with COMMENT ON) on all objects at once ?
For now, I resorted to ...
0
votes
0answers
6 views
Print formatted SETOF records from inside a PL/pgSQL function
I would love to exploit the SQL output formatting of PostgreSQL inside my PL/pgSQL functions, but I'm starting to feel I have to give up the idea.
I have my PL/pgSQL function query_result:
CREATE OR ...
0
votes
1answer
37 views
If exist return id else insert in postgres
I am new to postgres and i'm am having to populate a database using it. I cant submit my actual code for reference but my program is in java and i'm trying to do something along these lines.
IF ...
0
votes
0answers
33 views
update query not updating in postgresql
Not updating postgresql database when update_all using
@change_stat = Notification.where("fb_id = ? AND active = ?",@current_user.fb_id,true)
@change_stat.update_all(:active => false)
0
votes
0answers
15 views
Heroku Deployment : Discourse Assets precompile
Hi I'm actually trying to deploy discourse on Heroku.
I'm following the step by step guide here Basic Heroku deployment
I'm facing a problem when I try to rake assets:precompile (I'm precompiling ...
0
votes
0answers
11 views
Connecting ado.net Entity data model to postgresql database
I'm new to C#, ado.net and visual studio 2012, just to make that clear from the beginning.
I'm trying to connect an ADO.NET Entity Data Model to a postgresql database.
I tell VS to 'generate mdoel ...
0
votes
1answer
11 views
zabbix How to complete installation successfully? [closed]
CentOS 6.4
postgres 9.2
zabbix 2.0
ps
1761 ? Ss 0:00 postgres: logger process
1763 ? Ss 0:00 postgres: checkpointer process ...
0
votes
1answer
17 views
PostgreSQL nextval and currval in same query
I was hoping to call NEXTVAL once and use the returned values multiple times. However it doesn't work.
Assume the sequence seq_name is at 10 now (queries are executed independently, not in listed ...
1
vote
3answers
53 views
Detect range and count from a table
A table with 2 columns ordered by group, number:
group_id | number
---------+--------
1 | 101
1 | 102
1 | 103
1 | 106
2 | 104
2 | 105
2 | 107
...
0
votes
0answers
32 views
Indexes Size 20 times bigger then the table itself and very slow queries [migrated]
The table I want to query has only about ~3000 rows with 3 columns:
int/varchar(100)/varchar(100)
yet it takes ~30 sec to query them all!
Then I saw that the table size is 1331MB but the indexes ...
1
vote
3answers
34 views
How to find the last descendant (that matches other criteria) in a linear “ancestor-descendant” relationship
This question is based on the following question, but with an additional requirement: PostgreSQL: How to find the last descendant in a linear "ancestor-descendant" relationship
Basically, ...
1
vote
2answers
24 views
logging values from arduino to postgres db
I have a temperature sensor ([LM35][1]) interfaced with an Arduino board and my [sketch][2] is able to log values to the serial port, say /dev/ttyACM0 in Ubuntu, and I was able to install pySerial and ...
0
votes
0answers
17 views
Query for master in Postgres replication [migrated]
I'm trying to find out if there is a way to query for the master, from a slave PostgreSQL server that has been set up with server replication.
From a slave, I can:
SELECT pg_is_in_recovery()
And ...