Re: [HACKERS] user-defined numeric data types triggering ERROR: unsupported type
Tomas Vondra <tomas.vondra@2ndquadrant.com>
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2018-03-03T18:03:07Z
Lists: pgsql-hackers
Attachments
- unsupported-type-fix-v2.patch (text/x-patch) patch v2
Hi, Here is v2 of the fix. It does handle all the convert_to_scalar calls for various data types, just like the numeric one did in v1 with the exception of bytea. The bytea case is fixed by checking that the boundary values are varlenas. This seems better than checking for BYTEAOID explicitly, which would fail for custom varlena-based types. At first I've been thinking there might be issues when the data types has mismatching ordering, but I don't think the patch makes it any worse. I've also added a bunch of regression tests, checking each case. The bytea test it should cause segfault on master, of course. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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