sql/schéma.sql
author František Kučera <franta-hg@frantovo.cz>
Mon, 10 Mar 2014 12:21:02 +0100
changeset 27 60cfdaa89b3a
parent 24 571d9fd2d336
permissions -rw-r--r--
hgignore
franta-hg@0
     1
--
franta-hg@0
     2
-- PostgreSQL database dump
franta-hg@0
     3
--
franta-hg@0
     4
franta-hg@24
     5
-- Started on 2011-12-03 17:50:08 CET
franta-hg@0
     6
franta-hg@24
     7
SET statement_timeout = 0;
franta-hg@0
     8
SET client_encoding = 'UTF8';
franta-hg@0
     9
SET standard_conforming_strings = off;
franta-hg@0
    10
SET check_function_bodies = false;
franta-hg@0
    11
SET client_min_messages = warning;
franta-hg@0
    12
SET escape_string_warning = off;
franta-hg@0
    13
franta-hg@0
    14
--
franta-hg@24
    15
-- TOC entry 7 (class 2615 OID 16397)
franta-hg@24
    16
-- Name: posta; Type: SCHEMA; Schema: -; Owner: posta
franta-hg@0
    17
--
franta-hg@0
    18
franta-hg@0
    19
CREATE SCHEMA posta;
franta-hg@0
    20
franta-hg@0
    21
franta-hg@24
    22
ALTER SCHEMA posta OWNER TO posta;
franta-hg@24
    23
franta-hg@0
    24
SET search_path = posta, pg_catalog;
franta-hg@0
    25
franta-hg@0
    26
--
franta-hg@24
    27
-- TOC entry 189 (class 1255 OID 16398)
franta-hg@24
    28
-- Dependencies: 7 551
franta-hg@24
    29
-- Name: zmen_heslo(character varying, character varying, character varying, character varying); Type: FUNCTION; Schema: posta; Owner: posta
franta-hg@0
    30
--
franta-hg@0
    31
franta-hg@16
    32
CREATE FUNCTION zmen_heslo("Login" character varying, "Domena" character varying, "Stare_heslo" character varying, "Nove_heslo" character varying) RETURNS text
franta-hg@24
    33
    LANGUAGE plpgsql SECURITY DEFINER
franta-hg@17
    34
    AS $$DECLARE pocet integer;
franta-hg@12
    35
BEGIN
franta-hg@12
    36
UPDATE uzivatel
franta-hg@16
    37
 SET heslo = md5("Nove_heslo")
franta-hg@16
    38
 WHERE 	uzivatel.login = "Login"
franta-hg@16
    39
	AND uzivatel.domena = "Domena"
franta-hg@16
    40
	AND uzivatel.heslo = md5("Stare_heslo");
franta-hg@12
    41
	GET DIAGNOSTICS pocet = ROW_COUNT;
franta-hg@12
    42
	IF pocet = 1 THEN
franta-hg@17
    43
		RETURN 'Změna hesla pro ' || "Login" || '@' || "Domena" || ' proběhla úspěšně.';
franta-hg@12
    44
	ELSE
franta-hg@17
    45
		RAISE EXCEPTION 'Nesprávné heslo, nebo uživatel % neexistuje', "Login" || '@' || "Domena";
franta-hg@12
    46
	END IF;
franta-hg@12
    47
END;
franta-hg@24
    48
	$$;
franta-hg@0
    49
franta-hg@0
    50
franta-hg@24
    51
ALTER FUNCTION posta.zmen_heslo("Login" character varying, "Domena" character varying, "Stare_heslo" character varying, "Nove_heslo" character varying) OWNER TO posta;
franta-hg@24
    52
franta-hg@0
    53
--
franta-hg@24
    54
-- TOC entry 1900 (class 0 OID 0)
franta-hg@24
    55
-- Dependencies: 189
franta-hg@24
    56
-- Name: FUNCTION zmen_heslo("Login" character varying, "Domena" character varying, "Stare_heslo" character varying, "Nove_heslo" character varying); Type: COMMENT; Schema: posta; Owner: posta
franta-hg@0
    57
--
franta-hg@0
    58
franta-hg@16
    59
COMMENT ON FUNCTION zmen_heslo("Login" character varying, "Domena" character varying, "Stare_heslo" character varying, "Nove_heslo" character varying) IS 'Změní heslo uživatele.';
franta-hg@0
    60
