The following bug has been logged on the website:
Bug reference: 7838
Logged by: Jan Mate
Email address: jan.mate@inf-it.com
PostgreSQL version: 9.2.2
Operating system: Debian GNU/Linux
Description: =
Today I tried to upgrade from 9.1.7 to 9.2.2 by using:
pg_upgradecluster 9.1 main
The upgrade process failed on one of my VIEWS with syntax error (after I
removed that VIEW, the upgrade process worked well - also there was no
problem with re-creation of the VIEW after the upgrade).
I created a very simple example to reproduce the problem (looks like it is a
pg_dump problem). Here are the links to files used in my example:
- my original SQL queries
http://www.inf-it.com/fixes/postgres-bugreport/test.sql
- result from the pg_dump
http://www.inf-it.com/fixes/postgres-bugreport/test_dump.sql
Steps to reproduce the problem:
$ createdb test
$ psql test < test.sql
$ psql test -c 'SELECT * FROM export_data;'
number | org | =
name
=
------------+----------------------------------------------+---------------=
-------------------
5555551212 | Starfleet or Springfield Nuclear Power Plant | Simpson
Homer or Picard Jean-Luc
(1 row)
$ pg_dump test > test_dump.sql
$ dropdb test
$ createdb test
$ psql test < test_dump.sql
SET
SET
SET
SET
SET
CREATE EXTENSION
COMMENT
SET
SET
SET
CREATE TABLE
ALTER TABLE
ERROR: syntax error at or near "["
LINE 2: ...i'::text) regexp_matches(regexp_matches) LIMIT 1))[1],
'[\\]...
^
ERROR: relation "public.export_data" does not exist
REVOKE
REVOKE
GRANT
GRANT