Обсуждение: Re: [PORTS] Port Bug Report: pg_dump -d database >unload.file; cat unload.file|psql database ARE NOT EQUAL

Поиск
Список
Период
Сортировка
> 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.

--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

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

От
"Thomas G. Lockhart"
Дата:
> > 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