Re: Event Triggers reduced, v1

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема Re: Event Triggers reduced, v1
Дата
Msg-id m2harjwf43.fsf@2ndQuadrant.fr
обсуждение исходный текст
Ответ на Re: Event Triggers reduced, v1  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I guess I don't particularly like either of these changes.  The first

Fair enough.

> one is mostly harmless, but I don't really see why it's any better,
> and it does have the downside of traversing the string twice (once for
> strlen and a second time in str_toupper) instead of just once.  It
> also makes a line wider than 80 columns, which is a bit ugly.  In the

It's much easier to read, I think. The line is 79 columns here given the
project Emacs setup wrt tabs, see src/tools/editors/emacs.samples.

> second hunk, the point is that we never have to do CreateCommandTag()
> here at all unless either casserts are enabled or EventCacheLookup
> returns a non-empty list.  That means that in a non-assert-enabled
> build, we get to skip that work altogether in the presumably-common
> case where there are no relevant event triggers.  Your proposed change
> would avoid doing it twice when asserts are disabled, but the cost
> would be that we'd have to do it once when asserts were disabled even
> if no event triggers exist.  I don't think that's a good trade-off.

Well I needed more exercise before sending a patch then, I just missed
that.

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



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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: fairly useless psql compatibility warning?
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: pg_dump incorrect output in plaintext mode