Обсуждение: BUG #16658: HSTORE typecast exception is XX000 - inconsistent with the other cast exceptions (22xxx)

Поиск
Список
Период
Сортировка

BUG #16658: HSTORE typecast exception is XX000 - inconsistent with the other cast exceptions (22xxx)

От
PG Bug reporting form
Дата:
The following bug has been logged on the website:

Bug reference:      16658
Logged by:          Yuri Cherio
Email address:      cherio@gmail.com
PostgreSQL version: 13.0
Operating system:   Ubuntu Linux 20.04
Description:

This is probably not a bug but more of an inconsistent behavior.

All typecast exceptions fall into 22xxx category e.g. 'abc'::DATE,
'abc'::INTEGER, '123'::TIMESTAMPTZ. HSTORE type casting seems to be breaking
out from the pack throwing an XX000 exception, e.g. 'one'::HSTORE.

In my mind even the most generic data exception 22000 exception code should
probably be more appropriate than an internal error.

This is likely applicable to the earlier versions as well.