Re: jsonb_array_length: ERROR: 22023: cannot get array length of a scalar - Mailing list pgsql-general

From Alexander Farber
Subject Re: jsonb_array_length: ERROR: 22023: cannot get array length of a scalar
Date
Msg-id CAADeyWi1KErkf9=K_s+1jjR8Dai9n2-S9fGKQ1N4E0OJ0LmntQ@mail.gmail.com
Whole thread Raw
In response to Re: jsonb_array_length: ERROR: 22023: cannot get array length of a scalar  (Alexander Farber <alexander.farber@gmail.com>)
List pgsql-general
And here is how I call my stored function -

https://gist.github.com/afarber/88a832a1b90a8940764ad69b2b761914

- why wouldn't it store a jsonb array in the tiles column of words_moves table?

2018-03-02 15:29:42.644 CET [16693] LOG:  statement: DISCARD ALL
2018-03-02 15:29:42.644 CET [16693] LOG:  duration: 0.015 ms
2018-03-02 15:30:33.645 CET [16693] LOG:  statement: select 1
2018-03-02 15:30:33.645 CET [16693] LOG:  duration: 0.094 ms
2018-03-02 15:30:33.645 CET [16693] LOG:  statement: SET DateStyle='ISO';
2018-03-02 15:30:33.645 CET [16693] LOG:  duration: 0.050 ms
2018-03-02 15:30:33.645 CET [16693] LOG:  duration: 0.021 ms  parse <unnamed>: SET extra_float_digits = 3
2018-03-02 15:30:33.645 CET [16693] LOG:  duration: 0.003 ms  bind <unnamed>: SET extra_float_digits = 3
2018-03-02 15:30:33.645 CET [16693] LOG:  execute <unnamed>: SET extra_float_digits = 3
2018-03-02 15:30:33.645 CET [16693] LOG:  duration: 0.006 ms
2018-03-02 15:30:33.645 CET [16693] LOG:  duration: 0.007 ms  parse <unnamed>: SET application_name = 'PostgreSQL JDBC Driver'
2018-03-02 15:30:33.645 CET [16693] LOG:  duration: 0.002 ms  bind <unnamed>: SET application_name = 'PostgreSQL JDBC Driver'
2018-03-02 15:30:33.645 CET [16693] LOG:  execute <unnamed>: SET application_name = 'PostgreSQL JDBC Driver'
2018-03-02 15:30:33.645 CET [16693] LOG:  duration: 0.005 ms
2018-03-02 15:30:33.646 CET [16693] LOG:  duration: 0.110 ms  parse <unnamed>: SELECT out_uid  AS uid,  out_fcm  AS fcm,  out_apns AS apns, out_adm  AS adm,  out_body AS body  FROM words_play_game($1::int, $2::int, $3::jsonb)
2018-03-02 15:30:33.646 CET [16693] LOG:  duration: 0.058 ms  bind <unnamed>: SELECT out_uid  AS uid,  out_fcm  AS fcm,  out_apns AS apns, out_adm  AS adm,  out_body AS body  FROM words_play_game($1::int, $2::int, $3::jsonb)
2018-03-02 15:30:33.646 CET [16693] DETAIL:  parameters: $1 = '7', $2 = '609', $3 = '[{"col":0,"letter":"К","row":3,"value":2},{"col":0,"letter":"И","row":4,"value":1}]'
2018-03-02 15:30:33.646 CET [16693] LOG:  execute <unnamed>: SELECT out_uid  AS uid,  out_fcm  AS fcm,  out_apns AS apns, out_adm  AS adm,  out_body AS body  FROM words_play_game($1::int, $2::int, $3::jsonb)
2018-03-02 15:30:33.646 CET [16693] DETAIL:  parameters: $1 = '7', $2 = '609', $3 = '[{"col":0,"letter":"К","row":3,"value":2},{"col":0,"letter":"И","row":4,"value":1}]'
2018-03-02 15:30:33.653 CET [16693] LOG:  duration: 7.567 ms

pgsql-general by date:

Previous
From: Alexander Farber
Date:
Subject: Re: jsonb_array_length: ERROR: 22023: cannot get array length of a scalar
Next
From: Alexander Farber
Date:
Subject: Re: jsonb_array_length: ERROR: 22023: cannot get array length of a scalar