2014-03-25 62 views

回答

2

第一返回JSON和第二文本:

select 
    '[1,2,3]'::json->2 as "->", 
    pg_typeof('[1,2,3]'::json->2) as "-> type", 
    '[1,2,3]'::json->>2 as "-->", 
    pg_typeof('[1,2,3]'::json->>2) as "--> type" 
; 
-> | -> type | --> | --> type 
----+---------+-----+---------- 
3 | json | 3 | text 
相關問題