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

From David Rowley
Subject Re: Why does array_position_common bitwise NOT an Oid type?
Date
Msg-id CAKJS1f8xyUNR3mbSMGZ8kBLUF9q6e_3vP6-6a+AmWVmmKhh=sQ@mail.gmail.com
Whole thread Raw
In response to Re: Why does array_position_common bitwise NOT an Oid type?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 17 December 2017 at 14:53, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> David Rowley <david.rowley@2ndquadrant.com> writes:
>> I was puzzled to see the following code:
>
>> my_extra->element_type = ~element_type;
>
> If memory serves, the idea was to force the subsequent datatype-lookup
> path to be taken, even if for some reason element_type is InvalidOid.
> If we take the lookup path then the bogus element_type will be detected
> and reported; if we don't, it won't be.

That makes sense. I'd just have expected more documentation on that.
Although, perhaps I just didn't look hard enough. I did fail to notice
the fact that the same thing does occur over and over when I sent this
originally.

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


pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: pg_(total_)relation_size and partitioned tables
Next
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] Proposal: Local indexes for partitioned table