Re: [HACKERS] user-defined numeric data types triggering ERROR: unsupported type - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] user-defined numeric data types triggering ERROR: unsupported type
Date
Msg-id 15879.1520182782@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] user-defined numeric data types triggering ERROR:unsupported type  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: [HACKERS] user-defined numeric data types triggering ERROR:unsupported type  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List 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


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Fwd: automatic disable unicode line style when terminal is not unicode
Next
From: Magnus Hagander
Date:
Subject: Re: [PATCH] Verify Checksums during Basebackups