sql/schéma.sql
author František Kučera <franta-hg@frantovo.cz>
Sun, 14 Mar 2010 01:37:40 +0100
changeset 68 df5aedafb826
parent 62 d9df3f7b67dd
child 71 3829d619369c
permissions -rw-r--r--
Fotky se zobrazují ty, které jsou v databázi
(jen záznamy – soubory s fotkami jsou na disku).
franta-hg@18
     1
--
franta-hg@18
     2
-- PostgreSQL database dump
franta-hg@18
     3
--
franta-hg@18
     4
franta-hg@62
     5
-- Started on 2010-03-09 20:48:44 CET
franta-hg@18
     6
franta-hg@18
     7
SET statement_timeout = 0;
franta-hg@18
     8
SET client_encoding = 'UTF8';
franta-hg@18
     9
SET standard_conforming_strings = off;
franta-hg@18
    10
SET check_function_bodies = false;
franta-hg@18
    11
SET client_min_messages = warning;
franta-hg@18
    12
SET escape_string_warning = off;
franta-hg@18
    13
franta-hg@18
    14
--
franta-hg@18
    15
-- TOC entry 10 (class 2615 OID 35015)
franta-hg@18
    16
-- Name: nekurak; Type: SCHEMA; Schema: -; Owner: nekurak
franta-hg@18
    17
--
franta-hg@18
    18
franta-hg@18
    19
CREATE SCHEMA nekurak;
franta-hg@18
    20
franta-hg@18
    21
franta-hg@18
    22
ALTER SCHEMA nekurak OWNER TO nekurak;
franta-hg@18
    23
franta-hg@18
    24
SET search_path = nekurak, pg_catalog;
franta-hg@18
    25
franta-hg@18
    26
--
franta-hg@62
    27
-- TOC entry 369 (class 1247 OID 35086)
franta-hg@62
    28
-- Dependencies: 370 10
franta-hg@62
    29
-- Name: email; Type: DOMAIN; Schema: nekurak; Owner: nekurak
franta-hg@62
    30
--
franta-hg@62
    31
franta-hg@62
    32
CREATE DOMAIN email AS character varying(255)
franta-hg@62
    33
	CONSTRAINT email_regexp CHECK (((VALUE)::text ~ '^[_a-zA-Z0-9\\.\\-]+@[_a-zA-Z0-9\\.\\-]+\\.[a-zA-Z]{2,4}$'::text));
franta-hg@62
    34
franta-hg@62
    35
franta-hg@62
    36
ALTER DOMAIN nekurak.email OWNER TO nekurak;
franta-hg@62
    37
franta-hg@62
    38
--
franta-hg@62
    39
-- TOC entry 1881 (class 0 OID 0)
franta-hg@62
    40
-- Dependencies: 369
franta-hg@62
    41
-- Name: DOMAIN email; Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@62
    42
--
franta-hg@62
    43
franta-hg@62
    44
COMMENT ON DOMAIN email IS 'e-mailová adresa';
franta-hg@62
    45
franta-hg@62
    46
franta-hg@62
    47
--
franta-hg@62
    48
-- TOC entry 65 (class 1255 OID 35124)
franta-hg@62
    49
-- Dependencies: 10 392
franta-hg@62
    50
-- Name: bezny_uzivatel(); Type: FUNCTION; Schema: nekurak; Owner: nekurak
franta-hg@62
    51
--
franta-hg@62
    52
franta-hg@62
    53
CREATE FUNCTION bezny_uzivatel() RETURNS trigger
franta-hg@62
    54
    LANGUAGE plpgsql
franta-hg@62
    55
    AS $$BEGIN
franta-hg@62
    56
INSERT INTO uzivatel_role 
franta-hg@62
    57
(role, prezdivka) 
franta-hg@62
    58
VALUES
franta-hg@62
    59
('bezny', new.prezdivka);
franta-hg@62
    60
RETURN new;
franta-hg@62
    61
END;$$;
franta-hg@62
    62
franta-hg@62
    63
franta-hg@62
    64
ALTER FUNCTION nekurak.bezny_uzivatel() OWNER TO nekurak;
franta-hg@62
    65
