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