Search Postgresql Archives

Re: A parsing question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael Nolan <htfoot@xxxxxxxxx> 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





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux