Project

General

Profile

« Previous | Next » 

Revision 13585

bugfix: inputs/.TNRS/schema.sql: tnrs__match_num__fill(): only fill if not set, to support case where tnrs is being restored from a .sql file (where match_num is already set)

View differences:

trunk/inputs/.TNRS/schema.sql
181 181
    LANGUAGE plpgsql
182 182
    AS $$
183 183
BEGIN
184
	new.match_num = "TNRS".tnrs__match_num__next();
184
	IF new.match_num IS NULL THEN
185
		new.match_num = "TNRS".tnrs__match_num__next();
186
	END IF;
185 187
	RETURN new;
186 188
END;
187 189
$$;
trunk/schemas/vegbien.sql
16976 16976
    LANGUAGE plpgsql
16977 16977
    AS $$
16978 16978
BEGIN
16979
	new.match_num = "TNRS".tnrs__match_num__next();
16979
	IF new.match_num IS NULL THEN
16980
		new.match_num = "TNRS".tnrs__match_num__next();
16981
	END IF;
16980 16982
	RETURN new;
16981 16983
END;
16982 16984
$$;

Also available in: Unified diff