pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: kardash.a.v@yandex.ru
To: pgsql-bugs@postgresql.org
Subject: BUG #13870: couldn't restore dump with mat view
Date: Fri, 15 Jan 2016 17:55:46 +0000
Message-ID: <20160115175546.2968.6033@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      13870
Logged by:          Arthur Kardash
Email address:      kardash.a.v@yandex.ru
PostgreSQL version: 9.5.0
Operating system:   windows 7 x32
Description:        

Try to feed sql-commands below, then do dump and you will see errors while
restore!

d:/pgsql/bin/pg_dump.exe -h 127.0.0.1 -U postgres -F c -f d:/backUp/test4
test

d:/pgsql/bin/pg_restore.exe -h 127.0.0.1 -U postgres -d t -F c
d:/backUp/test4

-----------------
SQL - commands
-----------------
--
-- PostgreSQL database dump
--

-- Dumped from database version 9.5.0
-- Dumped by pg_dump version 9.5.0

SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;

--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: 
--

CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;


--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: 
--

COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';


SET search_path = public, pg_catalog;

--
-- Name: distance(integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION distance(line integer) RETURNS numeric
    LANGUAGE sql
    AS $$
SELECT line * 4.5;
$$;


ALTER FUNCTION public.distance(line integer) OWNER TO postgres;

--
-- Name: point(integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION point(line integer) RETURNS numeric
    LANGUAGE sql
    AS $$
WITH t(line) AS (
SELECT line
FROM stend
)
SELECT distance (line) FROM t
$$;


ALTER FUNCTION public.point(line integer) OWNER TO postgres;

SET default_tablespace = '';

--
-- Name: conjunct_dynamic1; Type: MATERIALIZED VIEW; Schema: public; Owner:
postgres
--

CREATE MATERIALIZED VIEW conjunct_dynamic1 AS
 SELECT point.point
   FROM point(1) point(point)
  WITH NO DATA;


ALTER TABLE conjunct_dynamic1 OWNER TO postgres;

SET default_with_oids = false;

--
-- Name: stend; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE stend (
    line integer
);


ALTER TABLE stend OWNER TO postgres;

--
-- Data for Name: stend; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY stend (line) FROM stdin;
\.


--
-- Name: conjunct_dynamic1; Type: MATERIALIZED VIEW DATA; Schema: public;
Owner: postgres
--

REFRESH MATERIALIZED VIEW conjunct_dynamic1;


--
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;


--
-- PostgreSQL database dump complete
--
 


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (6+ messages)  latest in thread

Message-ID: <20160115175546.2968.6033@wrigleys.postgresql.org>
Permalink:  ../20160115175546.2968.6033@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20160115175546.2968.6033@wrigleys.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: kardash.a.v@yandex.ru
  Subject: Re: BUG #13870: couldn't restore dump with mat view
  In-Reply-To: <20160115175546.2968.6033@wrigleys.postgresql.org>
  References: <20160115175546.2968.6033@wrigleys.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