Rather more work than can be completed in one evening -- needs a
[cocanwiki.git] / cocanwiki.sql
index 753fcb1..4a66608 100644 (file)
@@ -18,1660 +18,1653 @@ GRANT ALL ON SCHEMA public TO PUBLIC;
 SET search_path = public, pg_catalog;
 
 --
--- TOC entry 12 (OID 536004)
--- Name: pages; Type: TABLE; Schema: public; Owner: rich
+-- TOC entry 12 (OID 11524567)
+-- Name: pg_ts_dict; Type: TABLE; Schema: public; Owner: postgres
 --
 
-CREATE TABLE pages (
-    id serial NOT NULL,
-    url text,
-    url_deleted text,
-    title text NOT NULL,
-    description text NOT NULL,
-    creation_date timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL,
-    last_modified_date timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL,
-    hostid integer NOT NULL,
-    logged_ip text,
-    redirect text,
-    css text,
-    logged_user integer,
-    title_description_fti tsvector NOT NULL
+CREATE TABLE pg_ts_dict (
+    dict_name text NOT NULL,
+    dict_init oid,
+    dict_initoption text,
+    dict_lexize oid NOT NULL,
+    dict_comment text
 );
 
 
 --
--- TOC entry 13 (OID 536004)
--- Name: pages; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 13 (OID 11524567)
+-- Name: pg_ts_dict; Type: ACL; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE pages FROM PUBLIC;
-GRANT ALL ON TABLE pages TO "www-data";
+REVOKE ALL ON TABLE pg_ts_dict FROM PUBLIC;
+GRANT SELECT ON TABLE pg_ts_dict TO rich;
+GRANT SELECT ON TABLE pg_ts_dict TO "www-data";
 
 
 --
--- TOC entry 65 (OID 536004)
--- Name: pages_id_seq; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 116 (OID 11524574)
+-- Name: lexize(oid, text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE pages_id_seq FROM PUBLIC;
-GRANT ALL ON TABLE pages_id_seq TO "www-data";
+CREATE FUNCTION lexize(oid, text) RETURNS text[]
+    AS '$libdir/tsearch2', 'lexize'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 14 (OID 536021)
--- Name: contents; Type: TABLE; Schema: public; Owner: rich
+-- TOC entry 117 (OID 11524575)
+-- Name: lexize(text, text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE TABLE contents (
-    id serial NOT NULL,
-    pageid integer NOT NULL,
-    ordering integer NOT NULL,
-    sectionname text,
-    content text NOT NULL,
-    divname text,
-    content_fti tsvector NOT NULL
-);
+CREATE FUNCTION lexize(text, text) RETURNS text[]
+    AS '$libdir/tsearch2', 'lexize_byname'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 15 (OID 536021)
--- Name: contents; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 118 (OID 11524576)
+-- Name: lexize(text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE contents FROM PUBLIC;
-GRANT ALL ON TABLE contents TO "www-data";
+CREATE FUNCTION lexize(text) RETURNS text[]
+    AS '$libdir/tsearch2', 'lexize_bycurrent'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 66 (OID 536021)
--- Name: contents_id_seq; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 119 (OID 11524577)
+-- Name: set_curdict(integer); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE contents_id_seq FROM PUBLIC;
-GRANT ALL ON TABLE contents_id_seq TO "www-data";
+CREATE FUNCTION set_curdict(integer) RETURNS void
+    AS '$libdir/tsearch2', 'set_curdict'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 16 (OID 536371)
--- Name: hosts; Type: TABLE; Schema: public; Owner: rich
+-- TOC entry 120 (OID 11524578)
+-- Name: set_curdict(text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE TABLE hosts (
-    id serial NOT NULL,
-    canonical_hostname text NOT NULL,
-    css text,
-    edit_anon boolean DEFAULT true NOT NULL,
-    create_account_anon boolean DEFAULT true NOT NULL,
-    theme_css text,
-    feedback_email text,
-    mailing_list boolean DEFAULT false NOT NULL,
-    is_template boolean DEFAULT false NOT NULL,
-    search_box boolean DEFAULT true NOT NULL,
-    view_anon boolean DEFAULT true NOT NULL,
-    navigation boolean DEFAULT false NOT NULL,
-    powered_by integer,
-    brand text,
-    brand_tagline text,
-    brand_description text
-);
+CREATE FUNCTION set_curdict(text) RETURNS void
+    AS '$libdir/tsearch2', 'set_curdict_byname'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 17 (OID 536371)
--- Name: hosts; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 121 (OID 11524579)
+-- Name: dex_init(internal); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE hosts FROM PUBLIC;
-GRANT ALL ON TABLE hosts TO "www-data";
+CREATE FUNCTION dex_init(internal) RETURNS internal
+    AS '$libdir/tsearch2', 'dex_init'
+    LANGUAGE c;
 
 
 --
--- TOC entry 67 (OID 536371)
--- Name: hosts_id_seq; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 122 (OID 11524580)
+-- Name: dex_lexize(internal, internal, integer); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE hosts_id_seq FROM PUBLIC;
-GRANT ALL ON TABLE hosts_id_seq TO "www-data";
+CREATE FUNCTION dex_lexize(internal, internal, integer) RETURNS internal
+    AS '$libdir/tsearch2', 'dex_lexize'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 18 (OID 536379)
--- Name: hostnames; Type: TABLE; Schema: public; Owner: rich
+-- TOC entry 123 (OID 11524582)
+-- Name: snb_en_init(internal); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE TABLE hostnames (
-    hostid integer NOT NULL,
-    name text NOT NULL
-);
+CREATE FUNCTION snb_en_init(internal) RETURNS internal
+    AS '$libdir/tsearch2', 'snb_en_init'
+    LANGUAGE c;
 
 
 --
--- TOC entry 19 (OID 536379)
--- Name: hostnames; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 124 (OID 11524583)
+-- Name: snb_lexize(internal, internal, integer); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE hostnames FROM PUBLIC;
-GRANT ALL ON TABLE hostnames TO "www-data";
+CREATE FUNCTION snb_lexize(internal, internal, integer) RETURNS internal
+    AS '$libdir/tsearch2', 'snb_lexize'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 20 (OID 537151)
--- Name: images; Type: TABLE; Schema: public; Owner: rich
+-- TOC entry 125 (OID 11524585)
+-- Name: snb_ru_init(internal); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE TABLE images (
-    id serial NOT NULL,
-    hostid integer NOT NULL,
-    name text,
-    name_deleted text,
-    image bytea NOT NULL,
-    width integer NOT NULL,
-    height integer NOT NULL,
-    alt text NOT NULL,
-    title text,
-    longdesc text,
-    "class" text,
-    mime_type text NOT NULL,
-    thumbnail bytea,
-    tn_width integer,
-    tn_height integer,
-    tn_mime_type text,
-    upload_date timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL
-);
+CREATE FUNCTION snb_ru_init(internal) RETURNS internal
+    AS '$libdir/tsearch2', 'snb_ru_init'
+    LANGUAGE c;
 
 
 --
--- TOC entry 21 (OID 537151)
--- Name: images; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 126 (OID 11524587)
+-- Name: spell_init(internal); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE images FROM PUBLIC;
-GRANT ALL ON TABLE images TO "www-data";
+CREATE FUNCTION spell_init(internal) RETURNS internal
+    AS '$libdir/tsearch2', 'spell_init'
+    LANGUAGE c;
 
 
 --
--- TOC entry 68 (OID 537151)
--- Name: images_id_seq; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 127 (OID 11524588)
+-- Name: spell_lexize(internal, internal, integer); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE images_id_seq FROM PUBLIC;
-GRANT ALL ON TABLE images_id_seq TO "www-data";
+CREATE FUNCTION spell_lexize(internal, internal, integer) RETURNS internal
+    AS '$libdir/tsearch2', 'spell_lexize'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 22 (OID 537166)
--- Name: files; Type: TABLE; Schema: public; Owner: rich
+-- TOC entry 128 (OID 11524590)
+-- Name: syn_init(internal); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE TABLE files (
-    id serial NOT NULL,
-    hostid integer NOT NULL,
-    name text,
-    name_deleted text,
-    content bytea NOT NULL,
-    title text,
-    mime_type text NOT NULL,
-    upload_date timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL
-);
+CREATE FUNCTION syn_init(internal) RETURNS internal
+    AS '$libdir/tsearch2', 'syn_init'
+    LANGUAGE c;
 
 
 --
--- TOC entry 23 (OID 537166)
--- Name: files; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 129 (OID 11524591)
+-- Name: syn_lexize(internal, internal, integer); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE files FROM PUBLIC;
-GRANT ALL ON TABLE files TO "www-data";
+CREATE FUNCTION syn_lexize(internal, internal, integer) RETURNS internal
+    AS '$libdir/tsearch2', 'syn_lexize'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 69 (OID 537166)
--- Name: files_id_seq; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 14 (OID 11524593)
+-- Name: pg_ts_parser; Type: TABLE; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE files_id_seq FROM PUBLIC;
-GRANT ALL ON TABLE files_id_seq TO "www-data";
+CREATE TABLE pg_ts_parser (
+    prs_name text NOT NULL,
+    prs_start oid NOT NULL,
+    prs_nexttoken oid NOT NULL,
+    prs_end oid NOT NULL,
+    prs_headline oid NOT NULL,
+    prs_lextype oid NOT NULL,
+    prs_comment text
+);
 
 
 --
--- TOC entry 24 (OID 540816)
--- Name: users; Type: TABLE; Schema: public; Owner: rich
+-- TOC entry 15 (OID 11524593)
+-- Name: pg_ts_parser; Type: ACL; Schema: public; Owner: postgres
 --
 
-CREATE TABLE users (
-    id serial NOT NULL,
-    hostid integer NOT NULL,
-    name text NOT NULL,
-    "password" text NOT NULL,
-    email text,
-    registration_date date DEFAULT ('now'::text)::date NOT NULL,
-    can_edit boolean DEFAULT true NOT NULL,
-    can_manage_users boolean DEFAULT false NOT NULL,
-    can_manage_contacts boolean DEFAULT false NOT NULL,
-    can_manage_site boolean DEFAULT false NOT NULL,
-    can_edit_global_css boolean DEFAULT false NOT NULL,
-    force_password_change boolean DEFAULT false NOT NULL,
-    can_import_mail boolean DEFAULT false NOT NULL,
-    email_notify boolean DEFAULT true NOT NULL,
-    invite text
-);
+REVOKE ALL ON TABLE pg_ts_parser FROM PUBLIC;
+GRANT SELECT ON TABLE pg_ts_parser TO rich;
+GRANT SELECT ON TABLE pg_ts_parser TO "www-data";
 
 
 --
--- TOC entry 25 (OID 540816)
--- Name: users; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 5 (OID 11524601)
+-- Name: tokentype; Type: TYPE; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE users FROM PUBLIC;
-GRANT ALL ON TABLE users TO "www-data";
+CREATE TYPE tokentype AS (
+       tokid integer,
+       alias text,
+       descr text
+);
 
 
 --
--- TOC entry 70 (OID 540816)
--- Name: users_id_seq; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 130 (OID 11524602)
+-- Name: token_type(integer); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE users_id_seq FROM PUBLIC;
-GRANT ALL ON TABLE users_id_seq TO "www-data";
+CREATE FUNCTION token_type(integer) RETURNS SETOF tokentype
+    AS '$libdir/tsearch2', 'token_type'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 26 (OID 540832)
--- Name: usercookies; Type: TABLE; Schema: public; Owner: rich
+-- TOC entry 131 (OID 11524603)
+-- Name: token_type(text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE TABLE usercookies (
-    userid integer NOT NULL,
-    cookie text NOT NULL
-);
+CREATE FUNCTION token_type(text) RETURNS SETOF tokentype
+    AS '$libdir/tsearch2', 'token_type_byname'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 27 (OID 540832)
--- Name: usercookies; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 132 (OID 11524604)
+-- Name: token_type(); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE usercookies FROM PUBLIC;
-GRANT ALL ON TABLE usercookies TO "www-data";
+CREATE FUNCTION token_type() RETURNS SETOF tokentype
+    AS '$libdir/tsearch2', 'token_type_current'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 28 (OID 540961)
--- Name: sitemenu; Type: TABLE; Schema: public; Owner: rich
+-- TOC entry 133 (OID 11524605)
+-- Name: set_curprs(integer); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE TABLE sitemenu (
-    hostid integer NOT NULL,
-    url text NOT NULL,
-    label text NOT NULL,
-    ordering integer NOT NULL
-);
+CREATE FUNCTION set_curprs(integer) RETURNS void
+    AS '$libdir/tsearch2', 'set_curprs'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 29 (OID 540961)
--- Name: sitemenu; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 134 (OID 11524606)
+-- Name: set_curprs(text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE sitemenu FROM PUBLIC;
-GRANT ALL ON TABLE sitemenu TO "www-data";
+CREATE FUNCTION set_curprs(text) RETURNS void
+    AS '$libdir/tsearch2', 'set_curprs_byname'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 30 (OID 542605)
--- Name: contacts; Type: TABLE; Schema: public; Owner: rich
+-- TOC entry 6 (OID 11524608)
+-- Name: tokenout; Type: TYPE; Schema: public; Owner: postgres
 --
 
-CREATE TABLE contacts (
-    id serial NOT NULL,
-    hostid integer NOT NULL,
-    name text NOT NULL,
-    subject text NOT NULL
+CREATE TYPE tokenout AS (
+       tokid integer,
+       token text
 );
 
 
 --
--- TOC entry 31 (OID 542605)
--- Name: contacts; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 135 (OID 11524609)
+-- Name: parse(oid, text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE contacts FROM PUBLIC;
-GRANT ALL ON TABLE contacts TO "www-data";
+CREATE FUNCTION parse(oid, text) RETURNS SETOF tokenout
+    AS '$libdir/tsearch2', 'parse'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 71 (OID 542605)
--- Name: contacts_id_seq; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 136 (OID 11524610)
+-- Name: parse(text, text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE contacts_id_seq FROM PUBLIC;
-GRANT ALL ON TABLE contacts_id_seq TO "www-data";
+CREATE FUNCTION parse(text, text) RETURNS SETOF tokenout
+    AS '$libdir/tsearch2', 'parse_byname'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 32 (OID 542617)
--- Name: contact_emails; Type: TABLE; Schema: public; Owner: rich
+-- TOC entry 137 (OID 11524611)
+-- Name: parse(text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE TABLE contact_emails (
-    contactid integer NOT NULL,
-    email text NOT NULL
-);
+CREATE FUNCTION parse(text) RETURNS SETOF tokenout
+    AS '$libdir/tsearch2', 'parse_current'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 33 (OID 542617)
--- Name: contact_emails; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 138 (OID 11524612)
+-- Name: prsd_start(internal, integer); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE contact_emails FROM PUBLIC;
-GRANT ALL ON TABLE contact_emails TO "www-data";
+CREATE FUNCTION prsd_start(internal, integer) RETURNS internal
+    AS '$libdir/tsearch2', 'prsd_start'
+    LANGUAGE c;
 
 
 --
--- TOC entry 34 (OID 543499)
--- Name: themes; Type: TABLE; Schema: public; Owner: rich
+-- TOC entry 139 (OID 11524613)
+-- Name: prsd_getlexeme(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE TABLE themes (
-    theme_css text NOT NULL,
-    name text NOT NULL,
-    description text NOT NULL
-);
+CREATE FUNCTION prsd_getlexeme(internal, internal, internal) RETURNS integer
+    AS '$libdir/tsearch2', 'prsd_getlexeme'
+    LANGUAGE c;
 
 
 --
--- TOC entry 35 (OID 543499)
--- Name: themes; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 140 (OID 11524614)
+-- Name: prsd_end(internal); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE themes FROM PUBLIC;
-GRANT SELECT ON TABLE themes TO "www-data";
+CREATE FUNCTION prsd_end(internal) RETURNS void
+    AS '$libdir/tsearch2', 'prsd_end'
+    LANGUAGE c;
 
 
 --
--- TOC entry 36 (OID 543592)
--- Name: server_settings; Type: TABLE; Schema: public; Owner: rich
+-- TOC entry 141 (OID 11524615)
+-- Name: prsd_lextype(internal); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE TABLE server_settings (
-    "version" integer NOT NULL,
-    stats_page text,
-    crash_email text
-);
+CREATE FUNCTION prsd_lextype(internal) RETURNS internal
+    AS '$libdir/tsearch2', 'prsd_lextype'
+    LANGUAGE c;
 
 
 --
--- TOC entry 38 (OID 543592)
--- Name: server_settings; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 142 (OID 11524616)
+-- Name: prsd_headline(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE server_settings FROM PUBLIC;
-GRANT SELECT ON TABLE server_settings TO "www-data";
+CREATE FUNCTION prsd_headline(internal, internal, internal) RETURNS internal
+    AS '$libdir/tsearch2', 'prsd_headline'
+    LANGUAGE c;
 
 
 --
--- TOC entry 39 (OID 543754)
--- Name: page_emails; Type: TABLE; Schema: public; Owner: rich
+-- TOC entry 16 (OID 11524618)
+-- Name: pg_ts_cfg; Type: TABLE; Schema: public; Owner: postgres
 --
 
-CREATE TABLE page_emails (
-    hostid integer NOT NULL,
-    url text NOT NULL,
-    email text NOT NULL,
-    entry_date date DEFAULT ('now'::text)::date NOT NULL,
-    last_sent date DEFAULT ('now'::text)::date NOT NULL,
-    pending text,
-    opt_out text NOT NULL
+CREATE TABLE pg_ts_cfg (
+    ts_name text NOT NULL,
+    prs_name text NOT NULL,
+    locale text
 );
 
 
 --
--- TOC entry 40 (OID 543754)
--- Name: page_emails; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 17 (OID 11524618)
+-- Name: pg_ts_cfg; Type: ACL; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE page_emails FROM PUBLIC;
-GRANT ALL ON TABLE page_emails TO "www-data";
+REVOKE ALL ON TABLE pg_ts_cfg FROM PUBLIC;
+GRANT SELECT ON TABLE pg_ts_cfg TO rich;
+GRANT SELECT ON TABLE pg_ts_cfg TO "www-data";
 
 
 --
--- TOC entry 41 (OID 543785)
--- Name: mailing_lists; Type: TABLE; Schema: public; Owner: rich
+-- TOC entry 18 (OID 11524625)
+-- Name: pg_ts_cfgmap; Type: TABLE; Schema: public; Owner: postgres
 --
 
-CREATE TABLE mailing_lists (
-    hostid integer NOT NULL,
-    email text NOT NULL,
-    entry_date date DEFAULT ('now'::text)::date NOT NULL,
-    pending text,
-    opt_out text NOT NULL,
-    name text NOT NULL
+CREATE TABLE pg_ts_cfgmap (
+    ts_name text NOT NULL,
+    tok_alias text NOT NULL,
+    dict_name text[]
 );
 
 
 --
--- TOC entry 42 (OID 543785)
--- Name: mailing_lists; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 19 (OID 11524625)
+-- Name: pg_ts_cfgmap; Type: ACL; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE mailing_lists FROM PUBLIC;
-GRANT ALL ON TABLE mailing_lists TO "www-data";
+REVOKE ALL ON TABLE pg_ts_cfgmap FROM PUBLIC;
+GRANT SELECT ON TABLE pg_ts_cfgmap TO rich;
+GRANT SELECT ON TABLE pg_ts_cfgmap TO "www-data";
 
 
 --
--- TOC entry 43 (OID 544445)
--- Name: links; Type: TABLE; Schema: public; Owner: rich
+-- TOC entry 143 (OID 11524632)
+-- Name: set_curcfg(integer); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE TABLE links (
-    hostid integer NOT NULL,
-    from_url text NOT NULL,
-    to_url text NOT NULL,
-    CONSTRAINT links_not_selfref_cn CHECK ((from_url <> to_url))
-);
+CREATE FUNCTION set_curcfg(integer) RETURNS void
+    AS '$libdir/tsearch2', 'set_curcfg'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 44 (OID 544445)
--- Name: links; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 144 (OID 11524633)
+-- Name: set_curcfg(text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE links FROM PUBLIC;
-GRANT ALL ON TABLE links TO "www-data";
+CREATE FUNCTION set_curcfg(text) RETURNS void
+    AS '$libdir/tsearch2', 'set_curcfg_byname'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 45 (OID 547939)
--- Name: templates; Type: TABLE; Schema: public; Owner: rich
+-- TOC entry 145 (OID 11524634)
+-- Name: show_curcfg(); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE TABLE templates (
-    id serial NOT NULL,
-    title_regexp text NOT NULL,
-    url_regexp text NOT NULL,
-    extension text NOT NULL,
-    ordering integer NOT NULL
-);
+CREATE FUNCTION show_curcfg() RETURNS oid
+    AS '$libdir/tsearch2', 'show_curcfg'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 46 (OID 547939)
--- Name: templates; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 146 (OID 11524696)
+-- Name: tsvector_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE templates FROM PUBLIC;
-GRANT SELECT ON TABLE templates TO "www-data";
+CREATE FUNCTION tsvector_in(cstring) RETURNS tsvector
+    AS '$libdir/tsearch2', 'tsvector_in'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 72 (OID 547939)
--- Name: templates_id_seq; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 147 (OID 11524697)
+-- Name: tsvector_out(tsvector); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE templates_id_seq FROM PUBLIC;
+CREATE FUNCTION tsvector_out(tsvector) RETURNS cstring
+    AS '$libdir/tsearch2', 'tsvector_out'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 47 (OID 551123)
--- Name: recently_visited; Type: TABLE; Schema: public; Owner: rich
+-- TOC entry 7 (OID 11524695)
+-- Name: tsvector; Type: TYPE; Schema: public; Owner: postgres
 --
 
-CREATE TABLE recently_visited (
-    userid integer NOT NULL,
-    hostid integer NOT NULL,
-    url text NOT NULL,
-    visit_time timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL
+CREATE TYPE tsvector (
+    INTERNALLENGTH = variable,
+    INPUT = tsvector_in,
+    OUTPUT = tsvector_out,
+    ALIGNMENT = int4,
+    STORAGE = extended
 );
 
 
 --
--- TOC entry 48 (OID 551123)
--- Name: recently_visited; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 148 (OID 11524699)
+-- Name: length(tsvector); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE recently_visited FROM PUBLIC;
-GRANT ALL ON TABLE recently_visited TO "www-data";
+CREATE FUNCTION length(tsvector) RETURNS integer
+    AS '$libdir/tsearch2', 'tsvector_length'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 49 (OID 551675)
--- Name: messages; Type: TABLE; Schema: public; Owner: rich
+-- TOC entry 149 (OID 11524700)
+-- Name: to_tsvector(oid, text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE TABLE messages (
-    id serial NOT NULL,
-    subject text NOT NULL,
-    inet_message_id text NOT NULL,
-    message_date timestamp with time zone NOT NULL,
-    hostid integer NOT NULL
-);
+CREATE FUNCTION to_tsvector(oid, text) RETURNS tsvector
+    AS '$libdir/tsearch2', 'to_tsvector'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 50 (OID 551675)
--- Name: messages; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 150 (OID 11524701)
+-- Name: to_tsvector(text, text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE messages FROM PUBLIC;
-GRANT ALL ON TABLE messages TO "www-data";
+CREATE FUNCTION to_tsvector(text, text) RETURNS tsvector
+    AS '$libdir/tsearch2', 'to_tsvector_name'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 73 (OID 551675)
--- Name: messages_id_seq; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 151 (OID 11524702)
+-- Name: to_tsvector(text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE messages_id_seq FROM PUBLIC;
-GRANT ALL ON TABLE messages_id_seq TO "www-data";
+CREATE FUNCTION to_tsvector(text) RETURNS tsvector
+    AS '$libdir/tsearch2', 'to_tsvector_current'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 51 (OID 551685)
--- Name: msg_references; Type: TABLE; Schema: public; Owner: rich
+-- TOC entry 152 (OID 11524703)
+-- Name: strip(tsvector); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE TABLE msg_references (
-    message_id integer NOT NULL,
-    inet_message_id text NOT NULL,
-    ordering integer NOT NULL
-);
+CREATE FUNCTION strip(tsvector) RETURNS tsvector
+    AS '$libdir/tsearch2', 'strip'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 52 (OID 551685)
--- Name: msg_references; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 153 (OID 11524704)
+-- Name: setweight(tsvector, "char"); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE msg_references FROM PUBLIC;
-GRANT ALL ON TABLE msg_references TO "www-data";
+CREATE FUNCTION setweight(tsvector, "char") RETURNS tsvector
+    AS '$libdir/tsearch2', 'setweight'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 53 (OID 607075)
--- Name: powered_by; Type: TABLE; Schema: public; Owner: rich
+-- TOC entry 154 (OID 11524705)
+-- Name: concat(tsvector, tsvector); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE TABLE powered_by (
-    id serial NOT NULL,
-    name text NOT NULL,
-    url text NOT NULL
-);
+CREATE FUNCTION concat(tsvector, tsvector) RETURNS tsvector
+    AS '$libdir/tsearch2', 'concat'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 54 (OID 607075)
--- Name: powered_by; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 194 (OID 11524706)
+-- Name: ||; Type: OPERATOR; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE powered_by FROM PUBLIC;
-GRANT SELECT ON TABLE powered_by TO "www-data";
+CREATE OPERATOR || (
+    PROCEDURE = concat,
+    LEFTARG = tsvector,
+    RIGHTARG = tsvector
+);
 
 
 --
--- TOC entry 55 (OID 607136)
--- Name: pending_email_changes; Type: TABLE; Schema: public; Owner: rich
+-- TOC entry 155 (OID 11524708)
+-- Name: tsquery_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE TABLE pending_email_changes (
-    "key" text NOT NULL,
-    change_date date DEFAULT ('now'::text)::date NOT NULL,
-    userid integer NOT NULL,
-    email text NOT NULL
-);
+CREATE FUNCTION tsquery_in(cstring) RETURNS tsquery
+    AS '$libdir/tsearch2', 'tsquery_in'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 56 (OID 607136)
--- Name: pending_email_changes; Type: ACL; Schema: public; Owner: rich
+-- TOC entry 156 (OID 11524709)
+-- Name: tsquery_out(tsquery); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE pending_email_changes FROM PUBLIC;
-GRANT ALL ON TABLE pending_email_changes TO "www-data";
+CREATE FUNCTION tsquery_out(tsquery) RETURNS cstring
+    AS '$libdir/tsearch2', 'tsquery_out'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 57 (OID 618606)
--- Name: pg_ts_dict; Type: TABLE; Schema: public; Owner: postgres
+-- TOC entry 8 (OID 11524707)
+-- Name: tsquery; Type: TYPE; Schema: public; Owner: postgres
 --
 
-CREATE TABLE pg_ts_dict (
-    dict_name text NOT NULL,
-    dict_init regprocedure,
-    dict_initoption text,
-    dict_lexize regprocedure NOT NULL,
-    dict_comment text
-);
-
-
---
--- TOC entry 58 (OID 618606)
--- Name: pg_ts_dict; Type: ACL; Schema: public; Owner: postgres
---
-
-REVOKE ALL ON TABLE pg_ts_dict FROM PUBLIC;
-GRANT SELECT ON TABLE pg_ts_dict TO rich;
-GRANT SELECT ON TABLE pg_ts_dict TO "www-data";
+CREATE TYPE tsquery (
+    INTERNALLENGTH = variable,
+    INPUT = tsquery_in,
+    OUTPUT = tsquery_out,
+    ALIGNMENT = int4,
+    STORAGE = plain
+);
 
 
 --
--- TOC entry 114 (OID 618613)
--- Name: lexize(oid, text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 157 (OID 11524711)
+-- Name: querytree(tsquery); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION lexize(oid, text) RETURNS text[]
-    AS '$libdir/tsearch2', 'lexize'
+CREATE FUNCTION querytree(tsquery) RETURNS text
+    AS '$libdir/tsearch2', 'tsquerytree'
     LANGUAGE c STRICT;
 
 
 --
--- TOC entry 115 (OID 618614)
--- Name: lexize(text, text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 158 (OID 11524712)
+-- Name: to_tsquery(oid, text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION lexize(text, text) RETURNS text[]
-    AS '$libdir/tsearch2', 'lexize_byname'
-    LANGUAGE c STRICT;
+CREATE FUNCTION to_tsquery(oid, text) RETURNS tsquery
+    AS '$libdir/tsearch2', 'to_tsquery'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 116 (OID 618615)
--- Name: lexize(text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 159 (OID 11524713)
+-- Name: to_tsquery(text, text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION lexize(text) RETURNS text[]
-    AS '$libdir/tsearch2', 'lexize_bycurrent'
-    LANGUAGE c STRICT;
+CREATE FUNCTION to_tsquery(text, text) RETURNS tsquery
+    AS '$libdir/tsearch2', 'to_tsquery_name'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 117 (OID 618616)
--- Name: set_curdict(integer); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 160 (OID 11524714)
+-- Name: to_tsquery(text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION set_curdict(integer) RETURNS void
-    AS '$libdir/tsearch2', 'set_curdict'
-    LANGUAGE c STRICT;
+CREATE FUNCTION to_tsquery(text) RETURNS tsquery
+    AS '$libdir/tsearch2', 'to_tsquery_current'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 118 (OID 618617)
--- Name: set_curdict(text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 161 (OID 11524715)
+-- Name: exectsq(tsvector, tsquery); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION set_curdict(text) RETURNS void
-    AS '$libdir/tsearch2', 'set_curdict_byname'
-    LANGUAGE c STRICT;
+CREATE FUNCTION exectsq(tsvector, tsquery) RETURNS boolean
+    AS '$libdir/tsearch2', 'exectsq'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 119 (OID 618618)
--- Name: dex_init(text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 163 (OID 11524716)
+-- Name: rexectsq(tsquery, tsvector); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION dex_init(text) RETURNS internal
-    AS '$libdir/tsearch2', 'dex_init'
-    LANGUAGE c;
+CREATE FUNCTION rexectsq(tsquery, tsvector) RETURNS boolean
+    AS '$libdir/tsearch2', 'rexectsq'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 120 (OID 618619)
--- Name: dex_lexize(internal, internal, integer); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 196 (OID 11524717)
+-- Name: @@; Type: OPERATOR; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION dex_lexize(internal, internal, integer) RETURNS internal
-    AS '$libdir/tsearch2', 'dex_lexize'
-    LANGUAGE c STRICT;
+CREATE OPERATOR @@ (
+    PROCEDURE = rexectsq,
+    LEFTARG = tsquery,
+    RIGHTARG = tsvector,
+    COMMUTATOR = @@,
+    RESTRICT = contsel,
+    JOIN = contjoinsel
+);
 
 
 --
--- TOC entry 121 (OID 618621)
--- Name: snb_en_init(text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 195 (OID 11524718)
+-- Name: @@; Type: OPERATOR; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION snb_en_init(text) RETURNS internal
-    AS '$libdir/tsearch2', 'snb_en_init'
-    LANGUAGE c;
+CREATE OPERATOR @@ (
+    PROCEDURE = exectsq,
+    LEFTARG = tsvector,
+    RIGHTARG = tsquery,
+    COMMUTATOR = @@,
+    RESTRICT = contsel,
+    JOIN = contjoinsel
+);
 
 
 --
--- TOC entry 122 (OID 618622)
--- Name: snb_lexize(internal, internal, integer); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 165 (OID 11524719)
+-- Name: tsearch2(); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION snb_lexize(internal, internal, integer) RETURNS internal
-    AS '$libdir/tsearch2', 'snb_lexize'
-    LANGUAGE c STRICT;
+CREATE FUNCTION tsearch2() RETURNS "trigger"
+    AS '$libdir/tsearch2', 'tsearch2'
+    LANGUAGE c;
 
 
 --
--- TOC entry 123 (OID 618624)
--- Name: snb_ru_init(text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 166 (OID 11524720)
+-- Name: rank(real[], tsvector, tsquery); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION snb_ru_init(text) RETURNS internal
-    AS '$libdir/tsearch2', 'snb_ru_init'
-    LANGUAGE c;
+CREATE FUNCTION rank(real[], tsvector, tsquery) RETURNS real
+    AS '$libdir/tsearch2', 'rank'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 124 (OID 618626)
--- Name: spell_init(text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 167 (OID 11524721)
+-- Name: rank(real[], tsvector, tsquery, integer); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION spell_init(text) RETURNS internal
-    AS '$libdir/tsearch2', 'spell_init'
-    LANGUAGE c;
+CREATE FUNCTION rank(real[], tsvector, tsquery, integer) RETURNS real
+    AS '$libdir/tsearch2', 'rank'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 125 (OID 618627)
--- Name: spell_lexize(internal, internal, integer); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 168 (OID 11524722)
+-- Name: rank(tsvector, tsquery); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION spell_lexize(internal, internal, integer) RETURNS internal
-    AS '$libdir/tsearch2', 'spell_lexize'
-    LANGUAGE c STRICT;
+CREATE FUNCTION rank(tsvector, tsquery) RETURNS real
+    AS '$libdir/tsearch2', 'rank_def'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 126 (OID 618629)
--- Name: syn_init(text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 169 (OID 11524723)
+-- Name: rank(tsvector, tsquery, integer); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION syn_init(text) RETURNS internal
-    AS '$libdir/tsearch2', 'syn_init'
-    LANGUAGE c;
+CREATE FUNCTION rank(tsvector, tsquery, integer) RETURNS real
+    AS '$libdir/tsearch2', 'rank_def'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 127 (OID 618630)
--- Name: syn_lexize(internal, internal, integer); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 170 (OID 11524724)
+-- Name: rank_cd(integer, tsvector, tsquery); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION syn_lexize(internal, internal, integer) RETURNS internal
-    AS '$libdir/tsearch2', 'syn_lexize'
-    LANGUAGE c STRICT;
+CREATE FUNCTION rank_cd(integer, tsvector, tsquery) RETURNS real
+    AS '$libdir/tsearch2', 'rank_cd'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 59 (OID 618632)
--- Name: pg_ts_parser; Type: TABLE; Schema: public; Owner: postgres
+-- TOC entry 171 (OID 11524725)
+-- Name: rank_cd(integer, tsvector, tsquery, integer); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE TABLE pg_ts_parser (
-    prs_name text NOT NULL,
-    prs_start regprocedure NOT NULL,
-    prs_nexttoken regprocedure NOT NULL,
-    prs_end regprocedure NOT NULL,
-    prs_headline regprocedure NOT NULL,
-    prs_lextype regprocedure NOT NULL,
-    prs_comment text
-);
+CREATE FUNCTION rank_cd(integer, tsvector, tsquery, integer) RETURNS real
+    AS '$libdir/tsearch2', 'rank_cd'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 60 (OID 618632)
--- Name: pg_ts_parser; Type: ACL; Schema: public; Owner: postgres
+-- TOC entry 172 (OID 11524726)
+-- Name: rank_cd(tsvector, tsquery); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE pg_ts_parser FROM PUBLIC;
-GRANT SELECT ON TABLE pg_ts_parser TO rich;
-GRANT SELECT ON TABLE pg_ts_parser TO "www-data";
+CREATE FUNCTION rank_cd(tsvector, tsquery) RETURNS real
+    AS '$libdir/tsearch2', 'rank_cd_def'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 5 (OID 618640)
--- Name: tokentype; Type: TYPE; Schema: public; Owner: postgres
+-- TOC entry 173 (OID 11524727)
+-- Name: rank_cd(tsvector, tsquery, integer); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE TYPE tokentype AS (
-       tokid integer,
-       alias text,
-       descr text
-);
+CREATE FUNCTION rank_cd(tsvector, tsquery, integer) RETURNS real
+    AS '$libdir/tsearch2', 'rank_cd_def'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 128 (OID 618641)
--- Name: token_type(integer); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 174 (OID 11524728)
+-- Name: headline(oid, text, tsquery, text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION token_type(integer) RETURNS SETOF tokentype
-    AS '$libdir/tsearch2', 'token_type'
-    LANGUAGE c STRICT;
+CREATE FUNCTION headline(oid, text, tsquery, text) RETURNS text
+    AS '$libdir/tsearch2', 'headline'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 129 (OID 618642)
--- Name: token_type(text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 175 (OID 11524729)
+-- Name: headline(oid, text, tsquery); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION token_type(text) RETURNS SETOF tokentype
-    AS '$libdir/tsearch2', 'token_type_byname'
-    LANGUAGE c STRICT;
+CREATE FUNCTION headline(oid, text, tsquery) RETURNS text
+    AS '$libdir/tsearch2', 'headline'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 130 (OID 618643)
--- Name: token_type(); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 176 (OID 11524730)
+-- Name: headline(text, text, tsquery, text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION token_type() RETURNS SETOF tokentype
-    AS '$libdir/tsearch2', 'token_type_current'
-    LANGUAGE c STRICT;
+CREATE FUNCTION headline(text, text, tsquery, text) RETURNS text
+    AS '$libdir/tsearch2', 'headline_byname'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 131 (OID 618644)
--- Name: set_curprs(integer); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 177 (OID 11524731)
+-- Name: headline(text, text, tsquery); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION set_curprs(integer) RETURNS void
-    AS '$libdir/tsearch2', 'set_curprs'
-    LANGUAGE c STRICT;
+CREATE FUNCTION headline(text, text, tsquery) RETURNS text
+    AS '$libdir/tsearch2', 'headline_byname'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 132 (OID 618645)
--- Name: set_curprs(text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 178 (OID 11524732)
+-- Name: headline(text, tsquery, text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION set_curprs(text) RETURNS void
-    AS '$libdir/tsearch2', 'set_curprs_byname'
-    LANGUAGE c STRICT;
+CREATE FUNCTION headline(text, tsquery, text) RETURNS text
+    AS '$libdir/tsearch2', 'headline_current'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 6 (OID 618647)
--- Name: tokenout; Type: TYPE; Schema: public; Owner: postgres
+-- TOC entry 179 (OID 11524733)
+-- Name: headline(text, tsquery); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE TYPE tokenout AS (
-       tokid integer,
-       token text
-);
+CREATE FUNCTION headline(text, tsquery) RETURNS text
+    AS '$libdir/tsearch2', 'headline_current'
+    LANGUAGE c IMMUTABLE STRICT;
 
 
 --
--- TOC entry 133 (OID 618648)
--- Name: parse(oid, text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 180 (OID 11524735)
+-- Name: gtsvector_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION parse(oid, text) RETURNS SETOF tokenout
-    AS '$libdir/tsearch2', 'parse'
+CREATE FUNCTION gtsvector_in(cstring) RETURNS gtsvector
+    AS '$libdir/tsearch2', 'gtsvector_in'
     LANGUAGE c STRICT;
 
 
 --
--- TOC entry 134 (OID 618649)
--- Name: parse(text, text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 181 (OID 11524736)
+-- Name: gtsvector_out(gtsvector); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION parse(text, text) RETURNS SETOF tokenout
-    AS '$libdir/tsearch2', 'parse_byname'
+CREATE FUNCTION gtsvector_out(gtsvector) RETURNS cstring
+    AS '$libdir/tsearch2', 'gtsvector_out'
     LANGUAGE c STRICT;
 
 
 --
--- TOC entry 135 (OID 618650)
--- Name: parse(text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 9 (OID 11524734)
+-- Name: gtsvector; Type: TYPE; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION parse(text) RETURNS SETOF tokenout
-    AS '$libdir/tsearch2', 'parse_current'
-    LANGUAGE c STRICT;
+CREATE TYPE gtsvector (
+    INTERNALLENGTH = variable,
+    INPUT = gtsvector_in,
+    OUTPUT = gtsvector_out,
+    ALIGNMENT = int4,
+    STORAGE = plain
+);
 
 
 --
--- TOC entry 136 (OID 618651)
--- Name: prsd_start(internal, integer); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 182 (OID 11524738)
+-- Name: gtsvector_consistent(gtsvector, internal, integer); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION prsd_start(internal, integer) RETURNS internal
-    AS '$libdir/tsearch2', 'prsd_start'
+CREATE FUNCTION gtsvector_consistent(gtsvector, internal, integer) RETURNS boolean
+    AS '$libdir/tsearch2', 'gtsvector_consistent'
     LANGUAGE c;
 
 
 --
--- TOC entry 137 (OID 618652)
--- Name: prsd_getlexeme(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 183 (OID 11524739)
+-- Name: gtsvector_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION prsd_getlexeme(internal, internal, internal) RETURNS integer
-    AS '$libdir/tsearch2', 'prsd_getlexeme'
+CREATE FUNCTION gtsvector_compress(internal) RETURNS internal
+    AS '$libdir/tsearch2', 'gtsvector_compress'
     LANGUAGE c;
 
 
 --
--- TOC entry 138 (OID 618653)
--- Name: prsd_end(internal); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 184 (OID 11524740)
+-- Name: gtsvector_decompress(internal); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION prsd_end(internal) RETURNS void
-    AS '$libdir/tsearch2', 'prsd_end'
+CREATE FUNCTION gtsvector_decompress(internal) RETURNS internal
+    AS '$libdir/tsearch2', 'gtsvector_decompress'
     LANGUAGE c;
 
 
 --
--- TOC entry 139 (OID 618654)
--- Name: prsd_lextype(internal); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 185 (OID 11524741)
+-- Name: gtsvector_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION prsd_lextype(internal) RETURNS internal
-    AS '$libdir/tsearch2', 'prsd_lextype'
+CREATE FUNCTION gtsvector_penalty(internal, internal, internal) RETURNS internal
+    AS '$libdir/tsearch2', 'gtsvector_penalty'
+    LANGUAGE c STRICT;
+
+
+--
+-- TOC entry 186 (OID 11524742)
+-- Name: gtsvector_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION gtsvector_picksplit(internal, internal) RETURNS internal
+    AS '$libdir/tsearch2', 'gtsvector_picksplit'
     LANGUAGE c;
 
 
 --
--- TOC entry 140 (OID 618655)
--- Name: prsd_headline(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 187 (OID 11524743)
+-- Name: gtsvector_union(bytea, internal); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION prsd_headline(internal, internal, internal) RETURNS internal
-    AS '$libdir/tsearch2', 'prsd_headline'
+CREATE FUNCTION gtsvector_union(bytea, internal) RETURNS integer[]
+    AS '$libdir/tsearch2', 'gtsvector_union'
     LANGUAGE c;
 
 
 --
--- TOC entry 61 (OID 618657)
--- Name: pg_ts_cfg; Type: TABLE; Schema: public; Owner: postgres
+-- TOC entry 188 (OID 11524744)
+-- Name: gtsvector_same(gtsvector, gtsvector, internal); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE TABLE pg_ts_cfg (
-    ts_name text NOT NULL,
-    prs_name text NOT NULL,
-    locale text
-);
+CREATE FUNCTION gtsvector_same(gtsvector, gtsvector, internal) RETURNS internal
+    AS '$libdir/tsearch2', 'gtsvector_same'
+    LANGUAGE c;
 
 
 --
--- TOC entry 62 (OID 618657)
--- Name: pg_ts_cfg; Type: ACL; Schema: public; Owner: postgres
+-- TOC entry 197 (OID 11524745)
+-- Name: gist_tsvector_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE pg_ts_cfg FROM PUBLIC;
-GRANT SELECT ON TABLE pg_ts_cfg TO rich;
-GRANT SELECT ON TABLE pg_ts_cfg TO "www-data";
+CREATE OPERATOR CLASS gist_tsvector_ops
+    DEFAULT FOR TYPE tsvector USING gist AS
+    STORAGE gtsvector ,
+    OPERATOR 1 @@(tsvector,tsquery) RECHECK ,
+    FUNCTION 1 gtsvector_consistent(gtsvector,internal,integer) ,
+    FUNCTION 2 gtsvector_union(bytea,internal) ,
+    FUNCTION 3 gtsvector_compress(internal) ,
+    FUNCTION 4 gtsvector_decompress(internal) ,
+    FUNCTION 5 gtsvector_penalty(internal,internal,internal) ,
+    FUNCTION 6 gtsvector_picksplit(internal,internal) ,
+    FUNCTION 7 gtsvector_same(gtsvector,gtsvector,internal);
 
 
 --
--- TOC entry 63 (OID 618664)
--- Name: pg_ts_cfgmap; Type: TABLE; Schema: public; Owner: postgres
+-- TOC entry 10 (OID 11524747)
+-- Name: statinfo; Type: TYPE; Schema: public; Owner: postgres
 --
 
-CREATE TABLE pg_ts_cfgmap (
-    ts_name text NOT NULL,
-    tok_alias text NOT NULL,
-    dict_name text[]
+CREATE TYPE statinfo AS (
+       word text,
+       ndoc integer,
+       nentry integer
 );
 
 
 --
--- TOC entry 64 (OID 618664)
--- Name: pg_ts_cfgmap; Type: ACL; Schema: public; Owner: postgres
+-- TOC entry 189 (OID 11524748)
+-- Name: stat(text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-REVOKE ALL ON TABLE pg_ts_cfgmap FROM PUBLIC;
-GRANT SELECT ON TABLE pg_ts_cfgmap TO rich;
-GRANT SELECT ON TABLE pg_ts_cfgmap TO "www-data";
+CREATE FUNCTION stat(text) RETURNS SETOF statinfo
+    AS '$libdir/tsearch2', 'ts_stat'
+    LANGUAGE c STRICT;
 
 
 --
--- TOC entry 141 (OID 618671)
--- Name: set_curcfg(integer); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 190 (OID 11524749)
+-- Name: reset_tsearch(); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION set_curcfg(integer) RETURNS void
-    AS '$libdir/tsearch2', 'set_curcfg'
+CREATE FUNCTION reset_tsearch() RETURNS void
+    AS '$libdir/tsearch2', 'reset_tsearch'
     LANGUAGE c STRICT;
 
 
 --
--- TOC entry 142 (OID 618672)
--- Name: set_curcfg(text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 191 (OID 11524750)
+-- Name: get_covers(tsvector, tsquery); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION set_curcfg(text) RETURNS void
-    AS '$libdir/tsearch2', 'set_curcfg_byname'
+CREATE FUNCTION get_covers(tsvector, tsquery) RETURNS text
+    AS '$libdir/tsearch2', 'get_covers'
     LANGUAGE c STRICT;
 
 
 --
--- TOC entry 143 (OID 618673)
--- Name: show_curcfg(); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 11 (OID 11524752)
+-- Name: tsdebug; Type: TYPE; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION show_curcfg() RETURNS oid
-    AS '$libdir/tsearch2', 'show_curcfg'
-    LANGUAGE c STRICT;
+CREATE TYPE tsdebug AS (
+       ts_name text,
+       tok_type text,
+       description text,
+       token text,
+       dict_name text[],
+       tsvector tsvector
+);
 
 
 --
--- TOC entry 144 (OID 618735)
--- Name: tsvector_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 192 (OID 11524753)
+-- Name: _get_parser_from_curcfg(); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION tsvector_in(cstring) RETURNS tsvector
-    AS '$libdir/tsearch2', 'tsvector_in'
-    LANGUAGE c STRICT;
+CREATE FUNCTION _get_parser_from_curcfg() RETURNS text
+    AS ' select prs_name from pg_ts_cfg where oid = show_curcfg() '
+    LANGUAGE sql IMMUTABLE STRICT;
 
 
 --
--- TOC entry 145 (OID 618736)
--- Name: tsvector_out(tsvector); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 193 (OID 11524754)
+-- Name: ts_debug(text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
-CREATE FUNCTION tsvector_out(tsvector) RETURNS cstring
-    AS '$libdir/tsearch2', 'tsvector_out'
-    LANGUAGE c STRICT;
+CREATE FUNCTION ts_debug(text) RETURNS SETOF tsdebug
+    AS '
+select 
+        m.ts_name,
+        t.alias as tok_type,
+        t.descr as description,
+        p.token,
+        m.dict_name,
+        strip(to_tsvector(p.token)) as tsvector
+from
+        parse( _get_parser_from_curcfg(), $1 ) as p,
+        token_type() as t,
+        pg_ts_cfgmap as m,
+        pg_ts_cfg as c
+where
+        t.tokid=p.tokid and
+        t.alias = m.tok_alias and 
+        m.ts_name=c.ts_name and 
+        c.oid=show_curcfg() 
+'
+    LANGUAGE sql STRICT;
 
 
 --
--- TOC entry 7 (OID 618734)
--- Name: tsvector; Type: TYPE; Schema: public; Owner: postgres
+-- TOC entry 20 (OID 11524757)
+-- Name: pages; Type: TABLE; Schema: public; Owner: rich
 --
 
-CREATE TYPE tsvector (
-    INTERNALLENGTH = variable,
-    INPUT = tsvector_in,
-    OUTPUT = tsvector_out,
-    ALIGNMENT = int4,
-    STORAGE = extended
+CREATE TABLE pages (
+    id serial NOT NULL,
+    url text,
+    url_deleted text,
+    title text NOT NULL,
+    description text NOT NULL,
+    creation_date timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL,
+    last_modified_date timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL,
+    hostid integer NOT NULL,
+    logged_ip text,
+    redirect text,
+    css text,
+    logged_user integer,
+    title_description_fti tsvector NOT NULL
 );
 
 
 --
--- TOC entry 146 (OID 618738)
--- Name: length(tsvector); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 21 (OID 11524757)
+-- Name: pages; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION length(tsvector) RETURNS integer
-    AS '$libdir/tsearch2', 'tsvector_length'
-    LANGUAGE c IMMUTABLE STRICT;
+REVOKE ALL ON TABLE pages FROM PUBLIC;
+GRANT ALL ON TABLE pages TO "www-data";
 
 
 --
--- TOC entry 147 (OID 618739)
--- Name: to_tsvector(oid, text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 65 (OID 11524757)
+-- Name: pages_id_seq; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION to_tsvector(oid, text) RETURNS tsvector
-    AS '$libdir/tsearch2', 'to_tsvector'
-    LANGUAGE c IMMUTABLE STRICT;
+REVOKE ALL ON TABLE pages_id_seq FROM PUBLIC;
+GRANT ALL ON TABLE pages_id_seq TO "www-data";
 
 
 --
--- TOC entry 148 (OID 618740)
--- Name: to_tsvector(text, text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 22 (OID 11524767)
+-- Name: contents; Type: TABLE; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION to_tsvector(text, text) RETURNS tsvector
-    AS '$libdir/tsearch2', 'to_tsvector_name'
-    LANGUAGE c IMMUTABLE STRICT;
+CREATE TABLE contents (
+    id serial NOT NULL,
+    pageid integer NOT NULL,
+    ordering integer NOT NULL,
+    sectionname text,
+    content text NOT NULL,
+    divname text,
+    content_fti tsvector NOT NULL
+);
 
 
 --
--- TOC entry 149 (OID 618741)
--- Name: to_tsvector(text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 23 (OID 11524767)
+-- Name: contents; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION to_tsvector(text) RETURNS tsvector
-    AS '$libdir/tsearch2', 'to_tsvector_current'
-    LANGUAGE c IMMUTABLE STRICT;
+REVOKE ALL ON TABLE contents FROM PUBLIC;
+GRANT ALL ON TABLE contents TO "www-data";
 
 
 --
--- TOC entry 150 (OID 618742)
--- Name: strip(tsvector); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 66 (OID 11524767)
+-- Name: contents_id_seq; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION strip(tsvector) RETURNS tsvector
-    AS '$libdir/tsearch2', 'strip'
-    LANGUAGE c IMMUTABLE STRICT;
+REVOKE ALL ON TABLE contents_id_seq FROM PUBLIC;
+GRANT ALL ON TABLE contents_id_seq TO "www-data";
 
 
 --
--- TOC entry 151 (OID 618743)
--- Name: setweight(tsvector, "char"); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 24 (OID 11524775)
+-- Name: hosts; Type: TABLE; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION setweight(tsvector, "char") RETURNS tsvector
-    AS '$libdir/tsearch2', 'setweight'
-    LANGUAGE c IMMUTABLE STRICT;
+CREATE TABLE hosts (
+    id serial NOT NULL,
+    canonical_hostname text NOT NULL,
+    css text,
+    edit_anon boolean DEFAULT true NOT NULL,
+    create_account_anon boolean DEFAULT true NOT NULL,
+    theme_css text,
+    feedback_email text,
+    mailing_list boolean DEFAULT false NOT NULL,
+    is_template boolean DEFAULT false NOT NULL,
+    search_box boolean DEFAULT true NOT NULL,
+    view_anon boolean DEFAULT true NOT NULL,
+    navigation boolean DEFAULT false NOT NULL,
+    powered_by integer,
+    brand text,
+    brand_tagline text,
+    brand_description text,
+    pagebug text
+);
 
 
 --
--- TOC entry 152 (OID 618744)
--- Name: concat(tsvector, tsvector); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 25 (OID 11524775)
+-- Name: hosts; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION concat(tsvector, tsvector) RETURNS tsvector
-    AS '$libdir/tsearch2', 'concat'
-    LANGUAGE c IMMUTABLE STRICT;
+REVOKE ALL ON TABLE hosts FROM PUBLIC;
+GRANT ALL ON TABLE hosts TO "www-data";
 
 
 --
--- TOC entry 192 (OID 618745)
--- Name: ||; Type: OPERATOR; Schema: public; Owner: postgres
+-- TOC entry 67 (OID 11524775)
+-- Name: hosts_id_seq; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE OPERATOR || (
-    PROCEDURE = concat,
-    LEFTARG = tsvector,
-    RIGHTARG = tsvector
-);
+REVOKE ALL ON TABLE hosts_id_seq FROM PUBLIC;
+GRANT ALL ON TABLE hosts_id_seq TO "www-data";
 
 
 --
--- TOC entry 153 (OID 618747)
--- Name: tsquery_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 26 (OID 11524788)
+-- Name: hostnames; Type: TABLE; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION tsquery_in(cstring) RETURNS tsquery
-    AS '$libdir/tsearch2', 'tsquery_in'
-    LANGUAGE c STRICT;
+CREATE TABLE hostnames (
+    hostid integer NOT NULL,
+    name text NOT NULL
+);
 
 
 --
--- TOC entry 154 (OID 618748)
--- Name: tsquery_out(tsquery); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 27 (OID 11524788)
+-- Name: hostnames; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION tsquery_out(tsquery) RETURNS cstring
-    AS '$libdir/tsearch2', 'tsquery_out'
-    LANGUAGE c STRICT;
+REVOKE ALL ON TABLE hostnames FROM PUBLIC;
+GRANT ALL ON TABLE hostnames TO "www-data";
 
 
 --
--- TOC entry 8 (OID 618746)
--- Name: tsquery; Type: TYPE; Schema: public; Owner: postgres
+-- TOC entry 28 (OID 11524795)
+-- Name: images; Type: TABLE; Schema: public; Owner: rich
 --
 
-CREATE TYPE tsquery (
-    INTERNALLENGTH = variable,
-    INPUT = tsquery_in,
-    OUTPUT = tsquery_out,
-    ALIGNMENT = int4,
-    STORAGE = plain
+CREATE TABLE images (
+    id serial NOT NULL,
+    hostid integer NOT NULL,
+    name text,
+    name_deleted text,
+    image bytea NOT NULL,
+    width integer NOT NULL,
+    height integer NOT NULL,
+    alt text NOT NULL,
+    title text,
+    longdesc text,
+    "class" text,
+    mime_type text NOT NULL,
+    thumbnail bytea,
+    tn_width integer,
+    tn_height integer,
+    tn_mime_type text,
+    upload_date timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL
 );
 
 
 --
--- TOC entry 155 (OID 618750)
--- Name: querytree(tsquery); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION querytree(tsquery) RETURNS text
-    AS '$libdir/tsearch2', 'tsquerytree'
-    LANGUAGE c STRICT;
-
-
---
--- TOC entry 156 (OID 618751)
--- Name: to_tsquery(oid, text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 29 (OID 11524795)
+-- Name: images; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION to_tsquery(oid, text) RETURNS tsquery
-    AS '$libdir/tsearch2', 'to_tsquery'
-    LANGUAGE c IMMUTABLE STRICT;
+REVOKE ALL ON TABLE images FROM PUBLIC;
+GRANT ALL ON TABLE images TO "www-data";
 
 
 --
--- TOC entry 157 (OID 618752)
--- Name: to_tsquery(text, text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 68 (OID 11524795)
+-- Name: images_id_seq; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION to_tsquery(text, text) RETURNS tsquery
-    AS '$libdir/tsearch2', 'to_tsquery_name'
-    LANGUAGE c IMMUTABLE STRICT;
+REVOKE ALL ON TABLE images_id_seq FROM PUBLIC;
+GRANT ALL ON TABLE images_id_seq TO "www-data";
 
 
 --
--- TOC entry 158 (OID 618753)
--- Name: to_tsquery(text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 30 (OID 11524804)
+-- Name: files; Type: TABLE; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION to_tsquery(text) RETURNS tsquery
-    AS '$libdir/tsearch2', 'to_tsquery_current'
-    LANGUAGE c IMMUTABLE STRICT;
+CREATE TABLE files (
+    id serial NOT NULL,
+    hostid integer NOT NULL,
+    name text,
+    name_deleted text,
+    content bytea NOT NULL,
+    title text,
+    mime_type text NOT NULL,
+    upload_date timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL
+);
 
 
 --
--- TOC entry 159 (OID 618754)
--- Name: exectsq(tsvector, tsquery); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 31 (OID 11524804)
+-- Name: files; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION exectsq(tsvector, tsquery) RETURNS boolean
-    AS '$libdir/tsearch2', 'exectsq'
-    LANGUAGE c IMMUTABLE STRICT;
+REVOKE ALL ON TABLE files FROM PUBLIC;
+GRANT ALL ON TABLE files TO "www-data";
 
 
 --
--- TOC entry 161 (OID 618755)
--- Name: rexectsq(tsquery, tsvector); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 69 (OID 11524804)
+-- Name: files_id_seq; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION rexectsq(tsquery, tsvector) RETURNS boolean
-    AS '$libdir/tsearch2', 'rexectsq'
-    LANGUAGE c IMMUTABLE STRICT;
+REVOKE ALL ON TABLE files_id_seq FROM PUBLIC;
+GRANT ALL ON TABLE files_id_seq TO "www-data";
 
 
 --
--- TOC entry 194 (OID 618756)
--- Name: @@; Type: OPERATOR; Schema: public; Owner: postgres
+-- TOC entry 32 (OID 11524813)
+-- Name: users; Type: TABLE; Schema: public; Owner: rich
 --
 
-CREATE OPERATOR @@ (
-    PROCEDURE = rexectsq,
-    LEFTARG = tsquery,
-    RIGHTARG = tsvector,
-    COMMUTATOR = @@,
-    RESTRICT = contsel,
-    JOIN = contjoinsel
+CREATE TABLE users (
+    id serial NOT NULL,
+    hostid integer NOT NULL,
+    name text NOT NULL,
+    "password" text NOT NULL,
+    email text,
+    registration_date date DEFAULT ('now'::text)::date NOT NULL,
+    can_edit boolean DEFAULT true NOT NULL,
+    can_manage_users boolean DEFAULT false NOT NULL,
+    can_manage_contacts boolean DEFAULT false NOT NULL,
+    can_manage_site boolean DEFAULT false NOT NULL,
+    can_edit_global_css boolean DEFAULT false NOT NULL,
+    force_password_change boolean DEFAULT false NOT NULL,
+    can_import_mail boolean DEFAULT false NOT NULL,
+    email_notify boolean DEFAULT true NOT NULL,
+    invite text
 );
 
 
 --
--- TOC entry 193 (OID 618757)
--- Name: @@; Type: OPERATOR; Schema: public; Owner: postgres
+-- TOC entry 33 (OID 11524813)
+-- Name: users; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE OPERATOR @@ (
-    PROCEDURE = exectsq,
-    LEFTARG = tsvector,
-    RIGHTARG = tsquery,
-    COMMUTATOR = @@,
-    RESTRICT = contsel,
-    JOIN = contjoinsel
-);
+REVOKE ALL ON TABLE users FROM PUBLIC;
+GRANT ALL ON TABLE users TO "www-data";
 
 
 --
--- TOC entry 163 (OID 618758)
--- Name: tsearch2(); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 70 (OID 11524813)
+-- Name: users_id_seq; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION tsearch2() RETURNS "trigger"
-    AS '$libdir/tsearch2', 'tsearch2'
-    LANGUAGE c;
+REVOKE ALL ON TABLE users_id_seq FROM PUBLIC;
+GRANT ALL ON TABLE users_id_seq TO "www-data";
 
 
 --
--- TOC entry 164 (OID 618759)
--- Name: rank(real[], tsvector, tsquery); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 34 (OID 11524828)
+-- Name: usercookies; Type: TABLE; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION rank(real[], tsvector, tsquery) RETURNS real
-    AS '$libdir/tsearch2', 'rank'
-    LANGUAGE c IMMUTABLE STRICT;
+CREATE TABLE usercookies (
+    userid integer NOT NULL,
+    cookie text NOT NULL
+);
 
 
 --
--- TOC entry 165 (OID 618760)
--- Name: rank(real[], tsvector, tsquery, integer); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 35 (OID 11524828)
+-- Name: usercookies; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION rank(real[], tsvector, tsquery, integer) RETURNS real
-    AS '$libdir/tsearch2', 'rank'
-    LANGUAGE c IMMUTABLE STRICT;
+REVOKE ALL ON TABLE usercookies FROM PUBLIC;
+GRANT ALL ON TABLE usercookies TO "www-data";
 
 
 --
--- TOC entry 166 (OID 618761)
--- Name: rank(tsvector, tsquery); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 36 (OID 11524833)
+-- Name: sitemenu; Type: TABLE; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION rank(tsvector, tsquery) RETURNS real
-    AS '$libdir/tsearch2', 'rank_def'
-    LANGUAGE c IMMUTABLE STRICT;
+CREATE TABLE sitemenu (
+    hostid integer NOT NULL,
+    url text NOT NULL,
+    label text NOT NULL,
+    ordering integer NOT NULL
+);
 
 
 --
--- TOC entry 167 (OID 618762)
--- Name: rank(tsvector, tsquery, integer); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 37 (OID 11524833)
+-- Name: sitemenu; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION rank(tsvector, tsquery, integer) RETURNS real
-    AS '$libdir/tsearch2', 'rank_def'
-    LANGUAGE c IMMUTABLE STRICT;
+REVOKE ALL ON TABLE sitemenu FROM PUBLIC;
+GRANT ALL ON TABLE sitemenu TO "www-data";
 
 
 --
--- TOC entry 168 (OID 618763)
--- Name: rank_cd(integer, tsvector, tsquery); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 38 (OID 11524840)
+-- Name: contacts; Type: TABLE; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION rank_cd(integer, tsvector, tsquery) RETURNS real
-    AS '$libdir/tsearch2', 'rank_cd'
-    LANGUAGE c IMMUTABLE STRICT;
+CREATE TABLE contacts (
+    id serial NOT NULL,
+    hostid integer NOT NULL,
+    name text NOT NULL,
+    subject text NOT NULL
+);
 
 
 --
--- TOC entry 169 (OID 618764)
--- Name: rank_cd(integer, tsvector, tsquery, integer); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 39 (OID 11524840)
+-- Name: contacts; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION rank_cd(integer, tsvector, tsquery, integer) RETURNS real
-    AS '$libdir/tsearch2', 'rank_cd'
-    LANGUAGE c IMMUTABLE STRICT;
+REVOKE ALL ON TABLE contacts FROM PUBLIC;
+GRANT ALL ON TABLE contacts TO "www-data";
 
 
 --
--- TOC entry 170 (OID 618765)
--- Name: rank_cd(tsvector, tsquery); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 71 (OID 11524840)
+-- Name: contacts_id_seq; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION rank_cd(tsvector, tsquery) RETURNS real
-    AS '$libdir/tsearch2', 'rank_cd_def'
-    LANGUAGE c IMMUTABLE STRICT;
+REVOKE ALL ON TABLE contacts_id_seq FROM PUBLIC;
+GRANT ALL ON TABLE contacts_id_seq TO "www-data";
 
 
 --
--- TOC entry 171 (OID 618766)
--- Name: rank_cd(tsvector, tsquery, integer); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 40 (OID 11524846)
+-- Name: contact_emails; Type: TABLE; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION rank_cd(tsvector, tsquery, integer) RETURNS real
-    AS '$libdir/tsearch2', 'rank_cd_def'
-    LANGUAGE c IMMUTABLE STRICT;
+CREATE TABLE contact_emails (
+    contactid integer NOT NULL,
+    email text NOT NULL
+);
 
 
 --
--- TOC entry 172 (OID 618767)
--- Name: headline(oid, text, tsquery, text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 41 (OID 11524846)
+-- Name: contact_emails; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION headline(oid, text, tsquery, text) RETURNS text
-    AS '$libdir/tsearch2', 'headline'
-    LANGUAGE c IMMUTABLE STRICT;
+REVOKE ALL ON TABLE contact_emails FROM PUBLIC;
+GRANT ALL ON TABLE contact_emails TO "www-data";
 
 
 --
--- TOC entry 173 (OID 618768)
--- Name: headline(oid, text, tsquery); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 42 (OID 11524851)
+-- Name: themes; Type: TABLE; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION headline(oid, text, tsquery) RETURNS text
-    AS '$libdir/tsearch2', 'headline'
-    LANGUAGE c IMMUTABLE STRICT;
+CREATE TABLE themes (
+    theme_css text NOT NULL,
+    name text NOT NULL,
+    description text NOT NULL
+);
 
 
 --
--- TOC entry 174 (OID 618769)
--- Name: headline(text, text, tsquery, text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 43 (OID 11524851)
+-- Name: themes; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION headline(text, text, tsquery, text) RETURNS text
-    AS '$libdir/tsearch2', 'headline_byname'
-    LANGUAGE c IMMUTABLE STRICT;
+REVOKE ALL ON TABLE themes FROM PUBLIC;
+GRANT SELECT ON TABLE themes TO "www-data";
 
 
 --
--- TOC entry 175 (OID 618770)
--- Name: headline(text, text, tsquery); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 44 (OID 11524856)
+-- Name: server_settings; Type: TABLE; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION headline(text, text, tsquery) RETURNS text
-    AS '$libdir/tsearch2', 'headline_byname'
-    LANGUAGE c IMMUTABLE STRICT;
+CREATE TABLE server_settings (
+    "version" integer NOT NULL,
+    stats_page text,
+    crash_email text
+);
 
 
 --
--- TOC entry 176 (OID 618771)
--- Name: headline(text, tsquery, text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 46 (OID 11524856)
+-- Name: server_settings; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION headline(text, tsquery, text) RETURNS text
-    AS '$libdir/tsearch2', 'headline_current'
-    LANGUAGE c IMMUTABLE STRICT;
+REVOKE ALL ON TABLE server_settings FROM PUBLIC;
+GRANT SELECT ON TABLE server_settings TO "www-data";
 
 
 --
--- TOC entry 177 (OID 618772)
--- Name: headline(text, tsquery); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 47 (OID 11524861)
+-- Name: page_emails; Type: TABLE; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION headline(text, tsquery) RETURNS text
-    AS '$libdir/tsearch2', 'headline_current'
-    LANGUAGE c IMMUTABLE STRICT;
+CREATE TABLE page_emails (
+    hostid integer NOT NULL,
+    url text NOT NULL,
+    email text NOT NULL,
+    entry_date date DEFAULT ('now'::text)::date NOT NULL,
+    last_sent date DEFAULT ('now'::text)::date NOT NULL,
+    pending text,
+    opt_out text NOT NULL
+);
 
 
 --
--- TOC entry 178 (OID 618774)
--- Name: gtsvector_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 48 (OID 11524861)
+-- Name: page_emails; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION gtsvector_in(cstring) RETURNS gtsvector
-    AS '$libdir/tsearch2', 'gtsvector_in'
-    LANGUAGE c STRICT;
+REVOKE ALL ON TABLE page_emails FROM PUBLIC;
+GRANT ALL ON TABLE page_emails TO "www-data";
 
 
 --
--- TOC entry 179 (OID 618775)
--- Name: gtsvector_out(gtsvector); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 49 (OID 11524868)
+-- Name: mailing_lists; Type: TABLE; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION gtsvector_out(gtsvector) RETURNS cstring
-    AS '$libdir/tsearch2', 'gtsvector_out'
-    LANGUAGE c STRICT;
+CREATE TABLE mailing_lists (
+    hostid integer NOT NULL,
+    email text NOT NULL,
+    entry_date date DEFAULT ('now'::text)::date NOT NULL,
+    pending text,
+    opt_out text NOT NULL,
+    name text NOT NULL
+);
 
 
 --
--- TOC entry 9 (OID 618773)
--- Name: gtsvector; Type: TYPE; Schema: public; Owner: postgres
+-- TOC entry 50 (OID 11524868)
+-- Name: mailing_lists; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE TYPE gtsvector (
-    INTERNALLENGTH = variable,
-    INPUT = gtsvector_in,
-    OUTPUT = gtsvector_out,
-    ALIGNMENT = int4,
-    STORAGE = plain
-);
+REVOKE ALL ON TABLE mailing_lists FROM PUBLIC;
+GRANT ALL ON TABLE mailing_lists TO "www-data";
 
 
 --
--- TOC entry 180 (OID 618777)
--- Name: gtsvector_consistent(gtsvector, internal, integer); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 51 (OID 11524874)
+-- Name: links; Type: TABLE; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION gtsvector_consistent(gtsvector, internal, integer) RETURNS boolean
-    AS '$libdir/tsearch2', 'gtsvector_consistent'
-    LANGUAGE c;
+CREATE TABLE links (
+    hostid integer NOT NULL,
+    from_url text NOT NULL,
+    to_url text NOT NULL,
+    CONSTRAINT links_not_selfref_cn CHECK ((from_url <> to_url))
+);
 
 
 --
--- TOC entry 181 (OID 618778)
--- Name: gtsvector_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 52 (OID 11524874)
+-- Name: links; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION gtsvector_compress(internal) RETURNS internal
-    AS '$libdir/tsearch2', 'gtsvector_compress'
-    LANGUAGE c;
+REVOKE ALL ON TABLE links FROM PUBLIC;
+GRANT ALL ON TABLE links TO "www-data";
 
 
 --
--- TOC entry 182 (OID 618779)
--- Name: gtsvector_decompress(internal); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 53 (OID 11524882)
+-- Name: templates; Type: TABLE; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION gtsvector_decompress(internal) RETURNS internal
-    AS '$libdir/tsearch2', 'gtsvector_decompress'
-    LANGUAGE c;
+CREATE TABLE templates (
+    id serial NOT NULL,
+    title_regexp text NOT NULL,
+    url_regexp text NOT NULL,
+    extension text NOT NULL,
+    ordering integer NOT NULL
+);
 
 
 --
--- TOC entry 183 (OID 618780)
--- Name: gtsvector_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 54 (OID 11524882)
+-- Name: templates; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION gtsvector_penalty(internal, internal, internal) RETURNS internal
-    AS '$libdir/tsearch2', 'gtsvector_penalty'
-    LANGUAGE c STRICT;
+REVOKE ALL ON TABLE templates FROM PUBLIC;
+GRANT SELECT ON TABLE templates TO "www-data";
 
 
 --
--- TOC entry 184 (OID 618781)
--- Name: gtsvector_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 72 (OID 11524882)
+-- Name: templates_id_seq; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION gtsvector_picksplit(internal, internal) RETURNS internal
-    AS '$libdir/tsearch2', 'gtsvector_picksplit'
-    LANGUAGE c;
+REVOKE ALL ON TABLE templates_id_seq FROM PUBLIC;
 
 
 --
--- TOC entry 185 (OID 618782)
--- Name: gtsvector_union(bytea, internal); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 55 (OID 11524888)
+-- Name: recently_visited; Type: TABLE; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION gtsvector_union(bytea, internal) RETURNS integer[]
-    AS '$libdir/tsearch2', 'gtsvector_union'
-    LANGUAGE c;
+CREATE TABLE recently_visited (
+    userid integer NOT NULL,
+    hostid integer NOT NULL,
+    url text NOT NULL,
+    visit_time timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL
+);
 
 
 --
--- TOC entry 186 (OID 618783)
--- Name: gtsvector_same(gtsvector, gtsvector, internal); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 56 (OID 11524888)
+-- Name: recently_visited; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION gtsvector_same(gtsvector, gtsvector, internal) RETURNS internal
-    AS '$libdir/tsearch2', 'gtsvector_same'
-    LANGUAGE c;
+REVOKE ALL ON TABLE recently_visited FROM PUBLIC;
+GRANT ALL ON TABLE recently_visited TO "www-data";
 
 
 --
--- TOC entry 195 (OID 618784)
--- Name: gist_tsvector_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
+-- TOC entry 57 (OID 11524896)
+-- Name: messages; Type: TABLE; Schema: public; Owner: rich
 --
 
-CREATE OPERATOR CLASS gist_tsvector_ops
-    DEFAULT FOR TYPE tsvector USING gist AS
-    STORAGE gtsvector ,
-    OPERATOR 1 @@(tsvector,tsquery) RECHECK ,
-    FUNCTION 1 gtsvector_consistent(gtsvector,internal,integer) ,
-    FUNCTION 2 gtsvector_union(bytea,internal) ,
-    FUNCTION 3 gtsvector_compress(internal) ,
-    FUNCTION 4 gtsvector_decompress(internal) ,
-    FUNCTION 5 gtsvector_penalty(internal,internal,internal) ,
-    FUNCTION 6 gtsvector_picksplit(internal,internal) ,
-    FUNCTION 7 gtsvector_same(gtsvector,gtsvector,internal);
+CREATE TABLE messages (
+    id serial NOT NULL,
+    subject text NOT NULL,
+    inet_message_id text NOT NULL,
+    message_date timestamp with time zone NOT NULL,
+    hostid integer NOT NULL
+);
 
 
 --
--- TOC entry 10 (OID 618786)
--- Name: statinfo; Type: TYPE; Schema: public; Owner: postgres
+-- TOC entry 58 (OID 11524896)
+-- Name: messages; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE TYPE statinfo AS (
-       word text,
-       ndoc integer,
-       nentry integer
-);
+REVOKE ALL ON TABLE messages FROM PUBLIC;
+GRANT ALL ON TABLE messages TO "www-data";
 
 
 --
--- TOC entry 187 (OID 618787)
--- Name: stat(text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 73 (OID 11524896)
+-- Name: messages_id_seq; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION stat(text) RETURNS SETOF statinfo
-    AS '$libdir/tsearch2', 'ts_stat'
-    LANGUAGE c STRICT;
+REVOKE ALL ON TABLE messages_id_seq FROM PUBLIC;
+GRANT ALL ON TABLE messages_id_seq TO "www-data";
 
 
 --
--- TOC entry 188 (OID 618788)
--- Name: reset_tsearch(); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 59 (OID 11524902)
+-- Name: msg_references; Type: TABLE; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION reset_tsearch() RETURNS void
-    AS '$libdir/tsearch2', 'reset_tsearch'
-    LANGUAGE c STRICT;
+CREATE TABLE msg_references (
+    message_id integer NOT NULL,
+    inet_message_id text NOT NULL,
+    ordering integer NOT NULL
+);
 
 
 --
--- TOC entry 189 (OID 618789)
--- Name: get_covers(tsvector, tsquery); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 60 (OID 11524902)
+-- Name: msg_references; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION get_covers(tsvector, tsquery) RETURNS text
-    AS '$libdir/tsearch2', 'get_covers'
-    LANGUAGE c STRICT;
+REVOKE ALL ON TABLE msg_references FROM PUBLIC;
+GRANT ALL ON TABLE msg_references TO "www-data";
 
 
 --
--- TOC entry 11 (OID 618791)
--- Name: tsdebug; Type: TYPE; Schema: public; Owner: postgres
+-- TOC entry 61 (OID 11524909)
+-- Name: powered_by; Type: TABLE; Schema: public; Owner: rich
 --
 
-CREATE TYPE tsdebug AS (
-       ts_name text,
-       tok_type text,
-       description text,
-       token text,
-       dict_name text[],
-       tsvector tsvector
+CREATE TABLE powered_by (
+    id serial NOT NULL,
+    name text NOT NULL,
+    url text NOT NULL
 );
 
 
 --
--- TOC entry 190 (OID 618792)
--- Name: _get_parser_from_curcfg(); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 62 (OID 11524909)
+-- Name: powered_by; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION _get_parser_from_curcfg() RETURNS text
-    AS ' select prs_name from pg_ts_cfg where oid = show_curcfg() '
-    LANGUAGE sql IMMUTABLE STRICT;
+REVOKE ALL ON TABLE powered_by FROM PUBLIC;
+GRANT SELECT ON TABLE powered_by TO "www-data";
 
 
 --
--- TOC entry 191 (OID 618793)
--- Name: ts_debug(text); Type: FUNCTION; Schema: public; Owner: postgres
+-- TOC entry 63 (OID 11524915)
+-- Name: pending_email_changes; Type: TABLE; Schema: public; Owner: rich
 --
 
-CREATE FUNCTION ts_debug(text) RETURNS SETOF tsdebug
-    AS '
-select 
-        m.ts_name,
-        t.alias as tok_type,
-        t.descr as description,
-        p.token,
-        m.dict_name,
-        strip(to_tsvector(p.token)) as tsvector
-from
-        parse( _get_parser_from_curcfg(), $1 ) as p,
-        token_type() as t,
-        pg_ts_cfgmap as m,
-        pg_ts_cfg as c
-where
-        t.tokid=p.tokid and
-        t.alias = m.tok_alias and 
-        m.ts_name=c.ts_name and 
-        c.oid=show_curcfg() 
-'
-    LANGUAGE sql STRICT;
+CREATE TABLE pending_email_changes (
+    "key" text NOT NULL,
+    change_date date DEFAULT ('now'::text)::date NOT NULL,
+    userid integer NOT NULL,
+    email text NOT NULL
+);
 
 
 --
--- TOC entry 83 (OID 536388)
--- Name: hostnames_hostid_name_uq; Type: INDEX; Schema: public; Owner: rich
+-- TOC entry 64 (OID 11524915)
+-- Name: pending_email_changes; Type: ACL; Schema: public; Owner: rich
 --
 
-CREATE UNIQUE INDEX hostnames_hostid_name_uq ON hostnames USING btree (hostid, name);
+REVOKE ALL ON TABLE pending_email_changes FROM PUBLIC;
+GRANT ALL ON TABLE pending_email_changes TO "www-data";
 
 
 --
--- TOC entry 84 (OID 536389)
--- Name: hostnams_name_uq; Type: INDEX; Schema: public; Owner: rich
+-- TOC entry 88 (OID 11576669)
+-- Name: hostnames_hostid_name_uq; Type: INDEX; Schema: public; Owner: rich
 --
 
-CREATE UNIQUE INDEX hostnams_name_uq ON hostnames USING btree (name);
+CREATE UNIQUE INDEX hostnames_hostid_name_uq ON hostnames USING btree (hostid, name);
 
 
 --
--- TOC entry 78 (OID 536419)
+-- TOC entry 83 (OID 11576670)
 -- Name: pages_url_uq; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1679,7 +1672,7 @@ CREATE UNIQUE INDEX pages_url_uq ON pages USING btree (hostid, url);
 
 
 --
--- TOC entry 85 (OID 540251)
+-- TOC entry 90 (OID 11576671)
 -- Name: images_name_uq; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1687,7 +1680,7 @@ CREATE UNIQUE INDEX images_name_uq ON images USING btree (hostid, name);
 
 
 --
--- TOC entry 87 (OID 540252)
+-- TOC entry 92 (OID 11576672)
 -- Name: files_name_uq; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1695,7 +1688,7 @@ CREATE UNIQUE INDEX files_name_uq ON files USING btree (hostid, name);
 
 
 --
--- TOC entry 90 (OID 540831)
+-- TOC entry 95 (OID 11576673)
 -- Name: users_name_uq; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1703,7 +1696,7 @@ CREATE UNIQUE INDEX users_name_uq ON users USING btree (hostid, name);
 
 
 --
--- TOC entry 89 (OID 540946)
+-- TOC entry 94 (OID 11576674)
 -- Name: users_id_uq; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1711,7 +1704,7 @@ CREATE UNIQUE INDEX users_id_uq ON users USING btree (hostid, id);
 
 
 --
--- TOC entry 92 (OID 540970)
+-- TOC entry 98 (OID 11576675)
 -- Name: sitemenu_ordering_uq; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1719,7 +1712,7 @@ CREATE UNIQUE INDEX sitemenu_ordering_uq ON sitemenu USING btree (hostid, orderi
 
 
 --
--- TOC entry 93 (OID 540971)
+-- TOC entry 99 (OID 11576676)
 -- Name: sitemenu_url_uq; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1727,7 +1720,7 @@ CREATE UNIQUE INDEX sitemenu_url_uq ON sitemenu USING btree (hostid, url);
 
 
 --
--- TOC entry 96 (OID 542626)
+-- TOC entry 102 (OID 11576677)
 -- Name: contact_emails_uq; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1735,7 +1728,7 @@ CREATE UNIQUE INDEX contact_emails_uq ON contact_emails USING btree (contactid,
 
 
 --
--- TOC entry 97 (OID 543505)
+-- TOC entry 103 (OID 11576678)
 -- Name: themes_theme_css_uq; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1743,7 +1736,7 @@ CREATE UNIQUE INDEX themes_theme_css_uq ON themes USING btree (theme_css);
 
 
 --
--- TOC entry 98 (OID 543763)
+-- TOC entry 104 (OID 11576679)
 -- Name: page_emails_email_uq; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1751,7 +1744,7 @@ CREATE UNIQUE INDEX page_emails_email_uq ON page_emails USING btree (hostid, url
 
 
 --
--- TOC entry 99 (OID 543795)
+-- TOC entry 105 (OID 11576680)
 -- Name: mailing_lists_email_uq; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1759,7 +1752,7 @@ CREATE UNIQUE INDEX mailing_lists_email_uq ON mailing_lists USING btree (hostid,
 
 
 --
--- TOC entry 94 (OID 543880)
+-- TOC entry 100 (OID 11576681)
 -- Name: contacts_name_uq; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1767,7 +1760,7 @@ CREATE UNIQUE INDEX contacts_name_uq ON contacts USING btree (hostid, name);
 
 
 --
--- TOC entry 100 (OID 544454)
+-- TOC entry 106 (OID 11576682)
 -- Name: links_uq; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1775,7 +1768,7 @@ CREATE UNIQUE INDEX links_uq ON links USING btree (hostid, from_url, to_url);
 
 
 --
--- TOC entry 101 (OID 547951)
+-- TOC entry 107 (OID 11576683)
 -- Name: templates_ext_ord_uq; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1783,7 +1776,7 @@ CREATE UNIQUE INDEX templates_ext_ord_uq ON templates USING btree (extension, or
 
 
 --
--- TOC entry 103 (OID 547952)
+-- TOC entry 109 (OID 11576684)
 -- Name: templates_title_uq; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1791,7 +1784,7 @@ CREATE UNIQUE INDEX templates_title_uq ON templates USING btree (title_regexp);
 
 
 --
--- TOC entry 104 (OID 547953)
+-- TOC entry 110 (OID 11576685)
 -- Name: templates_url_uq; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1799,7 +1792,7 @@ CREATE UNIQUE INDEX templates_url_uq ON templates USING btree (url_regexp);
 
 
 --
--- TOC entry 105 (OID 551151)
+-- TOC entry 111 (OID 11576686)
 -- Name: recently_visited_uq; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1807,7 +1800,7 @@ CREATE UNIQUE INDEX recently_visited_uq ON recently_visited USING btree (userid,
 
 
 --
--- TOC entry 106 (OID 552155)
+-- TOC entry 112 (OID 11576687)
 -- Name: messages_inet_message_id_uq; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1815,7 +1808,7 @@ CREATE UNIQUE INDEX messages_inet_message_id_uq ON messages USING btree (hostid,
 
 
 --
--- TOC entry 77 (OID 552684)
+-- TOC entry 82 (OID 11576688)
 -- Name: pages_url_ix; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1823,7 +1816,7 @@ CREATE INDEX pages_url_ix ON pages USING btree (url);
 
 
 --
--- TOC entry 76 (OID 552685)
+-- TOC entry 81 (OID 11576689)
 -- Name: pages_redirect_ix; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1831,7 +1824,7 @@ CREATE INDEX pages_redirect_ix ON pages USING btree (redirect);
 
 
 --
--- TOC entry 74 (OID 618795)
+-- TOC entry 78 (OID 11576690)
 -- Name: pages_fti_idx; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1839,7 +1832,7 @@ CREATE INDEX pages_fti_idx ON pages USING gist (title_description_fti);
 
 
 --
--- TOC entry 79 (OID 620946)
+-- TOC entry 84 (OID 11576691)
 -- Name: contents_fti_idx; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1847,7 +1840,7 @@ CREATE INDEX contents_fti_idx ON contents USING gist (content_fti);
 
 
 --
--- TOC entry 80 (OID 622207)
+-- TOC entry 85 (OID 11576692)
 -- Name: contents_pageid_idx; Type: INDEX; Schema: public; Owner: rich
 --
 
@@ -1855,7 +1848,67 @@ CREATE INDEX contents_pageid_idx ON contents USING btree (pageid);
 
 
 --
--- TOC entry 75 (OID 536012)
+-- TOC entry 89 (OID 11576693)
+-- Name: hostnames_name_uq; Type: INDEX; Schema: public; Owner: rich
+--
+
+CREATE UNIQUE INDEX hostnames_name_uq ON hostnames USING btree (name);
+
+
+--
+-- TOC entry 97 (OID 11576694)
+-- Name: usercookies_cookie_idx; Type: INDEX; Schema: public; Owner: rich
+--
+
+CREATE INDEX usercookies_cookie_idx ON usercookies USING btree (cookie);
+
+
+--
+-- TOC entry 79 (OID 11576695)
+-- Name: pages_lc_title; Type: INDEX; Schema: public; Owner: rich
+--
+
+CREATE INDEX pages_lc_title ON pages USING btree (lower(title));
+
+
+--
+-- TOC entry 74 (OID 11524572)
+-- Name: pg_ts_dict_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
+--
+
+ALTER TABLE ONLY pg_ts_dict
+    ADD CONSTRAINT pg_ts_dict_pkey PRIMARY KEY (dict_name);
+
+
+--
+-- TOC entry 75 (OID 11524598)
+-- Name: pg_ts_parser_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
+--
+
+ALTER TABLE ONLY pg_ts_parser
+    ADD CONSTRAINT pg_ts_parser_pkey PRIMARY KEY (prs_name);
+
+
+--
+-- TOC entry 76 (OID 11524623)
+-- Name: pg_ts_cfg_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
+--
+
+ALTER TABLE ONLY pg_ts_cfg
+    ADD CONSTRAINT pg_ts_cfg_pkey PRIMARY KEY (ts_name);
+
+
+--
+-- TOC entry 77 (OID 11524630)
+-- Name: pg_ts_cfgmap_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
+--
+
+ALTER TABLE ONLY pg_ts_cfgmap
+    ADD CONSTRAINT pg_ts_cfgmap_pkey PRIMARY KEY (ts_name, tok_alias);
+
+
+--
+-- TOC entry 80 (OID 11576696)
 -- Name: pages_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -1864,7 +1917,7 @@ ALTER TABLE ONLY pages
 
 
 --
--- TOC entry 81 (OID 536027)
+-- TOC entry 86 (OID 11576698)
 -- Name: contents_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -1873,7 +1926,7 @@ ALTER TABLE ONLY contents
 
 
 --
--- TOC entry 82 (OID 536377)
+-- TOC entry 87 (OID 11576700)
 -- Name: hosts_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -1882,7 +1935,7 @@ ALTER TABLE ONLY hosts
 
 
 --
--- TOC entry 86 (OID 537158)
+-- TOC entry 91 (OID 11576702)
 -- Name: images_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -1891,7 +1944,7 @@ ALTER TABLE ONLY images
 
 
 --
--- TOC entry 88 (OID 537173)
+-- TOC entry 93 (OID 11576704)
 -- Name: files_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -1900,7 +1953,7 @@ ALTER TABLE ONLY files
 
 
 --
--- TOC entry 91 (OID 540825)
+-- TOC entry 96 (OID 11576706)
 -- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -1909,7 +1962,7 @@ ALTER TABLE ONLY users
 
 
 --
--- TOC entry 95 (OID 542611)
+-- TOC entry 101 (OID 11576708)
 -- Name: contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -1918,7 +1971,7 @@ ALTER TABLE ONLY contacts
 
 
 --
--- TOC entry 102 (OID 547945)
+-- TOC entry 108 (OID 11576710)
 -- Name: templates_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -1927,7 +1980,7 @@ ALTER TABLE ONLY templates
 
 
 --
--- TOC entry 107 (OID 551681)
+-- TOC entry 113 (OID 11576712)
 -- Name: messages_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -1936,7 +1989,7 @@ ALTER TABLE ONLY messages
 
 
 --
--- TOC entry 108 (OID 607081)
+-- TOC entry 114 (OID 11576714)
 -- Name: powered_by_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -1945,7 +1998,7 @@ ALTER TABLE ONLY powered_by
 
 
 --
--- TOC entry 109 (OID 607141)
+-- TOC entry 115 (OID 11576716)
 -- Name: pending_email_changes_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -1954,43 +2007,7 @@ ALTER TABLE ONLY pending_email_changes
 
 
 --
--- TOC entry 110 (OID 618611)
--- Name: pg_ts_dict_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
---
-
-ALTER TABLE ONLY pg_ts_dict
-    ADD CONSTRAINT pg_ts_dict_pkey PRIMARY KEY (dict_name);
-
-
---
--- TOC entry 111 (OID 618637)
--- Name: pg_ts_parser_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
---
-
-ALTER TABLE ONLY pg_ts_parser
-    ADD CONSTRAINT pg_ts_parser_pkey PRIMARY KEY (prs_name);
-
-
---
--- TOC entry 112 (OID 618662)
--- Name: pg_ts_cfg_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
---
-
-ALTER TABLE ONLY pg_ts_cfg
-    ADD CONSTRAINT pg_ts_cfg_pkey PRIMARY KEY (ts_name);
-
-
---
--- TOC entry 113 (OID 618669)
--- Name: pg_ts_cfgmap_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
---
-
-ALTER TABLE ONLY pg_ts_cfgmap
-    ADD CONSTRAINT pg_ts_cfgmap_pkey PRIMARY KEY (ts_name, tok_alias);
-
-
---
--- TOC entry 200 (OID 536029)
+-- TOC entry 202 (OID 11576718)
 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -1999,7 +2016,7 @@ ALTER TABLE ONLY contents
 
 
 --
--- TOC entry 204 (OID 536384)
+-- TOC entry 206 (OID 11576722)
 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2008,7 +2025,7 @@ ALTER TABLE ONLY hostnames
 
 
 --
--- TOC entry 201 (OID 536394)
+-- TOC entry 203 (OID 11576726)
 -- Name: hosts_hostname_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2017,7 +2034,7 @@ ALTER TABLE ONLY hosts
 
 
 --
--- TOC entry 196 (OID 536404)
+-- TOC entry 198 (OID 11576730)
 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2026,7 +2043,7 @@ ALTER TABLE ONLY pages
 
 
 --
--- TOC entry 205 (OID 537160)
+-- TOC entry 207 (OID 11576734)
 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2035,7 +2052,7 @@ ALTER TABLE ONLY images
 
 
 --
--- TOC entry 206 (OID 537175)
+-- TOC entry 208 (OID 11576738)
 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2044,7 +2061,7 @@ ALTER TABLE ONLY files
 
 
 --
--- TOC entry 197 (OID 539155)
+-- TOC entry 199 (OID 11576742)
 -- Name: pages_redirect_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2053,7 +2070,7 @@ ALTER TABLE ONLY pages
 
 
 --
--- TOC entry 207 (OID 540827)
+-- TOC entry 209 (OID 11576746)
 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2062,7 +2079,7 @@ ALTER TABLE ONLY users
 
 
 --
--- TOC entry 208 (OID 540837)
+-- TOC entry 210 (OID 11576750)
 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2071,7 +2088,7 @@ ALTER TABLE ONLY usercookies
 
 
 --
--- TOC entry 198 (OID 540942)
+-- TOC entry 200 (OID 11576754)
 -- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2080,7 +2097,7 @@ ALTER TABLE ONLY pages
 
 
 --
--- TOC entry 199 (OID 540947)
+-- TOC entry 201 (OID 11576758)
 -- Name: pages_user_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2089,7 +2106,7 @@ ALTER TABLE ONLY pages
 
 
 --
--- TOC entry 209 (OID 540966)
+-- TOC entry 211 (OID 11576762)
 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2098,7 +2115,7 @@ ALTER TABLE ONLY sitemenu
 
 
 --
--- TOC entry 210 (OID 540972)
+-- TOC entry 212 (OID 11576766)
 -- Name: sitemenu_url_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2107,7 +2124,7 @@ ALTER TABLE ONLY sitemenu
 
 
 --
--- TOC entry 211 (OID 542613)
+-- TOC entry 213 (OID 11576770)
 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2116,7 +2133,7 @@ ALTER TABLE ONLY contacts
 
 
 --
--- TOC entry 212 (OID 542622)
+-- TOC entry 214 (OID 11576774)
 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2125,7 +2142,7 @@ ALTER TABLE ONLY contact_emails
 
 
 --
--- TOC entry 202 (OID 543506)
+-- TOC entry 204 (OID 11576778)
 -- Name: hosts_theme_css_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2134,7 +2151,7 @@ ALTER TABLE ONLY hosts
 
 
 --
--- TOC entry 213 (OID 543759)
+-- TOC entry 215 (OID 11576782)
 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2143,7 +2160,7 @@ ALTER TABLE ONLY page_emails
 
 
 --
--- TOC entry 214 (OID 543764)
+-- TOC entry 216 (OID 11576786)
 -- Name: page_emails_url_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2152,7 +2169,7 @@ ALTER TABLE ONLY page_emails
 
 
 --
--- TOC entry 215 (OID 543791)
+-- TOC entry 217 (OID 11576790)
 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2161,7 +2178,7 @@ ALTER TABLE ONLY mailing_lists
 
 
 --
--- TOC entry 216 (OID 544450)
+-- TOC entry 218 (OID 11576794)
 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2170,7 +2187,7 @@ ALTER TABLE ONLY links
 
 
 --
--- TOC entry 217 (OID 544455)
+-- TOC entry 219 (OID 11576798)
 -- Name: links_from_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2179,7 +2196,7 @@ ALTER TABLE ONLY links
 
 
 --
--- TOC entry 218 (OID 551129)
+-- TOC entry 220 (OID 11576802)
 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2188,7 +2205,7 @@ ALTER TABLE ONLY recently_visited
 
 
 --
--- TOC entry 219 (OID 551133)
+-- TOC entry 221 (OID 11576806)
 -- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2197,7 +2214,7 @@ ALTER TABLE ONLY recently_visited
 
 
 --
--- TOC entry 220 (OID 551137)
+-- TOC entry 222 (OID 11576810)
 -- Name: recently_visited_url_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2206,7 +2223,7 @@ ALTER TABLE ONLY recently_visited
 
 
 --
--- TOC entry 221 (OID 551141)
+-- TOC entry 223 (OID 11576814)
 -- Name: recently_visited_userid_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2215,7 +2232,7 @@ ALTER TABLE ONLY recently_visited
 
 
 --
--- TOC entry 223 (OID 551690)
+-- TOC entry 225 (OID 11576818)
 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2224,7 +2241,7 @@ ALTER TABLE ONLY msg_references
 
 
 --
--- TOC entry 222 (OID 551694)
+-- TOC entry 224 (OID 11576822)
 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2233,7 +2250,7 @@ ALTER TABLE ONLY messages
 
 
 --
--- TOC entry 203 (OID 607083)
+-- TOC entry 205 (OID 11576826)
 -- Name: hosts_powered_by_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2242,7 +2259,7 @@ ALTER TABLE ONLY hosts
 
 
 --
--- TOC entry 224 (OID 607143)
+-- TOC entry 226 (OID 11576830)
 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
 --
 
@@ -2251,7 +2268,7 @@ ALTER TABLE ONLY pending_email_changes
 
 
 --
--- TOC entry 225 (OID 618794)
+-- TOC entry 227 (OID 11576834)
 -- Name: pages_fti_tr; Type: TRIGGER; Schema: public; Owner: rich
 --
 
@@ -2262,7 +2279,7 @@ CREATE TRIGGER pages_fti_tr
 
 
 --
--- TOC entry 226 (OID 618796)
+-- TOC entry 228 (OID 11576835)
 -- Name: contents_fti_tr; Type: TRIGGER; Schema: public; Owner: rich
 --
 
@@ -2281,27 +2298,27 @@ COMMENT ON SCHEMA public IS 'Standard public namespace';
 
 
 --
--- TOC entry 37 (OID 543592)
--- Name: TABLE server_settings; Type: COMMENT; Schema: public; Owner: rich
+-- TOC entry 162 (OID 11524715)
+-- Name: FUNCTION exectsq(tsvector, tsquery); Type: COMMENT; Schema: public; Owner: postgres
 --
 
-COMMENT ON TABLE server_settings IS 'This table contains global settings for the server.  There should be only one row in this table.  If you modify any setting, you must restart the webserver for the change to take effect.  The "version" field is intended to be some sort of database version, but is currently unused.';
+COMMENT ON FUNCTION exectsq(tsvector, tsquery) IS 'boolean operation with text index';
 
 
 --
--- TOC entry 160 (OID 618754)
--- Name: FUNCTION exectsq(tsvector, tsquery); Type: COMMENT; Schema: public; Owner: postgres
+-- TOC entry 164 (OID 11524716)
+-- Name: FUNCTION rexectsq(tsquery, tsvector); Type: COMMENT; Schema: public; Owner: postgres
 --
 
-COMMENT ON FUNCTION exectsq(tsvector, tsquery) IS 'boolean operation with text index';
+COMMENT ON FUNCTION rexectsq(tsquery, tsvector) IS 'boolean operation with text index';
 
 
 --
--- TOC entry 162 (OID 618755)
--- Name: FUNCTION rexectsq(tsquery, tsvector); Type: COMMENT; Schema: public; Owner: postgres
+-- TOC entry 45 (OID 11524856)
+-- Name: TABLE server_settings; Type: COMMENT; Schema: public; Owner: rich
 --
 
-COMMENT ON FUNCTION rexectsq(tsquery, tsvector) IS 'boolean operation with text index';
+COMMENT ON TABLE server_settings IS 'This table contains global settings for the server.  There should be only one row in this table.  If you modify any setting, you must restart the webserver for the change to take effect.  The "version" field is intended to be some sort of database version, but is currently unused.';
 
 
 --
@@ -2314,7 +2331,7 @@ SET check_function_bodies = false;
 SET search_path = public, pg_catalog;
 
 --
--- Data for TOC entry 3 (OID 547939)
+-- Data for TOC entry 3 (OID 11524882)
 -- Name: templates; Type: TABLE DATA; Schema: public; Owner: rich
 --
 
@@ -2326,7 +2343,7 @@ COPY templates (id, title_regexp, url_regexp, extension, ordering) FROM stdin;
 
 
 --
--- TOC entry 2 (OID 547937)
+-- TOC entry 2 (OID 11524880)
 -- Name: templates_id_seq; Type: SEQUENCE SET; Schema: public; Owner: rich
 --
 
@@ -2343,7 +2360,7 @@ SET check_function_bodies = false;
 SET search_path = public, pg_catalog;
 
 --
--- Data for TOC entry 2 (OID 543499)
+-- Data for TOC entry 2 (OID 11524851)
 -- Name: themes; Type: TABLE DATA; Schema: public; Owner: rich
 --