Re: [PORTS] Port Bug Report: int2 negative numbers not parsed correctly

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: lockhart(at)alumni(dot)caltech(dot)edu (Thomas G(dot) Lockhart)
Cc: hackers(at)postgresql(dot)org, mdalphin(at)sanger(dot)otago(dot)ac(dot)nz
Subject: Re: [PORTS] Port Bug Report: int2 negative numbers not parsed correctly
Date: 1998-04-01 16:02:47
Message-ID: 199804011602.LAA19457@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> > I am confused. As I can tell, these are coming in as null_expr - 1.
>
> What is "null_expr - 1"? I think that is the same thing; a node with a
> subtraction operator and the left side set to null and the right side
> set to a constant node. That's what I meant by the unary minus on a
> constant.
>
> > Why can't we do a check in gram.y,...
>
> 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.

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)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)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas G. Lockhart 1998-04-01 16:08:30 Re: [HACKERS] Re: [DOCS] Reference Manual
Previous Message Maurice Gittens 1998-04-01 15:01:41 Memory leak while creating indices?