Re: BUG #18222: Unexpected Error--Cannot delete from scalar

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: BUG #18222: Unexpected Error--Cannot delete from scalar
Дата
Msg-id e4e500f6f4f423de9df3e99680cd551c6253ae0c.camel@cybertec.at
обсуждение исходный текст
Ответ на BUG #18222: Unexpected Error--Cannot delete from scalar  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
On Mon, 2023-12-04 at 05:56 +0000, PG Bug reporting form wrote:
> PostgreSQL version: 16.1
>
> 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}

That's not a bug.

PostgreSQL infers the operator jsonb - text.  '1' gives a valid "jsonb"
scalar, but you cannot remove an attribute from a JSON scalar.

I cannot tell you what to do, because your expression makes as little
sense to me as it does to PostgreSQL.

Yours,
Laurenz Albe



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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #18225: chdb's s3 table function crashes postgresql with plpython3
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #18224: message bug in libpqwalreceiver.c.