All pastes #514918 Raw Edit

Untitled

public sql v1 · immutable
#514918 ·published 2007-05-27 23:57 UTC
rendered paste body
CREATE OR REPLACE FUNCTION benchmark(funkcija TEXT, kiekis INTEGER) RETURNS void AS $benchmark$    DECLARE        i INTEGER;    BEGIN        i := 0;	WHILE i < kiekis LOOP	    EXECUTE 'SELECT ' || funkcija || '()';	    i := i + 1;	END LOOP;    END;$benchmark$ LANGUAGE plpgsql;