franta-hg@62
    66
--
franta-hg@62
    67
-- TOC entry 1882 (class 0 OID 0)
franta-hg@62
    68
-- Dependencies: 65
franta-hg@62
    69
-- Name: FUNCTION bezny_uzivatel(); Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@62
    70
--
franta-hg@62
    71
franta-hg@62
    72
COMMENT ON FUNCTION bezny_uzivatel() IS 'Každému novému uživateli dáme automaticky roli „bezny“.';
franta-hg@62
    73
franta-hg@62
    74
franta-hg@62
    75
SET default_tablespace = '';
franta-hg@62
    76
franta-hg@62
    77
SET default_with_oids = true;
franta-hg@62
    78
franta-hg@62
    79
--
franta-hg@62
    80
-- TOC entry 1584 (class 1259 OID 35068)
franta-hg@62
    81
-- Dependencies: 1861 10
franta-hg@62
    82
-- Name: hlasovani; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@62
    83
--
franta-hg@62
    84
franta-hg@62
    85
CREATE TABLE hlasovani (
franta-hg@62
    86
    podnik integer NOT NULL,
franta-hg@62
    87
    hlas boolean NOT NULL,
franta-hg@62
    88
    datum date DEFAULT now() NOT NULL,
franta-hg@62
    89
    ip_adresa character varying(255)
franta-hg@62
    90
);
franta-hg@62
    91
franta-hg@62
    92
franta-hg@62
    93
ALTER TABLE nekurak.hlasovani OWNER TO nekurak;
franta-hg@62
    94
franta-hg@62
    95
--
franta-hg@62
    96
-- TOC entry 1883 (class 0 OID 0)
franta-hg@62
    97
-- Dependencies: 1584
franta-hg@62
    98
-- Name: COLUMN hlasovani.hlas; Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@62
    99
--
franta-hg@62
   100
franta-hg@62
   101
COMMENT ON COLUMN hlasovani.hlas IS 'Má být tento podnik nekuřácký?
franta-hg@62
   102
true = nekuřácký
franta-hg@62
   103
false = kouření povoleno';
franta-hg@62
   104
franta-hg@62
   105
franta-hg@62
   106
--
franta-hg@62
   107
-- TOC entry 1582 (class 1259 OID 35019)
franta-hg@18
   108
-- Dependencies: 10
franta-hg@18
   109
-- Name: podnik_seq; Type: SEQUENCE; Schema: nekurak; Owner: nekurak
franta-hg@18
   110
--
franta-hg@18
   111
franta-hg@18
   112
CREATE SEQUENCE podnik_seq
franta-hg@18
   113
    INCREMENT BY 1
franta-hg@18
   114
    NO MAXVALUE
franta-hg@18
   115
    NO MINVALUE
franta-hg@18
   116
    CACHE 1;
franta-hg@18
   117
franta-hg@18
   118
franta-hg@18
   119
ALTER TABLE nekurak.podnik_seq OWNER TO nekurak;
franta-hg@18
   120
franta-hg@18
   121
SET default_with_oids = false;
franta-hg@18
   122
franta-hg@18
   123
--
franta-hg@62
   124
-- TOC entry 1583 (class 1259 OID 35049)
franta-hg@62
   125
-- Dependencies: 1859 1860 10
franta-hg@18
   126
-- Name: podnik; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@18
   127
--
franta-hg@18
   128
franta-hg@18
   129
CREATE TABLE podnik (
franta-hg@18
   130
    id integer DEFAULT nextval('podnik_seq'::regclass) NOT NULL,
franta-hg@18
   131
    nazev character varying(255) NOT NULL,
franta-hg@62
   132
    popis character varying(255),
franta-hg@62
   133
    url character varying(255),
franta-hg@62
   134
    datum timestamp with time zone DEFAULT now(),
franta-hg@62
   135
    ulice character varying(64),
franta-hg@62
   136
    cislo_popisne integer,
franta-hg@62
   137
    mesto character varying(64)
franta-hg@18
   138
);
franta-hg@18
   139
franta-hg@18
   140
franta-hg@18
   141
