Re: [HACKERS] Re: [PORTS] Port Bug Report: int2 negative numbers not parsed correctly - Mailing list pgsql-hackers

From Thomas G. Lockhart
Subject Re: [HACKERS] Re: [PORTS] Port Bug Report: int2 negative numbers not parsed correctly
Date
Msg-id 352269F9.9C57968B@alumni.caltech.edu
Whole thread Raw
In response to Re: [PORTS] Port Bug Report: int2 negative numbers not parsed correctly  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] Re: [PORTS] Port Bug Report: int2 negative numbers not parsed correctly
List pgsql-hackers
> > Well we maybe can, but it sure is ugly. This will be spread around a
> > bunch of places (everywhere there is a unary minus allowed). I
> > already did the wrong thing and brute-forced something similar into
> > the CREATE SEQUENCE code in gram.y. Isolating it in transform_expr()
> > or somewhere like that would be much cleaner.
> But isn't it is just one line in gram.y.  That is where I was seeing
> it happen.

golem$ grep UMINUS gram.y
%right          UMINUS
                        | '-' default_expr %prec UMINUS
                        | '-' constraint_expr %prec UMINUS
                | '-' a_expr %prec UMINUS
                | '-' b_expr %prec UMINUS
                | '-' position_expr %prec UMINUS

So at least 5 different places, perhaps more when you get into it :(

                     - Tom

pgsql-hackers by date:

Previous
From: Sajiah Chmaitelli
Date:
Subject: ILLUSTRA DBA CONSULTANT NEEDED ASAP!
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Re: [PORTS] Port Bug Report: int2 negative numbers not parsed correctly