--
--


--
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: krupagj
--

COMMENT ON SCHEMA public IS 'Standard public schema';





--
-- Name: a_second; Type: TABLE; Schema: public; Owner: krupagj; Tablespace: 
--

CREATE TABLE a_second (
    id integer NOT NULL,
    ref integer NOT NULL
);


ALTER TABLE public.a_second OWNER TO krupagj;

--
-- Name: b_first; Type: TABLE; Schema: public; Owner: krupagj; Tablespace: 
--

CREATE TABLE b_first (
    id integer NOT NULL
);


ALTER TABLE public.b_first OWNER TO krupagj;

--
-- Data for Name: a_second; Type: TABLE DATA; Schema: public; Owner: krupagj
--

COPY a_second (id, ref) FROM stdin;
1	1
2	2
3	3
\.


--
-- Data for Name: b_first; Type: TABLE DATA; Schema: public; Owner: krupagj
--

COPY b_first (id) FROM stdin;
1
2
3
\.


--
-- Name: a_second_pkey; Type: CONSTRAINT; Schema: public; Owner: krupagj; Tablespace: 
--

ALTER TABLE ONLY a_second
    ADD CONSTRAINT a_second_pkey PRIMARY KEY (id);


ALTER INDEX public.a_second_pkey OWNER TO krupagj;

--
-- Name: b_first_pkey; Type: CONSTRAINT; Schema: public; Owner: krupagj; Tablespace: 
--

ALTER TABLE ONLY b_first
    ADD CONSTRAINT b_first_pkey PRIMARY KEY (id);


ALTER INDEX public.b_first_pkey OWNER TO krupagj;

--
-- Name: the_link; Type: FK CONSTRAINT; Schema: public; Owner: krupagj
--

ALTER TABLE ONLY a_second
    ADD CONSTRAINT the_link FOREIGN KEY (ref) REFERENCES b_first(id);


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

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


--
--

