本文共 3909 字,大约阅读时间需要 13 分钟。
摘要: 主要的内容是alter, alter table, alter type, length, postgresql 9.2, rewrite, reindex
下面有三个补丁供大家使用, 它们是由 Robert Hass 提交的。
2月7日的补丁
添加一个 numeric 类型 typmode coercisiions 的转换函数这将会使得 alter table操作 可以跳过表和索引重建时字段更改为不受约束的数字, 或者当这个比例不变时精度不降低.noah misch, 提供了语法上的修改和一个OID修改
补丁 二
添加了一个 varbit 类型的 typmod coercisions 转换函数这将会使得 alter table 操作可以跳过表和索引重建时这个新类型 varbit 不受约束, 或者允许位减少最后的补丁
添加一个 various temporal typmod coercisions 的转换函数可以使得 alter table 在一些情况下跳过表和索引重建接下来通过具体的例子, 我们来查看它的优点。
alter table z alter column i type numeric;
alter table z alter column i type varbit;
alter table z alter column i type time;
alter table z alter column i type timetz;
alter table z alter column i type timestamp;
alter table z alter column i type interval;
具体的内容参看下面的信息
从 "INTERVAL YEAR" 到
“INTERVAL YEAR”"INTERVAL DAY""INTERVAL HOUR""INTERVAL MINUTE""INTERVAL SECOND""INTERVAL YEAR TO MONTH""INTERVAL DAY TO HOUR""INTERVAL DAT TO MINUTE""INTERVAL DAY TO SECOND""INTERVAL HOUR TO MINUTE""INTERVAL HOUR TO SECOND""INTERVAL MINUTE TO SECOND"
从 "INTERVAL MONTH" 到
"INTERVAL YEAR""INTERVAL MONTH""INTERVAL DAY""INTERVAL HOUR""INTERVAL MINUTE""INTERVAL SECOND""INTERVAL YEAR TO MONTH""INTERVAL DAY TO HOUR""INTERVAL DAY TO MINUTE""INTERVAL DAY TO SECOND""INTERVAL MINUTE TO SECOND"
从 "INTERVAL DAY" 到
"INTERVAL DAY""INTERVAL HOUR""INTERVAL MINUTE""INTERVAL SECOND""INTERVAL DAY TO HOUR""INTERVAL DAY TO MINUTE""INTERVAL DAY TO SECOND""INTERVAL HOUR TO MINUTE""INTERVAL HOUR TO SECOND""INTERVAL MINUTE TO SECOND"
从 "INTERVAL MINUTE" 到
"INTERVAL MINUTE""INTERVAL SECOND""INTERVAL DAY TO MINUTE""INTERVAL DAY TO SECOND""INTERVAL HOUR TO MINUTE""INTERVAL HOUR TO SECOND""INTERVAL MINUTE TO SECOND"
从 "INTERVAL SECOND" 到
"INTERVAL MINUTE""INTERVAL SECOND""INTERVAL DAY TO MINUTE""INTERVAL DAY TO SECOND""INTERVAL HOUR TO MINUTE""INTERVAL HOUR TO SECOND""INTERVAL MINUTE TO SECOND"
从 "INTERVAL YEAR TO MONTH " 到
“INTERVAL YEAR”"INTERVAL DAY""INTERVAL HOUR""INTERVAL MINUTE""INTERVAL SECOND""INTERVAL YEAR TO MONTH""INTERVAL DAY TO HOUR""INTERVAL DAY TO MINUTE""INTERVAL DAY TO SECOND""INTERVAL HOUR TO MINUTE""INTERVAL HOUR TO SECOND""INTERVAL MINUTE TO SECOND"
从 "INTERVAL DAY TO HOUR" 到
“INTERVAL HOUR”"INTERVAL MINUTE""INTERVAL SECOND""INTERVAL DAY TO HOUR""INTERVAL DAY TO MINUTE""INTERVAL DAY TO SECOND""INTERVAL HOUR TO MINUTE""INTERVAL HOUR TO SECOND""INTERVAL MINUTE TO SECOND"
从 "INTERVAL DAY TO MINUTE" 到
"INTYERVAL MINUTE ""INTERVAL SECOND""INTERVAL DAY TO MINUTE""INTERVAL DAY TO SECOND""INTERVAL HOUR TO MINUTE""INTERVAL HOUR TO SECOND""INTERVAL MINUTE TO SECOND"
从 "INTERVAL DAY TO SECOND" 到
"INTERVAL MINUTE""INTERVAL SECOND""INTERVAL DAY TO MINUTE""INTERVAL DAY TO SECOND""INTERVAL HOUR TO MINUTE""INTERVAL HOUR TO SECOND""INTERVAL MINUTE TO SECOND"
从 "INTERVAL HOUR TO MINUTE" 到
"INTERVAL MINUTE""INTERVAL SECOND""INTERVAL DAY TO MINUTE""INTERVAL DAY TO SECOND""INTERVAL HOUR TO MINUTE""INTERVAL HOUR TO SECOND""INTERVAL MINUTE TO SECOND"
从 "INTERVAL HOUR TO SECOND" 到
"INTERVAL MINUTE""INTERVAL SECOND""INTERVAL DAY TO MINUTE""INTERVAL DAY TO SECOND""INTERVAL HOUR TO MINUTE""INTERVAL HOUR TO SECOND""INTERVAL MINUTE TO SECOND"
从 "INTERVAL MINUTE TO SECOND"
"INTERVAL MINUTE""INTERVAL SECOND""INTERVAL DAY TO MINUTE""INTERVAL DAY TO SECOND""INTERVAL HOUR TO MINUTE""INTERVAL HOUR TO SECOND""INTERVAL MINUTE TO SECOND"
这些数据类型的大部分是非常奇特的, 但是他们确实非常有用, 而且使用这种转换能力,不需要重写表和索引是一件非常好
的事情,在这里感谢诺亚和罗伯特转载地址:http://xtlzl.baihongyu.com/