pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: cherio@gmail.com
Subject: BUG #15695: Failure to restore a dump, ERROR: operator does not exist: public.hstore = public.hstore
Date: Fri, 15 Mar 2019 21:20:38 +0000
Message-ID: <15695-9ddb5735cf6dd931@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      15695
Logged by:          Yuri Cherio
Email address:      cherio@gmail.com
PostgreSQL version: 10.7
Operating system:   Ubuntu 18.04 64bit
Description:        

I am exporting DB from 10.6 and importing into 10.7 and an UPDATE rule fails
to restore. I have a view with a rule that starts like this

CREATE OR REPLACE RULE table_view__upd__rul AS ON UPDATE
	TO schema.table_view
	DO INSTEAD (
		UPDATE sch.tab
		SET
			updated_at = NEW.updated_at,
			updated_by = NEW.updated_by,
			hstore_field = NEW.hstore_field
		WHERE id = OLD.id
			AND
			(
				OLD.updated_at IS DISTINCT FROM NEW.updated_at OR
				OLD.updated_by IS DISTINCT FROM NEW.updated_by OR
				OLD.hstore_field IS DISTINCT FROM NEW.hstore_field
			);
....

I export into a custom format as
pg_dump -F c -Z 0 -T bak.* -T tmp.* -h host1 -p port database > file.dump

and import as
pg_restore -v -d database -j 4 -h host2 -p port file.dump

which at some point logs an error
pg_restore: [archiver (db)] could not execute query: ERROR:  operator does
not exist: public.hstore = public.hstore
LINE 3: ...ISTINCT FROM (new.updated_by)::text) OR (old.hstore_field IS
DISTINC...

with an arrow pointing to "old.hstore_field IS -->DISTINC..."

From the log I can see that hstore was extension successfully created and
many other tables, views and functions successfully recreated prior to this
error.

This looks like a bug to me :(

Thank you!



view thread (2+ messages)  latest in thread

Message-ID: <15695-9ddb5735cf6dd931@postgresql.org>
Permalink:  ../15695-9ddb5735cf6dd931@postgresql.org/
Also on:    postgresql.org/message-id/15695-9ddb5735cf6dd931@postgresql.org

 · 

reply

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: noreply@postgresql.org, cherio@gmail.com
  Subject: Re: BUG #15695: Failure to restore a dump, ERROR: operator does not exist: public.hstore = public.hstore
  In-Reply-To: <15695-9ddb5735cf6dd931@postgresql.org>
  References: <15695-9ddb5735cf6dd931@postgresql.org>

* 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