Tomas Vondra <tomas.von...@2ndquadrant.com> writes: > On 03/04/2018 02:37 AM, Tom Lane wrote: >> I was kind of underwhelmed with these test cases, too, so I didn't >> commit them. But they were good for proving that the bytea bug >> wasn't hypothetical :-)
> Underwhelmed in what sense? Should the tests be constructed in some > other way, or do you think it's something that doesn't need the tests? The tests seemed pretty ugly, and I don't think they were doing much to improve test coverage by adding all those bogus operators. Now, a look at https://coverage.postgresql.org/src/backend/utils/adt/selfuncs.c.gcov.html says that our test coverage for convert_to_scalar stinks, but we could (and probably should) improve that just by testing extant operators. A concrete argument for not creating those operators is that they pose a risk of breaking concurrently-running tests by capturing inexact argument matches (cf CVE-2018-1058). There are ways to get around that, eg run the whole test inside a transaction we never commit; but I don't really think we need the complication. regards, tom lane