Why does array_position_common bitwise NOT an Oid type? - Mailing list pgsql-hackers

From David Rowley
Subject Why does array_position_common bitwise NOT an Oid type?
Date
Msg-id CAKJS1f9e8oYEMwX8CjT8oQmmXLamGLD95Ty7Frda8v_hh6_W5A@mail.gmail.com
Whole thread Raw
Responses Re: Why does array_position_common bitwise NOT an Oid type?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

I was puzzled to see the following code:

my_extra->element_type = ~element_type;

It looks quite wrong, but if its right then I think it needs a comment
to explain it. I don't see any in the area which mentions it. My best
guess would be that it's using this to know if the type data has been
cached, but then why would it not use InvalidOid for that?

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Andreas Seltenreich
Date:
Subject: Re: [sqlsmith] Parallel worker executor crash on master
Next
From: Tom Lane
Date:
Subject: Re: Why does array_position_common bitwise NOT an Oid type?