Questions tagged [postgresql-9.0]

Questions specific to version 9.0 of the widely-used PostgreSQL relational database system

This tag is for questions specific to version 9.0 of the widely-used .

Official documentation for this version: http://www.postgresql.org/docs/9.0/interactive/index.html

For general PostgreSQL questions, use the tag.

101 questions
118
votes
9 answers

postgresql error PANIC: could not locate a valid checkpoint record

When I load up the postgres server (v9.0.1) i get a panic that prevents it from starting: PANIC: could not locate a valid checkpoint record How can I fix this?
nathan_scott
  • 1,181
  • 2
  • 8
  • 5
21
votes
4 answers

DATE_FORMAT in postgresql

I'm working in postgresql and I need to convert the date format in query itself, in mysql there is option called DATE_FORMAT and I can use a query like this: Select DATE_FORMAT(date_time, '%b %e, %Y, %T') from table_name is there any option in…
Sathish
  • 4,403
  • 7
  • 31
  • 53
20
votes
3 answers

Is there any difference between integer and bit(n) data types for a bitmask?

I am working with a table in a PostgreSQL database that has several boolean columns that determine some state (e.g. published, visible, etc.). I want to make a single status column that will store all these values as well as possible new ones in a…
Igor Zinov'yev
  • 3,676
  • 1
  • 33
  • 49
12
votes
2 answers

A postgresql query won't finish

on postgresl 9.0 we have a sql query: SELECT count(*) FROM lane WHERE not exists (SELECT 1 FROM id_map WHERE id_map.new_id=lane.lane_id and id_map.column_name='lane_id' and id_map.table_name='lane') and lane.lane_id is not…
norbitheeviljester
  • 952
  • 1
  • 6
  • 17
12
votes
1 answer

INFO output despite "SET client_min_messages TO WARNING" just before

postgresql-9.0.15 on CentOS 6.5. I have a plperlu function that outputs an INFO message. I want to suppress it during testing (using psql, which also behaves as below), but I can't even seem to do it from a pgAdminIII (1.18.1 for win2003) query…
Kev
  • 15,899
  • 15
  • 79
  • 112
10
votes
2 answers

Problematic nameless table in Postgresql

I actually don't know how I've done it : but I got a nameless table into my postgres DB. Needless to say that such a table is problematic, it doesn't get erased, neither could you change it in any way. Here is a picture of how it looks on the…
Akheloes
  • 1,352
  • 3
  • 11
  • 28
7
votes
1 answer

ERROR: function unnest(integer[]) does not exist in postgresql

SELECT UNNEST(ARRAY[1,2,3,4]) While executing the above query I got the error like this: ERROR: function unnest(integer[]) does not exist in postgresql. I am using PostgreSQL 8.3 and I have installed the _int.sql package in my db for integer array…
Rafiu
  • 4,700
  • 6
  • 25
  • 27
6
votes
1 answer

pg_dump vs COPY (SELECT * FROM my_table)

I need to copy the contents of a table from one database to another database with an identical table which is currently empty. I plan to dump the table data from the old table and then simply import it to the empty table in the new database. …
Axl
  • 427
  • 2
  • 7
  • 19
5
votes
2 answers

Postgresql setting next id to write to

I recently migrated a database from mysql to pgsql 9. But now when I try to create a new object (in django admin) it tells me that the id I'm trying to use (started at one and has increased each time I tried) is already used. I'm guessing that there…
demux
  • 4,544
  • 2
  • 32
  • 56
5
votes
1 answer

The difference in ordering of enum type literals between PostgreSQL 9.0 and 9.1

There has been some curious update in the way enum types work between PostgreSQL 9.0 and 9.1. The pg_catalog.pg_enum table has a new column enumsortorder in PostgreSQL 9.1. This order seems to override the previous enum ordering based on…
Lukas Eder
  • 211,314
  • 129
  • 689
  • 1,509
5
votes
2 answers

PostgreSQL - Smallint overflowing when creating index on multiple columns. Is this a bug?

I was having an issue inserting the value 32767 into a smallint column in Postgres, which would yield the error smallint out of range. This was odd because I could do: SELECT 32767::int2; Which would work just fine. After a little hair pulling, I…
Mike Christensen
  • 88,082
  • 50
  • 208
  • 326
5
votes
2 answers

Slow PostgreSQL query in production - help me understand this explain analyze output

I have a query that is taking 9 minutes to run on PostgreSQL 9.0.0 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46), 64-bit This query is automatically generated by hibernate for my application. It's trying to…
atroutt
  • 471
  • 6
  • 14
4
votes
1 answer

PostgreSQL using XID as unique entry in a table

I couldn't find how to set a xid (transaction ID type) column to be unique in a table. It complains about class method missing for btree and I have no clue how to get around it. This is using PostgreSQL 9.0. Couldn't find any similar question in…
4
votes
1 answer

How to use "Group By" for date interval in postgres

I have a table like this. ID (integer) event_name(varchar(20)) event_date(timestamp) some sample data is given below. ID event_date event_name 101 2013-04-24 18:33:37.694818 event_A 102 …
Anant
  • 3,047
  • 2
  • 27
  • 33
4
votes
2 answers

Join a table with one table if condition1 is true and with another table if condition1 is false?

I have the following tables : User_Group id group_id group_type ------------------------ 1 100 A 1 100 B 2 101 B 2 102 A Group_A id name --------- 100 A 101 B 102 C Group_B id name --------- 100 D 101 …
Daud
  • 7,429
  • 18
  • 68
  • 115
1
2 3 4 5 6 7