mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Added support of Collation, FTS Configuration, FTS Dictionary, FTS Parser, and FTS Template to the Schema Diff. Fixes #5261
This commit is contained in:
@@ -435,7 +435,7 @@ def compare(trans_id, source_sid, source_did, source_scid,
|
||||
status, msg = check_version_compatibility(source_sid, target_sid)
|
||||
|
||||
if not status:
|
||||
return make_json_response(success=0, errormsg=msg, status=404)
|
||||
return make_json_response(success=0, errormsg=msg, status=428)
|
||||
|
||||
comparison_result = []
|
||||
|
||||
|
@@ -318,37 +318,40 @@ def directory_diff(source_dict, target_dict, ignore_keys=[], difference={}):
|
||||
))
|
||||
|
||||
if len(tmp_list) > 0:
|
||||
tmp_target = copy.deepcopy(target_dict[key])
|
||||
for index in range(len(source_dict[key])):
|
||||
source = copy.deepcopy(source_dict[key][index])
|
||||
if type(source) is list:
|
||||
# TODO
|
||||
pass
|
||||
elif type(source) is dict:
|
||||
tmp_key_array = ['name', 'colname', 'argid']
|
||||
for tmp_key in tmp_key_array:
|
||||
if tmp_key in source:
|
||||
if type(target_dict[key]) is list and \
|
||||
len(target_dict[key]) > 0:
|
||||
tmp = None
|
||||
tmp_target = \
|
||||
copy.deepcopy(target_dict[key])
|
||||
for item in tmp_target:
|
||||
if tmp_key in item and \
|
||||
item[tmp_key] == \
|
||||
source[tmp_key]:
|
||||
tmp = copy.deepcopy(item)
|
||||
if tmp and source != tmp:
|
||||
updated.append(copy.deepcopy(source))
|
||||
tmp_target.remove(tmp)
|
||||
elif tmp and source == tmp:
|
||||
tmp_target.remove(tmp)
|
||||
elif tmp is None:
|
||||
added.append(source)
|
||||
else:
|
||||
tmp_key_array = ['name', 'colname', 'argid', 'token',
|
||||
'option']
|
||||
# Check the above keys are exist in the dictionary
|
||||
tmp_key = is_key_exists(tmp_key_array, source)
|
||||
if tmp_key is not None:
|
||||
if type(target_dict[key]) is list and \
|
||||
len(target_dict[key]) > 0:
|
||||
tmp = None
|
||||
for item in tmp_target:
|
||||
if tmp_key in item and \
|
||||
item[tmp_key] == \
|
||||
source[tmp_key]:
|
||||
tmp = copy.deepcopy(item)
|
||||
if tmp and source != tmp:
|
||||
updated.append(copy.deepcopy(source))
|
||||
tmp_target.remove(tmp)
|
||||
elif tmp and source == tmp:
|
||||
tmp_target.remove(tmp)
|
||||
elif tmp is None:
|
||||
added.append(source)
|
||||
else:
|
||||
added.append(source)
|
||||
|
||||
difference[key] = {}
|
||||
difference[key] = {}
|
||||
if len(added) > 0:
|
||||
difference[key]['added'] = added
|
||||
if len(updated) > 0:
|
||||
difference[key]['changed'] = updated
|
||||
elif target_dict[key] is None or \
|
||||
(type(target_dict[key]) is list and
|
||||
@@ -358,7 +361,7 @@ def directory_diff(source_dict, target_dict, ignore_keys=[], difference={}):
|
||||
elif type(target_dict[key]) is list and\
|
||||
len(target_dict[key]) > index:
|
||||
difference[key] = source
|
||||
else:
|
||||
elif len(source_dict[key]) > 0:
|
||||
difference[key] = source_dict[key]
|
||||
|
||||
if type(source) is dict and tmp_target and key in tmp_target and \
|
||||
@@ -383,6 +386,21 @@ def directory_diff(source_dict, target_dict, ignore_keys=[], difference={}):
|
||||
return difference
|
||||
|
||||
|
||||
def is_key_exists(key_list, target_dict):
|
||||
"""
|
||||
This function is used to iterate the key list and check that key is
|
||||
present in the given dictionary
|
||||
:param key_list:
|
||||
:param target_dict:
|
||||
:return:
|
||||
"""
|
||||
for key in key_list:
|
||||
if key in target_dict:
|
||||
return key
|
||||
|
||||
return None
|
||||
|
||||
|
||||
def parce_acl(source, target):
|
||||
key = 'acl'
|
||||
|
||||
|
@@ -438,3 +438,91 @@ ALTER TABLE source."test view f" OWNER TO postgres;
|
||||
--
|
||||
|
||||
COMMENT ON VIEW source."test view f" IS 'cmn';
|
||||
|
||||
-- Collation scripts
|
||||
CREATE COLLATION source.coll_src
|
||||
FROM pg_catalog."POSIX";
|
||||
|
||||
ALTER COLLATION source.coll_src
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON COLLATION source.coll_src
|
||||
IS 'Test Comment';
|
||||
|
||||
CREATE COLLATION source.coll_diff
|
||||
(LC_COLLATE = 'POSIX', LC_CTYPE = 'POSIX');
|
||||
|
||||
ALTER COLLATION source.coll_diff
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON COLLATION source.coll_diff
|
||||
IS 'Test Comment';
|
||||
|
||||
-- FTS Configuration scripts
|
||||
CREATE TEXT SEARCH CONFIGURATION source.fts_con_src (
|
||||
COPY=german
|
||||
);
|
||||
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_src OWNER TO postgres;
|
||||
|
||||
COMMENT ON TEXT SEARCH CONFIGURATION source.fts_con_src
|
||||
IS 'Test Comment';
|
||||
|
||||
|
||||
CREATE TEXT SEARCH CONFIGURATION source.fts_con_diff (
|
||||
PARSER = default
|
||||
);
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_diff ADD MAPPING FOR asciiword WITH german_stem;
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_diff ADD MAPPING FOR email WITH simple;
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_diff ADD MAPPING FOR hword WITH dutch_stem;
|
||||
|
||||
-- FTS Dictionary scripts
|
||||
CREATE TEXT SEARCH DICTIONARY source.fts_dict_src (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'english'
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH DICTIONARY source.fts_dict_src
|
||||
IS 'Test Comment';
|
||||
|
||||
CREATE TEXT SEARCH DICTIONARY source.fts_dict_diff (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'english'
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH DICTIONARY source.fts_dict_diff
|
||||
IS 'Test Comment';
|
||||
|
||||
-- FTS Parser scripts
|
||||
CREATE TEXT SEARCH PARSER source.fts_par_src (
|
||||
START = prsd_start,
|
||||
GETTOKEN = prsd_nexttoken,
|
||||
END = prsd_end,
|
||||
LEXTYPES = prsd_lextype);
|
||||
|
||||
COMMENT ON TEXT SEARCH PARSER source.fts_par_src
|
||||
IS 'Test Comment';
|
||||
|
||||
CREATE TEXT SEARCH PARSER source.fts_par_diff (
|
||||
START = prsd_start,
|
||||
GETTOKEN = prsd_nexttoken,
|
||||
END = prsd_end,
|
||||
LEXTYPES = prsd_lextype);
|
||||
|
||||
COMMENT ON TEXT SEARCH PARSER source.fts_par_diff
|
||||
IS 'Test Comment';
|
||||
|
||||
-- FTS Template scripts
|
||||
CREATE TEXT SEARCH TEMPLATE source.fts_templ_src (
|
||||
INIT = dispell_init,
|
||||
LEXIZE = dispell_lexize
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH TEMPLATE source.fts_templ_src IS 'Test Comment';
|
||||
|
||||
CREATE TEXT SEARCH TEMPLATE source.fts_templ_diff (
|
||||
INIT = dispell_init,
|
||||
LEXIZE = dispell_lexize
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH TEMPLATE source.fts_templ_diff IS 'Test Comment';
|
||||
|
@@ -427,3 +427,73 @@ ALTER TABLE target."test view f" OWNER TO postgres;
|
||||
--
|
||||
|
||||
COMMENT ON VIEW target."test view f" IS 'cmn';
|
||||
|
||||
-- Collation scripts
|
||||
CREATE COLLATION target.coll_tar
|
||||
FROM pg_catalog."POSIX";
|
||||
|
||||
ALTER COLLATION target.coll_tar
|
||||
OWNER TO postgres;
|
||||
|
||||
CREATE COLLATION target.coll_diff
|
||||
(LC_COLLATE = 'C', LC_CTYPE = 'C');
|
||||
|
||||
ALTER COLLATION target.coll_diff
|
||||
OWNER TO postgres;
|
||||
|
||||
-- FTS Configuration scripts
|
||||
CREATE TEXT SEARCH CONFIGURATION target.fts_con_tar (
|
||||
COPY=german
|
||||
);
|
||||
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_tar OWNER TO postgres;
|
||||
|
||||
CREATE TEXT SEARCH CONFIGURATION target.fts_con_diff (
|
||||
PARSER = default
|
||||
);
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_diff ADD MAPPING FOR asciiword WITH dutch_stem;
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_diff ADD MAPPING FOR email WITH simple;
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_diff ADD MAPPING FOR hword WITH german_stem;
|
||||
|
||||
-- FTS Dictionary scripts
|
||||
CREATE TEXT SEARCH DICTIONARY target.fts_dict_tar (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'english'
|
||||
);
|
||||
|
||||
CREATE TEXT SEARCH DICTIONARY target.fts_dict_diff (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'german'
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH DICTIONARY target.fts_dict_diff
|
||||
IS 'Comment';
|
||||
|
||||
-- FTS Parser scripts
|
||||
CREATE TEXT SEARCH PARSER target.fts_par_tar (
|
||||
START = prsd_start,
|
||||
GETTOKEN = prsd_nexttoken,
|
||||
END = prsd_end,
|
||||
LEXTYPES = prsd_lextype);
|
||||
|
||||
CREATE TEXT SEARCH PARSER target.fts_par_diff (
|
||||
START = int4_accum,
|
||||
GETTOKEN = inet_gist_penalty,
|
||||
END = btint2sortsupport,
|
||||
LEXTYPES = dispell_init);
|
||||
|
||||
COMMENT ON TEXT SEARCH PARSER target.fts_par_diff
|
||||
IS 'Comment';
|
||||
|
||||
-- FTS Template scripts
|
||||
CREATE TEXT SEARCH TEMPLATE target.fts_templ_tar (
|
||||
INIT = dispell_init,
|
||||
LEXIZE = dispell_lexize
|
||||
);
|
||||
|
||||
CREATE TEXT SEARCH TEMPLATE target.fts_templ_diff (
|
||||
INIT = dsimple_init,
|
||||
LEXIZE = dsimple_lexize
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH TEMPLATE target.fts_templ_diff IS 'Comment';
|
||||
|
@@ -437,3 +437,91 @@ ALTER TABLE source."test view f" OWNER TO postgres;
|
||||
--
|
||||
|
||||
COMMENT ON VIEW source."test view f" IS 'cmn';
|
||||
|
||||
-- Collation scripts
|
||||
CREATE COLLATION source.coll_src
|
||||
FROM pg_catalog."POSIX";
|
||||
|
||||
ALTER COLLATION source.coll_src
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON COLLATION source.coll_src
|
||||
IS 'Test Comment';
|
||||
|
||||
CREATE COLLATION source.coll_diff
|
||||
(LC_COLLATE = 'POSIX', LC_CTYPE = 'POSIX');
|
||||
|
||||
ALTER COLLATION source.coll_diff
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON COLLATION source.coll_diff
|
||||
IS 'Test Comment';
|
||||
|
||||
-- FTS Configuration scripts
|
||||
CREATE TEXT SEARCH CONFIGURATION source.fts_con_src (
|
||||
COPY=german
|
||||
);
|
||||
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_src OWNER TO postgres;
|
||||
|
||||
COMMENT ON TEXT SEARCH CONFIGURATION source.fts_con_src
|
||||
IS 'Test Comment';
|
||||
|
||||
|
||||
CREATE TEXT SEARCH CONFIGURATION source.fts_con_diff (
|
||||
PARSER = default
|
||||
);
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_diff ADD MAPPING FOR asciiword WITH german_stem;
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_diff ADD MAPPING FOR email WITH simple;
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_diff ADD MAPPING FOR hword WITH dutch_stem;
|
||||
|
||||
-- FTS Dictionary scripts
|
||||
CREATE TEXT SEARCH DICTIONARY source.fts_dict_src (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'english'
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH DICTIONARY source.fts_dict_src
|
||||
IS 'Test Comment';
|
||||
|
||||
CREATE TEXT SEARCH DICTIONARY source.fts_dict_diff (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'english'
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH DICTIONARY source.fts_dict_diff
|
||||
IS 'Test Comment';
|
||||
|
||||
-- FTS Parser scripts
|
||||
CREATE TEXT SEARCH PARSER source.fts_par_src (
|
||||
START = prsd_start,
|
||||
GETTOKEN = prsd_nexttoken,
|
||||
END = prsd_end,
|
||||
LEXTYPES = prsd_lextype);
|
||||
|
||||
COMMENT ON TEXT SEARCH PARSER source.fts_par_src
|
||||
IS 'Test Comment';
|
||||
|
||||
CREATE TEXT SEARCH PARSER source.fts_par_diff (
|
||||
START = prsd_start,
|
||||
GETTOKEN = prsd_nexttoken,
|
||||
END = prsd_end,
|
||||
LEXTYPES = prsd_lextype);
|
||||
|
||||
COMMENT ON TEXT SEARCH PARSER source.fts_par_diff
|
||||
IS 'Test Comment';
|
||||
|
||||
-- FTS Template scripts
|
||||
CREATE TEXT SEARCH TEMPLATE source.fts_templ_src (
|
||||
INIT = dispell_init,
|
||||
LEXIZE = dispell_lexize
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH TEMPLATE source.fts_templ_src IS 'Test Comment';
|
||||
|
||||
CREATE TEXT SEARCH TEMPLATE source.fts_templ_diff (
|
||||
INIT = dispell_init,
|
||||
LEXIZE = dispell_lexize
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH TEMPLATE source.fts_templ_diff IS 'Test Comment';
|
||||
|
@@ -426,3 +426,73 @@ ALTER TABLE target."test view f" OWNER TO postgres;
|
||||
--
|
||||
|
||||
COMMENT ON VIEW target."test view f" IS 'cmn';
|
||||
|
||||
-- Collation scripts
|
||||
CREATE COLLATION target.coll_tar
|
||||
FROM pg_catalog."POSIX";
|
||||
|
||||
ALTER COLLATION target.coll_tar
|
||||
OWNER TO postgres;
|
||||
|
||||
CREATE COLLATION target.coll_diff
|
||||
(LC_COLLATE = 'C', LC_CTYPE = 'C');
|
||||
|
||||
ALTER COLLATION target.coll_diff
|
||||
OWNER TO postgres;
|
||||
|
||||
-- FTS Configuration scripts
|
||||
CREATE TEXT SEARCH CONFIGURATION target.fts_con_tar (
|
||||
COPY=german
|
||||
);
|
||||
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_tar OWNER TO postgres;
|
||||
|
||||
CREATE TEXT SEARCH CONFIGURATION target.fts_con_diff (
|
||||
PARSER = default
|
||||
);
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_diff ADD MAPPING FOR asciiword WITH dutch_stem;
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_diff ADD MAPPING FOR email WITH simple;
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_diff ADD MAPPING FOR hword WITH german_stem;
|
||||
|
||||
-- FTS Dictionary scripts
|
||||
CREATE TEXT SEARCH DICTIONARY target.fts_dict_tar (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'english'
|
||||
);
|
||||
|
||||
CREATE TEXT SEARCH DICTIONARY target.fts_dict_diff (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'german'
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH DICTIONARY target.fts_dict_diff
|
||||
IS 'Comment';
|
||||
|
||||
-- FTS Parser scripts
|
||||
CREATE TEXT SEARCH PARSER target.fts_par_tar (
|
||||
START = prsd_start,
|
||||
GETTOKEN = prsd_nexttoken,
|
||||
END = prsd_end,
|
||||
LEXTYPES = prsd_lextype);
|
||||
|
||||
CREATE TEXT SEARCH PARSER target.fts_par_diff (
|
||||
START = int4_accum,
|
||||
GETTOKEN = inet_gist_penalty,
|
||||
END = btint2sortsupport,
|
||||
LEXTYPES = dispell_init);
|
||||
|
||||
COMMENT ON TEXT SEARCH PARSER target.fts_par_diff
|
||||
IS 'Comment';
|
||||
|
||||
-- FTS Template scripts
|
||||
CREATE TEXT SEARCH TEMPLATE target.fts_templ_tar (
|
||||
INIT = dispell_init,
|
||||
LEXIZE = dispell_lexize
|
||||
);
|
||||
|
||||
CREATE TEXT SEARCH TEMPLATE target.fts_templ_diff (
|
||||
INIT = dsimple_init,
|
||||
LEXIZE = dsimple_lexize
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH TEMPLATE target.fts_templ_diff IS 'Comment';
|
||||
|
@@ -438,3 +438,91 @@ CREATE PROCEDURE source.proc1(arg1 bigint)
|
||||
|
||||
|
||||
ALTER PROCEDURE source.proc1(arg1 bigint) OWNER TO postgres;
|
||||
|
||||
-- Collation scripts
|
||||
CREATE COLLATION source.coll_src
|
||||
FROM pg_catalog."POSIX";
|
||||
|
||||
ALTER COLLATION source.coll_src
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON COLLATION source.coll_src
|
||||
IS 'Test Comment';
|
||||
|
||||
CREATE COLLATION source.coll_diff
|
||||
(LC_COLLATE = 'POSIX', LC_CTYPE = 'POSIX');
|
||||
|
||||
ALTER COLLATION source.coll_diff
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON COLLATION source.coll_diff
|
||||
IS 'Test Comment';
|
||||
|
||||
-- FTS Configuration scripts
|
||||
CREATE TEXT SEARCH CONFIGURATION source.fts_con_src (
|
||||
COPY=german
|
||||
);
|
||||
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_src OWNER TO postgres;
|
||||
|
||||
COMMENT ON TEXT SEARCH CONFIGURATION source.fts_con_src
|
||||
IS 'Test Comment';
|
||||
|
||||
|
||||
CREATE TEXT SEARCH CONFIGURATION source.fts_con_diff (
|
||||
PARSER = default
|
||||
);
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_diff ADD MAPPING FOR asciiword WITH german_stem;
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_diff ADD MAPPING FOR email WITH simple;
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_diff ADD MAPPING FOR hword WITH dutch_stem;
|
||||
|
||||
-- FTS Dictionary scripts
|
||||
CREATE TEXT SEARCH DICTIONARY source.fts_dict_src (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'english'
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH DICTIONARY source.fts_dict_src
|
||||
IS 'Test Comment';
|
||||
|
||||
CREATE TEXT SEARCH DICTIONARY source.fts_dict_diff (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'english'
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH DICTIONARY source.fts_dict_diff
|
||||
IS 'Test Comment';
|
||||
|
||||
-- FTS Parser scripts
|
||||
CREATE TEXT SEARCH PARSER source.fts_par_src (
|
||||
START = prsd_start,
|
||||
GETTOKEN = prsd_nexttoken,
|
||||
END = prsd_end,
|
||||
LEXTYPES = prsd_lextype);
|
||||
|
||||
COMMENT ON TEXT SEARCH PARSER source.fts_par_src
|
||||
IS 'Test Comment';
|
||||
|
||||
CREATE TEXT SEARCH PARSER source.fts_par_diff (
|
||||
START = prsd_start,
|
||||
GETTOKEN = prsd_nexttoken,
|
||||
END = prsd_end,
|
||||
LEXTYPES = prsd_lextype);
|
||||
|
||||
COMMENT ON TEXT SEARCH PARSER source.fts_par_diff
|
||||
IS 'Test Comment';
|
||||
|
||||
-- FTS Template scripts
|
||||
CREATE TEXT SEARCH TEMPLATE source.fts_templ_src (
|
||||
INIT = dispell_init,
|
||||
LEXIZE = dispell_lexize
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH TEMPLATE source.fts_templ_src IS 'Test Comment';
|
||||
|
||||
CREATE TEXT SEARCH TEMPLATE source.fts_templ_diff (
|
||||
INIT = dispell_init,
|
||||
LEXIZE = dispell_lexize
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH TEMPLATE source.fts_templ_diff IS 'Test Comment';
|
||||
|
@@ -415,3 +415,73 @@ CREATE PROCEDURE target.dodaj_klijenta(v_naziv character varying, v_oib characte
|
||||
|
||||
|
||||
ALTER PROCEDURE target.dodaj_klijenta(v_naziv character varying, v_oib character varying, v_pdv_id character varying, v_adresa character varying, v_mjesto integer, v_drzava character varying, v_tip_p_sub character varying, v_vlasnik character varying, v_pdv boolean, v_fisk boolean, v_iban character varying, v_k_osoba character varying, v_email character varying, v_br_tel character varying, v_radna_god numeric, v_schema character varying) OWNER TO postgres;
|
||||
|
||||
-- Collation scripts
|
||||
CREATE COLLATION target.coll_tar
|
||||
FROM pg_catalog."POSIX";
|
||||
|
||||
ALTER COLLATION target.coll_tar
|
||||
OWNER TO postgres;
|
||||
|
||||
CREATE COLLATION target.coll_diff
|
||||
(LC_COLLATE = 'C', LC_CTYPE = 'C');
|
||||
|
||||
ALTER COLLATION target.coll_diff
|
||||
OWNER TO postgres;
|
||||
|
||||
-- FTS Configuration scripts
|
||||
CREATE TEXT SEARCH CONFIGURATION target.fts_con_tar (
|
||||
COPY=german
|
||||
);
|
||||
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_tar OWNER TO postgres;
|
||||
|
||||
CREATE TEXT SEARCH CONFIGURATION target.fts_con_diff (
|
||||
PARSER = default
|
||||
);
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_diff ADD MAPPING FOR asciiword WITH dutch_stem;
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_diff ADD MAPPING FOR email WITH simple;
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_diff ADD MAPPING FOR hword WITH german_stem;
|
||||
|
||||
-- FTS Dictionary scripts
|
||||
CREATE TEXT SEARCH DICTIONARY target.fts_dict_tar (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'english'
|
||||
);
|
||||
|
||||
CREATE TEXT SEARCH DICTIONARY target.fts_dict_diff (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'german'
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH DICTIONARY target.fts_dict_diff
|
||||
IS 'Comment';
|
||||
|
||||
-- FTS Parser scripts
|
||||
CREATE TEXT SEARCH PARSER target.fts_par_tar (
|
||||
START = prsd_start,
|
||||
GETTOKEN = prsd_nexttoken,
|
||||
END = prsd_end,
|
||||
LEXTYPES = prsd_lextype);
|
||||
|
||||
CREATE TEXT SEARCH PARSER target.fts_par_diff (
|
||||
START = int4_accum,
|
||||
GETTOKEN = inet_gist_penalty,
|
||||
END = btint2sortsupport,
|
||||
LEXTYPES = dispell_init);
|
||||
|
||||
COMMENT ON TEXT SEARCH PARSER target.fts_par_diff
|
||||
IS 'Comment';
|
||||
|
||||
-- FTS Template scripts
|
||||
CREATE TEXT SEARCH TEMPLATE target.fts_templ_tar (
|
||||
INIT = dispell_init,
|
||||
LEXIZE = dispell_lexize
|
||||
);
|
||||
|
||||
CREATE TEXT SEARCH TEMPLATE target.fts_templ_diff (
|
||||
INIT = dsimple_init,
|
||||
LEXIZE = dsimple_lexize
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH TEMPLATE target.fts_templ_diff IS 'Comment';
|
||||
|
@@ -309,3 +309,89 @@ COMMENT ON RULE rule1 ON source.table_for_rule IS 'comments';
|
||||
CREATE RULE rule2 AS
|
||||
ON INSERT TO source.table_for_rule DO NOTHING;
|
||||
|
||||
-- Collation scripts
|
||||
CREATE COLLATION source.coll_src
|
||||
FROM pg_catalog."POSIX";
|
||||
|
||||
ALTER COLLATION source.coll_src
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON COLLATION source.coll_src
|
||||
IS 'Test Comment';
|
||||
|
||||
CREATE COLLATION source.coll_diff
|
||||
(LC_COLLATE = 'POSIX', LC_CTYPE = 'POSIX');
|
||||
|
||||
ALTER COLLATION source.coll_diff
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON COLLATION source.coll_diff
|
||||
IS 'Test Comment';
|
||||
|
||||
-- FTS Configuration scripts
|
||||
CREATE TEXT SEARCH CONFIGURATION source.fts_con_src (
|
||||
COPY=german
|
||||
);
|
||||
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_src OWNER TO postgres;
|
||||
|
||||
COMMENT ON TEXT SEARCH CONFIGURATION source.fts_con_src
|
||||
IS 'Test Comment';
|
||||
|
||||
CREATE TEXT SEARCH CONFIGURATION source.fts_con_diff (
|
||||
PARSER = default
|
||||
);
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_diff ADD MAPPING FOR asciiword WITH german_stem;
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_diff ADD MAPPING FOR email WITH simple;
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_diff ADD MAPPING FOR hword WITH dutch_stem;
|
||||
|
||||
-- FTS Dictionary scripts
|
||||
CREATE TEXT SEARCH DICTIONARY source.fts_dict_src (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'english'
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH DICTIONARY source.fts_dict_src
|
||||
IS 'Test Comment';
|
||||
|
||||
CREATE TEXT SEARCH DICTIONARY source.fts_dict_diff (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'english'
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH DICTIONARY source.fts_dict_diff
|
||||
IS 'Test Comment';
|
||||
|
||||
-- FTS Parser scripts
|
||||
CREATE TEXT SEARCH PARSER source.fts_par_src (
|
||||
START = prsd_start,
|
||||
GETTOKEN = prsd_nexttoken,
|
||||
END = prsd_end,
|
||||
LEXTYPES = prsd_lextype);
|
||||
|
||||
COMMENT ON TEXT SEARCH PARSER source.fts_par_src
|
||||
IS 'Test Comment';
|
||||
|
||||
CREATE TEXT SEARCH PARSER source.fts_par_diff (
|
||||
START = prsd_start,
|
||||
GETTOKEN = prsd_nexttoken,
|
||||
END = prsd_end,
|
||||
LEXTYPES = prsd_lextype);
|
||||
|
||||
COMMENT ON TEXT SEARCH PARSER source.fts_par_diff
|
||||
IS 'Test Comment';
|
||||
|
||||
-- FTS Template scripts
|
||||
CREATE TEXT SEARCH TEMPLATE source.fts_templ_src (
|
||||
INIT = dispell_init,
|
||||
LEXIZE = dispell_lexize
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH TEMPLATE source.fts_templ_src IS 'Test Comment';
|
||||
|
||||
CREATE TEXT SEARCH TEMPLATE source.fts_templ_diff (
|
||||
INIT = dispell_init,
|
||||
LEXIZE = dispell_lexize
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH TEMPLATE source.fts_templ_diff IS 'Test Comment';
|
||||
|
@@ -335,3 +335,73 @@ CREATE RULE rule3 AS
|
||||
--
|
||||
|
||||
REFRESH MATERIALIZED VIEW target."MView";
|
||||
|
||||
-- Collation scripts
|
||||
CREATE COLLATION target.coll_tar
|
||||
FROM pg_catalog."POSIX";
|
||||
|
||||
ALTER COLLATION target.coll_tar
|
||||
OWNER TO postgres;
|
||||
|
||||
CREATE COLLATION target.coll_diff
|
||||
(LC_COLLATE = 'C', LC_CTYPE = 'C');
|
||||
|
||||
ALTER COLLATION target.coll_diff
|
||||
OWNER TO postgres;
|
||||
|
||||
-- FTS Configuration scripts
|
||||
CREATE TEXT SEARCH CONFIGURATION target.fts_con_tar (
|
||||
COPY=german
|
||||
);
|
||||
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_tar OWNER TO postgres;
|
||||
|
||||
CREATE TEXT SEARCH CONFIGURATION target.fts_con_diff (
|
||||
PARSER = default
|
||||
);
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_diff ADD MAPPING FOR asciiword WITH dutch_stem;
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_diff ADD MAPPING FOR email WITH simple;
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_diff ADD MAPPING FOR hword WITH german_stem;
|
||||
|
||||
-- FTS Dictionary scripts
|
||||
CREATE TEXT SEARCH DICTIONARY target.fts_dict_tar (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'english'
|
||||
);
|
||||
|
||||
CREATE TEXT SEARCH DICTIONARY target.fts_dict_diff (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'german'
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH DICTIONARY target.fts_dict_diff
|
||||
IS 'Comment';
|
||||
|
||||
-- FTS Parser scripts
|
||||
CREATE TEXT SEARCH PARSER target.fts_par_tar (
|
||||
START = prsd_start,
|
||||
GETTOKEN = prsd_nexttoken,
|
||||
END = prsd_end,
|
||||
LEXTYPES = prsd_lextype);
|
||||
|
||||
CREATE TEXT SEARCH PARSER target.fts_par_diff (
|
||||
START = int4_accum,
|
||||
GETTOKEN = inet_gist_penalty,
|
||||
END = btint2sortsupport,
|
||||
LEXTYPES = dispell_init);
|
||||
|
||||
COMMENT ON TEXT SEARCH PARSER target.fts_par_diff
|
||||
IS 'Comment';
|
||||
|
||||
-- FTS Template scripts
|
||||
CREATE TEXT SEARCH TEMPLATE target.fts_templ_tar (
|
||||
INIT = dispell_init,
|
||||
LEXIZE = dispell_lexize
|
||||
);
|
||||
|
||||
CREATE TEXT SEARCH TEMPLATE target.fts_templ_diff (
|
||||
INIT = dsimple_init,
|
||||
LEXIZE = dsimple_lexize
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH TEMPLATE target.fts_templ_diff IS 'Comment';
|
||||
|
@@ -374,3 +374,91 @@ COMMENT ON RULE rule1 ON source.table_for_rule IS 'comments';
|
||||
|
||||
CREATE RULE rule2 AS
|
||||
ON INSERT TO source.table_for_rule DO NOTHING;
|
||||
|
||||
-- Collation scripts
|
||||
CREATE COLLATION source.coll_src
|
||||
FROM pg_catalog."POSIX";
|
||||
|
||||
ALTER COLLATION source.coll_src
|
||||
OWNER TO enterprisedb;
|
||||
|
||||
COMMENT ON COLLATION source.coll_src
|
||||
IS 'Test Comment';
|
||||
|
||||
CREATE COLLATION source.coll_diff
|
||||
(LC_COLLATE = 'POSIX', LC_CTYPE = 'POSIX');
|
||||
|
||||
ALTER COLLATION source.coll_diff
|
||||
OWNER TO enterprisedb;
|
||||
|
||||
COMMENT ON COLLATION source.coll_diff
|
||||
IS 'Test Comment';
|
||||
|
||||
-- FTS Configuration scripts
|
||||
CREATE TEXT SEARCH CONFIGURATION source.fts_con_src (
|
||||
COPY=german
|
||||
);
|
||||
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_src OWNER TO enterprisedb;
|
||||
|
||||
COMMENT ON TEXT SEARCH CONFIGURATION source.fts_con_src
|
||||
IS 'Test Comment';
|
||||
|
||||
|
||||
CREATE TEXT SEARCH CONFIGURATION source.fts_con_diff (
|
||||
PARSER = default
|
||||
);
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_diff ADD MAPPING FOR asciiword WITH german_stem;
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_diff ADD MAPPING FOR email WITH simple;
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_diff ADD MAPPING FOR hword WITH dutch_stem;
|
||||
|
||||
-- FTS Dictionary scripts
|
||||
CREATE TEXT SEARCH DICTIONARY source.fts_dict_src (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'english'
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH DICTIONARY source.fts_dict_src
|
||||
IS 'Test Comment';
|
||||
|
||||
CREATE TEXT SEARCH DICTIONARY source.fts_dict_diff (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'english'
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH DICTIONARY source.fts_dict_diff
|
||||
IS 'Test Comment';
|
||||
|
||||
-- FTS Parser scripts
|
||||
CREATE TEXT SEARCH PARSER source.fts_par_src (
|
||||
START = prsd_start,
|
||||
GETTOKEN = prsd_nexttoken,
|
||||
END = prsd_end,
|
||||
LEXTYPES = prsd_lextype);
|
||||
|
||||
COMMENT ON TEXT SEARCH PARSER source.fts_par_src
|
||||
IS 'Test Comment';
|
||||
|
||||
CREATE TEXT SEARCH PARSER source.fts_par_diff (
|
||||
START = prsd_start,
|
||||
GETTOKEN = prsd_nexttoken,
|
||||
END = prsd_end,
|
||||
LEXTYPES = prsd_lextype);
|
||||
|
||||
COMMENT ON TEXT SEARCH PARSER source.fts_par_diff
|
||||
IS 'Test Comment';
|
||||
|
||||
-- FTS Template scripts
|
||||
CREATE TEXT SEARCH TEMPLATE source.fts_templ_src (
|
||||
INIT = dispell_init,
|
||||
LEXIZE = dispell_lexize
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH TEMPLATE source.fts_templ_src IS 'Test Comment';
|
||||
|
||||
CREATE TEXT SEARCH TEMPLATE source.fts_templ_diff (
|
||||
INIT = dispell_init,
|
||||
LEXIZE = dispell_lexize
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH TEMPLATE source.fts_templ_diff IS 'Test Comment';
|
||||
|
@@ -362,3 +362,73 @@ CREATE RULE rule3 AS
|
||||
--
|
||||
|
||||
REFRESH MATERIALIZED VIEW target."MView";
|
||||
|
||||
-- Collation scripts
|
||||
CREATE COLLATION target.coll_tar
|
||||
FROM pg_catalog."POSIX";
|
||||
|
||||
ALTER COLLATION target.coll_tar
|
||||
OWNER TO enterprisedb;
|
||||
|
||||
CREATE COLLATION target.coll_diff
|
||||
(LC_COLLATE = 'C', LC_CTYPE = 'C');
|
||||
|
||||
ALTER COLLATION target.coll_diff
|
||||
OWNER TO enterprisedb;
|
||||
|
||||
-- FTS Configuration scripts
|
||||
CREATE TEXT SEARCH CONFIGURATION target.fts_con_tar (
|
||||
COPY=german
|
||||
);
|
||||
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_tar OWNER TO enterprisedb;
|
||||
|
||||
CREATE TEXT SEARCH CONFIGURATION target.fts_con_diff (
|
||||
PARSER = default
|
||||
);
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_diff ADD MAPPING FOR asciiword WITH dutch_stem;
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_diff ADD MAPPING FOR email WITH simple;
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_diff ADD MAPPING FOR hword WITH german_stem;
|
||||
|
||||
-- FTS Dictionary scripts
|
||||
CREATE TEXT SEARCH DICTIONARY target.fts_dict_tar (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'english'
|
||||
);
|
||||
|
||||
CREATE TEXT SEARCH DICTIONARY target.fts_dict_diff (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'german'
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH DICTIONARY target.fts_dict_diff
|
||||
IS 'Comment';
|
||||
|
||||
-- FTS Parser scripts
|
||||
CREATE TEXT SEARCH PARSER target.fts_par_tar (
|
||||
START = prsd_start,
|
||||
GETTOKEN = prsd_nexttoken,
|
||||
END = prsd_end,
|
||||
LEXTYPES = prsd_lextype);
|
||||
|
||||
CREATE TEXT SEARCH PARSER target.fts_par_diff (
|
||||
START = int4_accum,
|
||||
GETTOKEN = inet_gist_penalty,
|
||||
END = btint2sortsupport,
|
||||
LEXTYPES = dispell_init);
|
||||
|
||||
COMMENT ON TEXT SEARCH PARSER target.fts_par_diff
|
||||
IS 'Comment';
|
||||
|
||||
-- FTS Template scripts
|
||||
CREATE TEXT SEARCH TEMPLATE target.fts_templ_tar (
|
||||
INIT = dispell_init,
|
||||
LEXIZE = dispell_lexize
|
||||
);
|
||||
|
||||
CREATE TEXT SEARCH TEMPLATE target.fts_templ_diff (
|
||||
INIT = dsimple_init,
|
||||
LEXIZE = dsimple_lexize
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH TEMPLATE target.fts_templ_diff IS 'Comment';
|
||||
|
@@ -309,3 +309,90 @@ COMMENT ON RULE rule1 ON source.table_for_rule IS 'comments';
|
||||
CREATE RULE rule2 AS
|
||||
ON INSERT TO source.table_for_rule DO NOTHING;
|
||||
|
||||
-- Collation scripts
|
||||
CREATE COLLATION source.coll_src
|
||||
FROM pg_catalog."default";
|
||||
|
||||
ALTER COLLATION source.coll_src
|
||||
OWNER TO enterprisedb;
|
||||
|
||||
COMMENT ON COLLATION source.coll_src
|
||||
IS 'Test Comment';
|
||||
|
||||
CREATE COLLATION source.coll_diff
|
||||
FROM pg_catalog."default";
|
||||
|
||||
ALTER COLLATION source.coll_diff
|
||||
OWNER TO enterprisedb;
|
||||
|
||||
COMMENT ON COLLATION source.coll_diff
|
||||
IS 'Test Comment';
|
||||
|
||||
-- FTS Configuration scripts
|
||||
CREATE TEXT SEARCH CONFIGURATION source.fts_con_src (
|
||||
COPY=german
|
||||
);
|
||||
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_src OWNER TO enterprisedb;
|
||||
|
||||
COMMENT ON TEXT SEARCH CONFIGURATION source.fts_con_src
|
||||
IS 'Test Comment';
|
||||
|
||||
|
||||
CREATE TEXT SEARCH CONFIGURATION source.fts_con_diff (
|
||||
PARSER = default
|
||||
);
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_diff ADD MAPPING FOR asciiword WITH german_stem;
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_diff ADD MAPPING FOR email WITH simple;
|
||||
ALTER TEXT SEARCH CONFIGURATION source.fts_con_diff ADD MAPPING FOR hword WITH dutch_stem;
|
||||
|
||||
-- FTS Dictionary scripts
|
||||
CREATE TEXT SEARCH DICTIONARY source.fts_dict_src (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'english'
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH DICTIONARY source.fts_dict_src
|
||||
IS 'Test Comment';
|
||||
|
||||
CREATE TEXT SEARCH DICTIONARY source.fts_dict_diff (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'english'
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH DICTIONARY source.fts_dict_diff
|
||||
IS 'Test Comment';
|
||||
|
||||
-- FTS Parser scripts
|
||||
CREATE TEXT SEARCH PARSER source.fts_par_src (
|
||||
START = prsd_start,
|
||||
GETTOKEN = prsd_nexttoken,
|
||||
END = prsd_end,
|
||||
LEXTYPES = prsd_lextype);
|
||||
|
||||
COMMENT ON TEXT SEARCH PARSER source.fts_par_src
|
||||
IS 'Test Comment';
|
||||
|
||||
CREATE TEXT SEARCH PARSER source.fts_par_diff (
|
||||
START = prsd_start,
|
||||
GETTOKEN = prsd_nexttoken,
|
||||
END = prsd_end,
|
||||
LEXTYPES = prsd_lextype);
|
||||
|
||||
COMMENT ON TEXT SEARCH PARSER source.fts_par_diff
|
||||
IS 'Test Comment';
|
||||
|
||||
-- FTS Template scripts
|
||||
CREATE TEXT SEARCH TEMPLATE source.fts_templ_src (
|
||||
INIT = dispell_init,
|
||||
LEXIZE = dispell_lexize
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH TEMPLATE source.fts_templ_src IS 'Test Comment';
|
||||
|
||||
CREATE TEXT SEARCH TEMPLATE source.fts_templ_diff (
|
||||
INIT = dispell_init,
|
||||
LEXIZE = dispell_lexize
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH TEMPLATE source.fts_templ_diff IS 'Test Comment';
|
||||
|
@@ -335,3 +335,73 @@ CREATE RULE rule3 AS
|
||||
--
|
||||
|
||||
REFRESH MATERIALIZED VIEW target."MView";
|
||||
|
||||
-- Collation scripts
|
||||
CREATE COLLATION target.coll_tar
|
||||
FROM pg_catalog."default";
|
||||
|
||||
ALTER COLLATION target.coll_tar
|
||||
OWNER TO enterprisedb;
|
||||
|
||||
CREATE COLLATION target.coll_diff
|
||||
(LC_COLLATE = 'C', LC_CTYPE = 'C');
|
||||
|
||||
ALTER COLLATION target.coll_diff
|
||||
OWNER TO enterprisedb;
|
||||
|
||||
-- FTS Configuration scripts
|
||||
CREATE TEXT SEARCH CONFIGURATION target.fts_con_tar (
|
||||
COPY=german
|
||||
);
|
||||
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_tar OWNER TO enterprisedb;
|
||||
|
||||
CREATE TEXT SEARCH CONFIGURATION target.fts_con_diff (
|
||||
PARSER = default
|
||||
);
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_diff ADD MAPPING FOR asciiword WITH dutch_stem;
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_diff ADD MAPPING FOR email WITH simple;
|
||||
ALTER TEXT SEARCH CONFIGURATION target.fts_con_diff ADD MAPPING FOR hword WITH german_stem;
|
||||
|
||||
-- FTS Dictionary scripts
|
||||
CREATE TEXT SEARCH DICTIONARY target.fts_dict_tar (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'english'
|
||||
);
|
||||
|
||||
CREATE TEXT SEARCH DICTIONARY target.fts_dict_diff (
|
||||
TEMPLATE = simple,
|
||||
stopwords = 'german'
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH DICTIONARY target.fts_dict_diff
|
||||
IS 'Comment';
|
||||
|
||||
-- FTS Parser scripts
|
||||
CREATE TEXT SEARCH PARSER target.fts_par_tar (
|
||||
START = prsd_start,
|
||||
GETTOKEN = prsd_nexttoken,
|
||||
END = prsd_end,
|
||||
LEXTYPES = prsd_lextype);
|
||||
|
||||
CREATE TEXT SEARCH PARSER target.fts_par_diff (
|
||||
START = int4_accum,
|
||||
GETTOKEN = inet_gist_penalty,
|
||||
END = btint2sortsupport,
|
||||
LEXTYPES = dispell_init);
|
||||
|
||||
COMMENT ON TEXT SEARCH PARSER target.fts_par_diff
|
||||
IS 'Comment';
|
||||
|
||||
-- FTS Template scripts
|
||||
CREATE TEXT SEARCH TEMPLATE target.fts_templ_tar (
|
||||
INIT = dispell_init,
|
||||
LEXIZE = dispell_lexize
|
||||
);
|
||||
|
||||
CREATE TEXT SEARCH TEMPLATE target.fts_templ_diff (
|
||||
INIT = dsimple_init,
|
||||
LEXIZE = dsimple_lexize
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH TEMPLATE target.fts_templ_diff IS 'Comment';
|
||||
|
@@ -165,6 +165,8 @@ class SchemaDiffTestCase(BaseTestGenerator):
|
||||
self.assertEquals(response.status_code, 200)
|
||||
response_data = json.loads(response.data.decode('utf-8'))
|
||||
file_obj.write(response_data['diff_ddl'])
|
||||
elif 'diff_ddl' in diff:
|
||||
file_obj.write(diff['diff_ddl'])
|
||||
|
||||
file_obj.close()
|
||||
try:
|
||||
|
Reference in New Issue
Block a user