Answer the question
In order to leave comments, you need to log in
How do I add required characters to a random password?
await queryRunner.query(`CREATE OR REPLACE FUNCTION random_hex(int) RETURNS TEXT as $$
SELECT string_agg(substring('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&()*+,-./:;<=>[email protected][]^', ceil(random() * 85)::integer, 1), '') FROM generate_series(1, $1);
$$ language sql;`);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question