Possible to modify query language in an extension?

From: Chris Cleveland <ccleve+github(at)dieselpoint(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Possible to modify query language in an extension?
Date: 2019-03-16 23:24:11
Message-ID: CABSN6VeeEhwb0HrjOCp9kHaWm0Ljbnko5y-0NKsT_=5i5C2jog@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2019-03-16 23:44:23 Re: [HACKERS] PATCH: multivariate histograms and MCV lists
Previous Message Euler Taveira 2019-03-16 22:54:30 Re: proposal: pg_restore --convert-to-text