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.

learn more… | top users | synonyms (3)

0
votes
0answers
27 views

Convert java.sql.Array to java primitive boolean[]

I have a postgres DB containing a table with a boolean array for the days of the week (t/f whether the employee has to work on this day or not). The table is as follows: CREATE TABLE employee( ...
0
votes
1answer
16 views

Convert query result to array

How can convert result from query to array. For example select ARRAY[x."Id"] as "id" from public."jp_OnlyIds" as x In above code, I get many rows with single element array, I want to get one array ...
0
votes
2answers
23 views

Convert WHERE condition into LEFT JOIN

I have tables student and encounter. I want to convert this WHERE to LEFT JOIN. Is this possible? WHERE stu.student_id NOT IN ( SELECT student_id FROM encounter WHERE AND deletion_date IS NULL AND ...
0
votes
0answers
7 views

NpgsqlDataReader - distinguish null value from “NULL” literal

I have a problem with distinguishing NULL database type from "NULL" text when reading a table column from database Sample code: using (var connection = new NpgsqlConnection("connectionString")) { ...
0
votes
1answer
11 views

Too many database connections created in rails 2.3.18 application

We have many models like the below one. class User < ActiveRecord::Base create_connection def create_connection # we have used this ...
0
votes
0answers
10 views

digital ocean(ubuntu) - how many rails apps can be hosted in a 512mb plan (including others like nginx, postgres etc)

I am setting up some rails apps on digital ocean basic plan of 5$ per month offering 512mb memory. I just installed basic things like git, vim, nginx, postgres(along with contrib), rvm and now just ...
0
votes
2answers
18 views

How to pass clojure vector in a prepared statement when running raw sql using Korma?

My query is something like (def list [1,2,3,4]) (def result (exec-raw ["SELECT * from table_name where table_id in (?)"],[list] :results)) I keep getting this error that Clojure can't infer SQL ...
-3
votes
0answers
14 views

How to separate the '.' sentenses

i have a table contains one column it contains one row like below col1 Gathering and prioritizing product and customer requirements, defining the product vision, and working closely with ...
0
votes
0answers
16 views

Heroku keeps telling me my application fails

So I am trying to push my site to heroku for the first time and some things have gone wrong. First was the postgres DB stuff so I added the gem for pg in the production group but it continues to say ...
0
votes
1answer
5 views

Postgres hstore: GIN vs GiST index performance

I have to decide whether to use GIN or GiST indexing for an hstore column. The Postgres docs state: GIN index lookups are about three times faster than GiST GIN indexes take about three times ...
0
votes
0answers
9 views

How could db schemas, implemented by Liquibase, be extended?

We have a product that we are looking to use liquibase to implement/re-factore the db schema. This then needs to be extended at the production site level that might have differences in the schema. ...
1
vote
1answer
22 views

How to execute multiple queries in for loop

I want to execute multiple queries in for loop of postgresql. For example FOR rec IN select * from student LOOP END LOOP; In above example select * from student is only one single query, I have ...
0
votes
2answers
16 views

What causes Postgresql conections to get stuck on BIND with server at 100% CPU?

One of our Postgresql 9.2.4 database servers has got "stuck". The are 20 connections to it showing up in htop as stuck on BIND and the server is at 100% CPU and load avg of 20 or so: postgres: ...
0
votes
1answer
18 views

Bugged by de'bug

The console is reporting that the following code has an undefined constructor. --"pgsql = new PostgreSQL( this, "127.0.0.1", database, user, pass );" What does this mean? import de.bezier.data.sql.*; ...
0
votes
0answers
10 views

Convert raw geographical information to distribution plot

Im trying to figure out PostGIS on Postgres 9.3. Using a PHP query (credit to @user623952), I've manage to retrieve geographical information from Marineregions web database in Json format as below, ...

15 30 50 per page