Re: jsonb_array_length: ERROR: 22023: cannot get array length of a scalar

From: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
To:
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: jsonb_array_length: ERROR: 22023: cannot get array length of a scalar
Date: 2018-03-02 18:58:37
Message-ID: CAADeyWgYKKaArJb6JK_xEtSO=7aeNaYqBu_ef-D5W7s8EFPfpQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I see, thank you for your comments, David and Adrian.

In the "tiles" column actually save either the JSON array of tiles - when
the user plays them

Or a string (which is jsonb too) concatenated of letters - when the user
swaps the letters.

Maybe I should rethink my table structure (I just want to "log" all plays,
swaps, skips, resigns in the words_moves table)...

Or maybe I should always check for the "action" column first (acts as enum)
- before accessing "tiles" column....

Regrads
Alex

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gary M 2018-03-02 19:05:44 Is there a continuous backup for pg ?
Previous Message Adrian Klaver 2018-03-02 18:52:32 Re: jsonb_array_length: ERROR: 22023: cannot get array length of a scalar