franta-hg@0
    61
franta-hg@0
    62
SET default_tablespace = '';
franta-hg@0
    63
franta-hg@0
    64
SET default_with_oids = false;
franta-hg@0
    65
franta-hg@0
    66
--
franta-hg@24
    67
-- TOC entry 143 (class 1259 OID 16399)
franta-hg@24
    68
-- Dependencies: 7
franta-hg@24
    69
-- Name: alias; Type: TABLE; Schema: posta; Owner: posta; Tablespace: 
franta-hg@0
    70
--
franta-hg@0
    71
franta-hg@0
    72
CREATE TABLE alias (
franta-hg@14
    73
    zdroj_jmeno character varying(255) NOT NULL,
franta-hg@14
    74
    zdroj_domena character varying(255) NOT NULL,
franta-hg@14
    75
    cil_jmeno character varying(255) NOT NULL,
franta-hg@17
    76
    cil_domena character varying(255) NOT NULL
franta-hg@0
    77
);
franta-hg@0
    78
franta-hg@0
    79
franta-hg@24
    80
ALTER TABLE posta.alias OWNER TO posta;
franta-hg@24
    81
franta-hg@0
    82
--
franta-hg@24
    83
-- TOC entry 1902 (class 0 OID 0)
franta-hg@24
    84
-- Dependencies: 143
franta-hg@24
    85
-- Name: COLUMN alias.zdroj_jmeno; Type: COMMENT; Schema: posta; Owner: posta
franta-hg@14
    86
--
franta-hg@14
    87
franta-hg@15
    88
COMMENT ON COLUMN alias.zdroj_jmeno IS 'Část zdrojové adresy před zavináčem.
franta-hg@15
    89
(sem přijde zpráva)';
franta-hg@14
    90
franta-hg@14
    91
franta-hg@14
    92
--
franta-hg@24
    93
-- TOC entry 1903 (class 0 OID 0)
franta-hg@24
    94
-- Dependencies: 143
franta-hg@24
    95
-- Name: COLUMN alias.zdroj_domena; Type: COMMENT; Schema: posta; Owner: posta
franta-hg@14
    96
--
franta-hg@14
    97
franta-hg@15
    98
COMMENT ON COLUMN alias.zdroj_domena IS 'Část zdrojové adresy za zavináčem.
franta-hg@15
    99
(sem přijde zpráva)';
franta-hg@14
   100
franta-hg@14
   101
franta-hg@14
   102
--
franta-hg@24
   103
-- TOC entry 1904 (class 0 OID 0)
franta-hg@24
   104
-- Dependencies: 143
franta-hg@24
   105
-- Name: COLUMN alias.cil_jmeno; Type: COMMENT; Schema: posta; Owner: posta
franta-hg@14
   106
--
franta-hg@14
   107
franta-hg@15
   108
COMMENT ON COLUMN alias.cil_jmeno IS 'Část cílové adresy před zavináčem.
franta-hg@14
   109
(sem zprávu předáme)';
franta-hg@14
   110
franta-hg@14
   111
franta-hg@14
   112
--
franta-hg@24
   113
-- TOC entry 1905 (class 0 OID 0)
franta-hg@24
   114
-- Dependencies: 143
franta-hg@24
   115
-- Name: COLUMN alias.cil_domena; Type: COMMENT; Schema: posta; Owner: posta
franta-hg@14
   116
--
franta-hg@14
   117
franta-hg@15
   118
COMMENT ON COLUMN alias.cil_domena IS 'Část cílové adresy za zavináčem.
franta-hg@14
   119
(sem zprávu předáme)';
franta-hg@14
   120
franta-hg@14
   121
franta-hg@14
   122
--
franta-hg@24
   123
-- TOC entry 144 (class 1259 OID 16405)
franta-hg@24
   124
-- Dependencies: 7
franta-hg@24
   125
-- Name: domena; Type: TABLE; Schema: posta; Owner: posta; Tablespace: 
franta-hg@0
   126
--
franta-hg@0
   127
franta-hg@0
   128
CREATE TABLE domena (
franta-hg@0
   129
    domena character varying(255) NOT NULL
franta-hg@0
   130
);
franta-hg@0
   131
franta-hg@0
   132
franta-hg@24
   133
ALTER TABLE posta.domena OWNER TO posta;
franta-hg@24
   134
