Created
January 29, 2019 08:18
-
-
Save spence/5e7900323911278dd9786ec4404888bf to your computer and use it in GitHub Desktop.
This file contains hidden or 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
DO | |
$do$ | |
DECLARE | |
i INT; | |
BEGIN | |
FOR i IN 1..1000000 LOOP | |
SELECT LEFT(('x' || RIGHT(gen_random_bytes(3)::TEXT, 6))::BIT(24)::INT::TEXT, 4)::INT INTO i; | |
RAISE NOTICE '%', i; | |
END LOOP; | |
END | |
$do$; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment