only_dump_measurement.sql

application/sql

Filename: only_dump_measurement.sql
Type: application/sql
Part: 0
Message: Re: [Proposal] Allow pg_dump to include all child tables with the root table
--
-- PostgreSQL database dump
--

-- Dumped from database version 16devel
-- Dumped by pg_dump version 16devel

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;

SET default_tablespace = '';

--
-- Name: measurement; Type: TABLE; Schema: dump_test; Owner: stephane
--

CREATE TABLE dump_test.measurement (
    city_id integer NOT NULL,
    logdate date NOT NULL,
    peaktemp integer,
    unitsales integer,
    CONSTRAINT measurement_peaktemp_check CHECK ((peaktemp >= '-460'::integer))
)
PARTITION BY RANGE (logdate);


ALTER TABLE dump_test.measurement OWNER TO stephane;

--
-- Name: measurement_city_id_seq; Type: SEQUENCE; Schema: dump_test; Owner: stephane
--

CREATE SEQUENCE dump_test.measurement_city_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE dump_test.measurement_city_id_seq OWNER TO stephane;

--
-- Name: measurement_city_id_seq; Type: SEQUENCE OWNED BY; Schema: dump_test; Owner: stephane
--

ALTER SEQUENCE dump_test.measurement_city_id_seq OWNED BY dump_test.measurement.city_id;


SET default_table_access_method = heap;

--
-- Name: measurement_y2006m2; Type: TABLE; Schema: dump_test_second_schema; Owner: stephane
--

CREATE TABLE dump_test_second_schema.measurement_y2006m2 (
    city_id integer DEFAULT nextval('dump_test.measurement_city_id_seq'::regclass) NOT NULL,
    logdate date NOT NULL,
    peaktemp integer,
    unitsales integer DEFAULT 0,
    CONSTRAINT measurement_peaktemp_check CHECK ((peaktemp >= '-460'::integer)),
    CONSTRAINT measurement_y2006m2_unitsales_check CHECK ((unitsales >= 0))
);


ALTER TABLE dump_test_second_schema.measurement_y2006m2 OWNER TO stephane;

--
-- Name: measurement_y2006m3; Type: TABLE; Schema: dump_test_second_schema; Owner: stephane
--

CREATE TABLE dump_test_second_schema.measurement_y2006m3 (
    city_id integer DEFAULT nextval('dump_test.measurement_city_id_seq'::regclass) NOT NULL,
    logdate date NOT NULL,
    peaktemp integer,
    unitsales integer,
    CONSTRAINT measurement_peaktemp_check CHECK ((peaktemp >= '-460'::integer))
);


ALTER TABLE dump_test_second_schema.measurement_y2006m3 OWNER TO stephane;

--
-- Name: measurement_y2006m4; Type: TABLE; Schema: dump_test_second_schema; Owner: stephane
--

CREATE TABLE dump_test_second_schema.measurement_y2006m4 (
    city_id integer DEFAULT nextval('dump_test.measurement_city_id_seq'::regclass) NOT NULL,
    logdate date NOT NULL,
    peaktemp integer,
    unitsales integer,
    CONSTRAINT measurement_peaktemp_check CHECK ((peaktemp >= '-460'::integer))
);


ALTER TABLE dump_test_second_schema.measurement_y2006m4 OWNER TO stephane;

--
-- Name: measurement_y2006m5; Type: TABLE; Schema: dump_test_second_schema; Owner: stephane
--

CREATE TABLE dump_test_second_schema.measurement_y2006m5 (
    city_id integer DEFAULT nextval('dump_test.measurement_city_id_seq'::regclass) NOT NULL,
    logdate date NOT NULL,
    peaktemp integer,
    unitsales integer,
    CONSTRAINT measurement_peaktemp_check CHECK ((peaktemp >= '-460'::integer))
);


ALTER TABLE dump_test_second_schema.measurement_y2006m5 OWNER TO stephane;

--
-- Name: measurement_y2006m2; Type: TABLE ATTACH; Schema: dump_test_second_schema; Owner: stephane
--

ALTER TABLE ONLY dump_test.measurement ATTACH PARTITION dump_test_second_schema.measurement_y2006m2 FOR VALUES FROM ('2006-02-01') TO ('2006-03-01');


--
-- Name: measurement_y2006m3; Type: TABLE ATTACH; Schema: dump_test_second_schema; Owner: stephane
--

ALTER TABLE ONLY dump_test.measurement ATTACH PARTITION dump_test_second_schema.measurement_y2006m3 FOR VALUES FROM ('2006-03-01') TO ('2006-04-01');


--
-- Name: measurement_y2006m4; Type: TABLE ATTACH; Schema: dump_test_second_schema; Owner: stephane
--

ALTER TABLE ONLY dump_test.measurement ATTACH PARTITION dump_test_second_schema.measurement_y2006m4 FOR VALUES FROM ('2006-04-01') TO ('2006-05-01');


--
-- Name: measurement_y2006m5; Type: TABLE ATTACH; Schema: dump_test_second_schema; Owner: stephane
--

