check for null value before looking up the hash function

From: Zhihong Yu <zyu(at)yugabyte(dot)com>
To: peter(at)eisentraut(dot)org, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: check for null value before looking up the hash function
Date: 2022-05-20 18:41:57
Message-ID: CALNJ-vTN7miyUy4tYcBF6C1F9z-YhfecAGiBAO41062s4-S0zQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
I was looking at the code in hash_record()
of src/backend/utils/adt/rowtypes.c

It seems if nulls[i] is true, we don't need to look up the hash function.

Please take a look at the patch.

Thanks

Attachment Content-Type Size
hash-record-check-null-first.patch application/octet-stream 1.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michail Nikolaev 2022-05-20 18:50:32 CPU time for pg_stat_statement
Previous Message Oleksii Kliukin 2022-05-20 17:36:38 Re: Limiting memory allocation