ALTER TABLE nekurak.podnik OWNER TO nekurak;
franta-hg@18
   142
franta-hg@18
   143
--
franta-hg@62
   144
-- TOC entry 1587 (class 1259 OID 35101)
franta-hg@62
   145
-- Dependencies: 10
franta-hg@62
   146
-- Name: role; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@18
   147
--
franta-hg@18
   148
franta-hg@62
   149
CREATE TABLE role (
franta-hg@62
   150
    kod character varying(16) NOT NULL,
franta-hg@62
   151
    popis character varying(255)
franta-hg@62
   152
);
franta-hg@18
   153
franta-hg@18
   154
franta-hg@62
   155
ALTER TABLE nekurak.role OWNER TO nekurak;
franta-hg@62
   156
franta-hg@18
   157
--
franta-hg@62
   158
-- TOC entry 1887 (class 0 OID 0)
franta-hg@62
   159
-- Dependencies: 1587
franta-hg@62
   160
-- Name: TABLE role; Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@62
   161
--
franta-hg@62
   162
franta-hg@62
   163
COMMENT ON TABLE role IS 'Role (skupiny) uživatelů ~ oprávnění';
franta-hg@62
   164
franta-hg@62
   165
franta-hg@62
   166
--
franta-hg@62
   167
-- TOC entry 1585 (class 1259 OID 35080)
franta-hg@62
   168
-- Dependencies: 10
franta-hg@62
   169
-- Name: uzivatel_seq; Type: SEQUENCE; Schema: nekurak; Owner: nekurak
franta-hg@62
   170
--
franta-hg@62
   171
franta-hg@62
   172
CREATE SEQUENCE uzivatel_seq
franta-hg@62
   173
    INCREMENT BY 1
franta-hg@62
   174
    NO MAXVALUE
franta-hg@62
   175
    NO MINVALUE
franta-hg@62
   176
    CACHE 1;
franta-hg@62
   177
franta-hg@62
   178
franta-hg@62
   179
ALTER TABLE nekurak.uzivatel_seq OWNER TO nekurak;
franta-hg@62
   180
franta-hg@62
   181
--
franta-hg@62
   182
-- TOC entry 1586 (class 1259 OID 35091)
franta-hg@62
   183
-- Dependencies: 1862 1863 10
franta-hg@62
   184
-- Name: uzivatel; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@62
   185
--
franta-hg@62
   186
franta-hg@62
   187
CREATE TABLE uzivatel (
franta-hg@62
   188
    id integer DEFAULT nextval('uzivatel_seq'::regclass) NOT NULL,
franta-hg@62
   189
    prezdivka character varying(64) NOT NULL,
franta-hg@62
   190
    heslo character varying(512) NOT NULL,
franta-hg@62
   191
    jmeno character varying(64),
franta-hg@62
   192
    prijmeni character varying(64),
franta-hg@62
   193
    email character varying(255),
franta-hg@62
   194
    datum timestamp with time zone DEFAULT now() NOT NULL
franta-hg@62
   195
);
franta-hg@62
   196
franta-hg@62
   197
franta-hg@62
   198
ALTER TABLE nekurak.uzivatel OWNER TO nekurak;
franta-hg@62
   199
franta-hg@62
   200
--
franta-hg@62
   201
-- TOC entry 1890 (class 0 OID 0)
franta-hg@62
   202
-- Dependencies: 1586
franta-hg@62
   203
-- Name: COLUMN uzivatel.prezdivka; Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@62
   204
--
franta-hg@62
   205
franta-hg@62
   206
COMMENT ON COLUMN uzivatel.prezdivka IS 'Uživatelské jméno';
franta-hg@62
   207
franta-hg@62
   208
franta-hg@62
   209
--
franta-hg@62
   210
-- TOC entry 1588 (class 1259 OID 35106)
franta-hg@62
   211
-- Dependencies: 10
franta-hg@62
   212
-- Name: uzivatel_role; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@62
   213
--
franta-hg@62
   214
franta-hg@62
   215
