Re: Why does array_position_common bitwise NOT an Oid type?

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Why does array_position_common bitwise NOT an Oid type?
Дата
Msg-id CAKJS1f8xyUNR3mbSMGZ8kBLUF9q6e_3vP6-6a+AmWVmmKhh=sQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Why does array_position_common bitwise NOT an Oid type?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: pg_(total_)relation_size and partitioned tables
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] Proposal: Local indexes for partitioned table