From: Sebastian Harl Date: Sun, 4 Nov 2012 14:35:07 +0000 (+0100) Subject: postrr.sql: Don't use 'EXECUTE' in PostRR_update(). X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ff2722639be03a9242d3adf43be62dbc473a2a70;p=postrr.git postrr.sql: Don't use 'EXECUTE' in PostRR_update(). This will, hopefully, improve performance a bit. --- diff --git a/src/postrr.sql.in b/src/postrr.sql.in index 10aeb77..af96a92 100644 --- a/src/postrr.sql.in +++ b/src/postrr.sql.in @@ -361,12 +361,7 @@ DECLARE BEGIN FOR adef IN SELECT tbl, tscol, vcol FROM postrr.rrarchives WHERE postrr.rrarchives.rraname = $1 LOOP - EXECUTE 'SELECT PostRR_update(' - || quote_literal(adef.tbl) || ', ' - || quote_literal(adef.tscol) || ', ' - || quote_literal(adef.vcol) || ', ' - || quote_literal(ts) || ', ' - || quote_literal(value) || ')' + SELECT PostRR_update(adef.tbl, adef.tscol, adef.vcol, $2, $3) INTO new; RETURN NEXT new; END LOOP;