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

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: cherio(at)gmail(dot)com
Subject: BUG #16658: HSTORE typecast exception is XX000 - inconsistent with the other cast exceptions (22xxx)
Date: 2020-10-06 23:45:51
Message-ID: 16658-662870114bd88f43@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 16658
Logged by: Yuri Cherio
Email address: cherio(at)gmail(dot)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.

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-10-07 01:04:44 Re: BUG #16655: pg_dump segfault when excluding postgis table
Previous Message PG Bug reporting form 2020-10-06 22:22:18 BUG #16657: Index not reflecting update when date to timestamp comparison operation used in index scan