Re: Nested transactions: deferred triggers

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Nested transactions: deferred triggers
Дата
Msg-id 23372.1055361236@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Nested transactions: deferred triggers  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Ответы Re: Nested transactions: deferred triggers  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Список pgsql-patches
Alvaro Herrera <alvherre@dcc.uchile.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

В списке pgsql-patches по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Nested transactions: deferred triggers
Следующее
От: Kurt Roeckx
Дата:
Сообщение: Re: Ipv6 network cleanup patch #2.