CREATE TABLE uzivatel_role (
franta-hg@62
   216
    role character varying(16) NOT NULL,
franta-hg@62
   217
    prezdivka character varying(64) NOT NULL
franta-hg@62
   218
);
franta-hg@62
   219
franta-hg@62
   220
franta-hg@62
   221
ALTER TABLE nekurak.uzivatel_role OWNER TO nekurak;
franta-hg@62
   222
franta-hg@62
   223
--
franta-hg@62
   224
-- TOC entry 1892 (class 0 OID 0)
franta-hg@62
   225
-- Dependencies: 1588
franta-hg@62
   226
-- Name: TABLE uzivatel_role; Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@62
   227
--
franta-hg@62
   228
franta-hg@62
   229
COMMENT ON TABLE uzivatel_role IS 'Přiřazení uživatelských rolí (skupin).';
franta-hg@62
   230
franta-hg@62
   231
franta-hg@62
   232
--
franta-hg@62
   233
-- TOC entry 1865 (class 2606 OID 35058)
franta-hg@62
   234
-- Dependencies: 1583 1583
franta-hg@18
   235
-- Name: podnik_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@18
   236
--
franta-hg@18
   237
franta-hg@18
   238
ALTER TABLE ONLY podnik
franta-hg@18
   239
    ADD CONSTRAINT podnik_pk PRIMARY KEY (id);
franta-hg@18
   240
franta-hg@18
   241
franta-hg@19
   242
--
franta-hg@62
   243
-- TOC entry 1871 (class 2606 OID 35105)
franta-hg@62
   244
-- Dependencies: 1587 1587
franta-hg@62
   245
-- Name: skupina_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@62
   246
--
franta-hg@62
   247
franta-hg@62
   248
ALTER TABLE ONLY role
franta-hg@62
   249
    ADD CONSTRAINT skupina_pk PRIMARY KEY (kod);
franta-hg@62
   250
franta-hg@62
   251
franta-hg@62
   252
--
franta-hg@62
   253
-- TOC entry 1867 (class 2606 OID 35098)
franta-hg@62
   254
-- Dependencies: 1586 1586
franta-hg@62
   255
-- Name: uzivatel_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@62
   256
--
franta-hg@62
   257
franta-hg@62
   258
ALTER TABLE ONLY uzivatel
franta-hg@62
   259
    ADD CONSTRAINT uzivatel_pk PRIMARY KEY (id);
franta-hg@62
   260
franta-hg@62
   261
franta-hg@62
   262
--
franta-hg@62
   263
-- TOC entry 1869 (class 2606 OID 35100)
franta-hg@62
   264
-- Dependencies: 1586 1586
franta-hg@62
   265
-- Name: uzivatel_prezdivka_uq; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@62
   266
--
franta-hg@62
   267
franta-hg@62
   268
ALTER TABLE ONLY uzivatel
franta-hg@62
   269
    ADD CONSTRAINT uzivatel_prezdivka_uq UNIQUE (prezdivka);
franta-hg@62
   270
franta-hg@62
   271
franta-hg@62
   272
--
franta-hg@62
   273
-- TOC entry 1873 (class 2606 OID 35137)
franta-hg@62
   274
-- Dependencies: 1588 1588 1588
franta-hg@62
   275
-- Name: uzivatel_role_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@62
   276
--
franta-hg@62
   277
franta-hg@62
   278
ALTER TABLE ONLY uzivatel_role
franta-hg@62
   279
    ADD CONSTRAINT uzivatel_role_pk PRIMARY KEY (role, prezdivka);
franta-hg@62
   280
franta-hg@62
   281
franta-hg@62
   282
--
franta-hg@62
   283
-- TOC entry 1877 (class 2620 OID 35125)
franta-hg@62
   284
-- Dependencies: 65 1586
franta-hg@62
   285
-- Name: uzivatel_insert; Type: TRIGGER; Schema: nekurak; Owner: nekurak
franta-hg@62
   286
--
franta-hg@62
   287
franta-hg@62
   288
CREATE TRIGGER uzivatel_insert
franta-hg@62
   289
    AFTER INSERT ON uzivatel
franta-hg@62
   290
    FOR EACH ROW
franta-hg@62
   291
    EXECUTE PROCEDURE bezny_uzivatel();
