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 CAADeyWhoauMGRhiahZW1jxocBxyyTw-7S55gEC6MZVAvrDV6Zw@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>)
Responses Re: jsonb_array_length: ERROR: 22023: cannot get array length of a scalar  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
Oops, I've got strings there too - when swapping instead of playing tiles:

#  select * from words_moves where gid=609 and action <> 'play';
 mid  | action | gid | uid  |            played             |  tiles   | score
------+--------+-----+------+-------------------------------+----------+-------
 1063 | swap   | 609 | 1192 | 2018-03-02 14:13:24.684301+01 | "ТСНЦУЭ" |     ¤
 1067 | swap   | 609 | 1192 | 2018-03-02 15:31:14.378474+01 | "ЕЯУЕФП" |     ¤
 1068 | swap   | 609 |    7 | 2018-03-02 15:52:07.629119+01 | "ОЕЕАУ"  |     ¤
 1072 | swap   | 609 |    7 | 2018-03-02 16:06:43.365012+01 | "ЕЕЫ"    |     ¤
 1076 | swap   | 609 |    7 | 2018-03-02 16:20:18.933948+01 | "Ъ"      |     ¤
(5 rows)

So my problem was simple. I am sorry for the numerous mails! 

(it is just such a long chain - android/html5 - Jetty - PostgreSQL, so that sometimes I am confused.
At least I am glad to have most of my logic as Pl/pgSQL right at the data)

Regards
Alex

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: "David G. Johnston"
Date:
Subject: Re: jsonb_array_length: ERROR: 22023: cannot get array length of a scalar