0
在postgres中,我需要將列的輸出拆分爲多個列。Progres - 將查詢輸出拆分爲多列
查詢:
select id, response from table
這是現在的輸出是什麼:
id | response |
---+-----------------------------------------------------------+
1 |{u'vendor': u'can', u'unit': 40, u'zone': u'Asia'} |
2 |{u'vendor': u'bottle', u'unit': 15, u'zone': u'America'} |
3 |{u'vendor': u'can', u'unit': 20, u'zone': u'South America'}|
(3 rows)
所需的輸出:
id | vendor | unit | zone |
----+---------+------+---------------+
1 | can | 40 | Asia |
2 | bottle | 15 | America |
3 | can | 20 | South America |
(3 rows)
是否有可用於將字典鍵/值列值解析爲多列的語法/函數? 謝謝