Interesting Bits of Postgres Grammar
I’ve been working on Squawk for a while, it’s a linter for PostgreSQL, and it now uses a handmade parser.
So let’s explore some interesting bits from the Postgres grammar.
Custom Operators
Very few operators are defined in the grammar itself and lots of Postgres features rely on custom operators.
For example, Postgres uses <-> for comparing geometric types, along with a whole host of others: ##, @-@, #, @>, <@>, &<, &>, |>>, |<<, <^, >^, ?-, ?|, ?||, ~=.
Note: custom operators can be prefix or i...
Read more at steve.dignam.xyz