franta-hg@62
   292
franta-hg@62
   293
franta-hg@62
   294
--
franta-hg@62
   295
-- TOC entry 1874 (class 2606 OID 35072)
franta-hg@62
   296
-- Dependencies: 1864 1583 1584
franta-hg@62
   297
-- Name: hlasovani_podnik_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
franta-hg@62
   298
--
franta-hg@62
   299
franta-hg@62
   300
ALTER TABLE ONLY hlasovani
franta-hg@62
   301
    ADD CONSTRAINT hlasovani_podnik_fk FOREIGN KEY (podnik) REFERENCES podnik(id) ON DELETE CASCADE;
franta-hg@62
   302
franta-hg@62
   303
franta-hg@62
   304
--
franta-hg@62
   305
-- TOC entry 1875 (class 2606 OID 35138)
franta-hg@62
   306
-- Dependencies: 1870 1587 1588
franta-hg@62
   307
-- Name: uzivatel_role_role_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
franta-hg@62
   308
--
franta-hg@62
   309
franta-hg@62
   310
ALTER TABLE ONLY uzivatel_role
franta-hg@62
   311
    ADD CONSTRAINT uzivatel_role_role_fk FOREIGN KEY (role) REFERENCES role(kod) ON UPDATE CASCADE ON DELETE CASCADE;
franta-hg@62
   312
franta-hg@62
   313
franta-hg@62
   314
--
franta-hg@62
   315
-- TOC entry 1876 (class 2606 OID 35143)
franta-hg@62
   316
-- Dependencies: 1868 1586 1588
franta-hg@62
   317
-- Name: uzivatel_role_uzivatel_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
franta-hg@62
   318
--
franta-hg@62
   319
franta-hg@62
   320
ALTER TABLE ONLY uzivatel_role
franta-hg@62
   321
    ADD CONSTRAINT uzivatel_role_uzivatel_fk FOREIGN KEY (prezdivka) REFERENCES uzivatel(prezdivka) ON UPDATE CASCADE ON DELETE CASCADE;
franta-hg@62
   322
franta-hg@62
   323
franta-hg@62
   324
--
franta-hg@62
   325
-- TOC entry 1880 (class 0 OID 0)
franta-hg@19
   326
-- Dependencies: 10
franta-hg@19
   327
-- Name: nekurak; Type: ACL; Schema: -; Owner: nekurak
franta-hg@19
   328
--
franta-hg@19
   329
franta-hg@19
   330
REVOKE ALL ON SCHEMA nekurak FROM PUBLIC;
franta-hg@19
   331
REVOKE ALL ON SCHEMA nekurak FROM nekurak;
franta-hg@19
   332
GRANT ALL ON SCHEMA nekurak TO nekurak;
franta-hg@19
   333
GRANT USAGE ON SCHEMA nekurak TO nekurak_web;
franta-hg@19
   334
franta-hg@19
   335
franta-hg@19
   336
--
franta-hg@62
   337
-- TOC entry 1884 (class 0 OID 0)
franta-hg@62
   338
-- Dependencies: 1584
franta-hg@62
   339
-- Name: hlasovani; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@62
   340
--
franta-hg@62
   341
franta-hg@62
   342
REVOKE ALL ON TABLE hlasovani FROM PUBLIC;
franta-hg@62
   343
REVOKE ALL ON TABLE hlasovani FROM nekurak;
franta-hg@62
   344
GRANT ALL ON TABLE hlasovani TO nekurak;
franta-hg@62
   345
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE hlasovani TO nekurak_web;
franta-hg@62
   346
franta-hg@62
   347
franta-hg@62
   348
--
franta-hg@62
   349
-- TOC entry 1885 (class 0 OID 0)
franta-hg@62
   350
-- Dependencies: 1582
franta-hg@19
   351
-- Name: podnik_seq; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@19
   352
--
franta-hg@19
   353
franta-hg@19
   354
REVOKE ALL ON SEQUENCE podnik_seq FROM PUBLIC;
franta-hg@19
   355
REVOKE ALL ON SEQUENCE podnik_seq FROM nekurak;
franta-hg@19
   356
