摘要: 将postgresql数组字段的初始值定为空串时报错,应设置为'{}' pq: 有缺陷的数组常量:"" 若数组字段rows.Scan用interface{}输入,会是base64编码,但如果字段可为null,scan到string又会报错 最后将表里面的字段设为not null,然后go读出的str 阅读全文
posted @ 2017-07-13 22:02 cdongyang 阅读(1145) 评论(0) 推荐(0) 编辑
摘要: runtime: goroutine stack exceeds 1000000000-byte limitfatal error: stack overflow runtime stack:runtime.throw(0x784d03, 0xe) /usr/local/go/src/runtime 阅读全文
posted @ 2017-07-13 16:47 cdongyang 阅读(2225) 评论(0) 推荐(0) 编辑
摘要: postgresql默认全部小写,若要区分字段名大小写需要用引号括住 阅读全文
posted @ 2017-07-13 14:11 cdongyang 阅读(1896) 评论(0) 推荐(0) 编辑
摘要: insert test=> insert into ask(id,publisherID,reward,cost,rangee,typee,label,content,image,createTime,zan,school,college) valuestest-> (1,1,4,10,'schoo 阅读全文
posted @ 2017-07-13 11:52 cdongyang 阅读(1144) 评论(0) 推荐(0) 编辑