postgresql-9.2 Questions

3

Solved

I'm trying to run this in PostgreSQL 9.2: RAISE NOTICE 'Hello, World!'; And the server says: Error : ERROR: syntax error at or near "RAISE" LINE 1: RAISE NOTICE 'Hello, World!' ^ Why? ...
Deland asked 16/9, 2013 at 12:31

3

Solved

I have column arr which is of type array. I need to get rows, where arr column contains value s This query: SELECT * FROM table WHERE arr @> ARRAY['s'] gives the error: ERROR: operator d...
Asleep asked 17/5, 2013 at 10:2

2

Solved

How do I check the current statistics targets used by ANALYZE?
Utopia asked 22/2, 2013 at 22:59

3

Solved

Do you know what the maximum number of columns that can be queried in Postgresql? I need to know this before I start my project.
Armalla asked 26/9, 2012 at 17:3

2

SqlAlchemy supports most database specific data types via dialects, but I could not find anything to work with the postgresql xml column type. Does somebody know a working solution. Idealy it shoul...
Adduction asked 22/4, 2013 at 17:50

1

Solved

Hello I need to intersect two tables with interval dates Timeline 1 start | end --------------------------------------------- 2016-12-19 08:00:00 | 2016-12-19 08:30:00 2016-12-19 09:30:00 | 2016-...
Onesided asked 19/12, 2016 at 10:46

2

Solved

I dont understand how Postgresql (9.2) calculate the column size (in kb), I have this tables: Table d2: Column | Type | ---------+---------------| id | serial | n | numeric(17,2) | Table d4: ...
Ormsby asked 6/5, 2013 at 15:27

1

I found how to add value to the TYPE. But how can I remove value from it? For example I have TYPE with enum values ('A','B','C'). How to remove 'C'?
Gallic asked 17/9, 2014 at 11:31

2

Solved

I want to import OSM file into my PostgreSQL database (Windows, Postgres Version 9.2) using the tool Osm2pgsql. When I run following command osm2pgsql.exe --create -d mydb artyom.xml -U myuser -W...
Hypostyle asked 30/10, 2012 at 4:30

3

Solved

I am having trouble changing a column called end_date in a table called key_request from time with time zone to timestamp in my Postgres database . I have tried using the following code: alter tab...
Embroidery asked 15/8, 2013 at 14:30

1

Solved

If I'm dropping and re-creating a Postgres table that is indexed, will the index still exist? Do I need to drop and re-index the table after re-creating it or do I just need to re-create the index...
Yonina asked 20/7, 2016 at 13:24

2

Solved

I'd like to generate a single sql query to mass-insert a series of rows that don't exist on a table. My current setup makes a new query for each record insertion similar to the solution detailed in...
Warlord asked 15/7, 2014 at 22:21

1

Solved

I have the problem with the following CTE expression because prev_count in new_values is being interpreted as text, but the column I'm updating in counts is type integer. I'm getting this error on ...
Peipeiffer asked 28/4, 2016 at 9:49

2

i am using postgres db server for my production use. when i fire a query select * from pg_stat_activity on my postgresql server, so i getting 98% of queries like "SHOW TRANSACTION ISOLATION LEVEL...
Blain asked 10/9, 2013 at 8:26

3

Solved

I'm trying to import data from a .csv file into a Postgres 9.2 database using the psql \COPY command (not the SQL COPY). The input .csv file contains a column with a timestamp in the dd.mm.yyyy hh....
Friedrich asked 26/12, 2012 at 15:14

6

Solved

I tried to use code from Check if sequence exists in Postgres (plpgsql). To create sequence if it does not exists. Running this code two times causes an exception: sequence ... already exists. ...
Substitute asked 6/12, 2012 at 21:24

2

Solved

I am trying to run the following query which results me postgres error: division by zero select request_count, response_count, (response_count*100) / (request_count+response_count) AS proport...
Barton asked 5/3, 2014 at 19:40

4

I'm setting up my local postgresql database for a rails project (that I'm joining), and have done the following: Installed postgres Added/bundled 'pg' gem Created a db user named "foobar" Created...
Strephon asked 4/7, 2013 at 5:14

2

Solved

I'm using PostgreSql version : postgres=# select version(); version ------------------------------------------------------------- PostgreSQL 9.2.4, compiled by Visual C++ build 1600, 64-bit (1 ...
Victory asked 31/7, 2013 at 6:40

2

Solved

My model is quite complex and I'm trying to take logic from existing stored procedures and convert them to SQLAlchemy (for portability reasons). I'm struggling however with uncommitted data. I ha...
Beano asked 25/2, 2013 at 19:24

3

Solved

I tried to change precision like this: ALTER Table account_invoice ALTER amount_total SET NUMERIC(5); But I get syntax error, so I'm clearly doing something wrong. What is the right syntax to ch...
Pimply asked 12/2, 2014 at 11:16

4

Solved

I am using (PostgreSQL) 9.2.1 and test the database with pgbench. pgbench -h 192.168.39.38 -p 5433 -t 1000 -c 40 -j 8 -C -U admin testdb When I use the -C parameter(Establish a new connection fo...
Demello asked 28/11, 2012 at 3:22

2

Solved

I'm working on creating a Database Cluster (single database) in PostgreSQL 9.x working on a Linux system (CentOS - RedHat - Fedora). I've installed the correct PostgreSQL packages (server & cli...
Caralie asked 17/8, 2015 at 2:17

2

Solved

I am writing a script to alter all functions of postgres(changing owner of each function). I am able to list down all the function names using postgres query but not able to list parameters for eac...
Mariannemariano asked 2/4, 2014 at 6:24

4

In oracle i can find out no:of months between using MONTHS_BETWEEN function. In postgres i am using extract function for this. eg.like select extract(year from age(current_date, '2012-12-09')) ...
Fathom asked 10/1, 2013 at 5:37

© 2022 - 2024 — McMap. All rights reserved.