From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
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:55:44 |
Message-ID: | 1154086.1591224944@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Michael Nolan <htfoot(at)gmail(dot)com> writes:
> 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 '>-'
No, we do it that way intentionally, because the SQL standard requires us
to parse such cases in this way. The CREATE OPERATOR man page has some
details about what is and isn't a valid operator name ... and '>-' isn't
one. (The rules there probably look a bit bizarre, but the intention
is to ensure that operators found in the SQL spec can be parsed without
requiring spaces between them.)
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Ron | 2020-06-04 04:26:22 | Re: Can we get SQL Server-like cross database queries |
Previous Message | David G. Johnston | 2020-06-03 22:54:01 | Re: A parsing question |