Re: ObjectIdGetDatum() missing from SearchSysCache*() callers

From: Zhang Mingli <zmlpostgres(at)gmail(dot)com>
To: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: ObjectIdGetDatum() missing from SearchSysCache*() callers
Date: 2023-07-17 13:09:01
Message-ID: 0a6ee217-6958-4f13-9af8-61904f677f09@Spark
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

Regards,
Zhang Mingli
On Jul 17, 2023 at 19:10 +0800, Michael Paquier <michael(at)paquier(dot)xyz>, wrote:
> Hi all,
>
> While scanning the code, I have noticed that a couple of code paths
> that do syscache lookups are passing down directly Oids rather than
> Datums. I think that we'd better be consistent here, even if there is
> no actual bug.
>
> I have noticed 11 callers of SearchSysCache*() that pass down
> an Oid instead of a Datum.
>
> Thoughts or comments?
> --
> Michael
LGTM, and there are two functions missed, in sequence_options

 pgstuple = SearchSysCache1(SEQRELID, relid);

Shall we fix that too?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhang Mingli 2023-07-17 13:11:22 Re: ObjectIdGetDatum() missing from SearchSysCache*() callers
Previous Message Jelte Fennema 2023-07-17 13:00:50 Re: [EXTERNAL] Re: Add non-blocking version of PQcancel