Re: relscan.h split

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: relscan.h split
Дата
Msg-id 20080614234901.GG8519@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: relscan.h split  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: relscan.h split
Список pgsql-patches
Tom Lane wrote:

> Perhaps a better idea would be to put the opaque-pointer typedefs into
> heapam.h and genam.h respectively, and then see where you could remove
> inclusions of relscan.h.

Hmm, this seems to be closely equivalent.  Patch attached.  I also moved
SysScanDescData from genam.h to relscan.h.

> Also, it seemed like some of those .c files had no business poking into
> the scan structs anyway; particularly contrib.  Did you check whether
> the inclusions could be avoided?

Not really, unless we were to provide something a routine that returns
the current block of a scan.  There are a few occurrences of this:

        /* must hold a buffer lock to call HeapTupleSatisfiesUpdate */
        LockBuffer(scan->rs_cbuf, BUFFER_LOCK_SHARE);

which of course need the definition.  Maybe providing it is not a bad
idea, because that kind of coding is used in the backend too.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Вложения

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Simplify formatting.c
Следующее
От: Tom Lane
Дата:
Сообщение: Re: relscan.h split