Possible to modify query language in an extension? - Mailing list pgsql-hackers

From Chris Cleveland
Subject Possible to modify query language in an extension?
Date
Msg-id CABSN6VeeEhwb0HrjOCp9kHaWm0Ljbnko5y-0NKsT_=5i5C2jog@mail.gmail.com
Whole thread Raw
Responses Re: Possible to modify query language in an extension?
List pgsql-hackers
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.

pgsql-hackers by date:

Previous
From: Euler Taveira
Date:
Subject: Re: proposal: pg_restore --convert-to-text
Next
From: Tomas Vondra
Date:
Subject: Re: [HACKERS] PATCH: multivariate histograms and MCV lists