0
我在我的postgres表中有一个表,它有奇怪的数据结构。这里是一个数据结构的例子:访问postgres数据结构
id | 1
name | name
data | :type: information
| :url: url
| :platform:
| android: ''
| iphone: ''
created_at | 2016-07-29 11:39:44.938359
updated_at | 2016-08-22 12:24:32.734321
我该如何改变数据> platform> android例如?
你的符号是很神秘,什么是'data'的类型? – klin
对不起。数据类型是“文本”。它是一个奇怪的数据结构。我不认为是否需要更新单个值,例如android我将不得不输出整个数据内容,包括新的值,即'update table set data =':type:information:url:url:platform:android:'new_value'iphone:'''我知道这不是正确的方式,但你明白我的观点。谢谢。 – EamonnMcElroy
不幸的是,Postgres没有内置的手段来更新文本的部分,所以你必须手动(或在你的应用程序)格式化全新的值。 – klin