Usando a função sql generate_series () no redshift

Eu gostaria de usar a função de gerar séries no redshift, mas não foram bem sucedidas.

A documentação do redshift diz que não é suportado. O código a seguir funciona:

select *
from generate_series(1,10,1)

saídas:

1
2
3
...
10

Eu gostaria de fazer o mesmo com datas. Eu tentei várias variações, incluindo:

select *
from generate_series(date('2008-10-01'),date('2008-10-10 00:00:00'),1)

chuta para fora:

 ERROR: function generate_series(date, date, integer) does not exist
 Hint: No function matches the given name and argument types.
 You may need to add explicit type casts. [SQL State=42883]

Também tentei:

select *
from generate_series('2008-10-01 00:00:00'::timestamp,
'2008-10-10 00:00:00'::timestamp,'1 day')

E tentei:

select *
from generate_series(cast('2008-10-01 00:00:00' as datetime),
cast('2008-10-10 00:00:00' as datetime),'1 day')

ambos expulsam:

ERROR: function generate_series(timestamp without time zone, timestamp without time zone, "unknown") does not exist
Hint: No function matches the given name and argument types.
You may need to add explicit type casts. [SQL State=42883]

Se não parece que eu vou usar esse código de outro post:

SELECT to_char(DATE '2008-01-01'
+ (interval '1 month' * generate_series(0,57)), 'YYYY-MM-DD') AS ym

PostgreSQL generate_series () com função SQL como argumentos

questionAnswers(4)

yourAnswerToTheQuestion