Re: Inconsistency between table am callback and table function names - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Inconsistency between table am callback and table function names
Date
Msg-id 20190514202747.GA3073@alvherre.pgsql
Whole thread Raw
In response to Re: Inconsistency between table am callback and table function names  (Ashwin Agrawal <aagrawal@pivotal.io>)
Responses Re: Inconsistency between table am callback and table function names
List 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



pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: ldapbindpasswdfile
Next
From: Andres Freund
Date:
Subject: Re: Inconsistency between table am callback and table function names