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
1answer
8 views

How to get last month records in psql

How to get last month records in psql ? Please help. Note: I have a created_at field in my table.
0
votes
0answers
8 views

PostGreSQL timestamp column truncates at the minute when accessed within SQL Server

I have a PostGreSQL database accessed remotely in SQL Server 2008 via a linked server. The database contains several tables that have columns of the type "timestamp." When I query these columns, the ...
1
vote
1answer
11 views

How to implicitly insert SERIAL ID via view over more than one table

I have two tables, connected in E/R by a is-relation. One representing the "mother table" CREATE TABLE PERSONS( id SERIAL NOT NULL, name character varying NOT ...
0
votes
1answer
35 views

UPDATE statement with subselect

I created a script with the necessary condition for me. And it works properly. But I have a need to apply this script on many rows. And not only where id is 15. UPDATE my_table SET my_field = ...
0
votes
2answers
22 views

When using a connection-pool should I get the connection each query or once each batch?

I have been unable to find an exact answer to this question. I'm using C3P0's ComboPooledDataSource. Which of these methodologies is better practice: dataSource = connectionClass.getDataSource(); ...
0
votes
0answers
7 views

OpenERP - Compare fields using external id?

Is it possible to compare fields in views using external id (not internal one). I need this because I need to hide some fields depending on another fields. I can make this work using internal database ...
0
votes
0answers
27 views

PostgreSQL, Swap data of certain column in two rows

I have complex function to swap data from same name column in different rows. I read data from first, store it in local temporary variables, read data from second row and if certain conditions are met ...
0
votes
1answer
18 views

postgresql trigger (strategy) to update table based on entries of another table

I am fairly new to PostgreSQL (spoilt by django ORM!), and I would like to create a trigger which updates a table based on entries of another table. So, I have the following table on my schema: ...
-2
votes
0answers
23 views

How to backup from databse postgres in linux? [on hold]

when i use fallow command pg_dump -U postgres -Fc mydb > db.dump I got this error error: db.dump: Permission denied
0
votes
0answers
32 views

how to map an array of custom type from postgres to java using hibernate

I am trying to map an array of custom type returned by a postgres procedure to the java I have a custom type in postgres as CREATE TYPE public.customtype_sample AS( sampleid bigint, ...
0
votes
0answers
3 views

How to resolve “could not find compatible versions for gem ”rake“ , when using dm-pg-types and (sass-rails, coffee-rails) gems together”

I started migrating my Sinatra app to Rails app and in process of changing the GEM file of a new Rails installation. I am using dm-pg-types and seems like it requires older version of rails , which ...
1
vote
0answers
10 views

Slony “duplicate key value violates unique constraint” error

I have a problem which goes on for longer time. I use slony to replicate database from master to slave and from that slave to three other backup servers. Once a 2-3 weeks there is a key duplication ...
0
votes
1answer
19 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
9 views

database space quotas with hibernate and postgresql, limit database megabytes used per user

Good day/night to all of you. In our university project we have a database created by hibernate (using postgresql) having 17 tables(obejct). We need to post a limit to 4 object i.e. ...
-3
votes
0answers
16 views

Connection with postgreSQL demo

Anyone please tell me how to connect my java class with database and what is the procedure to make a project with postgreSQL.Please give some demos

1 2 3 4 5 1256
15 30 50 per page