上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 24 下一页
摘要: PostgreSQL: Documentation: 9.6: ALTER TABLE 例子: alter table ask add column commentCount int not null default 0; mew=# drop type gradetype cascade;注意: 阅读全文
posted @ 2017-07-24 20:23 cdongyang 阅读(575) 评论(0) 推荐(0) 编辑
摘要: {"/image/ask/100002769image12017-07-24 15:56:56.243105236 +0800 CST m=+0.328076257.jpg","/image/ask/100002769image22017-07-24 15:56:56.280911621 +0800 阅读全文
posted @ 2017-07-24 16:11 cdongyang 阅读(549) 评论(0) 推荐(0) 编辑
摘要: 一般性 \copyright 显示PostgreSQL的使用和发行许可条款 \errverbose 以最冗长的形式显示最近的错误消息 \g [文件] or; 执行查询 (并把结果写入文件或 |管道) \gexec 执行策略,然后执行其结果中的每个值 \gset [PREFIX] 执行查询并把结果存到 阅读全文
posted @ 2017-07-24 12:05 cdongyang 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 原来的表: 这里通过评论对象来分类 对于@nickname这种评论评论的,objectName = "comment",objectID = comment.id,publisherID为被@的人,但这样在同一个object的评论时@nickname这种很难处理 修改后的表: 这里通过评论所属对象来 阅读全文
posted @ 2017-07-18 10:20 cdongyang 阅读(865) 评论(0) 推荐(0) 编辑
摘要: 将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) 编辑
摘要: 第一个测试将nil值的map[string]interface{}传到函数,修改后原函数里的值没改变 第二个测试将nil值的map[string]interface{}传入到函数,直接result[key]=val,panic: assignment to entry in nil map 第三个测 阅读全文
posted @ 2017-07-09 14:12 cdongyang 阅读(1575) 评论(0) 推荐(0) 编辑
摘要: The Laws of Reflection 阅读全文
posted @ 2017-07-02 14:36 cdongyang 阅读(140) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 24 下一页