Re: [HACKERS] user-defined numeric data types triggering ERROR: unsupported type
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2018-03-04T16:59:42Z
Lists: pgsql-hackers
Tomas Vondra <tomas.vondra@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
Commits
-
Fix assorted issues in convert_to_scalar().
- e2108f58131f 9.6.9 landed
- bfade0e51ba9 10.4 landed
- ad3e3d731bae 9.5.13 landed
- 58d9acc18d38 11.0 landed
- 165fa27fe440 9.4.18 landed
- 0bea99bd929a 9.3.23 landed