0
votes
1answer
24 views

Hibernate schema generation: same configurations, different behaviour

I am working on a project and have encountered a quite baffling issue. Some context: the project is a fairly standard Java 7 project using Maven 3.0.4 as build tool and spring (3.2.3.RELEASE) for ...
1
vote
1answer
26 views

Postgresql error on bundle install

I think this is a common problem, however the solutions I've found on the internet are not working for me. When I run bundle install with this section in my gemfile group :production, :staging do ...
1
vote
1answer
23 views

Postgresql dump each table to different file

I need to extract sql files from multiple tables of a postgres database. This is what I've come up so far: pg_dump -t 'thr_*' -s dbName -U userName > /home/anik/psqlTest/db_dump.sql However, as ...
1
vote
2answers
60 views

deadlock in postgres on simple update query

I'm working with postgres 9.1 and getting deadlock exception under excessive execution of a simple update method. According to the logs the deadlock occurs due to execution of two identical updates ...
2
votes
2answers
39 views

How to rank users and get a subset from this rank with my user and the above and below user by rank position

I am working on a query right now to get a ranking of my users. I have two tables one for users and the other one for profits where I save the amount and the user id to which is related. By getting ...
0
votes
0answers
15 views

Postgresql Streaming Replication - pgpool2 - failover [migrated]

In my scenario I want pgpool to forward read only queries to slaves when the master goes down - I want my app to be in the "read only mode". How do I setup pgpool to accept read only queries when ...
0
votes
1answer
20 views

How to duplicate schemas in PostgreSQL

I have a database with schema public and schema_A. I need to create a new schema schema_b with the same structure than schema_a. I found the function below, the problem is that it does not copy the ...
0
votes
1answer
24 views

import dump.sql file into postresql

I am new to PostgreSQL. I have a file name dump.sql. I want to import this into my POstgreSQL database. I created the database using CREATE database_name. Then I used psql database_name < ...
0
votes
0answers
22 views

Vacuum vs Auto Vacuum [migrated]

I am trying to find answers for my below few queries which will help me in fine tuning my postgres DB. I did some googling but was not able to find answer. 1) Out of vacuum or Auto vacuum which is ...
0
votes
1answer
37 views

How do I connect to Postgresql server from Python?

My final goal is to setup a server on my raspberry pi which can connect to a local postgresql server. Im a bit familiar with postgres therefore I installed it on my raspberry pi immediately. however, ...
1
vote
0answers
31 views

How do I store the returning ids of an insert statement? [duplicate]

I have a table: create table detailids(detail_id integer); I'm trying to do this: insert into detailids ( insert into another_table(a bunch of values) (select id from temp_table where ...
0
votes
1answer
45 views

How can I execute an `INSERT INTO` on a table with a string primary key?

I have two tables that are initialized with something like this: create table foo ( "id" varchar(254) not null primary key, "first_name" varchar(254) not null); create table my_user ( ...
0
votes
1answer
33 views

move columns from a table to its parent

In postgresql 9.1, I've tableB inheriting from tableA. There are some columns in tableB, and no column in tableA. I want to move columns from tableB to tableA without dumping and reimporting rows ...
1
vote
0answers
25 views

Using user-defined types in PostgreSQL for C#?

I'm using PostgreSQL 9.1 and I've made a custom user-defined type in PostgreSQL we'll call MyType. I have a function called MyFunction in PostgreSQL that returns MyType so when I call MyFunction like ...
1
vote
2answers
28 views

Order By character varying time strings?

I'm querying a table and I'm trying to Order By a "time" column that has the time formatted as "1 - 2 p.m.", "7 - 8 a.m.", "11 a.m. - 12 p.m.", etc etc. I'm not allowed to alter this column, but I ...

1 2 3 4 5 35
15 30 50 per page