This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION blowup(num BIGINT) RETURNS HSTORE[] AS $$ | |
DECLARE | |
result HSTORE[] := '{}'; | |
i BIGINT; | |
BEGIN | |
FOR i IN 1..num LOOP | |
result := array_append(result, ('num=>' || i)::HSTORE); | |
END LOOP; | |
RETURN result; | |
END | |
$$ LANGUAGE PLPGSQL IMMUTABLE; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment