【发布时间】:2020-09-18 08:15:49
【问题描述】:
这个我的 json 对象已经存储在我的 postgres 11 数据库中
[{“user_id”:0,“user_name”:“”,“user_role”:“”,“start_timestamp”: “2020-09-08 04:01:31.636848”,“end_timestamp”:“2020-09-08 04:01:31.636848”,“hold_timestamp_list”:[],“handover_link”:“”, “curr_state”:“待分配”,“is_complete”:1,“is_onhold”:0}, {“user_id”:910,“user_name”:“INM”,“user_role”:“”, “start_timestamp”:“2020-09-09 05:11:06.476766”,“end_timestamp”:“”, "hold_timestamp_list": [{"s": "2020-09-09 05:11:07.359749", "e": ""}], “handover_link”:“”,“curr_state”:“创作”,“is_complete”:0, "is_onhold": 1}]
如何从最后一个索引中获取 user_name(即:索引 2,值 =
{“user_id”:910,“user_name”:“INM”,“user_role”:“”, “start_timestamp”:“2020-09-09 05:11:06.476766”,“end_timestamp”:“”, "hold_timestamp_list": [{"s": "2020-09-09 05:11:07.359749", "e": ""}], “handover_link”:“”,“curr_state”:“创作”,“is_complete”:0, “is_onhold”:1}
【问题讨论】:
-
您使用的是哪个 Postgres 版本?
标签: sql arrays json postgresql