Re: Command Triggers

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Robert Haas <robertmhaas(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Greg Smith <greg(at)2ndquadrant(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>
Subject: Re: Command Triggers
Date: 2012-02-16 21:30:49
Message-ID: m2ipj6sbxy.fsf@2ndQuadrant.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> I didn't like the new cmdtrigger.h file. It's included by a lot of
> other headers, and it's also itself including execnodes.h and
> parsenodes.h which means practically the whole lot of the source tree
> is included in turn. If you could split it, so that the struct
> definition is in a different file that's only included by the few .c
> files that actually use that struct, I'd be much happier.

I didn't realize that, thanks for reviewing!

> ... after looking at it more closely, I think only this line needs to be
> in a separate file:
>
> typedef struct CommandContextData *CommandContext;
>
> and that file is included by other headers; they don't need the function
> declarations or the struct definition.

I'll look into that tomorrow then. The same trick is already applied to
Relation and RelationData (resp. in src/include/utils/relcache.h and
src/include/utils/rel.h), and only now I understand why :)

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Guillaume Lelarge 2012-02-16 21:43:48 Bug in intarray?
Previous Message Dimitri Fontaine 2012-02-16 21:21:30 Re: Command Triggers