Re: [HACKERS] user-defined numeric data types triggering ERROR:unsupported type

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: [HACKERS] user-defined numeric data types triggering ERROR:unsupported type
Дата
Msg-id b5cede7b-354b-83e6-ab1f-7a1bf8a232fa@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [HACKERS] user-defined numeric data types triggering ERROR:unsupported type  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Ответы Re: [HACKERS] user-defined numeric data types triggering ERROR: unsupported type  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: perltidy version
Следующее
От: Arthur Zakirov
Дата:
Сообщение: Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs