Re: [HACKERS] PATCH: pageinspect / add page_checksum andbt_page_items(bytea) - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] PATCH: pageinspect / add page_checksum andbt_page_items(bytea)
Date
Msg-id 77f3b949-05ff-f547-2c99-99b43a558f7f@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] PATCH: pageinspect / add page_checksum andbt_page_items(bytea)  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: PATCH: pageinspect / add page_checksum andbt_page_items(bytea)  (David Steele <david@pgmasters.net>)
Re: PATCH: pageinspect / add page_checksum andbt_page_items(bytea)  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-hackers
On 3/17/17 18:35, Tomas Vondra wrote:
> On 03/17/2017 05:23 PM, Peter Eisentraut wrote:
>> I'm struggling to find a good way to share code between
>> bt_page_items(text, int4) and bt_page_items(bytea).
>>
>> If we do it via the SQL route, as I had suggested, it makes the
>> extension non-relocatable, and it will also create a bit of a mess
>> during upgrades.
>>
>> If doing it in C, it will be a bit tricky to pass the SRF context
>> around.  There is no "DirectFunctionCall within SRF context", AFAICT.
> 
> Not sure what it has to do with DirectFunctionCall? You want to call the 
> bytea variant from the existing one? Wouldn't it be easier to simply 
> define a static function with the shared parts, and pass around the 
> fctx/fcinfo? Not quite pretty, but should work.

Perhaps what was added in
<http://git.postgresql.org/pg/commitdiff/29bf5016835a2c2c23786f7cda347716c083d95f>
would actually work here.

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



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] [COMMITTERS] pgsql: Sync pg_dump and pg_dumpall output
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Allow pg_dumpall to work without pg_authid