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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Idea on how to simplify comparing two sets
Дата
Msg-id 5212.1486575022@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Idea on how to simplify comparing two sets  (David Fetter <david@fetter.org>)
Ответы Re: [HACKERS] Idea on how to simplify comparing two sets  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-hackers
David Fetter <david@fetter.org> writes:
> On Wed, Feb 08, 2017 at 11:22:56AM -0500, Tom Lane wrote:
>> Yes.  I think a new set-operation keyword would inevitably have to
>> be fully reserved --- UNION, INTERSECT, and EXCEPT all are --- which
>> means that you'd break every application that has used that word as
>> a table, column, or function name.

> I've long wanted a SYMMETRIC DIFFERENCE join type, that being the only
> elementary set operation not included in join types, but nobody at the
> SQL standards committee seems to have cared enough to help.

I wonder whether you could shoehorn it in with no new reserved word
by spelling it "EXCEPT SYMMETRIC", which could be justified by the
precedent of BETWEEN SYMMETRIC.  But not sure what to do with
duplicate rows (ie, if LHS has two occurrences of row X and RHS
has one occurrence, do you output X?)
        regards, tom lane



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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: [HACKERS] Idea on how to simplify comparing two sets
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: [HACKERS] Idea on how to simplify comparing two sets