1
vote
2answers
67 views

Postgresql Select from values in array

i am converting multiple rows in to a array using array_agg() function, and i need to give that array to a select statements where condition. My query is, SELECT * FROM table WHERE id = ...
0
votes
0answers
22 views

Use select query in stored procedure [migrated]

I have some doubt about stored procedure. Using select query inside the stored procedure is efficent or using select query in front end. Which is take less time and give the result is fast Or if have ...
1
vote
0answers
22 views

How to monitor or do vacuum without stop all? [migrated]

I have postgres9.1 I try to run full vacuum on a specific table , but it run for more than 5 hours. I stop all process against this table and i cannot have the process down any longer. Is there a ...
2
votes
2answers
667 views

Postgres password authentication fails

I tried to login with the postgres user from my windows machine to my server with Pgadmin. But it keeps giving me this error: psql: FATAL: password authentication failed for user "postgres" So ...
1
vote
1answer
52 views

slow update script in postgres

I have a text file with 850000 individual update statements, updating a table containing 12 million records. An example of such a query is: update bag.pand set mutatiedatum = to_date('04-03-2013 ...
1
vote
2answers
34 views

SQL Union without duplicate values for one specific field

There're 3 tables DEVELOPER, MANAGER and PROJECT: create table DEVELOPER(id int(4), lastname varchar(40), project_id int(4)); create table MANAGER(id int(4), lastname varchar(40), project_id ...
0
votes
1answer
44 views

Duplicate key during import in PostgreSQL

I am following an PostgreSQL book, and had to import a CSV file into a table census.lu_tracts. Problem: When performing the INSERT query as shown below, I get the error: ERROR: duplicate key value ...
5
votes
1answer
345 views

WorkAround for PHP PDO(with libpq V 9.1.4) binding for use of CITEXT?

The scenario Two systems(not server) running PHP and PostgreSQL with the following versions Fedora 15: PHP PHP 5.3.13 (cli) (built: May 9 2012 14:38:35) Copyright (c) 1997-2012 The ...
1
vote
3answers
67 views

Improving Subquery performance in Postgres

I have these two tables in my database Student Table Student Semester Table | Column : Type | | Column : Type | |------------|----------| ...
1
vote
1answer
27 views

Convert a nested subquery into normal query

I have problem with following query where in which the nested query should be converted to normal query: select count(*) as count, TO_CHAR(RH.updated_datetime,'DD-MM-YYYY HH:MI:SS') as date, ...
0
votes
2answers
32 views

How to apply time slices to an existing SQL query

I have a table with approx 8 million rows that I need time slice data from. I'm using PostgreSQL 9.1. I need to query this table for a sum of the max(start_time) associated 'data' values for each ...
0
votes
1answer
25 views

Unable to restore pg_dump backup

I'm trying to restore backup from Postgres 9.1.1, which was created by: pg_dump mydb > backup.sql restore on Postgres 9.1.9 psql -d mydb -f backup.sql I'm getting this error: ...
0
votes
1answer
17 views

Restore Particular tables in one schema to another schema postgresql

In my case, i have backup file in full database. Now I want to restore some particulars tables in public schema. Those tables are already stored in another schema. Any Feasible solution is there? ...
0
votes
2answers
32 views

Why does the OS user has to be same as the database user while connecting to PostgreSQL using md5 authentication?

I have configured md5 authentication for user foo by putting the following in pg_hba.conf: # TYPE DATABASE USER ADDRESS METHOD local all foo md5 When I try to ...
0
votes
1answer
140 views

converting image to byte array and store in postgresql using function

In my case , I want store image to database(postgresql) using storeprocedure. my database is in server. I am converting the image into byte array in front end. Now i need to know How to pass the ...

1 2 3 4 5 29
15 30 50 per page