franta-hg@0
   135
--
franta-hg@24
   136
-- TOC entry 145 (class 1259 OID 16408)
franta-hg@24
   137
-- Dependencies: 1691 7
franta-hg@24
   138
-- Name: alias_externi; Type: VIEW; Schema: posta; Owner: posta
franta-hg@24
   139
--
franta-hg@24
   140
franta-hg@24
   141
CREATE VIEW alias_externi AS
franta-hg@24
   142
    SELECT a.zdroj_jmeno, a.zdroj_domena, a.cil_jmeno, a.cil_domena FROM (alias a LEFT JOIN domena d ON (((a.cil_domena)::text = (d.domena)::text))) WHERE (d.domena IS NULL);
franta-hg@24
   143
franta-hg@24
   144
franta-hg@24
   145
ALTER TABLE posta.alias_externi OWNER TO posta;
franta-hg@24
   146
franta-hg@24
   147
--
franta-hg@24
   148
-- TOC entry 1908 (class 0 OID 0)
franta-hg@24
   149
-- Dependencies: 145
franta-hg@24
   150
-- Name: VIEW alias_externi; Type: COMMENT; Schema: posta; Owner: posta
franta-hg@24
   151
--
franta-hg@24
   152
franta-hg@24
   153
COMMENT ON VIEW alias_externi IS 'Poštovní alias, který vede na doménu nacházející se na jiném serveru (tzn. e-mail opouští Veverku)';
franta-hg@24
   154
franta-hg@24
   155
franta-hg@24
   156
--
franta-hg@24
   157
-- TOC entry 146 (class 1259 OID 16412)
franta-hg@24
   158
-- Dependencies: 1692 7
franta-hg@24
   159
-- Name: alias_interni; Type: VIEW; Schema: posta; Owner: posta
franta-hg@24
   160
--
franta-hg@24
   161
franta-hg@24
   162
CREATE VIEW alias_interni AS
franta-hg@24
   163
    SELECT a.zdroj_jmeno, a.zdroj_domena, a.cil_jmeno, a.cil_domena FROM (alias a LEFT JOIN domena d ON (((a.cil_domena)::text = (d.domena)::text))) WHERE (d.domena IS NOT NULL);
franta-hg@24
   164
franta-hg@24
   165
franta-hg@24
   166
ALTER TABLE posta.alias_interni OWNER TO posta;
franta-hg@24
   167
franta-hg@24
   168
--
franta-hg@24
   169
-- TOC entry 1909 (class 0 OID 0)
franta-hg@24
   170
-- Dependencies: 146
franta-hg@24
   171
-- Name: VIEW alias_interni; Type: COMMENT; Schema: posta; Owner: posta
franta-hg@24
   172
--
franta-hg@24
   173
franta-hg@24
   174
COMMENT ON VIEW alias_interni IS 'Poštovní alias, který vede na doménu nacházející se na tomto serveru (tzn. e-mail neopouští Veverku)';
franta-hg@24
   175
franta-hg@24
   176
franta-hg@24
   177
--
franta-hg@24
   178
-- TOC entry 147 (class 1259 OID 16416)
franta-hg@24
   179
-- Dependencies: 7
franta-hg@24
   180
-- Name: uzivatel; Type: TABLE; Schema: posta; Owner: posta; Tablespace: 
franta-hg@0
   181
--
franta-hg@0
   182
franta-hg@0
   183
CREATE TABLE uzivatel (
franta-hg@0
   184
    login character varying(255) NOT NULL,
franta-hg@0
   185
    heslo character varying(512),
franta-hg@24
   186
    domena character varying(255) NOT NULL,
franta-hg@24
   187
    jmeno character varying(32)
franta-hg@0
   188
);
franta-hg@0
   189
franta-hg@0
   190
franta-hg@24
   191
ALTER TABLE posta.uzivatel OWNER TO posta;
franta-hg@24
   192
franta-hg@0
   193
--
franta-hg@24
   194
-- TOC entry 1910 (class 0 OID 0)
franta-hg@24
   195
-- Dependencies: 147
franta-hg@24
   196
-- Name: COLUMN uzivatel.jmeno; Type: COMMENT; Schema: posta; Owner: posta
franta-hg@24
   197
--
franta-hg@24
   198
franta-hg@24
   199