GRANT ALL ON SEQUENCE podnik_seq TO nekurak;
franta-hg@19
   357
GRANT USAGE ON SEQUENCE podnik_seq TO nekurak_web;
franta-hg@19
   358
franta-hg@19
   359
franta-hg@19
   360
--
franta-hg@62
   361
-- TOC entry 1886 (class 0 OID 0)
franta-hg@62
   362
-- Dependencies: 1583
franta-hg@19
   363
-- Name: podnik; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@19
   364
--
franta-hg@19
   365
franta-hg@19
   366
REVOKE ALL ON TABLE podnik FROM PUBLIC;
franta-hg@19
   367
REVOKE ALL ON TABLE podnik FROM nekurak;
franta-hg@19
   368
GRANT ALL ON TABLE podnik TO nekurak;
franta-hg@19
   369
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE podnik TO nekurak_web;
franta-hg@19
   370
franta-hg@19
   371
franta-hg@62
   372
--
franta-hg@62
   373
-- TOC entry 1888 (class 0 OID 0)
franta-hg@62
   374
-- Dependencies: 1587
franta-hg@62
   375
-- Name: role; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@62
   376
--
franta-hg@62
   377
franta-hg@62
   378
REVOKE ALL ON TABLE role FROM PUBLIC;
franta-hg@62
   379
REVOKE ALL ON TABLE role FROM nekurak;
franta-hg@62
   380
GRANT ALL ON TABLE role TO nekurak;
franta-hg@62
   381
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE role TO nekurak_web;
franta-hg@62
   382
franta-hg@62
   383
franta-hg@62
   384
--
franta-hg@62
   385
-- TOC entry 1889 (class 0 OID 0)
franta-hg@62
   386
-- Dependencies: 1585
franta-hg@62
   387
-- Name: uzivatel_seq; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@62
   388
--
franta-hg@62
   389
franta-hg@62
   390
REVOKE ALL ON SEQUENCE uzivatel_seq FROM PUBLIC;
franta-hg@62
   391
REVOKE ALL ON SEQUENCE uzivatel_seq FROM nekurak;
franta-hg@62
   392
GRANT ALL ON SEQUENCE uzivatel_seq TO nekurak;
franta-hg@62
   393
GRANT USAGE ON SEQUENCE uzivatel_seq TO nekurak_web;
franta-hg@62
   394
franta-hg@62
   395
franta-hg@62
   396
--
franta-hg@62
   397
-- TOC entry 1891 (class 0 OID 0)
franta-hg@62
   398
-- Dependencies: 1586
franta-hg@62
   399
-- Name: uzivatel; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@62
   400
--
franta-hg@62
   401
franta-hg@62
   402
REVOKE ALL ON TABLE uzivatel FROM PUBLIC;
franta-hg@62
   403
REVOKE ALL ON TABLE uzivatel FROM nekurak;
franta-hg@62
   404
GRANT ALL ON TABLE uzivatel TO nekurak;
franta-hg@62
   405
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE uzivatel TO nekurak_web;
franta-hg@62
   406
franta-hg@62
   407
franta-hg@62
   408
--
franta-hg@62
   409
-- TOC entry 1893 (class 0 OID 0)
franta-hg@62
   410
-- Dependencies: 1588
franta-hg@62
   411
-- Name: uzivatel_role; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@62
   412
--
franta-hg@62
   413
franta-hg@62
   414
REVOKE ALL ON TABLE uzivatel_role FROM PUBLIC;
franta-hg@62
   415
REVOKE ALL ON TABLE uzivatel_role FROM nekurak;
franta-hg@62
   416
GRANT ALL ON TABLE uzivatel_role TO nekurak;
franta-hg@62
   417
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE uzivatel_role TO nekurak_web;
franta-hg@62
   418
franta-hg@62
   419
franta-hg@62
   420
-- Completed on 2010-03-09 20:48:46 CET
franta-hg@18
   421
franta-hg@18
   422
--
franta-hg@18
   423
-- PostgreSQL database dump complete
franta-hg@18
   424
--
franta-hg@18
   425