Re: [HACKERS] Idea on how to simplify comparing two sets

Поиск
Список
Период
Сортировка
От Joel Jacobson
Тема Re: [HACKERS] Idea on how to simplify comparing two sets
Дата
Msg-id CAASwCXdWON5udZ0x77Epn0Df5WfsCHBAUWAFALPO3hC0a21m=Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Idea on how to simplify comparing two sets  (David Fetter <david@fetter.org>)
Список pgsql-hackers
On Tue, Feb 7, 2017 at 6:28 PM, David Fetter <david@fetter.org> wrote:
> This could be shortened further to the following if we ever implement
> DISTINCT for window functions, which might involve implementing
> DISTINCT via hashing more generally, which means hashable
> types...whee!
>
> SELECT array_agg(DISTINCT (a IS NOT NULL)::int + (b IS NOT NULL)::int) OVER () = '{2}'
> FROM a FULL JOIN b ON ...

That's still a lot more syntax than just adding "IS NOT DISTINCT FROM"
in between the sets.

I just thought the general approach at looking for ways to express new
things in SQL,
without introducing new keywords, but instead rely on existing keywords but
that currently are syntax errors when used in some semantic way,
is an interesting approach to allow extending the SQL syntax without
breaking backwards compatibility.

Are there any historical examples of when this approach has been used
to make progress in PostgreSQL?



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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: [HACKERS] Idea on how to simplify comparing two sets
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] Press Release Draft - 2016-02-09 Cumulative Update