Thread: Time to fully remove heap_formtuple() and friends?

Time to fully remove heap_formtuple() and friends?

From
Peter Geoghegan
Date:
Commit 902d1cb3, made in 2008, established that the functions
heap_formtuple(), heap_modifytuple(), and heap_deformtuple() were
deprecated. The commit also actually removed those routines, replacing
them with simple wrappers around their real replacements, which are
spelled slightly differently and have a slightly different interface
(their real replacements are heap_deform_tuple() and friends). The
wrappers fulfilled the old, legacy interface, and were added for
compatibility with third party code -- the old char 'n'/' ' convention
for indicating nulls was bolted on top of calls to the new variants.
Bolting that on to the new variants involves a new palloc() + pfree(),
which isn't cheap.

Attached patch actually removes heap_formtuple() and friends. Does
this seem worthwhile? Does this seem like something that there should
be a compatibility release note item for if we proceed? I have not
added one yet.

I think that enough time has passed that these wrappers are clearly
100% deadwood. If any external extensions are still using
heap_formtuple(), they ought to be updated to work with Postgres 9.5
by using the new variants -- a straight switch-over of callers in the
style of 902d1cb3 should now work against all supported versions of
PostgreSQL, and without macro hacks. Affected external code building
against the removed legacy interface will reliably fail to build,
forcing the third party code to conform in a non-surprising way.
Removing the code seems very low risk.

--
Peter Geoghegan

Attachment

Re: Time to fully remove heap_formtuple() and friends?

From
Tom Lane
Date:
Peter Geoghegan <pg@heroku.com> writes:
> Attached patch actually removes heap_formtuple() and friends. Does
> this seem worthwhile?

Seems reasonable, but at this point I would say this is 9.6 material;
third-party-module authors have enough to do with the API breaks we've
already created for 9.5.  Please enter this in commitfest-next.
        regards, tom lane



Re: Time to fully remove heap_formtuple() and friends?

From
Peter Geoghegan
Date:
On Fri, Jun 12, 2015 at 8:47 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Peter Geoghegan <pg@heroku.com> writes:
>> Attached patch actually removes heap_formtuple() and friends. Does
>> this seem worthwhile?
>
> Seems reasonable, but at this point I would say this is 9.6 material;
> third-party-module authors have enough to do with the API breaks we've
> already created for 9.5.  Please enter this in commitfest-next.

Fair enough. I have done so.

-- 
Peter Geoghegan



Re: Time to fully remove heap_formtuple() and friends?

From
Heikki Linnakangas
Date:
On 06/13/2015 07:10 AM, Peter Geoghegan wrote:
> On Fri, Jun 12, 2015 at 8:47 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Peter Geoghegan <pg@heroku.com> writes:
>>> Attached patch actually removes heap_formtuple() and friends. Does
>>> this seem worthwhile?
>>
>> Seems reasonable, but at this point I would say this is 9.6 material;
>> third-party-module authors have enough to do with the API breaks we've
>> already created for 9.5.  Please enter this in commitfest-next.
>
> Fair enough. I have done so.

Ok, committed.

- Heikki




Re: Time to fully remove heap_formtuple() and friends?

From
Peter Geoghegan
Date:
On Thu, Jul 2, 2015 at 11:22 AM, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
> Ok, committed.

Thanks.


-- 
Peter Geoghegan