COMMENT ON COLUMN uzivatel.jmeno IS 'Celé jméno uživatele';
franta-hg@24
   200
franta-hg@24
   201
franta-hg@24
   202
--
franta-hg@24
   203
-- TOC entry 148 (class 1259 OID 16422)
franta-hg@24
   204
-- Dependencies: 1693 7
franta-hg@24
   205
-- Name: dovecot_heslo; Type: VIEW; Schema: posta; Owner: posta
franta-hg@0
   206
--
franta-hg@0
   207
franta-hg@0
   208
CREATE VIEW dovecot_heslo AS
franta-hg@0
   209
    SELECT (((uzivatel.login)::text || '@'::text) || (uzivatel.domena)::text) AS "user", uzivatel.heslo AS password, uzivatel.login, uzivatel.domena FROM uzivatel;
franta-hg@0
   210
franta-hg@0
   211
franta-hg@24
   212
ALTER TABLE posta.dovecot_heslo OWNER TO posta;
franta-hg@24
   213
franta-hg@0
   214
--
franta-hg@24
   215
-- TOC entry 149 (class 1259 OID 16426)
franta-hg@24
   216
-- Dependencies: 1694 7
franta-hg@24
   217
-- Name: dovecot_uzivatel; Type: VIEW; Schema: posta; Owner: posta
franta-hg@0
   218
--
franta-hg@0
   219
franta-hg@0
   220
CREATE VIEW dovecot_uzivatel AS
franta-hg@24
   221
    SELECT 5000 AS uid, 5000 AS gid, ((('/var/mail/virtualniposta/'::text || (uzivatel.domena)::text) || '/'::text) || (uzivatel.login)::text) AS home, (((('maildir:/var/mail/virtualniposta/'::text || (uzivatel.domena)::text) || '/'::text) || (uzivatel.login)::text) || '/Maildir'::text) AS mail, 'maildir:Maximalni velikost schranky'::text AS quota, '*:storage=1G'::text AS quota_rule, uzivatel.login, uzivatel.domena FROM uzivatel;
franta-hg@0
   222
franta-hg@0
   223
franta-hg@24
   224
ALTER TABLE posta.dovecot_uzivatel OWNER TO posta;
franta-hg@24
   225
franta-hg@0
   226
--
franta-hg@24
   227
-- TOC entry 150 (class 1259 OID 16430)
franta-hg@24
   228
-- Dependencies: 1695 7
franta-hg@24
   229
-- Name: postfix_alias; Type: VIEW; Schema: posta; Owner: posta
franta-hg@0
   230
--
franta-hg@0
   231
franta-hg@0
   232
CREATE VIEW postfix_alias AS
franta-hg@14
   233
    SELECT (((alias.zdroj_jmeno)::text || '@'::text) || (alias.zdroj_domena)::text) AS zdroj, (((alias.cil_jmeno)::text || '@'::text) || (alias.cil_domena)::text) AS cil FROM alias;
franta-hg@0
   234
franta-hg@0
   235
franta-hg@24
   236
ALTER TABLE posta.postfix_alias OWNER TO posta;
franta-hg@24
   237
franta-hg@0
   238
--
franta-hg@24
   239
-- TOC entry 151 (class 1259 OID 16434)
franta-hg@24
   240
-- Dependencies: 1696 7
franta-hg@24
   241
-- Name: postfix_uzivatel; Type: VIEW; Schema: posta; Owner: posta
franta-hg@0
   242
--
franta-hg@0
   243
franta-hg@0
   244
CREATE VIEW postfix_uzivatel AS
franta-hg@0
   245
    SELECT ((((uzivatel.domena)::text || '/'::text) || (uzivatel.login)::text) || '/Maildir/'::text) AS cesta, uzivatel.login, uzivatel.domena FROM uzivatel;
franta-hg@0
   246
franta-hg@0
   247
franta-hg@24
   248
ALTER TABLE posta.postfix_uzivatel OWNER TO posta;
franta-hg@24
   249
franta-hg@0
   250
--
franta-hg@24
   251
-- TOC entry 152 (class 1259 OID 16438)
franta-hg@24
   252
-- Dependencies: 1697 7
franta-hg@24
   253
-- Name: sogo_uzivatel; Type: VIEW; Schema: posta; Owner: posta
franta-hg@24
   254
--
franta-hg@24
   255
franta-hg@24
   256
