-- -- PostgreSQL database dump -- -- Dumped from database version 9.1.3 -- Dumped by pg_dump version 9.1.3 -- Started on 2014-09-10 14:49:53 SET statement_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; -- -- TOC entry 169 (class 3079 OID 11639) -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; -- -- TOC entry 1892 (class 0 OID 0) -- Dependencies: 169 -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; SET search_path = public, pg_catalog; SET default_tablespace = ''; SET default_with_oids = false; -- -- TOC entry 162 (class 1259 OID 32840) -- Dependencies: 5 -- Name: amigo; Type: TABLE; Schema: public; Owner: postgres; Tablespace: -- CREATE TABLE amigo ( codamigo integer NOT NULL, nome character varying(30) NOT NULL, apelido character varying(30) ); ALTER TABLE public.amigo OWNER TO postgres; -- -- TOC entry 161 (class 1259 OID 32838) -- Dependencies: 5 162 -- Name: amigo_codamigo_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE amigo_codamigo_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.amigo_codamigo_seq OWNER TO postgres; -- -- TOC entry 1893 (class 0 OID 0) -- Dependencies: 161 -- Name: amigo_codamigo_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE amigo_codamigo_seq OWNED BY amigo.codamigo; -- -- TOC entry 1894 (class 0 OID 0) -- Dependencies: 161 -- Name: amigo_codamigo_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- SELECT pg_catalog.setval('amigo_codamigo_seq', 1, true); -- -- TOC entry 164 (class 1259 OID 32851) -- Dependencies: 5 -- Name: bairro; Type: TABLE; Schema: public; Owner: postgres; Tablespace: -- CREATE TABLE bairro ( codbairro integer NOT NULL, nomebairro character varying(30) ); ALTER TABLE public.bairro OWNER TO postgres; -- -- TOC entry 163 (class 1259 OID 32849) -- Dependencies: 164 5 -- Name: bairro_codbairro_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE bairro_codbairro_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.bairro_codbairro_seq OWNER TO postgres; -- -- TOC entry 1895 (class 0 OID 0) -- Dependencies: 163 -- Name: bairro_codbairro_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE bairro_codbairro_seq OWNED BY bairro.codbairro; -- -- TOC entry 1896 (class 0 OID 0) -- Dependencies: 163 -- Name: bairro_codbairro_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- SELECT pg_catalog.setval('bairro_codbairro_seq', 11, true); -- -- TOC entry 168 (class 1259 OID 49473) -- Dependencies: 5 -- Name: cidade; Type: TABLE; Schema: public; Owner: postgres; Tablespace: -- CREATE TABLE cidade ( codcidade integer NOT NULL, nomecidade character varying(50) NOT NULL, coduf integer NOT NULL ); ALTER TABLE public.cidade OWNER TO postgres; -- -- TOC entry 167 (class 1259 OID 49471) -- Dependencies: 168 5 -- Name: cidade_codcidade_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE cidade_codcidade_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.cidade_codcidade_seq OWNER TO postgres; -- -- TOC entry 1897 (class 0 OID 0) -- Dependencies: 167 -- Name: cidade_codcidade_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE cidade_codcidade_seq OWNED BY cidade.codcidade; -- -- TOC entry 1898 (class 0 OID 0) -- Dependencies: 167 -- Name: cidade_codcidade_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- SELECT pg_catalog.setval('cidade_codcidade_seq', 5, true); -- -- TOC entry 166 (class 1259 OID 49461) -- Dependencies: 5 -- Name: uf; Type: TABLE; Schema: public; Owner: postgres; Tablespace: -- CREATE TABLE uf ( coduf integer NOT NULL, nomeuf character varying(50) NOT NULL, sigla character(2) NOT NULL ); ALTER TABLE public.uf OWNER TO postgres; -- -- TOC entry 165 (class 1259 OID 49459) -- Dependencies: 166 5 -- Name: uf_coduf_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE uf_coduf_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.uf_coduf_seq OWNER TO postgres; -- -- TOC entry 1899 (class 0 OID 0) -- Dependencies: 165 -- Name: uf_coduf_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE uf_coduf_seq OWNED BY uf.coduf; -- -- TOC entry 1900 (class 0 OID 0) -- Dependencies: 165 -- Name: uf_coduf_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- SELECT pg_catalog.setval('uf_coduf_seq', 5, true); -- -- TOC entry 1866 (class 2604 OID 32843) -- Dependencies: 162 161 162 -- Name: codamigo; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY amigo ALTER COLUMN codamigo SET DEFAULT nextval('amigo_codamigo_seq'::regclass); -- -- TOC entry 1867 (class 2604 OID 32854) -- Dependencies: 164 163 164 -- Name: codbairro; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY bairro ALTER COLUMN codbairro SET DEFAULT nextval('bairro_codbairro_seq'::regclass); -- -- TOC entry 1869 (class 2604 OID 49476) -- Dependencies: 168 167 168 -- Name: codcidade; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY cidade ALTER COLUMN codcidade SET DEFAULT nextval('cidade_codcidade_seq'::regclass); -- -- TOC entry 1868 (class 2604 OID 49464) -- Dependencies: 165 166 166 -- Name: coduf; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY uf ALTER COLUMN coduf SET DEFAULT nextval('uf_coduf_seq'::regclass); -- -- TOC entry 1883 (class 0 OID 32840) -- Dependencies: 162 -- Data for Name: amigo; Type: TABLE DATA; Schema: public; Owner: postgres -- COPY amigo (codamigo, nome, apelido) FROM stdin; 1 MARCOS ANTONIO ESTREMOTE LANGÃO \. -- -- TOC entry 1884 (class 0 OID 32851) -- Dependencies: 164 -- Data for Name: bairro; Type: TABLE DATA; Schema: public; Owner: postgres -- COPY bairro (codbairro, nomebairro) FROM stdin; 3 JARDIM NOVO HORIZONTE 5 SUL 6 SANTA CATARINA 7 YPE 8 TESTE 10 CENTRO 11 JARDIM IRENE \. -- -- TOC entry 1886 (class 0 OID 49473) -- Dependencies: 168 -- Data for Name: cidade; Type: TABLE DATA; Schema: public; Owner: postgres -- COPY cidade (codcidade, nomecidade, coduf) FROM stdin; 2 Ilha Solteira 1 3 ILHA SOLTEIRA 1 4 ITURAMA 3 5 RIO DE JANEIRO 5 \. -- -- TOC entry 1885 (class 0 OID 49461) -- Dependencies: 166 -- Data for Name: uf; Type: TABLE DATA; Schema: public; Owner: postgres -- COPY uf (coduf, nomeuf, sigla) FROM stdin; 1 São Paulo SP 3 MINAS GERAIS MG 4 MATO GROSSO DO SUL MS 5 RIO DE JANEIRO rj \. -- -- TOC entry 1871 (class 2606 OID 32845) -- Dependencies: 162 162 -- Name: amigo_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: -- ALTER TABLE ONLY amigo ADD CONSTRAINT amigo_pkey PRIMARY KEY (codamigo); -- -- TOC entry 1873 (class 2606 OID 32856) -- Dependencies: 164 164 -- Name: bairro_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: -- ALTER TABLE ONLY bairro ADD CONSTRAINT bairro_pkey PRIMARY KEY (codbairro); -- -- TOC entry 1881 (class 2606 OID 49478) -- Dependencies: 168 168 -- Name: cidade_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: -- ALTER TABLE ONLY cidade ADD CONSTRAINT cidade_pkey PRIMARY KEY (codcidade); -- -- TOC entry 1875 (class 2606 OID 49468) -- Dependencies: 166 166 -- Name: uf_nomeuf_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: -- ALTER TABLE ONLY uf ADD CONSTRAINT uf_nomeuf_key UNIQUE (nomeuf); -- -- TOC entry 1877 (class 2606 OID 49466) -- Dependencies: 166 166 -- Name: uf_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: -- ALTER TABLE ONLY uf ADD CONSTRAINT uf_pkey PRIMARY KEY (coduf); -- -- TOC entry 1879 (class 2606 OID 49470) -- Dependencies: 166 166 -- Name: uf_sigla_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: -- ALTER TABLE ONLY uf ADD CONSTRAINT uf_sigla_key UNIQUE (sigla); -- -- TOC entry 1882 (class 2606 OID 49479) -- Dependencies: 1876 168 166 -- Name: fk_coduf; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY cidade ADD CONSTRAINT fk_coduf FOREIGN KEY (coduf) REFERENCES uf(coduf); -- -- TOC entry 1891 (class 0 OID 0) -- Dependencies: 5 -- 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; -- Completed on 2014-09-10 14:49:54 -- -- PostgreSQL database dump complete --