Re: BUG #15022: Multiple + operators when parsing SQL query - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG #15022: Multiple + operators when parsing SQL query
Date
Msg-id CAKFQuwY2xtWghTPm2kZGBHtv9c44uK1zfff9nzxk1SnnWbb5AQ@mail.gmail.com
Whole thread Raw
In response to BUG #15022: Multiple + operators when parsing SQL query  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
On Fri, Jan 19, 2018 at 3:17 PM, PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      15022
Logged by:          Victoria Nope
Email address:      victoria.nope@mail.com
PostgreSQL version: 10.1
Operating system:   Windows 7
Description:

When executing query like this:

SELECT 1 +++++++ 1;

parser doesn't complain. Shall we consider this as an issue?


​No.

What that really says is (using just 3 + signs)

1 + (+(+1))

Not much different that writing:

1 + (-(-1))

Which is the same as:

1 + - - 1

(you cannot write 1 + --1 since -- is the comment indicator)

David J.



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #15022: Multiple + operators when parsing SQL query
Next
From: Wallace Baggaley
Date:
Subject: Re: BUG #15021: Postgres crashes unexpectedly