[PATCH] Change simple_heap_insert() to a macro

From: Andrey Klychkov <aaklychkov(at)mail(dot)ru>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH] Change simple_heap_insert() to a macro
Date: 2018-10-12 08:54:33
Message-ID: 1539334473.199210414@f343.i.mail.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi, Hackers
Studying another question I noticed a small point for optimization.
In the src/backend/access/heap/heapam.c we have the function:
- * simple_heap_insert - insert a tuple
- *
- * Currently, this routine differs from heap_insert only in supplying
- * a default command ID and not allowing access to the speedup options.
- *
- * This should be used rather than using heap_insert directly in most places
- * where we are modifying system catalogs.
- */
-simple_heap_insert(Relation relation, HeapTuple tup)
- return heap_insert(relation, tup, GetCurrentCommandId(true), 0, NULL);
I changed it to a macro. See the attached patch.
I will be grateful if someone look at this.
Thank you! --
Andrey Klychkov

Attachment Content-Type Size
v1-00-simple_heap_insert-to-macro.patch application/x-patch 2.9 KB


Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2018-10-12 09:16:36 Re: [PATCH] Change simple_heap_insert() to a macro
Previous Message Christoph Berg 2018-10-12 07:47:51 Re: Debian mips: Failed test 'Check expected t_009_tbl data on standby'