Questions tagged [postgresql-9.2]

for PostgreSQL questions specific to version 9.2.

On 10 September 2012, PostgreSQL 9.2.0 was released. It was End Of Life as of September 2017. Major enhancements in PostgreSQL 9.2 include:

  • Allow queries to retrieve data only from indexes, avoiding heap access (index-only scans)
  • Allow the planner to generate custom plans for specific parameter values even when using prepared statements
  • Improve the planner's ability to use nested loops with inner index scans
  • Allow streaming replication slaves to forward data to other slaves (cascading replication)
  • Allow pg_basebackup to make base backups from standby servers
  • Add a pg_receivexlog tool to archive WAL file changes as they are written
  • Add the SP-GiST (Space-Partitioned GiST) index access method
  • Add support for range data types
  • Add a JSON data type
  • Add a security_barrier option for views
  • Allow libpq connection strings to have the format of a URI
  • Add a single-row processing mode to libpq for better handling of large result sets

The official documentation for this version is available at: http://www.postgresql.org/docs/9.2/static/index.html

1126 questions
11
votes
2 answers

upgrading to postgres on Heroku

What is the recommended way to upgrade a Heroku Postgres production database to 9.2 with minimal downtime? Is it possible to use a follower, or should we take the pgbackups/snapshots route?
nathany
  • 539
  • 5
  • 16
11
votes
1 answer

Unit of return value of ST_Distance

I need to calculate the distance between all buildings and all hospitals in a map imported from OSM. I use following query: SELECT building_id, hospital_id, ST_Distance(building_centroid, hospital_location) FROM ( select planet_osm_polygon.osm_id…
Glory to Russia
  • 17,289
  • 56
  • 182
  • 325
10
votes
2 answers

What is the timeframe for pg_stat_statements

I would like to know for "pg_stat_statements" view in postgres. What is the timeframe for the data? Does it shows query executed in last 24 hours or overall queries executed? As the table doesn't contain any timestamp.
Madhu
  • 367
  • 2
  • 7
  • 20
10
votes
5 answers

PostgreSQL find locks including the table name

I'm trying to take a look at locks that are happening on specific tables in my PostgreSQL database. I see there's a table called pg_locks select * from pg_locks; Which seems to give me a bunch of columns but is it possible to find the relation…
10
votes
3 answers

How to Auto Increment Alpha-Numeric value in postgresql?

I am using "PostgreSQL 9.3.5" I have a Table(StackOverflowTable) with columns (SoId,SoName,SoDob). I want a Sequence generator for column SoId which is a Alpha-numeric value. I want to auto increment a Alpha-Numeric Value in postgresql. For eg :…
09Q71AO534
  • 4,300
  • 13
  • 44
  • 68
10
votes
2 answers

Insert multiple rows where not exists PostgresQL

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 WHERE NOT EXISTS in PostgreSQL gives syntax error,…
Paul
  • 2,021
  • 5
  • 22
  • 33
10
votes
1 answer

How do i create postgres to oracle dblink?

How do I create dblink in postgres 9.2 ? I want to be able to use it using @ link in oracle? I am using postgres 9.2 64bit. DBlink is from postgres 9.2 to Oracle 11g.
kinkajou
  • 3,664
  • 25
  • 75
  • 128
10
votes
3 answers

PostgreSQL drop table command is not reducing DB size

I dropped a couple of tables from my Postgres database. However, before dropping tables the size of the database was 6586kB, and after dropping the table size of the database remains same. I think size should be reduced. What do I need to do to get…
10
votes
2 answers

Where did my database go in postgres?

postgres refuses to work. I am using 9.2 and a newbie. I create a database. I list and its not there? There is no error! Where did it go? Was it ever created? postgres-# creatdb test postgres-# \list List of…
Tampa
  • 75,446
  • 119
  • 278
  • 425
10
votes
4 answers

Passing a ResultSet into a Postgresql Function

Is it possible to pass the results of a postgres query as an input into another function? As a very contrived example, say I have one query like SELECT id, name FROM users LIMIT 50 and I want to create a function my_function that takes the…
Ben Hamner
  • 4,575
  • 4
  • 30
  • 50
10
votes
3 answers

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 pgAgent on machine. Download pgAgent package in…
Anvesh
  • 7,103
  • 3
  • 45
  • 43
10
votes
2 answers

Postgresql 9.2 installation on Ubuntu 12.04

For installing postgresql 9.2 I followed this url : http://www.ubuntugeek.com/how-to-install-postgresql-9-2-on-ubuntu-server-using-ppa.html But at the end of installation output is like : Setting up postgresql-common (140~precise) ... locale: Cannot…
Naresh J
  • 2,087
  • 5
  • 26
  • 39
10
votes
5 answers

unresolved dependency for postgresql 9.2 jar in play framework

I am using postgresql 9.2 with play framework 2.1 I downloaded the driver here: http://jdbc.postgresql.org/download.html (JDBC4 Postgresql Driver, Version 9.2-1002) My project/Build.scala file is as follows: import sbt._ import Keys._ import…
10
votes
4 answers

Months between two dates function

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')) * 12 + extract(month from…
jobi88
  • 3,865
  • 8
  • 21
  • 15
10
votes
3 answers

Importing .csv with timestamp column (dd.mm.yyyy hh.mm.ss) using psql \copy

I'm trying to import data from a .csv file into a postgresql 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.mm.ss format. I've set the database datestyle to…
jatobat
  • 749
  • 3
  • 8
  • 21