Re: Do we want a hashset type?

Поиск
Список
Период
Сортировка
От Joel Jacobson
Тема Re: Do we want a hashset type?
Дата
Msg-id 0f6d4856-95b8-415c-b820-b319da61ce1c@app.fastmail.com
обсуждение исходный текст
Ответ на Re: Do we want a hashset type?  ("Joel Jacobson" <joel@compiler.org>)
Ответы Re: Do we want a hashset type?  (jian he <jian.universality@gmail.com>)
Список pgsql-hackers
On Sun, Jun 25, 2023, at 11:42, Joel Jacobson wrote:
>     SELECT hashset_contains('{}'::int4hashset, NULL::int);
>
> would be False, according to the General Rules.
>
...
> Applying the same rules, we'd have to return Unknown (which we represent as
> null) for:
>
>     SELECT hashset_contains('{null}'::int4hashset, NULL::int);
>

Aha! I just discovered to my surprise that the corresponding array
queries gives the same result:

SELECT NULL = ANY(ARRAY[]::int[]);
 ?column?
----------
 f
(1 row)

SELECT NULL = ANY(ARRAY[NULL]::int[]);
 ?column?
----------

(1 row)

I have no more objections; let's stick to the same null semantics as arrays and multisets.

/Joel



В списке pgsql-hackers по дате отправления:

Предыдущее
От: James Coleman
Дата:
Сообщение: Re: Stampede of the JIT compilers
Следующее
От: David Rowley
Дата:
Сообщение: Re: Speeding Up Bitmapset