[PATCH] Change simple_heap_insert() to a macro - Mailing list pgsql-hackers

From Andrey Klychkov
Subject [PATCH] Change simple_heap_insert() to a macro
Date
Msg-id 1539334473.199210414@f343.i.mail.ru
Whole thread Raw
Responses Re: [PATCH] Change simple_heap_insert() to a macro  (Heikki Linnakangas <hlinnaka@iki.fi>)
List 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.
- */
-Oid
-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!--
Regards,
Andrey Klychkov

Attachment

pgsql-hackers by date:

Previous
From: Christoph Berg
Date:
Subject: Re: Debian mips: Failed test 'Check expected t_009_tbl data onstandby'
Next
From: Heikki Linnakangas
Date:
Subject: Re: [PATCH] Change simple_heap_insert() to a macro