Re: [HACKERS] Numeric and Aggregate: transform node 107

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Numeric and Aggregate: transform node 107
Дата
Msg-id 5172.927295299@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Numeric and Aggregate: transform node 107  (Michael Contzen <mcontzen@dohle.com>)
Список pgsql-hackers
Michael Contzen <mcontzen@dohle.com> writes:
> insert into b select sum(val) into b;
> ERROR:  transformExpr: does not know how to transform node 107

I fixed that error a few days ago (the parser wasn't coping with
implicit type coercion of aggregates).  It works here:

regression=> insert into b select sum(val) into b;
INSERT 540179 1

I'm a little confused about why this statement is allowed, though;
shouldn't it read 'insert into b select sum(val) FROM a'?

I'm not sure what the parser thought it was doing --- there's no
need for a type coercion if it's computing a sum() of a numeric
column and putting the result in another numeric column, so I have
a suspicion that the parser read the statement as meaning something
else entirely.
        regards, tom lane


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

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: [HACKERS] 6.5 cvs: views doesn't survives after pg_dump (fwd)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Empty system tables