> > create table templ_arg(accii int2,type char,sign float8);
> > create table a1 () inherits (templ_arg);
> > insert into a1 values (9999,'a',1); -- working;
> > insert into a1 values (9999,'a',-1); -- ERROR;
> > insert into a1 values (9999,'a',-1.0); --working
>
> Yep, the problem gram.y line is:
>
> | '-' a_expr %prec UMINUS
> { $$ = makeA_Expr(OP, "-", NULL, $2);}
>
> This is being executed rather than the code that reads in negative
> integer constants.
Yes. It's a problem because the scanner assigned types to integer and
floating point constants, but does not have a sense of context so the
negative sign must be stripped off since it could be in the middle of a
math expression. We will need to fix this in gram.y or by using the new
type conversion stuff farther back. But, I don't know how much new type
conversion capabilities there will be until I've tried to address most
of the pieces; still working out lingering problems in the function call
portion.
Will put this one on my list of things to look at.
- Tom