Noob here. I'm getting started on building a Postgres extension. I'd like to add some keywords/clauses to the SELECT statement. For my particular application, the syntax with new keywords would be way better than trying to do it through functions alone. I would add some new keywords followed by expressions similar to those allowed in WHERE and GROUP BY clauses. The new SELECT would return multiple result sets.
I did find an example where someone did modify the parser: http://www.neilconway.org/talks/hacking/hack_slides.pdf Question: is it possible to do this in an extension? Or do I have to fork the Postgres codebase itself? Obviously, I'd prefer the former. Forks are bad.