Re: renaming ExecStoreWhateverTuple

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: renaming ExecStoreWhateverTuple
Date: 2019-03-25 17:22:45
Message-ID: CA+Tgmoaw=D37drP-bn5vbe8+5ikTLr4KN4VA=S8W1HOhU8T_aQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 25, 2019 at 12:33 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > Maybe we don't really need the word "tuple". Like we could just make
> > it slot_store_heap() or SlotStoreHeap(). A slot can only store a
> > tuple, after all.
>
> I don't think it's wise to think of these things as just "slots";
> that name is way too generic. They are "tuple slots", and so that
> word has to stay in the relevant function names.

I suppose there is some potential for confusion with things like
logical replication slots, but I think that these are the most
widely-used type of slot in the backend, so it's not entirely crazy to
think that they deserve a bit of special consideration. I'm not
violently opposed to using four words instead of three
(slot_store_heap_tuple vs. slot_store_heap) but to really spell out
the operation in full you'd need to say something like
HeapTupleTableSlotStoreHeapTuple, and I think that's pretty unwieldy
for what's likely to end up being a very common programming idiom.

It's not crazy that we type 'cd' to change directories rather than
'chdir' or 'change_directory'.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2019-03-25 17:39:27 Re: warning to publication created and wal_level is not set to logical
Previous Message Andres Freund 2019-03-25 17:20:09 Re: renaming ExecStoreWhateverTuple