E.55. 版本 6.3

版本日期: 1998-03-01

在这个版本中有许多新的特性和改进. 下面是一个简短的不完整的概要:

注意: Bruce Momjian 写下了下面的介绍新版本的文字.

我在这里想提一些关于 6.3 的事情. 这些都是一些无法在一句话中描述的比较大的课题. 所以仍需要你回过头去看看修改的详细列表.

首先,我们现在有了子查询.既然我们已经拥有子查询了,我要很客观的说, 如果没有子查询,SQL 就是一种作 用非常有限的语言.子查询是一种很重要的特性,你应该复查一下你的代码, 以便找出子查询能给你提供更好解 决方法的地方.我相信你会发现子查询可以应用在比你想象得到多得多的地方. Vadim 把我们放在了一个拥有完 整功能的带子查询功能的巨大的 SQL前景上面. 你不能应用子查询的唯一方面是目标列.

第二,6.3 使用 unix 域套接字作为缺省而不是 TCP/IP. 要允许从其他机器来的联接,你必须使用新的 postmaster 的 -i 选项,当然你还要编辑 pg_hba.conf. 同样,pg_hba.conf 的格式也因此而改变了.

第三,现在使用char() 字段将比使用 varchar() 或 text 时访问的更快. 具体地说,在对第一个 text 和 varchar() 类型 的字段进行访问之后再对同类型字段访问将有一些访问延迟. char() 型原先也有这种访问延迟,但现在已经没有 了.这或许意味着你重新设计你的一些表,尤其是那些你已经定义为 varchar() 或 text 的短的字符型字段.这个和 其他的一些修改使 6.3 比早期的版本有更快的速度.

我们现在有了独立于任何 Unix 文件的可定义的口令. 现在有了新的 SQL USER 命令. 参阅管理员手册获取更多信息. 同时我们还有了一个新的表,pg_shadow,用来存放用户信息和用户口令, 并且缺省时只有 postgres 超级用户对其有(SELECT)查询权限. pg_user 现在是 pg_shadow 的一个视图,并且可以被公众 (PUBLIC)读取(SELECT). 你可以在你的应用里继续使用 pg_user 而不需做任何更改.

用户创建的表缺省时不再被公众(PUBLIC)拥有读取(SELECT)权限. 这么做是因为 ANSI 标准要求这样做. 你当然可以在创建表后用 GRANT 赋予他人任何你希望的权限. 系统表仍然可以被公众(PUBLIC)读取 (SELECT).

我们仍然有实时的死锁侦测代码.超时时间不超过60秒. 并且新的锁定代码实现了更好的FIFO(先入先出),所 以在重负荷时对资源的需求会轻一些.

在以前的版本中我们听到了许多关于缺乏文档的抱怨. Thomas 在这个版本中努力增加了许多新的手册.请查阅 doc/ 目录.

出于性能考虑,时间跟踪特性取消了, 但是可以使用触发器实现(参阅 pgsql/contrib/spi/README).请使用新 的\d命令查询关于类型,操作符等的信息.同时,视图拥有了他们自己的权限, 而不是以它们依赖的表为基础. 所以它们的权限应该独立的设置.请检查 /pgsql/interfaces 文件获取更多与 PostgreSQL 对话的方法.

这是第一个需要向已有的用户进行说明的版本.不管从哪个角度来说, 我们都需要做这样的说明,因为新版本取 消了许多限制,因而许多原先人们需要做的许多防范性工作都不再需要了.

E.55.1. 迁移到 v6.3

任何希望从以前的 PostgreSQL 版本移植到新版本的数据库都需要用 pg_dumppg_dumpall 进行一次倾倒/重载工作.

E.55.2. 修改列表

修补
---------
Fix binary cursors broken by MOVE implementation(Vadim)
Fix for tcl library crash(Jan)
Fix for array handling, from Gerhard Hintermayer
Fix acl error, and remove duplicate pqtrace(Bruce)
Fix psql \e for empty file(Bruce)
Fix for textcat on varchar() fields(Bruce)
Fix for DBT Sendproc (Zeugswetter Andres)
Fix vacuum analyze syntax problem(Bruce)
Fix for international identifiers(Tatsuo)
Fix aggregates on inherited tables(Bruce)
Fix substr() for out-of-bounds data
Fix for select 1=1 or 2=2, select 1=1 and 2=2, and select sum(2+2)(Bruce)
Fix notty output to show status result.  -q option still turns it off(Bruce)
Fix for count(*), aggs with views and multiple tables and sum(3)(Bruce)
Fix cluster(Bruce)
Fix for PQtrace start/stop several times(Bruce)
Fix a variety of locking problems like newer lock waiters getting
	lock before older waiters, and having readlock people not share
	locks if a writer is waiting for a lock, and waiting writers not
	getting priority over waiting readers(Bruce)
