Code

postrr.sql: Don't use 'EXECUTE' in PostRR_update().
authorSebastian Harl <sh@tokkee.org>
Sun, 4 Nov 2012 14:35:07 +0000 (15:35 +0100)
committerSebastian Harl <sh@tokkee.org>
Sun, 4 Nov 2012 14:35:07 +0000 (15:35 +0100)
This will, hopefully, improve performance a bit.

src/postrr.sql.in

index 10aeb777815720620e55c6a71f75ece9504ddadc..af96a920687736caaf66cdf5f1cca6f8d6421eed 100644 (file)
@@ -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;