Re: [PORTS] Port Bug Report: pg_dump -d database >unload.file; cat unload.file|psql database ARE NOT EQUAL - Mailing list pgsql-hackers

From Thomas G. Lockhart
Subject Re: [PORTS] Port Bug Report: pg_dump -d database >unload.file; cat unload.file|psql database ARE NOT EQUAL
Date
Msg-id 351F3EDC.FC5ADDD5@alumni.caltech.edu
Whole thread Raw
In response to Re: [PORTS] Port Bug Report: pg_dump -d database >unload.file; cat unload.file|psql database ARE NOT EQUAL  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
> > 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

pgsql-hackers by date:

Previous
From: Zeugswetter Andreas SARZ
Date:
Subject: AW: [HACKERS] Optimizer fails?
Next
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] Modules