CREATE VIEW sogo_uzivatel AS
franta-hg@24
   257
    SELECT (((uzivatel.login)::text || '@'::text) || (uzivatel.domena)::text) AS c_uid, COALESCE((uzivatel.jmeno)::text, (((uzivatel.login)::text || '@'::text) || (uzivatel.domena)::text)) AS c_cn, (((uzivatel.login)::text || '@'::text) || (uzivatel.domena)::text) AS c_name, (((uzivatel.login)::text || '@'::text) || (uzivatel.domena)::text) AS mail, uzivatel.heslo AS c_password FROM uzivatel;
franta-hg@24
   258
franta-hg@24
   259
franta-hg@24
   260
ALTER TABLE posta.sogo_uzivatel OWNER TO posta;
franta-hg@24
   261
franta-hg@24
   262
--
franta-hg@24
   263
-- TOC entry 1890 (class 2606 OID 16443)
franta-hg@24
   264
-- Dependencies: 143 143 143 143 143
franta-hg@24
   265
-- Name: aliasy_pk; Type: CONSTRAINT; Schema: posta; Owner: posta; Tablespace: 
franta-hg@0
   266
--
franta-hg@0
   267
franta-hg@0
   268
ALTER TABLE ONLY alias
franta-hg@17
   269
    ADD CONSTRAINT aliasy_pk PRIMARY KEY (zdroj_jmeno, zdroj_domena, cil_jmeno, cil_domena);
franta-hg@0
   270
franta-hg@0
   271
franta-hg@0
   272
--
franta-hg@24
   273
-- TOC entry 1892 (class 2606 OID 16445)
franta-hg@24
   274
-- Dependencies: 144 144
franta-hg@24
   275
-- Name: domena_pk; Type: CONSTRAINT; Schema: posta; Owner: posta; Tablespace: 
franta-hg@0
   276
--
franta-hg@0
   277
franta-hg@0
   278
ALTER TABLE ONLY domena
franta-hg@0
   279
    ADD CONSTRAINT domena_pk PRIMARY KEY (domena);
franta-hg@0
   280
franta-hg@0
   281
franta-hg@0
   282
--
franta-hg@24
   283
-- TOC entry 1894 (class 2606 OID 16447)
franta-hg@24
   284
-- Dependencies: 147 147 147
franta-hg@24
   285
-- Name: uzivatel_pk; Type: CONSTRAINT; Schema: posta; Owner: posta; Tablespace: 
franta-hg@0
   286
--
franta-hg@0
   287
franta-hg@0
   288
ALTER TABLE ONLY uzivatel
franta-hg@0
   289
    ADD CONSTRAINT uzivatel_pk PRIMARY KEY (login, domena);
franta-hg@0
   290
franta-hg@0
   291
franta-hg@0
   292
--
franta-hg@24
   293
-- TOC entry 1895 (class 2606 OID 16448)
franta-hg@24
   294
-- Dependencies: 143 1891 144
franta-hg@24
   295
-- Name: alias_domena_fk; Type: FK CONSTRAINT; Schema: posta; Owner: posta
franta-hg@0
   296
--
franta-hg@0
   297
franta-hg@0
   298
ALTER TABLE ONLY alias
franta-hg@14
   299
    ADD CONSTRAINT alias_domena_fk FOREIGN KEY (zdroj_domena) REFERENCES domena(domena);
franta-hg@0
   300
franta-hg@0
   301
franta-hg@0
   302
--
franta-hg@24
   303
-- TOC entry 1896 (class 2606 OID 16453)
franta-hg@24
   304
-- Dependencies: 1891 144 147
franta-hg@24
   305
-- Name: uzivatel_domena_fk; Type: FK CONSTRAINT; Schema: posta; Owner: posta
franta-hg@0
   306
--
franta-hg@0
   307
franta-hg@0
   308
ALTER TABLE ONLY uzivatel
franta-hg@0
   309
    ADD CONSTRAINT uzivatel_domena_fk FOREIGN KEY (domena) REFERENCES domena(domena);
franta-hg@0
   310
franta-hg@0
   311
franta-hg@0
   312
--
franta-hg@24
   313
-- TOC entry 1899 (class 0 OID 0)
franta-hg@24
   314
-- Dependencies: 7
franta-hg@24
   315
-- Name: posta; Type: ACL; Schema: -; Owner: posta
franta-hg@0
   316
