Re: BUG #18356: Casting values from jsonb_each_text does not respect WHERE filter with sub select

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #18356: Casting values from jsonb_each_text does not respect WHERE filter with sub select
Дата
Msg-id 123109.1708546678@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #18356: Casting values from jsonb_each_text does not respect WHERE filter with sub select  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> - Prior to v16, this statement would work for casting values of a k/v jsonb
> pair to an integer:
>                     SELECT id, mytdata.key, mytdata.value::integer
>                     FROM my_table as myt,
>                         jsonb_each_text(myt.data) as mytdata
>                     WHERE mytdata.key IN ( SELECT key from week_key_table
> )

> - Where week_key_table stores keys such as "week01", "week02", and
> "week03".
> - And where the jsonb has some keys with alphanumeric values and some keys
> with numeric values, such as: { "key_figure": "Volume", "week01": "0",
> "week02": "0", "week03": "0"}

> However as of v16, this same statement causes the error: 'invalid input
> syntax for type double precision: "Volume"'. 

Could you provide an actually self-contained example?  People
have other things to do than guess about the data and table details
needed to reproduce this.

            regards, tom lane



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

Предыдущее
От: Ed Herrmann
Дата:
Сообщение: Re: BUG #18356: Casting values from jsonb_each_text does not respect WHERE filter with sub select
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: BUG #18356: Casting values from jsonb_each_text does not respect WHERE filter with sub select