--
-- PostgreSQL database dump
--

--
-- TOC entry 2 (OID 19417)
-- Name: test; Type: TABLE; Schema: public; Owner: alex
--

CREATE TABLE test (
    foo_id serial NOT NULL,
    foo1 text,
    foo2 text,
    foo3 text
);


--
-- Data for TOC entry 5 (OID 19417)
-- Name: test; Type: TABLE DATA; Schema: public; Owner: alex
--

COPY test (foo_id, foo1, foo2, foo3) FROM stdin;
1	hhh	ggg	333
2	tra	bau	tst
3	hhh	ggg	333
4	tra	bau	tst
5	hhh	ggg	333
6	tra	bau	tst
7	hhh	ggg	333
8	tra	bau	tst
9	hhh	ggg	333
10	tra	bau	tst
11	hhh	ggg	333
12	tra	bau	tst
\.


--
-- TOC entry 4 (OID 19423)
-- Name: test_pkey; Type: CONSTRAINT; Schema: public; Owner: alex
--

ALTER TABLE ONLY test
    ADD CONSTRAINT test_pkey PRIMARY KEY (foo_id);


--
-- TOC entry 3 (OID 19415)
-- Name: test_foo_id_seq; Type: SEQUENCE SET; Schema: public; Owner: alex
--

SELECT pg_catalog.setval ('test_foo_id_seq', 12, true);

--
-- TOC entry 2 (OID 19427)
-- Name: test2; Type: TABLE; Schema: public; Owner: alex
--

CREATE TABLE test2 (
    foo_id serial NOT NULL,
    foo1 bigint,
    foo2 text,
    foo3 text
);


--
-- Data for TOC entry 5 (OID 19427)
-- Name: test2; Type: TABLE DATA; Schema: public; Owner: alex
--

COPY test2 (foo_id, foo1, foo2, foo3) FROM stdin;
1	1	bau	tst
2	2	ggg	333
3	3	bau	tst
4	4	ggg	333
5	5	bau	tst
6	6	ggg	333
\.


--
-- TOC entry 4 (OID 19433)
-- Name: test2_pkey; Type: CONSTRAINT; Schema: public; Owner: alex
--

ALTER TABLE ONLY test2
    ADD CONSTRAINT test2_pkey PRIMARY KEY (foo_id);


--
-- TOC entry 6 (OID 19435)
-- Name: $1; Type: CONSTRAINT; Schema: public; Owner: alex
--

ALTER TABLE ONLY test2
    ADD CONSTRAINT "$1" FOREIGN KEY (foo1) REFERENCES test(foo_id) ON UPDATE CASCADE ON DELETE NO ACTION;


--
-- TOC entry 3 (OID 19425)
-- Name: test2_foo_id_seq; Type: SEQUENCE SET; Schema: public; Owner: alex
--

SELECT pg_catalog.setval ('test2_foo_id_seq', 37, true);

--
-- TOC entry 2 (OID 19441)
-- Name: test3; Type: TABLE; Schema: public; Owner: alex
--

CREATE TABLE test3 (
    foo_id serial NOT NULL,
    foo2 bigint,
    foo1 text,
    foo3 text
);


--
-- Data for TOC entry 5 (OID 19441)
-- Name: test3; Type: TABLE DATA; Schema: public; Owner: alex
--

COPY test3 (foo_id, foo2, foo1, foo3) FROM stdin;
1	5	bau	tst
2	6	ggg	333
3	1	bau	tst
4	2	ggg	333
5	3	bau	tst
6	4	ggg	333
\.


--
-- TOC entry 4 (OID 19447)
-- Name: test3_pkey; Type: CONSTRAINT; Schema: public; Owner: alex
--

ALTER TABLE ONLY test3
    ADD CONSTRAINT test3_pkey PRIMARY KEY (foo_id);


--
-- TOC entry 6 (OID 19449)
-- Name: $1; Type: CONSTRAINT; Schema: public; Owner: alex
--

ALTER TABLE ONLY test3
    ADD CONSTRAINT "$1" FOREIGN KEY (foo2) REFERENCES test2(foo_id) ON UPDATE CASCADE ON DELETE NO ACTION;


--
-- TOC entry 3 (OID 19439)
-- Name: test3_foo_id_seq; Type: SEQUENCE SET; Schema: public; Owner: alex
--

SELECT pg_catalog.setval ('test3_foo_id_seq', 33, true);


