I want to loop between two dates but my PL/pgSQL code goes into indefinite loop. I think I'm missing something here.

```
do $$
    declare
        the_dates date;
    begin
        select gs from generate_series('2019-11-01'::date, '2012-11-30', '1 day') as gs into the_dates;
        loop
            raise notice '%', the_dates;
        end loop;
    end
$$

```

How should I loop between these 2 dates?