BUFFER_LOCK_* synonyms

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема BUFFER_LOCK_* synonyms
Дата
Msg-id CAMkU=1xTWfZUNPcegy1e4WSOEKAZS9A2gZJveHzgJbVC17RsEA@mail.gmail.com
обсуждение исходный текст
Ответы Re: BUFFER_LOCK_* synonyms  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers

All of the index methods have their own synonyms of the BUFFER_LOCK_* constants, for example:

#define GIN_SHARE       BUFFER_LOCK_SHARE
#define GIST_SHARE     BUFFER_LOCK_SHARE
#define HASH_READ      BUFFER_LOCK_SHARE
#define BT_READ           BUFFER_LOCK_SHARE

But most of them pass their constants directly to LockBuffer.  So if they were ever defined to be anything else, things would fall apart pretty comprehensively.  (Hash index also passes them to LockBuffer, but only indirectly via some utility functions).

What does this pseudo-encapsulation get us?  It seems like we have a separation of spelling, but no real separation of concerns.

Cheers,

Jeff

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

Предыдущее
От: Euler Taveira
Дата:
Сообщение: Re: pltcl: sentence improvement
Следующее
От: Teodor Sigaev
Дата:
Сообщение: Re: [PATCH] Microvacuum for gist.