Postgres 8.4 对象操作增进

来源:互联网 发布:飞常准网络值机登机牌 编辑:程序博客网 时间:2024/05/01 17:57
  • Add support for column-level privileges (Stephen Frost, KaiGai Kohei) 支持列 级授权。
  • Refactor multi-object DROP operations to reduce the need for CASCADE (Alex Hunsaker) 多对象删除操作对 CASCADE (级联——译者)的依赖降低。

    For example, if table B has a dependency on table A, the command DROP TABLE A, B no longer requires the CASCADE option.

    例如,表 B 依赖于表 A,DROP TABLE A, B 命令不再需要 CASCADE 选项。

  • Fixvarious problems with concurrent DROP commands by ensuring that locksare taken before we begin to drop dependencies of an object (Tom)修正了几个并行 DROP 命令带来的问题,这些问题由于删除对象依赖之前确认获取的锁定而引发。
  • Improve reporting of dependencies during DROP commands (Tom) 改进了删除命令的 依懒性报告。
  • AddWITH [NO] DATA clause to CREATE TABLE AS, per the SQL standard (Peter,Tom) 基于 SQL 标准,为 CREATE TABLE AS 增加了 WITH [NO] DATA 子句。
  • Add support for user-defined I/O conversion casts (Heikki) 增加了用户定义 I/O 转换。
  • Allow CREATE AGGREGATE to use an internal transition datatype (Tom) 允许  CREATE AGGREGATE 使用内部数据类型转换。
  • Add LIKE clause to CREATE TYPE (Tom) CREATE TYPE 增加了 LIKE 子句。

    This simplifies creation of data types that use the same internal representation as an existing type.

    这样同类的内部类型描述可以作为一个既有的类型,简化了数据类型创建。

  • Allow specification of the type category and "preferred" status for user-defined base types (Tom) 允许详细说明用户定义基类的类型分类和“首选”状态。

    This allows more control over the coercion behavior of user-defined types.

    这样就可以进一步强制性的控制用户定义类型。

  • Allow CREATE OR REPLACE VIEW to add columns to the end of a view (Robert Haas) 允许 CREATE OR REPLACE VIEW 在视图末尾追加列。
ALTER
  • Add ALTER TYPE RENAME (Petr Jelinek) 增加 ALTER TYPE RENAME
  • AddALTER SEQUENCE ... RESTART (with no parameter) to reset a sequence toits initial value (Zoltan Boszormenyi) 增加 ALTER SEQUENCE ... RESET以重置序列的 初始值。
  • Modify the ALTER TABLE syntax to allow allreasonable combinations for tables, indexes, sequences, and views (Tom)修改 ALTER TABLES 语法以允许所有 表、索引、序列和视图的合理组合。

    This change allows the following new syntaxes 此改变带来以下新语法:

    • ALTER SEQUENCE OWNER TO
    • ALTER VIEW ALTER COLUMN SET/DROP DEFAULT
    • ALTER VIEW OWNER TO
    • ALTER VIEW SET SCHEMA

    There is no actual new functionality here, but formerly you had to say ALTER TABLE to do these things, which was confusing.

    这样也没带来什么新功能,不过以前都是用 ALTER TABLE 来做这件事,很让人迷惑。

  • Addsupport for the syntax ALTER TABLE ... ALTER COLUMN ... SET DATA TYPE(Peter) 增加对 ALTER TABLE ... ALTER COLUMN ... SET DATA TYPE 语法的支持。

    This is SQL-standard syntax for functionality that was already supported.

    现在这些功能的 SQL 标准语法都已经得到支持了。

  • MakeALTER TABLE SET WITHOUT OIDS rewrite the table to physically remove OIDvalues (Tom) ALTER TABLE SET WITHOUT OIDS 会重写表,在物理上删除 OID。

    Also, add ALTER TABLE SET WITH OIDS to rewrite the table to add OIDs.

    当然,也增加了 ALTER TABLE SET WITH OIDS 以重写表,添加 OID。

Database Manipulation 数据库操作
  • Improvereporting of CREATE/DROP/RENAME DATABASE failure when uncommittedprepared transactions are the cause (Tom) 当未提交预备事务时 CREATE/DROP/RENAMEDATABASE 失败的报告得到的增进。
  • Make LC_COLLATE and LC_CTYPE into per-database settings (Radek Strnad, Heikki) LC_COLLATE 和 LC_CTYPE 进入了每数据库设置。

    This makes collation similar to encoding, which was always configurable per database.

    这样,此类配置就可以与一直作为每数据库单独配置的编码一致了。

  • Improvechecks that the database encoding, collation (LC_COLLATE), andcharacter classes (LC_CTYPE) match (Heikki, Tom) 增进数据库编码、排序规则(LC_COLLATE) 和字符类型(LC_CTYPE)匹配检查。

    Notein particular that a new database's encoding and locale settings can bechanged only when copying from template0. This prevents possiblycopying data that doesn't match the settings.

    注意:只能在新建数据库,从 template0 复制的时候可以改变数据库编码。这样可能出现 复制的数据与设置不匹配。

  • AddALTER DATABASE SET TABLESPACE to move a database to a new tablespace(Guillaume Lelarge, Bernd Helmle) 增加 ALTER DATABASE SET TABLESPACE ,以此将数据库转移到新的表空间。
原创粉丝点击