Re: [HACKERS] Execute query with EXCEPT, INTERSECT as anti-join, join?

2013-11-11 Thread Tom Lane
"Colin 't Hart" writes: > Would these be difficult to build in? Well, you'd have to worry about the ALL cases, as well as how to determine whether you're actually getting a win (which would probably be rather tough, really, as the choice would have to be made before we've fired up any of the plan

Re: [HACKERS] Execute query with EXCEPT, INTERSECT as anti-join, join?

2013-11-11 Thread Colin 't Hart
On 11 November 2013 15:16, Tom Lane wrote: > "Colin 't Hart" writes: >> On 11 November 2013 14:34, Tom Lane wrote: >>> No, and it probably won't ever be, since the semantics aren't the same. >>> EXCEPT/INTERSECT imply duplicate elimination. > >> Can't we just use DISTINCT for that? > > If you ha

Re: [HACKERS] Execute query with EXCEPT, INTERSECT as anti-join, join?

2013-11-11 Thread Tom Lane
"Colin 't Hart" writes: > On 11 November 2013 14:34, Tom Lane wrote: >> No, and it probably won't ever be, since the semantics aren't the same. >> EXCEPT/INTERSECT imply duplicate elimination. > Can't we just use DISTINCT for that? If you have to do a DISTINCT it's not clear to me that you're g

Re: [HACKERS] Execute query with EXCEPT, INTERSECT as anti-join, join?

2013-11-11 Thread Colin 't Hart
On 11 November 2013 14:34, Tom Lane wrote: > "Colin 't Hart" writes: >> I can't get Postgresql to execute a query with EXCEPT (or INTERSECT) >> as an anti-join (or join). > >> Is this even possible? > > No, and it probably won't ever be, since the semantics aren't the same. > EXCEPT/INTERSECT imp

Re: [HACKERS] Execute query with EXCEPT, INTERSECT as anti-join, join?

2013-11-11 Thread Tom Lane
"Colin 't Hart" writes: > I can't get Postgresql to execute a query with EXCEPT (or INTERSECT) > as an anti-join (or join). > Is this even possible? No, and it probably won't ever be, since the semantics aren't the same. EXCEPT/INTERSECT imply duplicate elimination. rega

[HACKERS] Execute query with EXCEPT, INTERSECT as anti-join, join?

2013-11-11 Thread Colin 't Hart
Hi, I can't get Postgresql to execute a query with EXCEPT (or INTERSECT) as an anti-join (or join). Is this even possible? If not currently possible, is this something we would like to have? Cheers, Colin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes