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

2023-07-19 Thread Michael Paquier
On Tue, Jul 18, 2023 at 07:27:02AM +0900, Michael Paquier wrote: > On Mon, Jul 17, 2023 at 05:33:42PM +0300, Aleksander Alekseev wrote: > > I can't be 100% sure but it looks like that's all of them. PFA the > > updated patch v2. > > Thanks. Yes, this stuff is easy to miss. I was just grepping fo

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

2023-07-17 Thread Michael Paquier
On Mon, Jul 17, 2023 at 05:33:42PM +0300, Aleksander Alekseev wrote: > I can't be 100% sure but it looks like that's all of them. PFA the > updated patch v2. Thanks. Yes, this stuff is easy to miss. I was just grepping for a few patterns and missed these two. -- Michael signature.asc Descripti

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

2023-07-17 Thread Aleksander Alekseev
Hi, > > And inside pg_sequence_parameters: > > pgstuple = SearchSysCache1(SEQRELID, relid); > > Found another one in partcache.c: > > ``` > /* Get pg_class.relpartbound */ > tuple = SearchSysCache1(RELOID, RelationGetRelid(rel)); > ``` > > I can't be 100% sure but it looks like that's all

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

2023-07-17 Thread Aleksander Alekseev
Hi, > And inside pg_sequence_parameters: > pgstuple = SearchSysCache1(SEQRELID, relid); Found another one in partcache.c: ``` /* Get pg_class.relpartbound */ tuple = SearchSysCache1(RELOID, RelationGetRelid(rel)); ``` I can't be 100% sure but it looks like that's all of them. PFA the up

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

2023-07-17 Thread Zhang Mingli
Hi, Regards, Zhang Mingli On Jul 17, 2023 at 21:09 +0800, Zhang Mingli , wrote: > sequence_options And inside pg_sequence_parameters: pgstuple = SearchSysCache1(SEQRELID, relid);

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

2023-07-17 Thread Zhang Mingli
Hi Regards, Zhang Mingli On Jul 17, 2023 at 19:10 +0800, Michael Paquier , 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 t

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

2023-07-17 Thread Aleksander Alekseev
Hi, > I have noticed 11 callers of SearchSysCache*() that pass down > an Oid instead of a Datum. Good catch. > I think that we'd better be consistent here, even if there is > no actual bug. > +1 -- Best regards, Aleksander Alekseev

ObjectIdGetDatum() missing from SearchSysCache*() callers

2023-07-17 Thread Michael Paquier
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 Oi