--
franta-hg@0
   317
franta-hg@0
   318
REVOKE ALL ON SCHEMA posta FROM PUBLIC;
franta-hg@0
   319
REVOKE ALL ON SCHEMA posta FROM posta;
franta-hg@0
   320
GRANT ALL ON SCHEMA posta TO posta;
franta-hg@0
   321
GRANT USAGE ON SCHEMA posta TO posta_cteni;
franta-hg@12
   322
GRANT USAGE ON SCHEMA posta TO posta_zmena_hesla;
franta-hg@0
   323
franta-hg@0
   324
franta-hg@0
   325
--
franta-hg@24
   326
-- TOC entry 1901 (class 0 OID 0)
franta-hg@24
   327
-- Dependencies: 189
franta-hg@24
   328
-- Name: zmen_heslo(character varying, character varying, character varying, character varying); Type: ACL; Schema: posta; Owner: posta
franta-hg@12
   329
--
franta-hg@12
   330
franta-hg@16
   331
REVOKE ALL ON FUNCTION zmen_heslo("Login" character varying, "Domena" character varying, "Stare_heslo" character varying, "Nove_heslo" character varying) FROM PUBLIC;
franta-hg@16
   332
REVOKE ALL ON FUNCTION zmen_heslo("Login" character varying, "Domena" character varying, "Stare_heslo" character varying, "Nove_heslo" character varying) FROM posta;
franta-hg@16
   333
GRANT ALL ON FUNCTION zmen_heslo("Login" character varying, "Domena" character varying, "Stare_heslo" character varying, "Nove_heslo" character varying) TO posta;
franta-hg@16
   334
GRANT ALL ON FUNCTION zmen_heslo("Login" character varying, "Domena" character varying, "Stare_heslo" character varying, "Nove_heslo" character varying) TO PUBLIC;
franta-hg@16
   335
GRANT ALL ON FUNCTION zmen_heslo("Login" character varying, "Domena" character varying, "Stare_heslo" character varying, "Nove_heslo" character varying) TO posta_zmena_hesla;
franta-hg@12
   336
franta-hg@12
   337
franta-hg@12
   338
--
franta-hg@24
   339
-- TOC entry 1906 (class 0 OID 0)
franta-hg@24
   340
-- Dependencies: 143
franta-hg@24
   341
-- Name: alias; Type: ACL; Schema: posta; Owner: posta
franta-hg@0
   342
--
franta-hg@0
   343
franta-hg@0
   344
REVOKE ALL ON TABLE alias FROM PUBLIC;
franta-hg@0
   345
REVOKE ALL ON TABLE alias FROM posta;
franta-hg@0
   346
GRANT ALL ON TABLE alias TO posta;
franta-hg@0
   347
franta-hg@0
   348
franta-hg@0
   349
--
franta-hg@24
   350
-- TOC entry 1907 (class 0 OID 0)
franta-hg@24
   351
-- Dependencies: 144
franta-hg@24
   352
-- Name: domena; Type: ACL; Schema: posta; Owner: posta
franta-hg@0
   353
--
franta-hg@0
   354
franta-hg@0
   355
REVOKE ALL ON TABLE domena FROM PUBLIC;
franta-hg@0
   356
REVOKE ALL ON TABLE domena FROM posta;
franta-hg@0
   357
GRANT ALL ON TABLE domena TO posta;
franta-hg@0
   358
GRANT SELECT ON TABLE domena TO posta_cteni;
franta-hg@0
   359
franta-hg@0
   360
franta-hg@0
   361
--
franta-hg@24
   362
-- TOC entry 1911 (class 0 OID 0)
franta-hg@24
   363
-- Dependencies: 147
franta-hg@24
   364
-- Name: uzivatel; Type: ACL; Schema: posta; Owner: posta
franta-hg@0
   365
--
franta-hg@0
   366
franta-hg@0
   367
REVOKE ALL ON TABLE uzivatel FROM PUBLIC;
franta-hg@0
   368
REVOKE ALL ON TABLE uzivatel FROM posta;
franta-hg@0
   369
GRANT ALL ON TABLE uzivatel TO posta;
franta-hg@0
   370
GRANT SELECT ON TABLE uzivatel TO posta_cteni;
franta-hg@0
   371
franta-hg@0
   372
franta-hg@0
   373
--
franta-hg@24
   374