ALTER TABLE ONLY dump_test.measurement ATTACH PARTITION dump_test_second_schema.measurement_y2006m5 FOR VALUES FROM ('2006-05-01') TO ('2006-06-01');


--
-- Name: measurement city_id; Type: DEFAULT; Schema: dump_test; Owner: stephane
--

ALTER TABLE ONLY dump_test.measurement ALTER COLUMN city_id SET DEFAULT nextval('dump_test.measurement_city_id_seq'::regclass);


--
-- Data for Name: measurement_y2006m2; Type: TABLE DATA; Schema: dump_test_second_schema; Owner: stephane
--

COPY dump_test_second_schema.measurement_y2006m2 (city_id, logdate, peaktemp, unitsales) FROM stdin;
1	2006-02-12	35	1
\.


--
-- Data for Name: measurement_y2006m3; Type: TABLE DATA; Schema: dump_test_second_schema; Owner: stephane
--

COPY dump_test_second_schema.measurement_y2006m3 (city_id, logdate, peaktemp, unitsales) FROM stdin;
\.


--
-- Data for Name: measurement_y2006m4; Type: TABLE DATA; Schema: dump_test_second_schema; Owner: stephane
--

COPY dump_test_second_schema.measurement_y2006m4 (city_id, logdate, peaktemp, unitsales) FROM stdin;
\.


--
-- Data for Name: measurement_y2006m5; Type: TABLE DATA; Schema: dump_test_second_schema; Owner: stephane
--

COPY dump_test_second_schema.measurement_y2006m5 (city_id, logdate, peaktemp, unitsales) FROM stdin;
\.


--
-- Name: measurement_city_id_seq; Type: SEQUENCE SET; Schema: dump_test; Owner: stephane
--

SELECT pg_catalog.setval('dump_test.measurement_city_id_seq', 1, false);


--
-- Name: measurement measurement_pkey; Type: CONSTRAINT; Schema: dump_test; Owner: stephane
--

ALTER TABLE ONLY dump_test.measurement
    ADD CONSTRAINT measurement_pkey PRIMARY KEY (city_id, logdate);


--
-- Name: measurement_y2006m2 measurement_y2006m2_pkey; Type: CONSTRAINT; Schema: dump_test_second_schema; Owner: stephane
--

ALTER TABLE ONLY dump_test_second_schema.measurement_y2006m2
    ADD CONSTRAINT measurement_y2006m2_pkey PRIMARY KEY (city_id, logdate);


--
-- Name: measurement_y2006m3 measurement_y2006m3_pkey; Type: CONSTRAINT; Schema: dump_test_second_schema; Owner: stephane
--

ALTER TABLE ONLY dump_test_second_schema.measurement_y2006m3
    ADD CONSTRAINT measurement_y2006m3_pkey PRIMARY KEY (city_id, logdate);


--
-- Name: measurement_y2006m4 measurement_y2006m4_pkey; Type: CONSTRAINT; Schema: dump_test_second_schema; Owner: stephane
--

ALTER TABLE ONLY dump_test_second_schema.measurement_y2006m4
    ADD CONSTRAINT measurement_y2006m4_pkey PRIMARY KEY (city_id, logdate);


--
-- Name: measurement_y2006m5 measurement_y2006m5_pkey; Type: CONSTRAINT; Schema: dump_test_second_schema; Owner: stephane
--

ALTER TABLE ONLY dump_test_second_schema.measurement_y2006m5
    ADD CONSTRAINT measurement_y2006m5_pkey PRIMARY KEY (city_id, logdate);


--
-- Name: measurement_city_id_logdate_idx; Type: INDEX; Schema: dump_test; Owner: stephane
--

CREATE INDEX measurement_city_id_logdate_idx ON ONLY dump_test.measurement USING btree (city_id, logdate);


--
-- Name: measurement_y2006m2_city_id_logdate_idx; Type: INDEX; Schema: dump_test_second_schema; Owner: stephane
--

CREATE INDEX measurement_y2006m2_city_id_logdate_idx ON dump_test_second_schema.measurement_y2006m2 USING btree (city_id, logdate);


--
-- Name: measurement_y2006m3_city_id_logdate_idx; Type: INDEX; Schema: dump_test_second_schema; Owner: stephane
--

CREATE INDEX measurement_y2006m3_city_id_logdate_idx ON dump_test_second_schema.measurement_y2006m3 USING btree (city_id, logdate);


--
-- Name: measurement_y2006m4_city_id_logdate_idx; Type: INDEX; Schema: dump_test_second_schema; Owner: stephane
--

CREATE INDEX measurement_y2006m4_city_id_logdate_idx ON dump_test_second_schema.measurement_y2006m4 USING btree (city_id, logdate);


--
-- Name: measurement_y2006m5_city_id_logdate_idx; Type: INDEX; Schema: dump_test_second_schema; Owner: stephane
--

CREATE INDEX measurement_y2006m5_city_id_logdate_idx ON dump_test_second_schema.measurement_y2006m5 USING btree (city_id, logdate);


--
-- Name: measurement_y2006m2_city_id_logdate_idx; Type: INDEX ATTACH; Schema: dump_test_second_schema; Owner: stephane
--

ALTER INDEX dump_test.measurement_city_id_logdate_idx ATTACH PARTITION dump_test_second_schema.measurement_y2006m2_city_id_logdate_idx;


--
-- Name: measurement_y2006m2_pkey; Type: INDEX ATTACH; Schema: dump_test_second_schema; Owner: stephane
--

ALTER INDEX dump_test.measurement_pkey ATTACH PARTITION dump_test_second_schema.measurement_y2006m2_pkey;


--
-- Name: measurement_y2006m3_city_id_logdate_idx; Type: INDEX ATTACH; Schema: dump_test_second_schema; Owner: stephane
--

ALTER INDEX dump_test.measurement_city_id_logdate_idx ATTACH PARTITION dump_test_second_schema.measurement_y2006m3_city_id_logdate_idx;


--
-- Name: measurement_y2006m3_pkey; Type: INDEX ATTACH; Schema: dump_test_second_schema; Owner: stephane
--

ALTER INDEX dump_test.measurement_pkey ATTACH PARTITION dump_test_second_schema.measurement_y2006m3_pkey;


--
-- Name: measurement_y2006m4_city_id_logdate_idx; Type: INDEX ATTACH; Schema: dump_test_second_schema; Owner: stephane
--

ALTER INDEX dump_test.measurement_city_id_logdate_idx ATTACH PARTITION dump_test_second_schema.measurement_y2006m4_city_id_logdate_idx;


--
-- Name: measurement_y2006m4_pkey; Type: INDEX ATTACH; Schema: dump_test_second_schema; Owner: stephane
--

ALTER INDEX dump_test.measurement_pkey ATTACH PARTITION dump_test_second_schema.measurement_y2006m4_pkey;


--
-- Name: measurement_y2006m5_city_id_logdate_idx; Type: INDEX ATTACH; Schema: dump_test_second_schema; Owner: stephane
--

ALTER INDEX dump_test.measurement_city_id_logdate_idx ATTACH PARTITION dump_test_second_schema.measurement_y2006m5_city_id_logdate_idx;


--
-- Name: measurement_y2006m5_pkey; Type: INDEX ATTACH; Schema: dump_test_second_schema; Owner: stephane
--

ALTER INDEX dump_test.measurement_pkey ATTACH PARTITION dump_test_second_schema.measurement_y2006m5_pkey;


--
-- Name: measurement test_trigger; Type: TRIGGER; Schema: dump_test; Owner: stephane
--

CREATE TRIGGER test_trigger AFTER INSERT ON dump_test.measurement FOR EACH ROW EXECUTE FUNCTION dump_test.trigger_func();


--
-- Name: measurement_y2006m3 test_trigger; Type: TRIGGER; Schema: dump_test_second_schema; Owner: stephane
--


ALTER TABLE dump_test_second_schema.measurement_y2006m3 DISABLE TRIGGER test_trigger;


--
-- Name: measurement_y2006m4 test_trigger; Type: TRIGGER; Schema: dump_test_second_schema; Owner: stephane
--


ALTER TABLE dump_test_second_schema.measurement_y2006m4 ENABLE REPLICA TRIGGER test_trigger;


--
-- Name: measurement_y2006m5 test_trigger; Type: TRIGGER; Schema: dump_test_second_schema; Owner: stephane
--


ALTER TABLE dump_test_second_schema.measurement_y2006m5 ENABLE ALWAYS TRIGGER test_trigger;


--
-- Name: LANGUAGE plpgsql; Type: ACL; Schema: -; Owner: stephane
--

REVOKE ALL ON LANGUAGE plpgsql FROM PUBLIC;


--
-- Name: TABLE measurement; Type: ACL; Schema: dump_test; Owner: stephane
--

GRANT SELECT ON TABLE dump_test.measurement TO regress_dump_test_role;


--
-- Name: TABLE measurement_y2006m2; Type: ACL; Schema: dump_test_second_schema; Owner: stephane
--

GRANT SELECT ON TABLE dump_test_second_schema.measurement_y2006m2 TO regress_dump_test_role;


--
-- Name: TABLE measurement_y2006m3; Type: ACL; Schema: dump_test_second_schema; Owner: stephane
--

GRANT SELECT ON TABLE dump_test_second_schema.measurement_y2006m3 TO regress_dump_test_role;


--
-- Name: TABLE measurement_y2006m4; Type: ACL; Schema: dump_test_second_schema; Owner: stephane
--

GRANT SELECT ON TABLE dump_test_second_schema.measurement_y2006m4 TO regress_dump_test_role;


--
-- Name: TABLE measurement_y2006m5; Type: ACL; Schema: dump_test_second_schema; Owner: stephane
--

GRANT SELECT ON TABLE dump_test_second_schema.measurement_y2006m5 TO regress_dump_test_role;


--
-- PostgreSQL database dump complete
--