BUG #15022: Multiple + operators when parsing SQL query

Started by PG Bug reporting formover 8 years ago2 messagesbugs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

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?

#2David G. Johnston
david.g.johnston@gmail.com
In reply to: PG Bug reporting form (#1)
Re: BUG #15022: Multiple + operators when parsing SQL query

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.