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
-- http://www.postgresql.org/message-id/[email protected] | |
CREATE OR REPLACE FUNCTION | |
random_text(INTEGER) | |
RETURNS TEXT | |
LANGUAGE SQL | |
AS $$ | |
SELECT array_to_string(array( | |
SELECT SUBSTRING('23456789abcdefghjkmnpqrstuvwxyz' | |
FROM floor(random()*31)::int+1 FOR 1) |