执行sql:

select id, jsonb_array_elements(content) from "fd_content_behavior_at_2WIQRCZAPA"

报错:

> ERROR:  cannot extract elements from a scalar

原因:

content 有错误数据,加条件去掉错误数据即可。

select id, jsonb_array_elements(content) from "fd_content_behavior_at_2WIQRCZAPA" where content::text != 'null'

或者

select id, jsonb_array_elements(content) from "fd_content_behavior_at_2WIQRCZAPA" where content is not null

 

相关文章:

  • 2021-10-05
  • 2022-12-23
  • 2021-11-17
  • 2021-12-20
  • 2019-03-20
  • 2019-12-17
  • 2021-08-06
  • 2021-11-11
猜你喜欢
  • 2021-12-08
  • 2022-12-23
  • 2021-06-16
  • 2021-11-22
  • 2021-10-09
  • 2021-11-25
相关资源
相似解决方案