-- TOC entry 1912 (class 0 OID 0)
franta-hg@24
   375
-- Dependencies: 148
franta-hg@24
   376
-- Name: dovecot_heslo; Type: ACL; Schema: posta; Owner: posta
franta-hg@0
   377
--
franta-hg@0
   378
franta-hg@0
   379
REVOKE ALL ON TABLE dovecot_heslo FROM PUBLIC;
franta-hg@0
   380
REVOKE ALL ON TABLE dovecot_heslo FROM posta;
franta-hg@0
   381
GRANT ALL ON TABLE dovecot_heslo TO posta;
franta-hg@0
   382
GRANT SELECT ON TABLE dovecot_heslo TO posta_cteni;
franta-hg@0
   383
franta-hg@0
   384
franta-hg@0
   385
--
franta-hg@24
   386
-- TOC entry 1913 (class 0 OID 0)
franta-hg@24
   387
-- Dependencies: 149
franta-hg@24
   388
-- Name: dovecot_uzivatel; Type: ACL; Schema: posta; Owner: posta
franta-hg@0
   389
--
franta-hg@0
   390
franta-hg@0
   391
REVOKE ALL ON TABLE dovecot_uzivatel FROM PUBLIC;
franta-hg@0
   392
REVOKE ALL ON TABLE dovecot_uzivatel FROM posta;
franta-hg@0
   393
GRANT ALL ON TABLE dovecot_uzivatel TO posta;
franta-hg@0
   394
GRANT SELECT ON TABLE dovecot_uzivatel TO posta_cteni;
franta-hg@0
   395
franta-hg@0
   396
franta-hg@0
   397
--
franta-hg@24
   398
-- TOC entry 1914 (class 0 OID 0)
franta-hg@24
   399
-- Dependencies: 150
franta-hg@24
   400
-- Name: postfix_alias; Type: ACL; Schema: posta; Owner: posta
franta-hg@0
   401
--
franta-hg@0
   402
franta-hg@0
   403
REVOKE ALL ON TABLE postfix_alias FROM PUBLIC;
franta-hg@0
   404
REVOKE ALL ON TABLE postfix_alias FROM posta;
franta-hg@0
   405
GRANT ALL ON TABLE postfix_alias TO posta;
franta-hg@0
   406
GRANT SELECT ON TABLE postfix_alias TO posta_cteni;
franta-hg@0
   407
franta-hg@0
   408
franta-hg@0
   409
--
franta-hg@24
   410
-- TOC entry 1915 (class 0 OID 0)
franta-hg@24
   411
-- Dependencies: 151
franta-hg@24
   412
-- Name: postfix_uzivatel; Type: ACL; Schema: posta; Owner: posta
franta-hg@0
   413
--
franta-hg@0
   414
franta-hg@0
   415
REVOKE ALL ON TABLE postfix_uzivatel FROM PUBLIC;
franta-hg@0
   416
REVOKE ALL ON TABLE postfix_uzivatel FROM posta;
franta-hg@0
   417
GRANT ALL ON TABLE postfix_uzivatel TO posta;
franta-hg@0
   418
GRANT SELECT ON TABLE postfix_uzivatel TO posta_cteni;
franta-hg@0
   419
franta-hg@0
   420
franta-hg@24
   421
--
franta-hg@24
   422
-- TOC entry 1916 (class 0 OID 0)
franta-hg@24
   423
-- Dependencies: 152
franta-hg@24
   424
-- Name: sogo_uzivatel; Type: ACL; Schema: posta; Owner: posta
franta-hg@24
   425
--
franta-hg@24
   426
franta-hg@24
   427
REVOKE ALL ON TABLE sogo_uzivatel FROM PUBLIC;
franta-hg@24
   428
REVOKE ALL ON TABLE sogo_uzivatel FROM posta;
franta-hg@24
   429
GRANT ALL ON TABLE sogo_uzivatel TO posta;
franta-hg@24
   430
GRANT SELECT ON TABLE sogo_uzivatel TO posta_cteni;
franta-hg@24
   431
franta-hg@24
   432
franta-hg@24
   433
-- Completed on 2011-12-03 17:50:08 CET
franta-hg@0
   434
franta-hg@0
   435
--
franta-hg@0
   436
-- PostgreSQL database dump complete
franta-hg@0
   437
--
franta-hg@0
   438