Fix crashes in psql when executing queries from external files(James)
Fix problem with multiple order by columns, with the first one having
	NULL values(Jeroen)
Use correct hash table support functions for float8 and int4(Thomas)
Re-enable JOIN= option in CREATE OPERATOR statement (Thomas)
Change precedence for boolean operators to match expected behavior(Thomas)
Generate elog(ERROR) on over-large integer(Bruce)
Allow multiple-argument functions in constraint clauses(Thomas)
Check boolean input literals for 'true','false','yes','no','1','0'
	and throw elog(ERROR) if unrecognized(Thomas)
Major large objects fix
Fix for GROUP BY showing duplicates(Vadim)
Fix for index scans in MergeJoin(Vadim)

增强
------------
Subselects with EXISTS, IN, ALL, ANY keywords (Vadim, Bruce, Thomas)
New User Manual(Thomas, others)
Speedup by inlining some frequently-called functions
Real deadlock detection, no more timeouts(Bruce)
Add SQL92 "constants" CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, 
	CURRENT_USER(Thomas)
Modify constraint syntax to be SQL92-compliant(Thomas)
Implement SQL92 PRIMARY KEY and UNIQUE clauses using indexes(Thomas)
Recognize SQL92 syntax for FOREIGN KEY. Throw elog notice(Thomas)
Allow NOT NULL UNIQUE constraint clause (each allowed separately before)(Thomas)
Allow PostgreSQL-style casting ("::") of non-constants(Thomas)
Add support for SQL3 TRUE and FALSE boolean constants(Thomas)
Support SQL92 syntax for IS TRUE/IS FALSE/IS NOT TRUE/IS NOT FALSE(Thomas)
Allow shorter strings for boolean literals (e.g. "t", "tr", "tru")(Thomas)
Allow SQL92 delimited identifiers(Thomas)
Implement SQL92 binary and hexadecimal string decoding (b'10' and x'1F')(Thomas)
Support SQL92 syntax for type coercion of literal strings
	(e.g. "DATETIME 'now'")(Thomas)
Add conversions for int2, int4, and OID types to and from text(Thomas)
Use shared lock when building indexes(Vadim)
Free memory allocated for an user query inside transaction block after
	this query is done, was turned off in <= 6.2.1(Vadim)
New SQL statement CREATE PROCEDURAL LANGUAGE(Jan)
New PostgreSQL Procedural Language (PL) backend interface(Jan)
Rename pg_dump -H option to -h(Bruce)
Add Java support for passwords, European dates(Peter)
Use indexes for LIKE and ~, !~ operations(Bruce)
Add hash functions for datetime and timespan(Thomas)
Time Travel removed(Vadim, Bruce)
Add paging for \d and \z, and fix \i(Bruce)
Add Unix domain socket support to backend and to frontend library(Goran)
Implement CREATE DATABASE/WITH LOCATION and initlocation utility(Thomas)
Allow more SQL92 and/or PostgreSQL reserved words as column identifiers(Thomas)
Augment support for SQL92 SET TIME ZONE...(Thomas)
SET/SHOW/RESET TIME ZONE uses TZ backend environment variable(Thomas)
Implement SET keyword = DEFAULT and SET TIME ZONE DEFAULT(Thomas)
Enable SET TIME ZONE using TZ environment variable(Thomas)
Add PGDATESTYLE environment variable to frontend and backend initialization(Thomas)
Add PGTZ, PGCOSTHEAP, PGCOSTINDEX, PGRPLANS, PGGEQO
	frontend library initialization environment variables(Thomas)
Regression tests time zone automatically set with "setenv PGTZ PST8PDT"(Thomas)
Add pg_description table for info on tables, columns, operators, types, and
	aggregates(Bruce)
