On 02/11/2017 10:51 AM, Alexander Farber wrote:
At the same time this advice from http://stackoverflow.com/questions/42179012/how-to-shuffle-array-in-postgresql-9-6-and-also-lower-versions works, don't know why though:words=> select array_agg(u order by random()) words-> from unnest(array['a','b','c','d','e','f']) u; array_agg --------------- {d,a,f,c,b,e}
To future proof your code follow the advice shown in the doc snippet in the first answer to your SO question. This is what I showed in my answers to your questions.
-- Adrian Klaver [email protected] -- Sent via pgsql-general mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
