· 7 years ago · Sep 03, 2018, 02:26 AM
1--
2-- PostgreSQL database dump
3--
4
5-- Dumped from database version 10.4 (Ubuntu 10.4-2.pgdg16.04+1)
6-- Dumped by pg_dump version 10.4 (Ubuntu 10.4-2.pgdg16.04+1)
7
8-- Started on 2018-09-02 23:22:10 -03
9
10SET statement_timeout = 0;
11SET lock_timeout = 0;
12SET idle_in_transaction_session_timeout = 0;
13SET client_encoding = 'UTF8';
14SET standard_conforming_strings = on;
15SELECT pg_catalog.set_config('search_path', '', false);
16SET check_function_bodies = false;
17SET client_min_messages = warning;
18SET row_security = off;
19
20DROP INDEX public."uniq_serieUID";
21ALTER TABLE public.tag ALTER COLUMN id DROP DEFAULT;
22ALTER TABLE public.serie ALTER COLUMN id DROP DEFAULT;
23DROP FOREIGN TABLE public.tagsindex;
24DROP SEQUENCE public.tag_id_seq;
25DROP TABLE public.tag;
26DROP SEQUENCE public.serie_id_seq;
27DROP TABLE public.serie;
28DROP FOREIGN TABLE dicomimg.dicomimg_files;
29DROP SERVER index_server;
30DROP SERVER dicomimg_server;
31DROP EXTENSION multicorn;
32DROP EXTENSION plpgsql;
33DROP SCHEMA public;
34DROP SCHEMA dicomimg;
35--
36-- TOC entry 4 (class 2615 OID 16729)
37-- Name: dicomimg; Type: SCHEMA; Schema: -; Owner: postgres
38--
39
40CREATE SCHEMA dicomimg;
41
42
43ALTER SCHEMA dicomimg OWNER TO postgres;
44
45--
46-- TOC entry 7 (class 2615 OID 2200)
47-- Name: public; Type: SCHEMA; Schema: -; Owner: postgres
48--
49
50CREATE SCHEMA public;
51
52
53ALTER SCHEMA public OWNER TO postgres;
54
55--
56-- TOC entry 2899 (class 0 OID 0)
57-- Dependencies: 7
58-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
59--
60
61COMMENT ON SCHEMA public IS 'standard public schema';
62
63
64--
65-- TOC entry 1 (class 3079 OID 13001)
66-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
67--
68
69CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
70
71
72--
73-- TOC entry 2901 (class 0 OID 0)
74-- Dependencies: 1
75-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
76--
77
78COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
79
80
81--
82-- TOC entry 2 (class 3079 OID 16720)
83-- Name: multicorn; Type: EXTENSION; Schema: -; Owner:
84--
85
86CREATE EXTENSION IF NOT EXISTS multicorn WITH SCHEMA public;
87
88
89--
90-- TOC entry 2902 (class 0 OID 0)
91-- Dependencies: 2
92-- Name: EXTENSION multicorn; Type: COMMENT; Schema: -; Owner:
93--
94
95COMMENT ON EXTENSION multicorn IS 'Multicorn Python bindings for Postgres 9.2.* Foreign Data Wrapper';
96
97
98--
99-- TOC entry 1689 (class 1417 OID 16724)
100-- Name: dicomimg_server; Type: SERVER; Schema: -; Owner: postgres
101--
102
103CREATE SERVER dicomimg_server FOREIGN DATA WRAPPER multicorn OPTIONS (
104 hosts 'localhost',
105 port '9042',
106 wrapper 'cassandra-fdw.CassandraFDW'
107);
108
109
110ALTER SERVER dicomimg_server OWNER TO postgres;
111
112--
113-- TOC entry 1690 (class 1417 OID 16733)
114-- Name: index_server; Type: SERVER; Schema: -; Owner: postgres
115--
116
117CREATE SERVER index_server FOREIGN DATA WRAPPER multicorn OPTIONS (
118 wrapper 'pg_es_fdw.ElasticsearchFDW'
119);
120
121
122ALTER SERVER index_server OWNER TO postgres;
123
124SET default_tablespace = '';
125
126--
127-- TOC entry 200 (class 1259 OID 16730)
128-- Name: dicomimg_files; Type: FOREIGN TABLE; Schema: dicomimg; Owner: postgres
129--
130
131CREATE FOREIGN TABLE dicomimg.dicomimg_files (
132 tag_0010_0020 text,
133 tag_0020_000d text,
134 tag_0020_000e text,
135 tag_0008_0018 text,
136 dcm bytea,
137 __rowid__ text
138)
139SERVER dicomimg_server
140OPTIONS (
141 columnfamily 'dicomimg_files',
142 keyspace 'dicomimg'
143);
144
145
146ALTER FOREIGN TABLE dicomimg.dicomimg_files OWNER TO postgres;
147
148SET default_with_oids = false;
149
150--
151-- TOC entry 198 (class 1259 OID 16695)
152-- Name: serie; Type: TABLE; Schema: public; Owner: postgres
153--
154
155CREATE TABLE public.serie (
156 tag_0020_000e character varying(64) NOT NULL,
157 id integer NOT NULL
158);
159
160
161ALTER TABLE public.serie OWNER TO postgres;
162
163--
164-- TOC entry 202 (class 1259 OID 16739)
165-- Name: serie_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
166--
167
168CREATE SEQUENCE public.serie_id_seq
169 AS integer
170 START WITH 1
171 INCREMENT BY 1
172 NO MINVALUE
173 NO MAXVALUE
174 CACHE 1;
175
176
177ALTER TABLE public.serie_id_seq OWNER TO postgres;
178
179--
180-- TOC entry 2903 (class 0 OID 0)
181-- Dependencies: 202
182-- Name: serie_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
183--
184
185ALTER SEQUENCE public.serie_id_seq OWNED BY public.serie.id;
186
187
188--
189-- TOC entry 199 (class 1259 OID 16703)
190-- Name: tag; Type: TABLE; Schema: public; Owner: postgres
191--
192
193CREATE TABLE public.tag (
194 idserie numeric NOT NULL,
195 tag character varying(20) NOT NULL,
196 valor character varying(128) NOT NULL,
197 id integer NOT NULL,
198 tag_0020_000d character varying(64),
199 tag_0010_0020 character varying(64),
200 tag_0008_0018 character varying(64)
201);
202
203
204ALTER TABLE public.tag OWNER TO postgres;
205
206--
207-- TOC entry 203 (class 1259 OID 16746)
208-- Name: tag_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
209--
210
211CREATE SEQUENCE public.tag_id_seq
212 AS integer
213 START WITH 1
214 INCREMENT BY 1
215 NO MINVALUE
216 NO MAXVALUE
217 CACHE 1;
218
219
220ALTER TABLE public.tag_id_seq OWNER TO postgres;
221
222--
223-- TOC entry 2904 (class 0 OID 0)
224-- Dependencies: 203
225-- Name: tag_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
226--
227
228ALTER SEQUENCE public.tag_id_seq OWNED BY public.tag.id;
229
230
231--
232-- TOC entry 201 (class 1259 OID 16734)
233-- Name: tagsindex; Type: FOREIGN TABLE; Schema: public; Owner: postgres
234--
235
236CREATE FOREIGN TABLE public.tagsindex (
237 id text,
238 origem text,
239 tag_0008_0020 text,
240 tag_0010_0030 text,
241 tag_0010_0010 text,
242 tag_0008_1030 text,
243 tag_0008_103e text,
244 tag_0008_0060 text,
245 query text,
246 score numeric
247)
248SERVER index_server
249OPTIONS (
250 host 'localhost',
251 index 'tags-index',
252 port '9200',
253 query_column 'query',
254 rowid_column 'id',
255 score_column 'score',
256 type 'tags'
257);
258
259
260ALTER FOREIGN TABLE public.tagsindex OWNER TO postgres;
261
262--
263-- TOC entry 2769 (class 2604 OID 16741)
264-- Name: serie id; Type: DEFAULT; Schema: public; Owner: postgres
265--
266
267ALTER TABLE ONLY public.serie ALTER COLUMN id SET DEFAULT nextval('public.serie_id_seq'::regclass);
268
269
270--
271-- TOC entry 2770 (class 2604 OID 16748)
272-- Name: tag id; Type: DEFAULT; Schema: public; Owner: postgres
273--
274
275ALTER TABLE ONLY public.tag ALTER COLUMN id SET DEFAULT nextval('public.tag_id_seq'::regclass);
276
277
278--
279-- TOC entry 2771 (class 1259 OID 16774)
280-- Name: uniq_serieUID; Type: INDEX; Schema: public; Owner: postgres
281--
282
283CREATE UNIQUE INDEX "uniq_serieUID" ON public.serie USING btree (tag_0020_000e COLLATE "C.UTF-8" text_pattern_ops);
284
285
286--
287-- TOC entry 2900 (class 0 OID 0)
288-- Dependencies: 7
289-- Name: SCHEMA public; Type: ACL; Schema: -; Owner: postgres
290--
291
292GRANT ALL ON SCHEMA public TO PUBLIC;
293
294
295-- Completed on 2018-09-02 23:22:10 -03
296
297--
298-- PostgreSQL database dump complete
299--