I want to insert a series of numbers in a postgreSQL column.The series will be
1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3.....30
So 1-30 repeated 10 times each(300 rows).but I know to generate series I can use
SELECT a.n
from generate_series(1, 100) as a(n), generate_series(1, 3)
How to insert this series into an existing table public.trip and to the column day.I tried with
update public.trip
set day = generate_series(1, 30) , generate_series(1, 10);
But this is showing as an error.Any help is appreciated.