From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
Cc: | Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: Nested transactions: deferred triggers |
Date: | 2003-06-11 19:53:56 |
Message-ID: | 23372.1055361236@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> writes:
> In an attempt to simplify my life I'm submitting this patch that
> restructures the deferred trigger queue. The fundamental change is to
> put all the static variables to hold the deferred triggers in a single
> structure.
Seems reasonable, but I have a stylistic gripe:
> + static DeferredTriggers ts;
I dislike static variables with names as short as that --- they are too
likely to conflict against local variables. (And before you say there's
no problem because a local declaration would mask it, what happens if
you forget the local declaration?)
I suspect you named it this way because you intend to pass it as a
parameter to all these routines later, and you're trying to avoid
one pass of editing when you add "DeferredTriggers ts" to the parameter
lists. I would suggest doing that now and including it in the patch.
Whether you are intending that or not, please use a better name for
the static variable.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Kurt Roeckx | 2003-06-11 21:09:24 | Re: Ipv6 network cleanup patch #2. |
Previous Message | Alvaro Herrera | 2003-06-11 19:25:01 | Nested transactions: deferred triggers |