BEGIN;
-CREATE TRIGGER thes_code_tracking_trigger
- AFTER UPDATE ON authority.thesaurus
- FOR EACH ROW EXECUTE PROCEDURE oils_i18n_code_tracking('at');
+--CREATE TRIGGER thes_code_tracking_trigger
+ --AFTER UPDATE ON authority.thesaurus
+ --FOR EACH ROW EXECUTE PROCEDURE oils_i18n_code_tracking('at');
-ALTER TABLE authority.thesaurus ADD COLUMN short_code TEXT, uri TEXT;
+--ALTER TABLE authority.thesaurus ADD COLUMN short_code TEXT, uri TEXT;
DELETE FROM authority.thesaurus WHERE control_set = 1 AND code NOT IN ('n',' ','|');
UPDATE authority.thesaurus SET short_code = code;
noraf http://id.loc.gov/vocabulary/subjectSchemes/noraf Norwegian Authority File
kito http://id.loc.gov/vocabulary/subjectSchemes/kito KITO - Kirjallisuudentutkimuksen ontologia "fi"=>"KITO - Kirjallisuudentutkimuksen ontologia"
tho http://id.loc.gov/vocabulary/subjectSchemes/tho Thesauros HellÄ\93nikÅ\8dn Oron "el"=>"Thesauros HellÄ\93nikÅ\8dn Oron"
-ept http://id.loc.gov/vocabulary/subjectSchemes/ept European education thesaurus "sl"=>"Evropski pedagoški tezaver"
pmont http://id.loc.gov/vocabulary/subjectSchemes/pmont Powerhouse Museum Object Name Thesaurus
ssg http://id.loc.gov/vocabulary/subjectSchemes/ssg Splošni slovenski geslovnik "sl"=>"Splošni slovenski geslovnik"
huc http://id.loc.gov/vocabulary/subjectSchemes/huc U.S. Geological Survey water-supply paper 2294: hydrologic basins unit codes
francis http://id.loc.gov/vocabulary/subjectSchemes/francis FRANCIS database classification scheme "fr"=>"Base de donneés FRANCIS: plan de classement"
eurovocsl http://id.loc.gov/vocabulary/subjectSchemes/eurovocsl Eurovoc thesaurus "sl"=>"Eurovoc thesaurus"
idszbzes http://id.loc.gov/vocabulary/subjectSchemes/idszbzes Thesaurus IDS Nebis Bibliothek Englisches Seminar der Universität Zürich "de"=>"Thesaurus IDS Nebis Bibliothek Englisches Seminar der Universität Zürich"
-gnd http://id.loc.gov/vocabulary/subjectSchemes/gnd Gemeinsame Normdatei "de"=>"Gemeinsame Normdatei"
nlmnaf http://id.loc.gov/vocabulary/subjectSchemes/nlmnaf National Library of Medicine name authority file
rugeo http://id.loc.gov/vocabulary/subjectSchemes/rugeo Natsional'nyi normativnyi fail geograficheskikh nazvanii Rossiiskoi Federatsii "ru"=>"Natsional'nyi normativnyi fail geograficheskikh nazvanii Rossiiskoi Federatsii"
sipri http://id.loc.gov/vocabulary/subjectSchemes/sipri SIPRI library thesaurus
-- ' ...blah
INSERT INTO authority.thesaurus (code, uri, name, control_set)
- SELECT code, uri, name, 1 FROM thesausi;
+ SELECT code, uri, name, 1 FROM thesauri;
UPDATE authority.thesaurus SET short_code = 'a' WHERE code = 'lcsh';
UPDATE authority.thesaurus SET short_code = 'b' WHERE code = 'lcshac';
AND control_set = 1;
INSERT INTO config.i18n_core (fq_field, identity_value, translation, string )
- SELECT 'at.name', t.code, (xlate).key, (xlate).value
- FROM thesauri t,
+ SELECT 'at.name', t.code, xlate->key, xlate->value
+ FROM thesauri t
JOIN LATERAL each(t.xlate) AS xlate ON TRUE
WHERE NOT EXISTS
(SELECT id
FROM config.i18n_core
WHERE fq_field = 'at.name'
AND identity_value = t.code
- AND translation = each.key)
+ AND translation = xlate->key)
AND t.xlate IS NOT NULL
- AND t.name <> each.value;
+ AND t.name <> (xlate->value);
CREATE OR REPLACE FUNCTION authority.extract_thesaurus( marcxml TEXT ) RETURNS TEXT AS $func$
DECLARE