· 6 years ago · Apr 30, 2019, 09:26 PM
1--
2-- PostgreSQL database dump
3--
4
5SET statement_timeout = 0;
6SET lock_timeout = 0;
7SET client_encoding = 'UTF8';
8SET standard_conforming_strings = on;
9SELECT pg_catalog.set_config('search_path', '', false);
10SET check_function_bodies = false;
11SET client_min_messages = warning;
12
13--
14-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
15--
16
17CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
18
19
20--
21-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
22--
23
24COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
25
26
27--
28-- Name: color_component; Type: DOMAIN; Schema: public; Owner: alumno
29--
30
31CREATE DOMAIN public.color_component AS smallint
32 CONSTRAINT color_component_check CHECK (((VALUE > (-1)) AND (VALUE < 256)));
33
34
35ALTER DOMAIN public.color_component OWNER TO alumno;
36
37SET default_tablespace = '';
38
39SET default_with_oids = false;
40
41--
42-- Name: colores; Type: TABLE; Schema: public; Owner: alumno; Tablespace:
43--
44
45CREATE TABLE public.colores (
46 color text NOT NULL,
47 html text,
48 red public.color_component,
49 green public.color_component,
50 blue public.color_component
51);
52
53
54ALTER TABLE public.colores OWNER TO alumno;
55
56--
57-- Name: figuras; Type: TABLE; Schema: public; Owner: alumno; Tablespace:
58--
59
60CREATE TABLE public.figuras (
61 figura text NOT NULL,
62 vertices integer,
63 color text
64);
65
66
67ALTER TABLE public.figuras OWNER TO alumno;
68
69--
70-- Data for Name: colores; Type: TABLE DATA; Schema: public; Owner: alumno
71--
72
73COPY public.colores (color, html, red, green, blue) FROM stdin;
74rojo #FF0000 255 0 0
75verde #00FF00 0 255 0
76azul #0000FF 0 0 255
77amarillo #FFFF00 255 255 0
78\.
79
80
81--
82-- Data for Name: figuras; Type: TABLE DATA; Schema: public; Owner: alumno
83--
84
85COPY public.figuras (figura, vertices, color) FROM stdin;
86triangulo 3 rojo
87cuadrado 4 azul
88rectangulo 4 verde
89pentagono 5 \N
90hexagono 6 \N
91\.
92
93
94--
95-- Name: colores_pkey; Type: CONSTRAINT; Schema: public; Owner: alumno; Tablespace:
96--
97
98ALTER TABLE ONLY public.colores
99 ADD CONSTRAINT colores_pkey PRIMARY KEY (color);
100
101
102--
103-- Name: figuras_pkey; Type: CONSTRAINT; Schema: public; Owner: alumno; Tablespace:
104--
105
106ALTER TABLE ONLY public.figuras
107 ADD CONSTRAINT figuras_pkey PRIMARY KEY (figura);
108
109
110--
111-- Name: figuras_color_fkey; Type: FK CONSTRAINT; Schema: public; Owner: alumno
112--
113
114ALTER TABLE ONLY public.figuras
115 ADD CONSTRAINT figuras_color_fkey FOREIGN KEY (color) REFERENCES public.colores(color);
116
117
118--
119-- Name: SCHEMA public; Type: ACL; Schema: -; Owner: postgres
120--
121
122REVOKE ALL ON SCHEMA public FROM PUBLIC;
123REVOKE ALL ON SCHEMA public FROM postgres;
124GRANT ALL ON SCHEMA public TO postgres;
125GRANT ALL ON SCHEMA public TO PUBLIC;
126
127
128--
129-- PostgreSQL database dump complete
130--