Skip site navigation (1) Skip section navigation (2)

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

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
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 04:24:26
Message-ID: 3521C17A.5EFBE27F@alumni.caltech.edu (view raw or flat)
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.

In response to

Responses

pgsql-hackers by date

Next:From: Maurice GittensDate: 1998-04-01 13:48:16
Subject: patch for some more overruns; two to go
Previous:From: Thomas G. LockhartDate: 1998-04-01 02:48:02
Subject: Re: [PORTS] Port Bug Report: int2 negative numbers not parsed correctly

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group