[Fixed]-Postgres function json_array_elements does not found while django's tests

33👍

Mistake in query json_array_elements(animated_groups)

Needs change to this:
json_array_elements(animated_groups::json)

9👍

Postgres JSON processing functions such as json_array_elements(animated_groups::json), jsonb_array_elements(animated_groups::jsonb) will take json or jsonb values.

Because postgres JSON field(animated_groups) are store as text format or binary format.
so we need to convert the type by using either ::json or ::jsonb it give the json or jsonb format

check here

Leave a comment