From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Michael Nolan <htfoot(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: A parsing question |
Date: | 2020-06-03 22:54:01 |
Message-ID: | CAKFQuwapwo09A+mGZMcdYii_bQEuKCbNzqtYWss+5RPTut8Nbw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Jun 3, 2020 at 3:41 PM Michael Nolan <htfoot(at)gmail(dot)com> wrote:
> Recently I was typing in a query in PG 10.4.
>
> What I MEANT to type was: Where xyz >= 2400
>
> What I actually typed was: Where xyz >- 2400
>
> The latter was interpreted as 'where xyz > -2400', but I'm wondering if it
> shouldn't have thrown an error on an unrecognized operator '>-'
>
From the syntax section of the documentation:
A multiple-character operator name cannot end in + or -, unless the name
also contains at least one of these characters:
~ ! @ # % ^ & | ` ?
For example, @- is an allowed operator name, but *- is not. This
restriction allows PostgreSQL to parse SQL-compliant queries without
requiring spaces between tokens.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-06-03 22:55:44 | Re: A parsing question |
Previous Message | Michael Nolan | 2020-06-03 22:48:23 | Re: Oracle vs. PostgreSQL - a comment on Mysql |