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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Contzen <mcontzen(at)dohle(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Numeric and Aggregate: transform node 107
Date: 1999-05-21 14:01:39
Message-ID: 5172.927295299@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Contzen <mcontzen(at)dohle(dot)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

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-05-21 15:07:02 Re: [HACKERS] Empty system tables
Previous Message Oleg Bartunov 1999-05-21 13:29:04 [HACKERS] 6.5 cvs: views doesn't survives after pg_dump (fwd)