Re: Inconsistency between table am callback and table function names

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Ashwin Agrawal <aagrawal(at)pivotal(dot)io>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Inconsistency between table am callback and table function names
Date: 2019-05-14 20:27:47
Message-ID: 20190514202747.GA3073@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-May-14, Ashwin Agrawal wrote:

> Thank you. Please find the patch to rename the agreed functions. It would
> be good to make all consistent instead of applying exception to three
> functions but seems no consensus on it. Given table_ api are new, we could
> modify them leaving systable_ ones as is, but as objections left that as is.

Hmm .. I'm surprised to find out that we only have one caller of
simple_table_insert, simple_table_delete, simple_table_update. I'm not
sure I agree to the new names those got in the renaming patch, since
they're not really part of table AM proper ... do we really want to
offer those as separate entry points? Why not just remove those routines?

Somewhat related: it's strange that CatalogTupleUpdate etc use
simple_heap_update instead of the tableam variants wrappers (I suppose
that's either because of bootstrapping concerns, or performance). Would
it be too strange to have CatalogTupleInsert call heap_insert()
directly, and do away with simple_heap_insert? (Equivalently for
update, delete). I think those wrappers made perfect sense when we had
simple_heap_insert all around the place ... but now that we introduced
the CatalogTupleFoo wrappers, I don't think it does any longer.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-05-14 20:37:14 Re: Inconsistency between table am callback and table function names
Previous Message Daniel Gustafsson 2019-05-14 20:24:15 Re: ldapbindpasswdfile