Advertisement
vojtarek

db structure

Sep 8th, 2011
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 29.96 KB | None | 0 0
  1. --
  2. -- PostgreSQL database dump
  3. --
  4.  
  5. SET client_encoding = 'UTF8';
  6. SET standard_conforming_strings = off;
  7. SET check_function_bodies = FALSE;
  8. SET client_min_messages = warning;
  9. SET escape_string_warning = off;
  10.  
  11. --
  12. -- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: meco
  13. --
  14.  
  15. CREATE PROCEDURAL LANGUAGE plpgsql;
  16.  
  17.  
  18. ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO meco;
  19.  
  20. SET search_path = public, pg_catalog;
  21.  
  22. --
  23. -- Name: create_tsvector(character varying, character varying, text); Type: FUNCTION; Schema: public; Owner: meco
  24. --
  25.  
  26. CREATE FUNCTION create_tsvector(LANGUAGE CHARACTER VARYING, title CHARACTER VARYING, text text) RETURNS tsvector
  27.     AS $_$select * FROM to_tsvector(langtolong($1), COALESCE($2, '')||COALESCE($3, '')) LIMIT 1;$_$
  28.     LANGUAGE SQL;
  29.  
  30.  
  31. ALTER FUNCTION public.create_tsvector(LANGUAGE CHARACTER VARYING, title CHARACTER VARYING, text text) OWNER TO meco;
  32.  
  33. --
  34. -- Name: FUNCTION create_tsvector(language character varying, title character varying, text text); Type: COMMENT; Schema: public; Owner: meco
  35. --
  36.  
  37. COMMENT ON FUNCTION create_tsvector(LANGUAGE CHARACTER VARYING, title CHARACTER VARYING, text text) IS 'Example usage:
  38. select * from create_tsvector(''en'', ''I\\''m in Prague'', ''Hello from prague!'')';
  39.  
  40.  
  41. --
  42. -- Name: insert_entity(character varying, integer, character varying, character varying); Type: FUNCTION; Schema: public; Owner: meco
  43. --
  44.  
  45. CREATE FUNCTION insert_entity(par_name CHARACTER VARYING, par_enttype_id INTEGER, par_reference CHARACTER VARYING, par_coordinates CHARACTER VARYING) RETURNS INTEGER
  46.     AS $$DECLARE
  47.   already_id INTEGER;
  48. BEGIN
  49.   -- already in db?
  50.   IF par_coordinates IS NULL THEN
  51.     SELECT id INTO already_id FROM entities WHERE name=par_name AND coordinates IS NULL;
  52.   ELSE
  53.     SELECT id INTO already_id FROM entities WHERE name=par_name AND coordinates=par_coordinates;
  54.   END IF;
  55.  
  56.   IF already_id IS NULL THEN
  57.     -- have to insert it
  58.     INSERT INTO entities (name, enttype_id, reference, normalized_entity, coordinates)
  59.            VALUES (par_name, par_enttype_id, par_reference, LOWER(par_name), par_coordinates)
  60.            RETURNING id INTO already_id;
  61.   END IF;
  62.  
  63.   RETURN already_id;
  64. END$$
  65.     LANGUAGE plpgsql;
  66.  
  67.  
  68. ALTER FUNCTION public.insert_entity(par_name CHARACTER VARYING, par_enttype_id INTEGER, par_reference CHARACTER VARYING, par_coordinates CHARACTER VARYING) OWNER TO meco;
  69.  
  70. --
  71. -- Name: inserting_document_f(); Type: FUNCTION; Schema: public; Owner: meco
  72. --
  73.  
  74. CREATE FUNCTION inserting_document_f() RETURNS TRIGGER
  75.     AS $$BEGIN
  76.     IF NEW.TIMESTAMP IS NULL THEN
  77.         NEW.TIMESTAMP := CURRENT_TIMESTAMP;
  78.     END IF;
  79.     NEW.fts := to_tsvector(langtolong(NEW.LANGUAGE), SUBSTRING(COALESCE(NEW.title, '')||COALESCE(NEW.text, ''), 1, 500000));
  80.     RETURN NEW;
  81. END;$$
  82.     LANGUAGE plpgsql;
  83.  
  84.  
  85. ALTER FUNCTION public.inserting_document_f() OWNER TO meco;
  86.  
  87. --
  88. -- Name: inserting_sources_f(); Type: FUNCTION; Schema: public; Owner: meco
  89. --
  90.  
  91. CREATE FUNCTION inserting_sources_f() RETURNS TRIGGER
  92.     AS $$BEGIN
  93. IF NEW.normalized_section IS NULL THEN
  94.     NEW.normalized_section := LOWER( NEW.SECTION );
  95. END IF;
  96. RETURN NEW;
  97. END;$$
  98.     LANGUAGE plpgsql;
  99.  
  100.  
  101. ALTER FUNCTION public.inserting_sources_f() OWNER TO meco;
  102.  
  103. --
  104. -- Name: langtolong(character varying); Type: FUNCTION; Schema: public; Owner: meco
  105. --
  106.  
  107. CREATE FUNCTION langtolong(CHARACTER VARYING) RETURNS regconfig
  108.     AS $_$SELECT LANGUAGE FROM langs WHERE lang=$1 LIMIT 1;$_$
  109.     LANGUAGE SQL IMMUTABLE;
  110.  
  111.  
  112. ALTER FUNCTION public.langtolong(CHARACTER VARYING) OWNER TO meco;
  113.  
  114. SET default_tablespace = '';
  115.  
  116. SET default_with_oids = FALSE;
  117.  
  118. --
  119. -- Name: authors; Type: TABLE; Schema: public; Owner: meco; Tablespace:
  120. --
  121.  
  122. CREATE TABLE authors (
  123.     id INTEGER NOT NULL,
  124.     guid CHARACTER VARYING(64) NOT NULL,
  125.     name CHARACTER VARYING(511),
  126.     location CHARACTER VARYING(511),
  127.     description CHARACTER VARYING(511),
  128.     occupation CHARACTER VARYING(511)
  129. );
  130.  
  131.  
  132. ALTER TABLE public.authors OWNER TO meco;
  133.  
  134. --
  135. -- Name: documents; Type: TABLE; Schema: public; Owner: meco; Tablespace:
  136. --
  137.  
  138. CREATE TABLE documents (
  139.     id INTEGER NOT NULL,
  140.     LANGUAGE CHARACTER VARYING(2),
  141.     source_id INTEGER,
  142.     author_id INTEGER,
  143.     "timestamp" TIMESTAMP WITHOUT TIME zone,
  144.     guid CHARACTER VARYING(511),
  145.     link CHARACTER VARYING(2047),
  146.     title CHARACTER VARYING(2047),
  147.     text text,
  148.     georss_lat CHARACTER VARYING(31),
  149.     georss_lon CHARACTER VARYING(31),
  150.     html_description text,
  151.     html_keywords text,
  152.     pubdate DATE,
  153.     pubtime TIME WITHOUT TIME zone,
  154.     sentences text,
  155.     termvector text,
  156.     _calaised BOOLEAN DEFAULT FALSE,
  157.     _analyzed BOOLEAN DEFAULT FALSE,
  158.     _relevance INTEGER DEFAULT (-1),
  159.     _stanford BOOLEAN,
  160.     fts tsvector,
  161.     _affected BOOLEAN DEFAULT FALSE,
  162.     georss_name CHARACTER VARYING(255)
  163. );
  164.  
  165.  
  166. ALTER TABLE public.documents OWNER TO meco;
  167.  
  168. --
  169. -- Name: COLUMN documents._calaised; Type: COMMENT; Schema: public; Owner: meco
  170. --
  171.  
  172. COMMENT ON COLUMN documents._calaised IS 'True if document was analyzed by OpenCalais.';
  173.  
  174.  
  175. --
  176. -- Name: COLUMN documents._analyzed; Type: COMMENT; Schema: public; Owner: meco
  177. --
  178.  
  179. COMMENT ON COLUMN documents._analyzed IS 'true if was analyzed by analyzer';
  180.  
  181.  
  182. --
  183. -- Name: COLUMN documents._relevance; Type: COMMENT; Schema: public; Owner: meco
  184. --
  185.  
  186. COMMENT ON COLUMN documents._relevance IS 'the implicit value is -1';
  187.  
  188.  
  189. --
  190. -- Name: COLUMN documents.fts; Type: COMMENT; Schema: public; Owner: meco
  191. --
  192.  
  193. COMMENT ON COLUMN documents.fts IS 'full text search';
  194.  
  195.  
  196. --
  197. -- Name: sources; Type: TABLE; Schema: public; Owner: meco; Tablespace:
  198. --
  199.  
  200. CREATE TABLE sources (
  201.     id INTEGER NOT NULL,
  202.     link CHARACTER VARYING(2047),
  203.     LANGUAGE CHARACTER VARYING(2),
  204.     etag CHARACTER VARYING(63),
  205.     modified CHARACTER VARYING(63),
  206.     SECTION CHARACTER VARYING(200),
  207.     _stahovak BOOLEAN DEFAULT FALSE,
  208.     _follow BOOLEAN DEFAULT FALSE,
  209.     normalized_section CHARACTER VARYING(200)
  210. );
  211.  
  212.  
  213. ALTER TABLE public.sources OWNER TO meco;
  214.  
  215. --
  216. -- Name: COLUMN sources._stahovak; Type: COMMENT; Schema: public; Owner: meco
  217. --
  218.  
  219. COMMENT ON COLUMN sources._stahovak IS 'True if should be downloaded by stahovak';
  220.  
  221.  
  222. --
  223. -- Name: COLUMN sources._follow; Type: COMMENT; Schema: public; Owner: meco
  224. --
  225.  
  226. COMMENT ON COLUMN sources._follow IS 'True if needed follow links of rss.';
  227.  
  228.  
  229. --
  230. -- Name: sources_twitter; Type: VIEW; Schema: public; Owner: meco
  231. --
  232.  
  233. CREATE VIEW sources_twitter AS
  234.     SELECT sources.id, sources.link, sources.LANGUAGE, sources.etag, sources.modified, sources.SECTION, sources._stahovak, sources._follow FROM sources WHERE ((sources.SECTION)::text = ANY ((ARRAY['TWITTER'::CHARACTER VARYING, 'Twitter'::CHARACTER VARYING, 'twitter'::CHARACTER VARYING])::text[]));
  235.  
  236.  
  237. ALTER TABLE public.sources_twitter OWNER TO meco;
  238.  
  239. --
  240. -- Name: VIEW sources_twitter; Type: COMMENT; Schema: public; Owner: meco
  241. --
  242.  
  243. COMMENT ON VIEW sources_twitter IS 'Vybere všechny sources, které náleží twitteru.';
  244.  
  245.  
  246. --
  247. -- Name: Problems; Type: VIEW; Schema: public; Owner: meco
  248. --
  249.  
  250. CREATE VIEW "Problems" AS
  251.     (SELECT COUNT(1) AS COUNT, 'Autori bez dokumentu' AS popis FROM authors WHERE (NOT (EXISTS (SELECT 1 FROM documents WHERE (documents.author_id = authors.id)))) UNION SELECT COUNT(1) AS COUNT, 'Tweety delsi 140 znaku' AS popis FROM documents WHERE ((documents.source_id IN (SELECT sources_twitter.id FROM sources_twitter)) AND (LENGTH(documents.text) > 140))) UNION SELECT COUNT(1) AS COUNT, 'Dokumenty s exotickymi jazyky' AS popis FROM documents WHERE (langtolong(documents.LANGUAGE) IS NULL);
  252.  
  253.  
  254. ALTER TABLE public."Problems" OWNER TO meco;
  255.  
  256. --
  257. -- Name: VIEW "Problems"; Type: COMMENT; Schema: public; Owner: meco
  258. --
  259.  
  260. COMMENT ON VIEW "Problems" IS 'Detekce problému. Velmi pomalé!';
  261.  
  262.  
  263. --
  264. -- Name: StanfordProgress; Type: VIEW; Schema: public; Owner: meco
  265. --
  266.  
  267. CREATE VIEW "StanfordProgress" AS
  268.     SELECT documents.LANGUAGE, 'Stanford successfully', COUNT(*) AS COUNT FROM documents WHERE ((documents._stanford = TRUE) AND (documents.sentences IS NOT NULL)) GROUP BY documents.LANGUAGE UNION SELECT documents.LANGUAGE, 'Analyzed by Stanford', COUNT(*) AS COUNT FROM documents WHERE (documents._stanford = TRUE) GROUP BY documents.LANGUAGE;
  269.  
  270.  
  271. ALTER TABLE public."StanfordProgress" OWNER TO meco;
  272.  
  273. --
  274. -- Name: VIEW "StanfordProgress"; Type: COMMENT; Schema: public; Owner: meco
  275. --
  276.  
  277. COMMENT ON VIEW "StanfordProgress" IS 'Progress of stanford parser.';
  278.  
  279.  
  280. --
  281. -- Name: authors_id_seq; Type: SEQUENCE; Schema: public; Owner: meco
  282. --
  283.  
  284. CREATE SEQUENCE authors_id_seq
  285.     INCREMENT BY 1
  286.     NO MAXVALUE
  287.     NO MINVALUE
  288.     CACHE 1;
  289.  
  290.  
  291. ALTER TABLE public.authors_id_seq OWNER TO meco;
  292.  
  293. --
  294. -- Name: authors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: meco
  295. --
  296.  
  297. ALTER SEQUENCE authors_id_seq OWNED BY authors.id;
  298.  
  299.  
  300. --
  301. -- Name: entities; Type: TABLE; Schema: public; Owner: meco; Tablespace:
  302. --
  303.  
  304. CREATE TABLE entities (
  305.     id INTEGER NOT NULL,
  306.     name CHARACTER VARYING(255),
  307.     enttype_id INTEGER,
  308.     reference CHARACTER VARYING(255),
  309.     normalized_entity CHARACTER VARYING(255),
  310.     coordinates CHARACTER VARYING(24)
  311. );
  312.  
  313.  
  314. ALTER TABLE public.entities OWNER TO meco;
  315.  
  316. --
  317. -- Name: enttypes; Type: TABLE; Schema: public; Owner: meco; Tablespace:
  318. --
  319.  
  320. CREATE TABLE enttypes (
  321.     id INTEGER NOT NULL,
  322.     TYPE CHARACTER VARYING(255),
  323.     reference CHARACTER VARYING(255),
  324.     parent CHARACTER VARYING(255)
  325. );
  326.  
  327.  
  328. ALTER TABLE public.enttypes OWNER TO meco;
  329.  
  330. --
  331. -- Name: instances; Type: TABLE; Schema: public; Owner: meco; Tablespace:
  332. --
  333.  
  334. CREATE TABLE instances (
  335.     id INTEGER NOT NULL,
  336.     entity_id INTEGER,
  337.     item_id INTEGER,
  338.     exact CHARACTER VARYING(255),
  339.     offset_ INTEGER,
  340.     LENGTH INTEGER,
  341.     sid INTEGER,
  342.     begintoken INTEGER,
  343.     endtoken INTEGER
  344. );
  345.  
  346.  
  347. ALTER TABLE public.instances OWNER TO meco;
  348.  
  349. --
  350. -- Name: de_twitter_location; Type: VIEW; Schema: public; Owner: meco
  351. --
  352.  
  353. CREATE VIEW de_twitter_location AS
  354.     SELECT DISTINCT d.id, d.text, e.name AS entity, et.TYPE AS entity_type FROM (((documents d JOIN instances i ON ((i.item_id = d.id))) JOIN entities e ON ((i.entity_id = e.id))) JOIN enttypes et ON ((e.enttype_id = et.id))) WHERE (((((d.LANGUAGE)::text = 'de'::text) AND (d._calaised = TRUE)) AND (d.source_id IN (SELECT sources_twitter.id FROM sources_twitter))) AND (et.id = ANY (ARRAY[7, 10, 11, 14, 17, 18, 49]))) ORDER BY d.id, d.text, e.name, et.TYPE;
  355.  
  356.  
  357. ALTER TABLE public.de_twitter_location OWNER TO meco;
  358.  
  359. --
  360. -- Name: VIEW de_twitter_location; Type: COMMENT; Schema: public; Owner: meco
  361. --
  362.  
  363. COMMENT ON VIEW de_twitter_location IS 'vyber všechny německé tweety a k nim entity s takovým typem, že se jedná nějakým způsobem o lokaci';
  364.  
  365.  
  366. --
  367. -- Name: de_twitter_location_with_MedicalCondition; Type: VIEW; Schema: public; Owner: meco
  368. --
  369.  
  370. CREATE VIEW "de_twitter_location_with_MedicalCondition" AS
  371.     SELECT DISTINCT d.id, d.text AS tweet, e.name AS entity, et.TYPE AS entity_type FROM (((documents d JOIN instances i ON ((i.item_id = d.id))) JOIN entities e ON ((i.entity_id = e.id))) JOIN enttypes et ON ((e.enttype_id = et.id))) WHERE ((((((d.LANGUAGE)::text = 'de'::text) AND (d._calaised = TRUE)) AND (d.source_id IN (SELECT sources_twitter.id FROM sources_twitter))) AND (et.id = ANY (ARRAY[7, 10, 11, 14, 17, 18, 49]))) AND (EXISTS (SELECT dd.id, dd.LANGUAGE, dd.source_id, dd.author_id, dd."timestamp", dd.guid, dd.link, dd.title, dd.text, dd.georss_lat, dd.georss_lon, dd.html_description, dd.html_keywords, dd.pubdate, dd.pubtime, dd.sentences, dd.termvector, dd._calaised, dd._analyzed, dd._relevance, dd._stanford, ii.id, ii.entity_id, ii.item_id, ii.exact, ii.offset_, ii.LENGTH, ii.sid, ii.begintoken, ii.endtoken, ee.id, ee.name, ee.enttype_id, ee.reference, ee.normalized_entity, eet.id, eet.TYPE, eet.reference FROM (((documents dd JOIN instances ii ON ((ii.item_id = dd.id))) JOIN entities ee ON ((ii.entity_id = ee.id))) JOIN enttypes eet ON ((ee.enttype_id = eet.id))) WHERE ((dd.id = d.id) AND (eet.id = 13))))) ORDER BY d.id, d.text, e.name, et.TYPE;
  372.  
  373.  
  374. ALTER TABLE public."de_twitter_location_with_MedicalCondition" OWNER TO meco;
  375.  
  376. --
  377. -- Name: VIEW "de_twitter_location_with_MedicalCondition"; Type: COMMENT; Schema: public; Owner: meco
  378. --
  379.  
  380. COMMENT ON VIEW "de_twitter_location_with_MedicalCondition" IS 'Vyber všechny německé tweety s nějakou tou entitou typu různých Location. Další podmínka je výskyt entity typu 13 MedicalCondition, což znamená, že tweet je "relevantnější".';
  381.  
  382.  
  383. --
  384. -- Name: de_twitter_no_location; Type: VIEW; Schema: public; Owner: meco
  385. --
  386.  
  387. CREATE VIEW de_twitter_no_location AS
  388.     SELECT d.id, d.text FROM documents d WHERE (((NOT (d.id IN (SELECT de_twitter_location.id FROM de_twitter_location))) AND ((d.LANGUAGE)::text = 'de'::text)) AND (d.source_id IN (SELECT sources_twitter.id FROM sources_twitter))) ORDER BY d.id;
  389.  
  390.  
  391. ALTER TABLE public.de_twitter_no_location OWNER TO meco;
  392.  
  393. --
  394. -- Name: VIEW de_twitter_no_location; Type: COMMENT; Schema: public; Owner: meco
  395. --
  396.  
  397. COMMENT ON VIEW de_twitter_no_location IS 'Zeptá se de_twitter_location na twíty s lokací a vybere všechny ostatní (tj. twíty německé bez lokace)';
  398.  
  399.  
  400. --
  401. -- Name: diseases; Type: TABLE; Schema: public; Owner: meco; Tablespace:
  402. --
  403.  
  404. CREATE TABLE diseases (
  405.     id INTEGER NOT NULL,
  406.     disease_id INTEGER,
  407.     disease CHARACTER VARYING(255),
  408.     LANGUAGE CHARACTER VARYING(2),
  409.     _new BOOLEAN DEFAULT TRUE
  410. );
  411.  
  412.  
  413. ALTER TABLE public.diseases OWNER TO meco;
  414.  
  415. --
  416. -- Name: diseases_id_seq; Type: SEQUENCE; Schema: public; Owner: meco
  417. --
  418.  
  419. CREATE SEQUENCE diseases_id_seq
  420.     INCREMENT BY 1
  421.     NO MAXVALUE
  422.     NO MINVALUE
  423.     CACHE 1;
  424.  
  425.  
  426. ALTER TABLE public.diseases_id_seq OWNER TO meco;
  427.  
  428. --
  429. -- Name: diseases_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: meco
  430. --
  431.  
  432. ALTER SEQUENCE diseases_id_seq OWNED BY diseases.id;
  433.  
  434.  
  435. --
  436. -- Name: documents_id_seq; Type: SEQUENCE; Schema: public; Owner: meco
  437. --
  438.  
  439. CREATE SEQUENCE documents_id_seq
  440.     INCREMENT BY 1
  441.     NO MAXVALUE
  442.     NO MINVALUE
  443.     CACHE 1;
  444.  
  445.  
  446. ALTER TABLE public.documents_id_seq OWNER TO meco;
  447.  
  448. --
  449. -- Name: documents_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: meco
  450. --
  451.  
  452. ALTER SEQUENCE documents_id_seq OWNED BY documents.id;
  453.  
  454.  
  455. --
  456. -- Name: downloadurl; Type: TABLE; Schema: public; Owner: meco; Tablespace:
  457. --
  458.  
  459. CREATE TABLE downloadurl (
  460.     entity_id INTEGER NOT NULL,
  461.     document_id INTEGER
  462. );
  463.  
  464.  
  465. ALTER TABLE public.downloadurl OWNER TO meco;
  466.  
  467. --
  468. -- Name: TABLE downloadurl; Type: COMMENT; Schema: public; Owner: meco
  469. --
  470.  
  471. COMMENT ON TABLE downloadurl IS 'Download url entities';
  472.  
  473.  
  474. --
  475. -- Name: downloadurl_document_id_seq; Type: SEQUENCE; Schema: public; Owner: meco
  476. --
  477.  
  478. CREATE SEQUENCE downloadurl_document_id_seq
  479.     INCREMENT BY 1
  480.     NO MAXVALUE
  481.     NO MINVALUE
  482.     CACHE 1;
  483.  
  484.  
  485. ALTER TABLE public.downloadurl_document_id_seq OWNER TO meco;
  486.  
  487. --
  488. -- Name: downloadurl_document_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: meco
  489. --
  490.  
  491. ALTER SEQUENCE downloadurl_document_id_seq OWNED BY downloadurl.document_id;
  492.  
  493.  
  494. --
  495. -- Name: downloadurl_entity_id_seq; Type: SEQUENCE; Schema: public; Owner: meco
  496. --
  497.  
  498. CREATE SEQUENCE downloadurl_entity_id_seq
  499.     START WITH 1
  500.     INCREMENT BY 1
  501.     NO MAXVALUE
  502.     NO MINVALUE
  503.     CACHE 1;
  504.  
  505.  
  506. ALTER TABLE public.downloadurl_entity_id_seq OWNER TO meco;
  507.  
  508. --
  509. -- Name: downloadurl_entity_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: meco
  510. --
  511.  
  512. ALTER SEQUENCE downloadurl_entity_id_seq OWNED BY downloadurl.entity_id;
  513.  
  514.  
  515. --
  516. -- Name: entities_id_seq; Type: SEQUENCE; Schema: public; Owner: meco
  517. --
  518.  
  519. CREATE SEQUENCE entities_id_seq
  520.     INCREMENT BY 1
  521.     NO MAXVALUE
  522.     NO MINVALUE
  523.     CACHE 1;
  524.  
  525.  
  526. ALTER TABLE public.entities_id_seq OWNER TO meco;
  527.  
  528. --
  529. -- Name: entities_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: meco
  530. --
  531.  
  532. ALTER SEQUENCE entities_id_seq OWNED BY entities.id;
  533.  
  534.  
  535. --
  536. -- Name: enttypes_id_seq; Type: SEQUENCE; Schema: public; Owner: meco
  537. --
  538.  
  539. CREATE SEQUENCE enttypes_id_seq
  540.     INCREMENT BY 1
  541.     NO MAXVALUE
  542.     NO MINVALUE
  543.     CACHE 1;
  544.  
  545.  
  546. ALTER TABLE public.enttypes_id_seq OWNER TO meco;
  547.  
  548. --
  549. -- Name: enttypes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: meco
  550. --
  551.  
  552. ALTER SEQUENCE enttypes_id_seq OWNED BY enttypes.id;
  553.  
  554.  
  555. --
  556. -- Name: instances_id_seq; Type: SEQUENCE; Schema: public; Owner: meco
  557. --
  558.  
  559. CREATE SEQUENCE instances_id_seq
  560.     INCREMENT BY 1
  561.     NO MAXVALUE
  562.     NO MINVALUE
  563.     CACHE 1;
  564.  
  565.  
  566. ALTER TABLE public.instances_id_seq OWNER TO meco;
  567.  
  568. --
  569. -- Name: instances_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: meco
  570. --
  571.  
  572. ALTER SEQUENCE instances_id_seq OWNED BY instances.id;
  573.  
  574.  
  575. --
  576. -- Name: langs; Type: TABLE; Schema: public; Owner: meco; Tablespace:
  577. --
  578.  
  579. CREATE TABLE langs (
  580.     lang CHARACTER VARYING(12) NOT NULL,
  581.     LANGUAGE regconfig
  582. );
  583.  
  584.  
  585. ALTER TABLE public.langs OWNER TO meco;
  586.  
  587. --
  588. -- Name: TABLE langs; Type: COMMENT; Schema: public; Owner: meco
  589. --
  590.  
  591. COMMENT ON TABLE langs IS 'Stahovane jazyky. Ktere zde nejsou, budou zahozeny. K jazykove zkratce je nutno pripojit i spravny "regconfig" -- plny nazev pro FULL TEXT SEARCH.';
  592.  
  593.  
  594. --
  595. -- Name: prefered_sources; Type: VIEW; Schema: public; Owner: meco
  596. --
  597.  
  598. CREATE VIEW prefered_sources AS
  599.     SELECT sources.id, sources.link, sources.LANGUAGE, sources.etag, sources.modified, sources.SECTION, sources._stahovak, sources._follow, sources.normalized_section FROM sources WHERE ((((sources.SECTION)::text = 'Medisys'::text) OR ((sources.SECTION)::text = 'medworm'::text)) OR (sources.id = 8793));
  600.  
  601.  
  602. ALTER TABLE public.prefered_sources OWNER TO meco;
  603.  
  604. --
  605. -- Name: pubtypes_sources; Type: TABLE; Schema: public; Owner: meco; Tablespace:
  606. --
  607.  
  608. CREATE TABLE pubtypes_sources (
  609.     source_id INTEGER,
  610.     pubtype CHARACTER VARYING(32)
  611. );
  612.  
  613.  
  614. ALTER TABLE public.pubtypes_sources OWNER TO meco;
  615.  
  616. --
  617. -- Name: sources_id_seq; Type: SEQUENCE; Schema: public; Owner: meco
  618. --
  619.  
  620. CREATE SEQUENCE sources_id_seq
  621.     INCREMENT BY 1
  622.     NO MAXVALUE
  623.     NO MINVALUE
  624.     CACHE 1;
  625.  
  626.  
  627. ALTER TABLE public.sources_id_seq OWNER TO meco;
  628.  
  629. --
  630. -- Name: sources_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: meco
  631. --
  632.  
  633. ALTER SEQUENCE sources_id_seq OWNED BY sources.id;
  634.  
  635.  
  636. --
  637. -- Name: stat_count_doc_alchemized; Type: VIEW; Schema: public; Owner: meco
  638. --
  639.  
  640. CREATE VIEW stat_count_doc_alchemized AS
  641.     SELECT COUNT(*) AS COUNT FROM documents WHERE (((documents.LANGUAGE)::text = 'de'::text) AND (documents._calaised = TRUE));
  642.  
  643.  
  644. ALTER TABLE public.stat_count_doc_alchemized OWNER TO meco;
  645.  
  646. --
  647. -- Name: VIEW stat_count_doc_alchemized; Type: COMMENT; Schema: public; Owner: meco
  648. --
  649.  
  650. COMMENT ON VIEW stat_count_doc_alchemized IS 'Počet dokumentů anotovaných AlchemyAPI.';
  651.  
  652.  
  653. --
  654. -- Name: stat_count_doc_analyzed; Type: VIEW; Schema: public; Owner: meco
  655. --
  656.  
  657. CREATE VIEW stat_count_doc_analyzed AS
  658.     SELECT COUNT(*) AS COUNT FROM documents WHERE (documents._analyzed = TRUE);
  659.  
  660.  
  661. ALTER TABLE public.stat_count_doc_analyzed OWNER TO meco;
  662.  
  663. --
  664. -- Name: VIEW stat_count_doc_analyzed; Type: COMMENT; Schema: public; Owner: meco
  665. --
  666.  
  667. COMMENT ON VIEW stat_count_doc_analyzed IS 'Počet analyzovaných dokumentů.';
  668.  
  669.  
  670. --
  671. -- Name: stat_count_doc_per_source; Type: VIEW; Schema: public; Owner: meco
  672. --
  673.  
  674. CREATE VIEW stat_count_doc_per_source AS
  675.     SELECT COUNT(1) AS pocet, sources.SECTION FROM documents, sources WHERE (documents.source_id = sources.id) GROUP BY sources.SECTION ORDER BY COUNT(1);
  676.  
  677.  
  678. ALTER TABLE public.stat_count_doc_per_source OWNER TO meco;
  679.  
  680. --
  681. -- Name: VIEW stat_count_doc_per_source; Type: COMMENT; Schema: public; Owner: meco
  682. --
  683.  
  684. COMMENT ON VIEW stat_count_doc_per_source IS 'pocet dokumentů z každého fóra';
  685.  
  686.  
  687. --
  688. -- Name: stat_count_doc_stanford; Type: VIEW; Schema: public; Owner: meco
  689. --
  690.  
  691. CREATE VIEW stat_count_doc_stanford AS
  692.     SELECT COUNT(*) AS COUNT FROM documents WHERE (documents._stanford = TRUE);
  693.  
  694.  
  695. ALTER TABLE public.stat_count_doc_stanford OWNER TO meco;
  696.  
  697. --
  698. -- Name: symptoms; Type: TABLE; Schema: public; Owner: meco; Tablespace:
  699. --
  700.  
  701. CREATE TABLE symptoms (
  702.     id INTEGER NOT NULL,
  703.     symptom CHARACTER VARYING(255),
  704.     LANGUAGE CHARACTER VARYING(2),
  705.     _new BOOLEAN DEFAULT TRUE
  706. );
  707.  
  708.  
  709. ALTER TABLE public.symptoms OWNER TO meco;
  710.  
  711. --
  712. -- Name: symptoms_id_seq; Type: SEQUENCE; Schema: public; Owner: meco
  713. --
  714.  
  715. CREATE SEQUENCE symptoms_id_seq
  716.     INCREMENT BY 1
  717.     NO MAXVALUE
  718.     NO MINVALUE
  719.     CACHE 1;
  720.  
  721.  
  722. ALTER TABLE public.symptoms_id_seq OWNER TO meco;
  723.  
  724. --
  725. -- Name: symptoms_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: meco
  726. --
  727.  
  728. ALTER SEQUENCE symptoms_id_seq OWNED BY symptoms.id;
  729.  
  730.  
  731. --
  732. -- Name: terms; Type: TABLE; Schema: public; Owner: meco; Tablespace:
  733. --
  734.  
  735. CREATE TABLE terms (
  736.     term CHARACTER VARYING(255) NOT NULL,
  737.     id INTEGER NOT NULL
  738. );
  739.  
  740.  
  741. ALTER TABLE public.terms OWNER TO meco;
  742.  
  743. --
  744. -- Name: term_form_seq; Type: SEQUENCE; Schema: public; Owner: meco
  745. --
  746.  
  747. CREATE SEQUENCE term_form_seq
  748.     START WITH 1
  749.     INCREMENT BY 1
  750.     NO MAXVALUE
  751.     NO MINVALUE
  752.     CACHE 1;
  753.  
  754.  
  755. ALTER TABLE public.term_form_seq OWNER TO meco;
  756.  
  757. --
  758. -- Name: term_form_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: meco
  759. --
  760.  
  761. ALTER SEQUENCE term_form_seq OWNED BY terms.term;
  762.  
  763.  
  764. --
  765. -- Name: term_number_seq; Type: SEQUENCE; Schema: public; Owner: meco
  766. --
  767.  
  768. CREATE SEQUENCE term_number_seq
  769.     INCREMENT BY 1
  770.     NO MAXVALUE
  771.     NO MINVALUE
  772.     CACHE 1;
  773.  
  774.  
  775. ALTER TABLE public.term_number_seq OWNER TO meco;
  776.  
  777. --
  778. -- Name: term_number_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: meco
  779. --
  780.  
  781. ALTER SEQUENCE term_number_seq OWNED BY terms.id;
  782.  
  783.  
  784. --
  785. -- Name: id; Type: DEFAULT; Schema: public; Owner: meco
  786. --
  787.  
  788. ALTER TABLE authors ALTER COLUMN id SET DEFAULT NEXTVAL('authors_id_seq'::regclass);
  789.  
  790.  
  791. --
  792. -- Name: id; Type: DEFAULT; Schema: public; Owner: meco
  793. --
  794.  
  795. ALTER TABLE diseases ALTER COLUMN id SET DEFAULT NEXTVAL('diseases_id_seq'::regclass);
  796.  
  797.  
  798. --
  799. -- Name: id; Type: DEFAULT; Schema: public; Owner: meco
  800. --
  801.  
  802. ALTER TABLE documents ALTER COLUMN id SET DEFAULT NEXTVAL('documents_id_seq'::regclass);
  803.  
  804.  
  805. --
  806. -- Name: entity_id; Type: DEFAULT; Schema: public; Owner: meco
  807. --
  808.  
  809. ALTER TABLE downloadurl ALTER COLUMN entity_id SET DEFAULT NEXTVAL('downloadurl_entity_id_seq'::regclass);
  810.  
  811.  
  812. --
  813. -- Name: document_id; Type: DEFAULT; Schema: public; Owner: meco
  814. --
  815.  
  816. ALTER TABLE downloadurl ALTER COLUMN document_id SET DEFAULT NEXTVAL('downloadurl_document_id_seq'::regclass);
  817.  
  818.  
  819. --
  820. -- Name: id; Type: DEFAULT; Schema: public; Owner: meco
  821. --
  822.  
  823. ALTER TABLE entities ALTER COLUMN id SET DEFAULT NEXTVAL('entities_id_seq'::regclass);
  824.  
  825.  
  826. --
  827. -- Name: id; Type: DEFAULT; Schema: public; Owner: meco
  828. --
  829.  
  830. ALTER TABLE enttypes ALTER COLUMN id SET DEFAULT NEXTVAL('enttypes_id_seq'::regclass);
  831.  
  832.  
  833. --
  834. -- Name: id; Type: DEFAULT; Schema: public; Owner: meco
  835. --
  836.  
  837. ALTER TABLE instances ALTER COLUMN id SET DEFAULT NEXTVAL('instances_id_seq'::regclass);
  838.  
  839.  
  840. --
  841. -- Name: id; Type: DEFAULT; Schema: public; Owner: meco
  842. --
  843.  
  844. ALTER TABLE sources ALTER COLUMN id SET DEFAULT NEXTVAL('sources_id_seq'::regclass);
  845.  
  846.  
  847. --
  848. -- Name: id; Type: DEFAULT; Schema: public; Owner: meco
  849. --
  850.  
  851. ALTER TABLE symptoms ALTER COLUMN id SET DEFAULT NEXTVAL('symptoms_id_seq'::regclass);
  852.  
  853.  
  854. --
  855. -- Name: id; Type: DEFAULT; Schema: public; Owner: meco
  856. --
  857.  
  858. ALTER TABLE terms ALTER COLUMN id SET DEFAULT NEXTVAL('term_number_seq'::regclass);
  859.  
  860.  
  861. --
  862. -- Name: authors_guid_key; Type: CONSTRAINT; Schema: public; Owner: meco; Tablespace:
  863. --
  864.  
  865. ALTER TABLE ONLY authors
  866.     ADD CONSTRAINT authors_guid_key UNIQUE (guid);
  867.  
  868.  
  869. --
  870. -- Name: authors_pkey; Type: CONSTRAINT; Schema: public; Owner: meco; Tablespace:
  871. --
  872.  
  873. ALTER TABLE ONLY authors
  874.     ADD CONSTRAINT authors_pkey PRIMARY KEY (id);
  875.  
  876.  
  877. --
  878. -- Name: diseases_disease_key; Type: CONSTRAINT; Schema: public; Owner: meco; Tablespace:
  879. --
  880.  
  881. ALTER TABLE ONLY diseases
  882.     ADD CONSTRAINT diseases_disease_key UNIQUE (disease);
  883.  
  884.  
  885. --
  886. -- Name: diseases_pkey; Type: CONSTRAINT; Schema: public; Owner: meco; Tablespace:
  887. --
  888.  
  889. ALTER TABLE ONLY diseases
  890.     ADD CONSTRAINT diseases_pkey PRIMARY KEY (id);
  891.  
  892.  
  893. --
  894. -- Name: documents_guid_key; Type: CONSTRAINT; Schema: public; Owner: meco; Tablespace:
  895. --
  896.  
  897. ALTER TABLE ONLY documents
  898.     ADD CONSTRAINT documents_guid_key UNIQUE (guid);
  899.  
  900.  
  901. --
  902. -- Name: documents_pkey; Type: CONSTRAINT; Schema: public; Owner: meco; Tablespace:
  903. --
  904.  
  905. ALTER TABLE ONLY documents
  906.     ADD CONSTRAINT documents_pkey PRIMARY KEY (id);
  907.  
  908.  
  909. --
  910. -- Name: entities_pkey; Type: CONSTRAINT; Schema: public; Owner: meco; Tablespace:
  911. --
  912.  
  913. ALTER TABLE ONLY entities
  914.     ADD CONSTRAINT entities_pkey PRIMARY KEY (id);
  915.  
  916.  
  917. --
  918. -- Name: enttypes_pkey; Type: CONSTRAINT; Schema: public; Owner: meco; Tablespace:
  919. --
  920.  
  921. ALTER TABLE ONLY enttypes
  922.     ADD CONSTRAINT enttypes_pkey PRIMARY KEY (id);
  923.  
  924.  
  925. --
  926. -- Name: enttypes_type_key; Type: CONSTRAINT; Schema: public; Owner: meco; Tablespace:
  927. --
  928.  
  929. ALTER TABLE ONLY enttypes
  930.     ADD CONSTRAINT enttypes_type_key UNIQUE (TYPE);
  931.  
  932.  
  933. --
  934. -- Name: instances_pkey; Type: CONSTRAINT; Schema: public; Owner: meco; Tablespace:
  935. --
  936.  
  937. ALTER TABLE ONLY instances
  938.     ADD CONSTRAINT instances_pkey PRIMARY KEY (id);
  939.  
  940.  
  941. --
  942. -- Name: langs_pkey; Type: CONSTRAINT; Schema: public; Owner: meco; Tablespace:
  943. --
  944.  
  945. ALTER TABLE ONLY langs
  946.     ADD CONSTRAINT langs_pkey PRIMARY KEY (lang);
  947.  
  948.  
  949. --
  950. -- Name: name_coords_uniq; Type: CONSTRAINT; Schema: public; Owner: meco; Tablespace:
  951. --
  952.  
  953. ALTER TABLE ONLY entities
  954.     ADD CONSTRAINT name_coords_uniq UNIQUE (name, coordinates);
  955.  
  956.  
  957. --
  958. -- Name: sources_link_key; Type: CONSTRAINT; Schema: public; Owner: meco; Tablespace:
  959. --
  960.  
  961. ALTER TABLE ONLY sources
  962.     ADD CONSTRAINT sources_link_key UNIQUE (link);
  963.  
  964.  
  965. --
  966. -- Name: sources_pkey; Type: CONSTRAINT; Schema: public; Owner: meco; Tablespace:
  967. --
  968.  
  969. ALTER TABLE ONLY sources
  970.     ADD CONSTRAINT sources_pkey PRIMARY KEY (id);
  971.  
  972.  
  973. --
  974. -- Name: symptoms_pkey; Type: CONSTRAINT; Schema: public; Owner: meco; Tablespace:
  975. --
  976.  
  977. ALTER TABLE ONLY symptoms
  978.     ADD CONSTRAINT symptoms_pkey PRIMARY KEY (id);
  979.  
  980.  
  981. --
  982. -- Name: terms_pkey; Type: CONSTRAINT; Schema: public; Owner: meco; Tablespace:
  983. --
  984.  
  985. ALTER TABLE ONLY terms
  986.     ADD CONSTRAINT terms_pkey PRIMARY KEY (id);
  987.  
  988.  
  989. --
  990. -- Name: terms_term_key; Type: CONSTRAINT; Schema: public; Owner: meco; Tablespace:
  991. --
  992.  
  993. ALTER TABLE ONLY terms
  994.     ADD CONSTRAINT terms_term_key UNIQUE (term);
  995.  
  996.  
  997. --
  998. -- Name: uniq_symptom; Type: CONSTRAINT; Schema: public; Owner: meco; Tablespace:
  999. --
  1000.  
  1001. ALTER TABLE ONLY symptoms
  1002.     ADD CONSTRAINT uniq_symptom UNIQUE (symptom);
  1003.  
  1004.  
  1005. --
  1006. -- Name: author_id_index; Type: INDEX; Schema: public; Owner: meco; Tablespace:
  1007. --
  1008.  
  1009. CREATE INDEX author_id_index ON documents USING btree (author_id);
  1010.  
  1011.  
  1012. --
  1013. -- Name: documents_analyzed; Type: INDEX; Schema: public; Owner: meco; Tablespace:
  1014. --
  1015.  
  1016. CREATE INDEX documents_analyzed ON documents USING btree (_stanford, _calaised, _analyzed);
  1017.  
  1018.  
  1019. --
  1020. -- Name: documents_fts_index; Type: INDEX; Schema: public; Owner: meco; Tablespace:
  1021. --
  1022.  
  1023. CREATE INDEX documents_fts_index ON documents USING gin (fts);
  1024.  
  1025.  
  1026. --
  1027. -- Name: documents_language; Type: INDEX; Schema: public; Owner: meco; Tablespace:
  1028. --
  1029.  
  1030. CREATE INDEX documents_language ON documents USING btree (LANGUAGE);
  1031.  
  1032.  
  1033. --
  1034. -- Name: documents_pubdate; Type: INDEX; Schema: public; Owner: meco; Tablespace:
  1035. --
  1036.  
  1037. CREATE INDEX documents_pubdate ON documents USING btree (pubdate, pubtime);
  1038.  
  1039.  
  1040. --
  1041. -- Name: documents_relevance; Type: INDEX; Schema: public; Owner: meco; Tablespace:
  1042. --
  1043.  
  1044. CREATE INDEX documents_relevance ON documents USING btree (_relevance);
  1045.  
  1046.  
  1047. --
  1048. -- Name: entities_enttype_id; Type: INDEX; Schema: public; Owner: meco; Tablespace:
  1049. --
  1050.  
  1051. CREATE INDEX entities_enttype_id ON entities USING btree (enttype_id);
  1052.  
  1053.  
  1054. --
  1055. -- Name: entities_normalized_entity; Type: INDEX; Schema: public; Owner: meco; Tablespace:
  1056. --
  1057.  
  1058. CREATE INDEX entities_normalized_entity ON entities USING hash (normalized_entity);
  1059.  
  1060.  
  1061. --
  1062. -- Name: entity_index; Type: INDEX; Schema: public; Owner: meco; Tablespace:
  1063. --
  1064.  
  1065. CREATE UNIQUE INDEX entity_index ON downloadurl USING btree (entity_id);
  1066.  
  1067.  
  1068. --
  1069. -- Name: instances_entity_id; Type: INDEX; Schema: public; Owner: meco; Tablespace:
  1070. --
  1071.  
  1072. CREATE INDEX instances_entity_id ON instances USING btree (entity_id);
  1073.  
  1074.  
  1075. --
  1076. -- Name: instances_item_id; Type: INDEX; Schema: public; Owner: meco; Tablespace:
  1077. --
  1078.  
  1079. CREATE INDEX instances_item_id ON instances USING btree (item_id);
  1080.  
  1081.  
  1082. --
  1083. -- Name: inserting_document_trigger; Type: TRIGGER; Schema: public; Owner: meco
  1084. --
  1085.  
  1086. CREATE TRIGGER inserting_document_trigger
  1087.     BEFORE INSERT ON documents
  1088.     FOR EACH ROW
  1089.     EXECUTE PROCEDURE inserting_document_f();
  1090.  
  1091.  
  1092. --
  1093. -- Name: inserting_trigger; Type: TRIGGER; Schema: public; Owner: meco
  1094. --
  1095.  
  1096. CREATE TRIGGER inserting_trigger
  1097.     BEFORE INSERT ON sources
  1098.     FOR EACH ROW
  1099.     EXECUTE PROCEDURE inserting_sources_f();
  1100.  
  1101.  
  1102. --
  1103. -- Name: authors_fk; Type: FK CONSTRAINT; Schema: public; Owner: meco
  1104. --
  1105.  
  1106. ALTER TABLE ONLY documents
  1107.     ADD CONSTRAINT authors_fk FOREIGN KEY (author_id) REFERENCES authors(id) ON UPDATE SET NULL ON DELETE SET NULL;
  1108.  
  1109.  
  1110. --
  1111. -- Name: doc_fk; Type: FK CONSTRAINT; Schema: public; Owner: meco
  1112. --
  1113.  
  1114. ALTER TABLE ONLY downloadurl
  1115.     ADD CONSTRAINT doc_fk FOREIGN KEY (document_id) REFERENCES documents(id) ON UPDATE CASCADE ON DELETE CASCADE;
  1116.  
  1117.  
  1118. --
  1119. -- Name: entity_fk; Type: FK CONSTRAINT; Schema: public; Owner: meco
  1120. --
  1121.  
  1122. ALTER TABLE ONLY downloadurl
  1123.     ADD CONSTRAINT entity_fk FOREIGN KEY (entity_id) REFERENCES entities(id) ON UPDATE CASCADE ON DELETE CASCADE;
  1124.  
  1125.  
  1126. --
  1127. -- Name: fk_entities_enttypes; Type: FK CONSTRAINT; Schema: public; Owner: meco
  1128. --
  1129.  
  1130. ALTER TABLE ONLY entities
  1131.     ADD CONSTRAINT fk_entities_enttypes FOREIGN KEY (enttype_id) REFERENCES enttypes(id);
  1132.  
  1133.  
  1134. --
  1135. -- Name: fk_instances_documents; Type: FK CONSTRAINT; Schema: public; Owner: meco
  1136. --
  1137.  
  1138. ALTER TABLE ONLY instances
  1139.     ADD CONSTRAINT fk_instances_documents FOREIGN KEY (item_id) REFERENCES documents(id) ON UPDATE CASCADE ON DELETE CASCADE;
  1140.  
  1141.  
  1142. --
  1143. -- Name: fk_instances_entities; Type: FK CONSTRAINT; Schema: public; Owner: meco
  1144. --
  1145.  
  1146. ALTER TABLE ONLY instances
  1147.     ADD CONSTRAINT fk_instances_entities FOREIGN KEY (entity_id) REFERENCES entities(id) ON UPDATE CASCADE ON DELETE CASCADE;
  1148.  
  1149.  
  1150. --
  1151. -- Name: fk_pubtypes_sources_sources; Type: FK CONSTRAINT; Schema: public; Owner: meco
  1152. --
  1153.  
  1154. ALTER TABLE ONLY pubtypes_sources
  1155.     ADD CONSTRAINT fk_pubtypes_sources_sources FOREIGN KEY (source_id) REFERENCES sources(id);
  1156.  
  1157.  
  1158. --
  1159. -- Name: source_fk; Type: FK CONSTRAINT; Schema: public; Owner: meco
  1160. --
  1161.  
  1162. ALTER TABLE ONLY documents
  1163.     ADD CONSTRAINT source_fk FOREIGN KEY (source_id) REFERENCES sources(id) ON UPDATE CASCADE ON DELETE SET NULL;
  1164.  
  1165.  
  1166. --
  1167. -- Name: public; Type: ACL; Schema: -; Owner: ischmidt
  1168. --
  1169.  
  1170. REVOKE ALL ON SCHEMA public FROM PUBLIC;
  1171. REVOKE ALL ON SCHEMA public FROM ischmidt;
  1172. GRANT ALL ON SCHEMA public TO ischmidt;
  1173. GRANT ALL ON SCHEMA public TO PUBLIC;
  1174.  
  1175.  
  1176. --
  1177. -- Name: inserting_document_f(); Type: ACL; Schema: public; Owner: meco
  1178. --
  1179.  
  1180. REVOKE ALL ON FUNCTION inserting_document_f() FROM PUBLIC;
  1181. REVOKE ALL ON FUNCTION inserting_document_f() FROM meco;
  1182. GRANT ALL ON FUNCTION inserting_document_f() TO meco;
  1183. GRANT ALL ON FUNCTION inserting_document_f() TO PUBLIC;
  1184.  
  1185.  
  1186. --
  1187. -- PostgreSQL database dump complete
  1188. --
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement