datatype of constant is not propagated into aggregate query

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема datatype of constant is not propagated into aggregate query
Дата
Msg-id CAFj8pRB4nHkrBq8bMyPMn-UYnrFfADok2wakRLRVqznq2cks4g@mail.gmail.com
обсуждение исходный текст
Ответы Re: datatype of constant is not propagated into aggregate query
Список pgsql-hackers
Hello

create table t1(d date, n integer);

postgres=# insert into t1 select '2001-01-01', 1 from generate_series(1,3);
INSERT 0 3

but

postgres=# insert into t1 select distinct '2001-01-01', 1 from
generate_series(1,3);
ERROR:  column "d" is of type date but expression is of type text
LINE 1: insert into t1 select distinct '2001-01-01', 1 from generate...                                      ^
HINT:  You will need to rewrite or cast the expression.

Regards

Pavel Stehule


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

Предыдущее
От: Thomas Hunger
Дата:
Сообщение: Typo patch
Следующее
От: Stefan Keller
Дата:
Сообщение: Re: pg_prewarm