Re: Possible to modify query language in an extension?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Chris Cleveland <ccleve+github(at)dieselpoint(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Possible to modify query language in an extension?
Date: 2019-03-18 14:09:57
Message-ID: CA+TgmoabrH89dTvt=5B5tLay6ogB=wFE+fiuOSGT57+z7DVS8w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Mar 17, 2019 at 12:21 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Chris Cleveland <ccleve+github(at)dieselpoint(dot)com> writes:
> > I'd like to add some keywords/clauses to the SELECT statement.
>
> Yeah, you'll have to modify gram.y (and a pile of other places)
> if you want to do that. That's certainly something we do all
> the time, but bison doesn't provide any way to add grammar
> productions on-the-fly, so it does imply core-code mods.
>
> > ... The new SELECT would return multiple result sets.
>
> And that sounds like you'd also be redefining the wire protocol,
> hence having to touch client-side code as well as the server.

Long story short, this sounds like a VERY hard project. Chris, you
will probably want to think about some other approach to achieving
your objective, because this sounds like a project that even an expert
coder would spend a lot of time trying to get done.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2019-03-18 14:13:11 Re: Timeout parameters
Previous Message Alvaro Herrera 2019-03-18 14:02:15 Re: partitioned tables referenced by FKs