BUG #13870: couldn't restore dump with mat view - Mailing list pgsql-bugs

From kardash.a.v@yandex.ru
Subject BUG #13870: couldn't restore dump with mat view
Date
Msg-id 20160115175546.2968.6033@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #13870: couldn't restore dump with mat view
Re: BUG #13870: couldn't restore dump with mat view
List pgsql-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
--

pgsql-bugs by date:

Previous
From: luisandro@hotmail.com
Date:
Subject: BUG #13871: Format '%2f' invalid or incompatible with argument
Next
From: "David G. Johnston"
Date:
Subject: Re: BUG #13871: Format '%2f' invalid or incompatible with argument