How to make the generate_series to generate the letter series?

Поиск
Список
Период
Сортировка
От Wen Yi
Тема How to make the generate_series to generate the letter series?
Дата
Msg-id tencent_A24CD2422E177547AB16A6AA906A71266E08@qq.com
обсуждение исходный текст
Ответы Re: How to make the generate_series to generate the letter series?
Список pgsql-general
Hi team,
when I study the generate_series function, I found that it can not only generate the number series but also can generate the date series.(ref: https://www.postgresql.org/docs/current/functions-srf.html)
That means I can make the generate_series to generate the letter series.

So I try this command (I guess I can follow the ascil code rule to complete this work):

# SELECT * FROM generate_series('a'::int, 'z'::int, 1);

But the postgres reply me a error, because the 'a' can't translate into 'integer' type.

Can someone provide me a better solution?
Thanks in advance!

Yours,
Wen Yi

В списке pgsql-general по дате отправления:

Предыдущее
От: "Wen Yi"
Дата:
Сообщение: Re: A question about generate_series
Следующее
От: Ian Lawrence Barwick
Дата:
Сообщение: Re: How to make the generate_series to generate the letter series?