pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jim Mlodgenski <jimmy76@gmail.com>
Cc: Simon Riggs <simon.riggs@enterprisedb.com>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Hook for extensible parsing.
Date: Wed, 15 Sep 2021 11:26:56 -0400
Message-ID: <984300.1631719616@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB_5SRfOGwEhsz6kR4BxYHjjDeUcmCHZRrCtvWQKi+6GL7M7aQ@mail.gmail.com>
References: <20210501072458.adqjoaqnmhg4l34l@nol>
	<CANbhV-EFq08gH_1ZAfenRucq4iR=-2G29Z4f6OPpciy_FqxjiA@mail.gmail.com>
	<CAB_5SRfOGwEhsz6kR4BxYHjjDeUcmCHZRrCtvWQKi+6GL7M7aQ@mail.gmail.com>

Jim Mlodgenski <jimmy76@gmail.com> writes:
> On Wed, Sep 15, 2021 at 9:25 AM Simon Riggs
> <simon.riggs@enterprisedb.com> wrote:
>> The general rule has always been that we don't just put hooks in, we
>> always require an in-core use for those hooks. I was reminded of that
>> myself recently.

> That's not historically what has happened. There are several hooks with
> no in core use such as emit_log_hook and ExplainOneQuery_hook.

Yeah.  I think the proper expectation is that there be a sufficiently
worked-out example to convince us that the proposed hooks have real-world
usefulness, and are not missing any basic requirements to make them do
something useful.  Whether the example ends up in our tree is a
case-by-case decision.

In the case at hand, what's troubling me is that I don't see any
particular use in merely substituting a new bison grammar, if it
still has to produce parse trees that the rest of the system will
understand.  Yeah, you could make some very simple surface-syntax
changes that way, but it doesn't seem like you could do anything
interesting (like, say, support Oracle-style outer join syntax).
AFAICS, to get to a useful feature, you'd then need to invent an
extensible Node system (which'd be hugely invasive if it's feasible
at all), and then probably more things on top of that.  So I'm not
convinced that you've demonstrated any real-world usefulness.

			regards, tom lane





view thread (33+ messages)  latest in thread

Message-ID: <984300.1631719616@sss.pgh.pa.us>
Permalink:  ../984300.1631719616@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/984300.1631719616@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jimmy76@gmail.com, simon.riggs@enterprisedb.com, rjuju123@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Hook for extensible parsing.
  In-Reply-To: <984300.1631719616@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox