From: | Amit Langote <amitlangote09(at)gmail(dot)com> |
---|---|
To: | Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Identifying user-created objects |
Date: | 2020-02-10 04:16:30 |
Message-ID: | CA+HiwqFzc0mU0cNQ41hHpu4DeyBwjip7+UbRDZn1gsDx_4m5Zw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Feb 10, 2020 at 1:06 PM Masahiko Sawada
<masahiko(dot)sawada(at)2ndquadrant(dot)com> wrote:
> On Mon, 10 Feb 2020 at 12:54, Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
> >
> > Sawada-san,
> >
> > On Mon, Feb 10, 2020 at 12:25 PM Masahiko Sawada
> > <masahiko(dot)sawada(at)2ndquadrant(dot)com> wrote:
> > > > > > On Thu, Feb 06, 2020 at 04:25:47PM +0900, Amit Langote wrote:
> > > > > > > About the implementation, how about defining a static inline function,
> > > > > > > say is_user_object(), next to FirstNormalObjectId's definition and
> > > > > > > make pg_is_user_object() call it? There are a few placed in the
> > > > > > > backend code that perform the same computation as pg_is_user_object(),
> > > > > > > which could be changed to use is_user_object() instead.
> > >
> > > Attached the updated version patch that includes regression tests. And
> > > I have registered this to the next commit fest.
> >
> > Thank you.
> >
> > Any thoughts on the above suggestion?
>
> Oops, I had overlooked it. I agree with you.
>
> How about having it as a macro like:
>
> #define ObjectIdIsUserObject(oid) ((Oid)(oid) >= FirstNormalObjectId)
I'm fine with a macro.
Thanks,
Amit
From | Date | Subject | |
---|---|---|---|
Next Message | Justin Pryzby | 2020-02-10 04:53:08 | Re: subplan resets wrong hashtable |
Previous Message | Amit Kapila | 2020-02-10 04:06:49 | Re: typos in comments and user docs |