Increase 16 char limit on system table/index names to 32 characters(Bruce)
Rename system indexes(Bruce)
Add 'GERMAN' option to SET DATESTYLE(Thomas)
Define an "ISO-style" timespan output format with "hh:mm:ss" fields(Thomas)
Allow fractional values for delta times (e.g. '2.5 days')(Thomas)
Validate numeric input more carefully for delta times(Thomas)
Implement day of year as possible input to date_part()(Thomas)
Define timespan_finite() and text_timespan() functions(Thomas)
Remove archive stuff(Bruce)
Allow for a pg_password authentication database that is separate from
	the system password file(Todd)
Dump ACLs, GRANT, REVOKE permissions(Matt)
Define text, varchar, and bpchar string length functions(Thomas)
Fix Query handling for inheritance, and cost computations(Bruce)
Implement CREATE TABLE/AS SELECT (alternative to SELECT/INTO)(Thomas)
Allow NOT, IS NULL, IS NOT NULL in constraints(Thomas)
Implement UNIONs for SELECT(Bruce)
Add UNION, GROUP, DISTINCT to INSERT(Bruce)
varchar() stores only necessary bytes on disk(Bruce)
Fix for BLOBs(Peter)
Mega-Patch for JDBC...see README_6.3 for list of changes(Peter)
Remove unused "option" from PQconnectdb()
New LOCK command and lock manual page describing deadlocks(Bruce)
Add new psql \da, \dd, \df, \do, \dS, and \dT commands(Bruce)
Enhance psql \z to show sequences(Bruce)
Show NOT NULL and DEFAULT in psql \d table(Bruce)
New psql .psqlrc file start-up(Andrew)
Modify sample start-up script in contrib/linux to show syslog(Thomas)
New types for IP and MAC addresses in contrib/ip_and_mac(TomH)
Unix system time conversions with date/time types in contrib/unixdate(Thomas)
Update of contrib stuff(Massimo)
Add Unix socket support to DBD::Pg(Goran)
New python interface (PyGreSQL 2.0)(D'Arcy)
New frontend/backend protocol has a version number, network byte order(Phil)
Security features in pg_hba.conf enhanced and documented, many cleanups(Phil)
CHAR() now faster access than VARCHAR() or TEXT
ecpg embedded SQL preprocessor
Reduce system column overhead(Vadmin)
Remove pg_time table(Vadim)
Add pg_type attribute to identify types that need length (bpchar, varchar)
Add report of offending line when COPY command fails
Allow VIEW permissions to be set separately from the underlying tables. 
	For security, use GRANT/REVOKE on views as appropriate(Jan)
Tables now have no default GRANT SELECT TO PUBLIC.  You must
	explicitly grant such permissions.
Clean up tutorial examples(Darren)

源代码树修改
-------------------
Add new html development tools, and flow chart in /tools/backend
Fix for SCO compiles
Stratus computer port Robert Gillies
Added support for shlib for BSD44_derived & i386_solaris
Make configure more automated(Brook)
Add script to check regression test results
Break parser functions into smaller files, group together(Bruce)
Rename heap_create to heap_create_and_catalog, rename heap_creatr
	to heap_create()(Bruce)
Sparc/Linux patch for locking(TomS)
Remove PORTNAME and reorganize port-specific stuff(Marc)
Add optimizer README file(Bruce)
Remove some recursion in optimizer and clean up some code there(Bruce)
Fix for NetBSD locking(Henry)
Fix for libptcl make(Tatsuo)
AIX patch(Darren)
Change IS TRUE, IS FALSE, ... to expressions using "=" rather than
	function calls to istrue() or isfalse() to allow optimization(Thomas)
Various fixes NetBSD/Sparc related(TomH)
Alpha linux locking(Travis,Ryan)
Change elog(WARN) to elog(ERROR)(Bruce)
FAQ for FreeBSD(Marc)
Bring in the PostODBC source tree as part of our standard distribution(Marc)
A minor patch for HP-UX 10 vs 9(Stan)
New pg_attribute.atttypmod for type-specific info like varchar length(Bruce)
UnixWare patches(Billy)
New i386 'lock' for spin lock asm(Billy)
Support for multiplexed backends is removed
Start an OpenBSD port
Start an AUX port
Start a Cygnus port
Add string functions to regression suite(Thomas)
Expand a few function names formerly truncated to 16 characters(Thomas)
Remove un-needed malloc() calls and replace with palloc()(Bruce)