Re: Oddity with NOT IN

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>
Cc: Marko Tiikkaja <marko(at)joh(dot)to>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Oddity with NOT IN
Date: 2016-08-06 18:08:04
Message-ID: CAFj8pRCQSKsXP0uGyFK4M_Y+0cSfF4cZ_vi5qW9FSHdKTL+x3w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2016-08-06 20:01 GMT+02:00 Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>:

> On 8/6/16 12:03 PM, Pavel Stehule wrote:
>
>> It would be very useful if we had some way to warn users about stuff
>> like this. Emitting a NOTICE comes to mind.
>>
>>
>> This can be valid query
>>
>
> Right, but in my experience it's an extremely uncommon pattern and much
> more likely to be a mistake (that ends up being very time consuming to
> debug). That's why I think something like a NOTICE or even a WARNING would
> be useful. The only thing I don't like about that idea is if you ever did
> actually want this behavior you'd have to do something to squash the
> ereport. Though, that's a problem we already have in some places, so
> perhaps not worth worrying about.

I worked for company where they generated sets of SQL queries as result of
transformation from multidimensional query language. Some similar queries
are possible there.

I don't thing so using NOTICE or WARNING for any valid query is good idea.

I like the idea of some special extension than can block or raises warning
for some strange plans like this or with Cartesian product ...

Regards

Pavel

>
> --
> Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
> Experts in Analytics, Data Architecture and PostgreSQL
> Data in Trouble? Get it in Treble! http://BlueTreble.com
> 855-TREBLE2 (855-873-2532) mobile: 512-569-9461
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Gierth 2016-08-06 18:09:52 Re: Oddity with NOT IN
Previous Message Jim Nasby 2016-08-06 18:01:19 Re: Oddity with NOT IN