Why does array_position_common bitwise NOT an Oid type?

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

Предыдущее
От: Andreas Seltenreich
Дата:
Сообщение: Re: [sqlsmith] Parallel worker executor crash on master
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Why does array_position_common bitwise NOT an Oid type?