Re: [HACKERS] PATCH: pageinspect / add page_checksum andbt_page_items(bytea)

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [HACKERS] PATCH: pageinspect / add page_checksum andbt_page_items(bytea)
Дата
Msg-id e41f61f4-fcd4-a64e-2214-52e1c76b6cf2@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [HACKERS] PATCH: pageinspect / add page_checksum andbt_page_items(bytea)  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Ответы Re: [HACKERS] PATCH: pageinspect / add page_checksum and bt_page_items(bytea)  (Ashutosh Sharma <ashu.coek88@gmail.com>)
Список pgsql-hackers
On 3/6/17 16:33, Tomas Vondra wrote:
>> I think it would be better not to maintain so much duplicate code
>> between bt_page_items(text, int) and bt_page_items(bytea).  How about
>> just redefining bt_page_items(text, int) as an SQL-language function
>> calling bt_page_items(get_raw_page($1, $2))?
>>
> 
> Maybe. We can also probably share the code at the C level, so I'll look 
> into that.

I think SQL would be easier, but either way some reduction in
duplication would be good.

>> For page_checksum(), the checksums are internally unsigned, so maybe
>> return type int on the SQL level, so that there is no confusion about
>> the sign?
>>
> 
> That ship already sailed, I'm afraid. We already have checksum in the 
> page_header() output, and it's defined as smallint there. So using int 
> here would be inconsistent.

OK, no worries then.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Dilip Kumar
Дата:
Сообщение: Re: [HACKERS] Parallel bitmap heap scan
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Parallel bitmap heap scan