Re: SQL/JSON: JSON_TABLE

Поиск
Список
Период
Сортировка
От Erik Rijkers
Тема Re: SQL/JSON: JSON_TABLE
Дата
Msg-id 2101814418.20240.1617123418368@webmailclassic.xs4all.nl
обсуждение исходный текст
Ответ на Re: SQL/JSON: JSON_TABLE  (Nikita Glukhov <n.gluhov@postgrespro.ru>)
Ответы Re: SQL/JSON: JSON_TABLE  (Nikita Glukhov <n.gluhov@postgrespro.ru>)
Список pgsql-hackers
> On 2021.03.27. 02:12 Nikita Glukhov <n.gluhov@postgrespro.ru> wrote:
> 
> Attached 47th version of the patches.
> 
[..]
> 
> I have added forgotten files and fixed the first patch.
> 
> [0001-SQL-JSON-functions-v47.patch]
> [0002-JSON_TABLE-v47.patch]
> [0003-JSON_TABLE-PLAN-DEFAULT-clause-v47.patch]
> [0004-JSON_TABLE-PLAN-clause-v47.patch]

Hi,

Apply, build all fine.  It also works quite well, and according to specification, as far as I can tell.

But today I ran into:

ERROR:  function ExecEvalJson not in llvmjit_types.c

I think that it is caused by:

set enable_bitmapscan = off;

(I installed llvm a few days ago. llvm-3.9-dev on this debian stretch).


This is the test sql I concocted, which runs fine with enable_bitmapscan on (the default):

select jt1.* 
from myjsonfile100k as t(js, id) 
  , json_table(
      t.js
   , '$' columns (
        "lastname"   text    path  '$. "lastname"     '
      , "firstname"  text    path  '$. "firstname"    '
      , "date"       text    path  '$. "date"         '
      , "city"       text    path  '$. "city"         '
      , "country"    text    path  '$. "country"      '
      , "name 0(1)"  text    path  '$. "array"[0]     '
      , "name 4(5)"  text    path  '$. "array"[4]     '
      , "names"      text[]  path  '$. "array"        '
      , "randfloat"  float   path  '$. "random float" '
    )
) as jt1
where  js @> ('[ { "city": "Santiago de Cuba" } ]')
   and js[0]->>'firstname' = 'Gilda'
;
ERROR:  function ExecEvalJson not in llvmjit_types.c

That statement only errors out if the table is large enough. I have no time now to make a sample table but if no-one
understandsthe problem off-hand, I'll try to construct such a table later this week (the one I'm using is large, 1.5
GB).


Erik Rijkers



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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: Autovacuum worker doesn't immediately exit on postmaster death
Следующее
От: Jacob Champion
Дата:
Сообщение: Re: Proposal: Save user's original authenticated identity for logging