From: Craig Ringer <craig@2ndquadrant.com>
To: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: hstore dump/restore bug in 9.3
Date: Mon, 12 May 2014 10:08:32 +0800
Message-ID: <53702D20.4070505@2ndquadrant.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Hi all
A user has reported a bug where a simple view using hstore does not dump
and restore correctly. I've reproduced the detailed test case they
supplied below.
The original report is by Stack Overflow user 'aidan', here:
http://stackoverflow.com/q/23599926/398670
The error is:
pg_restore: [archiver (db)] could not execute query: ERROR: operator
does not exist: public.hstore = public.hstore
LINE 2: SELECT NULLIF(hstore_test_table.column1, hstore_test_table....
produced by test case:
CREATE DATABASE hstore_test;
\c hstore_test
CREATE EXTENSION hstore WITH SCHEMA public;
CREATE SCHEMA hstore_test_schema;
CREATE TABLE hstore_test_schema.hstore_test_table(
id int,
column1 hstore,
column2 hstore,
PRIMARY KEY( id )
);
CREATE VIEW hstore_test_schema.hstore_test_view AS
SELECT NULLIF(column1, column2) AS comparison FROM
hstore_test_schema.hstore_test_table;
followed by command sequence:
$ pg_dump -U postgres -Fc hstore_test -f test.out
$ dropdb -U postgres hstore_test;
$ createdb -U postgres hstore_test;
$ pg_restore -U postgres -d hstore_test test.out
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 172; 1259 96803 VIEW
hstore_test_view postgres
pg_restore: [archiver (db)] could not execute query: ERROR: operator
does not exist: public.hstore = public.hstore
LINE 2: SELECT NULLIF(hstore_test_table.column1, hstore_test_table....
^
HINT: No operator matches the given name and argument type(s). You
might need to add explicit type casts.
Command was: CREATE VIEW hstore_test_view AS
SELECT NULLIF(hstore_test_table.column1, hstore_test_table.column2) AS
comparison
FROM h...
--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: craig@2ndquadrant.com
Subject: Re: hstore dump/restore bug in 9.3
In-Reply-To: <53702D20.4070505@2ndquadrant.com>
References: <53702D20.4070505@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox