Tagged Questions
1
vote
1answer
33 views
Postgres: unique on array and varchar column
I would like to ask if it is possible to set UNIQUE on array column - I need to check array items if are uniqued.
Secondly, I wish to have also second column to be included in this.
To imagine what ...
1
vote
1answer
76 views
Updating a table using CASE and conditions (postgresql)
i have the tables ::
CREATE TABLE emp1
(
eid integer NOT NULL,
ename character varying(20),
sid integer,
ssid integer,
CONSTRAINT pk_eid PRIMARY KEY (eid)
);
CREATE TABLE leave_type
(
...
0
votes
1answer
38 views
How to create a Trigger in PostgreSql?
TRIGEER-->To get a column value from one table to other table when i insert values?
I am having two tables(customer_details and loan_balance).
What i need is, I must get the column (custid)of ...
0
votes
1answer
26 views
Postgre SQL incorrect syntaxt near If
I'm trying to create function but it's having error at If statement don't know what's the problem with it.
CREATE FUNCTION uspgetcountrylistwithpagenumber(IN "PageNumber" integer, IN "PageSize" ...
1
vote
0answers
42 views
Postgresql Sorting a Joined Table with an index
I'm currently working on a complex sorting problem in Postgres 9.2
You can find the Source Code used in this Question(simplified) here: http://sqlfiddle.com/#!12/9857e/11
I have a Huge (>>20Mio rows) ...
1
vote
0answers
16 views
Rails migration is always inserting whitespaces or changing the ordering of columns in the schema
There is a frustrating issue where my rails migrations update the schema with whitespaces and the position of the table's columns.
So most times when I run bundle exec rake db:migrate it will do one ...
1
vote
0answers
89 views
Low Postgres Cache Hit Ratio - data size or something else?
I've just upgraded my Heroku postgres database from the Kappa plan (800MB RAM, postgres 9.1) to the Ronin plan (1.7GB RAM, postgres 9.2), but performance has degraded.
Following the guide here, I ...
0
votes
0answers
11 views
Create operator / function for custom type in PostgreSQL 9.2
I have the following custom type:
CREATE TYPE param_range AS (
param smallint,
range int4range
);
The following table:
CREATE TABLE test4
(
id serial NOT NULL,
geo point,
...
0
votes
0answers
26 views
How to install pgAgent service on windows
I am new in postgreSQL database , I recently found that postgreSQL support SQL Job by pgAgent. I am using windows XP operating system.
I searched lots about pgAgent on Google and trying to configure ...
0
votes
0answers
126 views
An error occurred while installing pg (0.15.1) ; PostgreSQL on Mac Installation Error: no pg_config, gem native extension build failure
I have OSX 10.6.8 and am trying to install PostgreSQL 9.2 on my device. I used the graphical installer available on their website, and set up the software, without using stack builder at the end to ...
0
votes
0answers
31 views
How to get value of a variable in plv8 without using plv8.elog()?
I am having an issue with getting correct output from plv8.elog(). Just to start, I'm using PostgreSQL 9.2, plv8 1.4.1 as installed by pgxn, on Ubuntu 12.10. I have a function I am building that ...
0
votes
0answers
39 views
PostgreSQL 9.2 archiving last replayed WAL after recovery
Following the PostgreSQL 9.2 official documentation, I have set up continuous archiving on my postgres.conf file:
wal_level = archive
archive_mode = on
archive_command = 'test ! -f /.../archive/%f ...
0
votes
0answers
48 views
OpenERP - warning: failed to kill 30449: No such process
I have script that runs OpenERP server, but I seems to be not working on new server for some reason (I use same script on another server and it works fine).
when I enter command such as:
...
0
votes
0answers
69 views
How to create hibernate criteria with DISTINCT in this case
I am using hibernate criteria to create postgres query:
criteria.addOrder(Order.asc(property).ignoreCase()).setProjection(
...
0
votes
0answers
46 views
postgresql to mssql query conversion
can any one help me to convert the following query into mssql which is working on postgresql now
query is to take the updated datetime of the report in the asc order of the date
select
count(*) ...