BUG #18222: Unexpected Error--Cannot delete from scalar - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #18222: Unexpected Error--Cannot delete from scalar
Date
Msg-id 18222-de86a89e6ed68f3d@postgresql.org
Whole thread Raw
Responses Re: BUG #18222: Unexpected Error--Cannot delete from scalar
Re: BUG #18222: Unexpected Error--Cannot delete from scalar
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      18222
Logged by:          Jinsheng Ba
Email address:      bajinsheng@u.nus.edu
PostgreSQL version: 16.1
Operating system:   Ubuntu
Description:

SELECT ('1'-to_hex(2))::BOOLEAN; -- ERROR:  cannot delete from scalar

This error looks strange to me as I do not understand what this error
means.

If I execute the following query, there is no error instead:
SELECT '1'-2; -- {-2}


pgsql-bugs by date:

Previous
From: Ba Jinsheng
Date:
Subject: Re: Re:BUG #18221: Unexpected Query Result
Next
From: PG Bug reporting form
Date:
Subject: BUG #18223: There is a confusing result where an update statement can reference itself and execute successfully.