I am using GUC style variables in an SQL script like this:
set mycustom.var = 5;
select current_setting('mycustom.var');
that works fine for strings and integers... but how do I get and set enumerated lists of integers?
Ideally, I'd like to populated the enumerated list with random unique values using this code:
SELECT num
FROM GENERATE_SERIES (1, 10) AS s(num)
ORDER BY RANDOM()
LIMIT 6