| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | imchifan(at)mail(dot)com |
| Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BUG #19948: Unqualified prefix <= operator is rejected despite being first in search_path |
| Date: | 2026-11-25 18:29:50 |
| Message-ID: | 1303395.1795631390@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> A user-defined prefix operator named <= can be created and invoked with
> qualified OPERATOR(...) syntax, but the equivalent unqualified expression is
> rejected with SQLSTATE 42601 even when its schema is first in search_path.
Don't hold your breath waiting for a fix for that. "<=", like some
other operators standardized by the SQL standard, has its own
productions in our Bison grammar, and must do so in order to receive
the correct operator-precedence treatment. We could perhaps enable
this by adding explicit grammar productions for all those operators in
prefix form, but it seems like it'd bloat the grammar (with ensuing
performance consequences) for little real-world return. You can't
use "<", "=", ">", ">=", "<>", "*", "/", and probably some other
standard binary operators as prefix operators either, and there have
been basically no complaints about that in 30 years.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2026-11-25 18:46:31 | Re: BUG #19935: comparing timestamps milliseocnds = microseconds |
| Previous Message | Kirill Reshke | 2026-11-25 18:07:34 | Re: BUG #19942: SIGSEGV crash (and wrong results) in MERGE ... RETURNING WITH (OLD/NEW) with VIRTUAL generated colum |