天天看點

postgresql json字段的查詢語句

{"role": "COMPUTE", "vcpu": "1", "region": "ap-seoul-1", "userId": "12", "vendor": "oracle", "category": "COMPUTE_CLUSTER", "tenantId": "0", "clusterId": "7", "lifecycle": "ondemand", "scaleMode": "NONE", "fs-platform": "LINUX", "apiClusterId": "8", "cloudAccount": "FASTONE", "instanceType": "D3-c1-m4-g0", "partitionName": "partition0866", ".image_version": "7.5", "cloudImageName": "fs-centos-7.5", "deploy_node_id": "17", "fsInstanceType": "s2.c1.2"}      
select * from event  where  resource_data->>'instanceType'='E4-c1-m4-g0'