Re: Add CREATE support to event triggers

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add CREATE support to event triggers
Date: 2014-10-08 21:26:00
Message-ID: 20141008212600.GB7043@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

About patch 1, which I just pushed, there were two reviews:

Andres Freund wrote:
> On 2014-09-25 18:59:31 -0300, Alvaro Herrera wrote:
> > diff --git a/src/include/utils/ruleutils.h b/src/include/utils/ruleutils.h
> > new file mode 100644
> > index 0000000..520b066
> > --- /dev/null
> > +++ b/src/include/utils/ruleutils.h

> I wondered for a minute whether any of these are likely to cause
> problems for code just including builtins.h - but I think there will be
> sufficiently few callers for them to make that not much of a concern.

Great.

Michael Paquier wrote:

> Patch 1: I still like this patch as it gives a clear separation of the
> built-in functions and the sub-functions of ruleutils.c that are
> completely independent. Have you considered adding the external
> declaration of quote_all_identifiers as well? It is true that this
> impacts extensions (some of my stuff as well), but my point is to bite
> the bullet and make the separation cleaner between builtins.h and
> ruleutils.h. Attached is a patch that can be applied on top of patch 1
> doing so... Feel free to discard for the potential breakage this would
> create though.

Yes, I did consider moving the quoting function definitions and the
global out of builtins.h. It is much more disruptive, however, because
it affects a lot of external code not only our own; and given the looks
I got after people had to mess with adding the htup_details.h header to
external projects due to the refactoring I did to htup.h in an earlier
release, I'm not sure about it.

However, if I were to do it, I would instead create a quote.h file and
would also add the quote_literal_cstr() prototype to it, perhaps even
move the implementations from their current ruleutils.c location to
quote.c. (Why is half the stuff in ruleutils.c rather than quote.c is
beyond me.)

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2014-10-08 21:50:02 Re: Promise index tuples for UPSERT
Previous Message Andres Freund 2014-10-08 21:13:49 Re: What exactly is our CRC algorithm?