FROM (SELECT 8 as len) AS param,
LATERAL (
SELECT chr(ceil(random() * 26 + 64)::integer) AS s1 FROM generate_series(1, param.len)
UNION ALL
SELECT chr(ceil(random() * 26 + 96)::integer) AS s1 FROM generate_series(1,param.len)
UNION ALL
SELECT chr(ceil(random() * 9 + 48)::integer) AS s1 FROM generate_series(1,param.len)
UNION ALL
SELECT substring('!#$%&()*+,-./:;<=>?@[]^', ceil(random() * 23)::integer, 1) AS s1 FROM generate_series(1,param.len)
) AS t
ORDER BY random()
Непонятней - это да, хотя и за текущий вариант бить будут больно.
Во-первых, https://t.me/pgsql/303899
Обсуждают сегодня