> you must check type of any single operand, find correct operator implemenation, find correct index operator family/class and many more all through querying system catalog.
Not with static typing.
The problem with PG is that it's not fully statically typed internally. SQLite3 is worse still, naturally. But a statically typed SQL RDBMS should be possible.