view schema/updates/1409/01.add_fm_validity_indexes.sql @ 5560:f2204f91d286

Join the log lines of imports to the log exports to recover data from them. Used in SR export to extract information that where in the meta json but now are only found in the log.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 09 Feb 2022 18:34:40 +0100
parents de190de05f67
children
line wrap: on
line source

DO LANGUAGE plpgsql
$$
DECLARE table_suffix varchar;
BEGIN
    FOREACH table_suffix IN ARRAY ARRAY[
        'bcnlat_hydro', 'bcnlat_ienc', 'boycar',
        'boylat_hydro', 'boylat_ienc', 'boysaw',
        'boyspp', 'daymar_hydro', 'daymar_ienc',
        'lights', 'rtpbcn', 'topmar', 'notmrk']
    LOOP
        EXECUTE format(
            'CREATE INDEX fairway_marks_%1$s_validity '
            'ON waterway.fairway_marks_%1$s USING GiST (validity)',
            table_suffix);
    END LOOP;
END;
$$;