Project

General

Profile

« Previous | Next » 

Revision 10147

bugfix: schemas/util.sql: set_col_names_with_metadata(): need `util.` before mk_const_col(). "to", "from" need to be referenced from row_. substring() needs to start from 2 rather than 1 because PostgreSQL string indexes are 1-based.

View differences:

schemas/util.sql
1238 1238
	FOR row_ IN
1239 1239
		EXECUTE $$DELETE FROM $$||names||$$ WHERE "from" LIKE ':%' RETURNING *$$
1240 1240
	LOOP
1241
		PERFORM mk_const_col((table_, "to"), substring("from" from 1));
1241
		PERFORM util.mk_const_col((table_, row_."to"),
1242
			substring(row_."from" from 2));
1242 1243
	END LOOP;
1243 1244
	
1244 1245
	PERFORM util.set_col_names(table_, names);

Also available in: Unified diff