`
v5qqcom
  • 浏览: 1285109 次
文章分类
社区版块
存档分类
最新评论

Postgres 8.4 数据类型增进

 
阅读更多
  • Add a CaseSensitive option for text search synonym dictionaries (Simon) 为文 本搜索同义词字典添加了 CaseSensitive 选项。
  • Improve the precision of NUMERIC division (Tom) 提升了 NUMERIC 除法的精度。
  • Add basic arithmetic operators for int2 with int8 (Tom) 为 int2 与 int8 添加 了一个基础算法操作符。

    This eliminates the need for explicit casting in some situations.

    这就避免了一些需要显式类型转换的情况。

  • Allow UUID input to accept an optional hyphen after every fourth digit (Robert Haas) 允许 UUID 输入时在每四位后加一个可选的连字符。
  • Allow on/off as input for the boolean data type (Itagaki Takahiro) 允许输入

    on/off 作为逻辑类型值。

  • Allow spaces around NaN in the input string for type numeric (Sam Mason) 允

    许输入数据类型时在 NaN 两边有空格。

Temporal Data Types 时间数据类型
  • Reject year 0 BC and years 000 and 0000 (Tom) 谢绝公元前 0 年,以及 00,000,0000。

    Previously these were interpreted as 1 BC. (Note: years 0 and 00 are still assumed to be the year 2000.)

    以前这些会解释为公元前一前(注意:0 年和 00 年被当做 2000 年接受)

  • Include SGT (Singapore time) in the default list of known time zone abbreviations (Tom) 包括 SGT(新加坡时间)在内的所有已知时区的默认列表
  • Support infinity and -infinity as values of type date (Tom) 支持正负无穷作为 时间类型。
  • Make parsing of interval literals more standard-compliant (Tom, Ron Mayer) 使 interval 的方法更符合标准。

    For example, INTERVAL '1' YEAR now does what it's supposed to.

    例如: INTERVAL '1' YEAR 现在就像你猜的一样,表示一年。

  • Allow interval fractional-seconds precision to be specified after the second keyword, for SQL standard compliance (Tom) 允许在 second 关键字后指定微秒精度 的 interval。以兼容 SQL 标准。

    Formerly the precision had to be specified after the keyword interval. (For backwards compatibility, this syntax is still supported, though deprecated.) Data type definitions will now be output using the standard format.

    之前精度要在 interval 关键字后指定。(为了向后兼容,这种语法仍被支持,不过不建议 这样用。)数据类型定义现在会使用标准输出格式。

  • Support the IS0 8601 interval syntax (Ron Mayer, Kevin Grittner) 支持 ISO 8601 interval 语法。

    For example, INTERVAL 'P1Y2M3DT4H5M6.7S' is now supported. 例如,现在支持 INTERVAL 'P1Y2M3DT4H5M6.7S'

  • Add IntervalStyle parameter which controls how interval values are output (Ron Mayer) 增加 IntervalStyle 参数以控制 interval 值的输出格式。

    Valid values are: postgres, postgres_verbose, sql_standard, iso_8601. This setting also controls the handling of negative interval input when only some fields have positive/negative designations.

    可用的值有: postgres, postgres_verbose, sql_standard, iso_8601。当只有一部分字 段有正负号时,该设置也控制负 interval。

  • Improve consistency of handling of fractional seconds in timestamp and interval output (Ron Mayer) 增强了 timestamp 和 interval 的微秒输出一致性。
Arrays
  • Improve the handling of casts applied to ARRAY[] constructs, such as ARRAY[...]::integer[] (Brendan Jurd) 增进了对 ARRAY[] 构造器的类型转换控制, 诸如: ARRAY[...]::integer[]

    Formerly PostgreSQL attempted to determine a data type for the ARRAY[] construct without reference to the ensuing cast. This could fail unnecessarily in many cases, in particular when the ARRAY[] construct was empty or contained only ambiguous entries such as NULL. Now the cast is consulted to determine the type that the array elements must be.

    以 前 PostgreSQL 在不引用确定转换的情况下尝试判定 ARRAY[] 构造器的类型。这在很多 情况下可能会导致不必要的错误,特别是 ARRAY[] 构造器为空或只有一个 NULL 之类的不 定值的情况下。现在类型转换可以根据必要的类型定义明确数线元素的类型。

  • Make SQL-syntax ARRAY dimensions optional to match the SQL standard (Peter) 现在 ARRAY 度量选项可以与 SQL 标准相符。
  • Add array_ndims() to return the number of dimensions of an array (Robert Haas) 增加了 array_ndims() 以返回数组的度量值。
  • Add array_length() to return the length of an array for a specified dimension (Jim Nasby, Robert Haas, Peter Eisentraut) 添加了 array_length() 以返回指定数 组的长度。
  • Add aggregate function array_agg(), which returns all aggregated values as a single array (Robert Haas, Jeff Davis, Peter) 添加 array_agg() 聚集函数,将所 有的聚合值作为一个单一数组返回。
  • Add unnest(), which converts an array to individual row values (Tom) 添加 unnest(),以将数组转化为标量行集。

    This is the opposite of array_agg().

    这是 array_agg() 的逆操作。

  • Add array_fill() to create arrays initialized with a value (Pavel Stehule) 添 加 array_fill() 以创建数组,并用指定值填充。
  • Add generate_subscripts() to simplify generating the range of an array's subscripts (Pavel Stehule) 添加 generate_subscripts(),简单的生成数组的下标范 围。
Wide-Value Storage (TOAST)
  • Consider TOAST compression on values as short as 32 bytes (previously 256 bytes) (Greg Stark) 使用 TOAST 的话,将值压缩为 32 位(以前是256位)
  • Require 25% minimum space savings before using TOAST compression (previously 20% for small values and any-savings-at-all for large values) (Greg) 使用 TOAST 压缩的话,最小情况下只需要以前的 25% 保存空间(小类型值和完整保存的大型 值只需要以前的 20%)。
  • Improve TOAST heuristics for rows that have a mix of large and small toastable fields, so that we prefer to push large values out of line and don't compress small values unnecessarily (Greg, Tom) 增进了 TOAST 对大小混 合值的启发式计算,所以我们现在可以提取出数据行中的大型值,不压缩不必要的小值。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics