Re: Refactoring SysCacheGetAttr to know when attr cannot be NULL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Refactoring SysCacheGetAttr to know when attr cannot be NULL
Date: 2023-03-01 20:04:55
Message-ID: 1549010.1677701095@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> writes:
> Yes please!

> I have occasionally wondered whether just passing the isnull argument as
> NULL would be sufficient, so we don't need a new function.

I thought about that too. I think I prefer Daniel's formulation
with the new function, but I'm not especially set on that.

An advantage of using a new function name is it'd be more obvious
what's wrong if you try to back-patch such code into a branch that
lacks the feature. (Or, of course, we could back-patch the feature.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrei Zubkov 2023-03-01 20:15:26 Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements
Previous Message Jelte Fennema 2023-03-01 20:03:31 Re: [EXTERNAL] Re: Support load balancing in libpq