Robert Haas <robertmh...@gmail.com> writes: > On Sat, Aug 20, 2016 at 4:58 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: >> I am not exactly sold on this assumption that applications have >> de-duplicated the contents of a VALUES or IN list. They haven't been >> asked to do that in the past, so why do you think they are doing it?
> It's hard to know, but my intuition is that most people would > deduplicate. I mean, nobody is going to want to their query generator > to send X IN (1, 1, <repeat a zillion more times>) to the server if it > could have just sent X IN (1). I dunno, these are the very same people who send "WHERE 1=1" so that they can save one line of code to decide whether to append AND or not before the first real condition. Still, maybe we should optimize for smart queries rather than stupid ones. regards, tom lane -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers