|
|
|
@ -1,4 +1,4 @@ |
|
|
|
|
<!-- $PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.523 2007/10/18 06:07:23 neilc Exp $ --> |
|
|
|
|
<!-- $PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.524 2007/10/18 16:45:05 momjian Exp $ --> |
|
|
|
|
<!-- |
|
|
|
|
|
|
|
|
|
Typical markup: |
|
|
|
@ -53,6 +53,7 @@ do it for earlier branch release files. |
|
|
|
|
and performance enhancements. This was made possible by a growing |
|
|
|
|
community that has dramatically accelerated the pace of |
|
|
|
|
development. This release adds the follow major capabilities: |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<itemizedlist> |
|
|
|
|
|
|
|
|
@ -153,9 +154,11 @@ do it for earlier branch release files. |
|
|
|
|
|
|
|
|
|
</itemizedlist> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
Major performance improvements are listed below. Fortunately, most of |
|
|
|
|
these enhancements are automatic and do not require user changes or |
|
|
|
|
tuning: |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<itemizedlist> |
|
|
|
|
|
|
|
|
@ -254,7 +257,16 @@ do it for earlier branch release files. |
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
Queries that previously automatically cast values to |
|
|
|
|
<type>TEXT</type> might now need explicit casts |
|
|
|
|
<type>TEXT</type> might now need explicit casts (Peter, Tom) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
Data types other than <type>CHAR</> and <type>VARCHAR</> no |
|
|
|
|
longer automatically cast to <type>TEXT</>, except in the |
|
|
|
|
limited case of concatenation (<literal>||</>) where the other |
|
|
|
|
input is textual. While this change will require additional |
|
|
|
|
casts for some queries it also eliminates some unusual |
|
|
|
|
behavior. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
@ -283,7 +295,12 @@ do it for earlier branch release files. |
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
Commenting out a parameter in <filename>postgresql.conf</> now |
|
|
|
|
causes it to revert to its default value |
|
|
|
|
causes it to revert to its default value (Joachim Wieland) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
Previously commenting out a value kept the value unchanged until |
|
|
|
|
the next server restart. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
@ -291,6 +308,7 @@ do it for earlier branch release files. |
|
|
|
|
<para> |
|
|
|
|
<literal>ARRAY(SELECT ...)</literal>, where <command>SELECT</> |
|
|
|
|
returns no rows, now returns an empty array, rather than NULL |
|
|
|
|
(Tom) |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
@ -298,7 +316,7 @@ do it for earlier branch release files. |
|
|
|
|
<para> |
|
|
|
|
<literal>ORDER BY ... USING</> <replaceable>operator</> now must |
|
|
|
|
use a less-than or greater-than <replaceable>operator</> that is |
|
|
|
|
defined in a btree operator class |
|
|
|
|
defined in a btree operator class (???) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
@ -311,62 +329,154 @@ do it for earlier branch release files. |
|
|
|
|
The array name for a base data type is no longer required to |
|
|
|
|
be the data type name with an underscore prefix |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
Non-superuser database owners now have privileges to add trusted |
|
|
|
|
procedural languages in their databases by default |
|
|
|
|
The old naming convention is still honored when possible, but |
|
|
|
|
client code should no longer depending on it. Application code |
|
|
|
|
should use the new <literal>pg_type.typarray</literal> column to |
|
|
|
|
determine the array data type. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
<command>SET LOCAL</command> changes now persist until |
|
|
|
|
the end of the top-most transaction, unless rolled back |
|
|
|
|
the end of the top-most transaction, unless rolled back (Tom) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
Previously <command>SET LOCAL</command>'s effects reverted |
|
|
|
|
during subtransaction commit and <command>RELEASE</>. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
Commands that are disallowed in transaction blocks are now also |
|
|
|
|
disallowed in multiple-statement query strings |
|
|
|
|
disallowed in multiple-statement query strings (Tom) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
For example, <literal>BEGIN; DROP DATABASE; COMMIT</> will now be |
|
|
|
|
rejected even if submitted as a single query message. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
More checks for invalidly-encoded data (Andrew) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
This change plugs some holes that existed in literal backslash |
|
|
|
|
escape string processing and <command>COPY</command> escape |
|
|
|
|
processing. Now the de-escaped string is rechecked to see if the |
|
|
|
|
result created an invalid multi-byte character. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
Add additional checks for invalidly-encoded multibyte strings |
|
|
|
|
Ensure that <function>chr()</function> cannot create invalidly |
|
|
|
|
encoded values (Andrew) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
For example, <function>chr()</function> has additional checks. |
|
|
|
|
In UTF8-encoded databases the argument is processed as a Unicode |
|
|
|
|
code point. In other multi-byte encodings the argument must |
|
|
|
|
designate a 7-bit ASCII character, or an error is raised. Zero |
|
|
|
|
also causes an error. <function>ascii()</function> has been |
|
|
|
|
adjusted as well to match this behavior. |
|
|
|
|
|
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
<function>convert()</function> encoding has changed behavior |
|
|
|
|
Adjust <function>convert()</function> behavior to ensure encoding |
|
|
|
|
validity (Andrew) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
The two argument form of <function>convert()</function> has been |
|
|
|
|
removed. The three argument form now takes a <type>BYTEA</type> |
|
|
|
|
first argument and returns a <type>BYTEA</type>. To cover this |
|
|
|
|
loss three new functions are introduced: |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<itemizedlist> |
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
<type>bytea</> is now used for strings that do not match the |
|
|
|
|
server encoding, and <function>convert_from</> and |
|
|
|
|
<function>convert_to</> have been added for consistency. |
|
|
|
|
<function>convert_from(bytea, name)</function> returns |
|
|
|
|
<type>TEXT</> — converts the first argument from the named |
|
|
|
|
encoding to the database encoding. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
<function>convert_to(text, name)</function> returns |
|
|
|
|
<type>BYTEA</> — converts the first argument from the |
|
|
|
|
database encoding to the named encoding. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
<function>length(bytea, name)</function> returns |
|
|
|
|
<type>INTEGER</> — gives the length of the first |
|
|
|
|
argument in characters in the named encoding. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
</itemizedlist> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
Remove <literal>convert(argument USING conversion_name)</literal> |
|
|
|
|
(Andrew) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
Its behavior did not match the SQL standard and could not be |
|
|
|
|
implemented in this release. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
<function>convert()</function> encoding has changed behavior |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
Restrict object size functions to users who have reasonable |
|
|
|
|
permissions to view such information |
|
|
|
|
permissions to view such information (Tom) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
For example, <function>pg_database_size()</function> now |
|
|
|
|
requires <literal>CONNECT</> permission, which is granted to |
|
|
|
|
everyone by default. <function>pg_tablespace_size()</function> |
|
|
|
|
requires <literal>CREATE</> permission in the tablespace, or the |
|
|
|
|
tablespace is the default tablespace for the database. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
New C macros for handling variable-length data values |
|
|
|
|
New C macros for handling variable-length data values (Greg |
|
|
|
|
Stark, Tom) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
The new <function>SET_VARSIZE()</> macro <emphasis>must</> be |
|
|
|
|
used to set the length of generated values. Also, it might be |
|
|
|
|
necessary to expand (<quote>de-TOAST</quote>) input values in |
|
|
|
|
additional places. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
@ -577,19 +687,6 @@ do it for earlier branch release files. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
Commenting out a parameter in <filename>postgresql.conf</> now |
|
|
|
|
causes it to revert to its default value (Joachim Wieland) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
Previously commenting out a value kept the value unchanged until |
|
|
|
|
the next server restart. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
Automatically invalidate cached function code when table |
|
|
|
@ -953,23 +1050,6 @@ do it for earlier branch release files. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
Queries that previously automatically cast values to |
|
|
|
|
<type>TEXT</type> might now need explicit casts (Peter, Tom) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
Data types other than <type>CHAR</> and <type>VARCHAR</> no |
|
|
|
|
longer automatically cast to <type>TEXT</>, except in the |
|
|
|
|
limited case of concatenation (<literal>||</>) where the other |
|
|
|
|
input is textual. While this change will require additional |
|
|
|
|
casts for some queries it also eliminates some unusual |
|
|
|
|
behavior. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
Create a general mechanism that supports casts to and from the |
|
|
|
@ -986,14 +1066,6 @@ do it for earlier branch release files. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
<literal>ARRAY(SELECT ...)</literal>, where <command>SELECT</> |
|
|
|
|
returns no rows, now returns an empty array, rather than NULL |
|
|
|
|
(Tom) |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
Allow <literal>col IS NULL</> to use an index (Teodor) |
|
|
|
@ -1067,20 +1139,6 @@ do it for earlier branch release files. |
|
|
|
|
|
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
The array name for a base data type is no longer required to |
|
|
|
|
be the data type name with an underscore prefix |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
The old naming convention is still honored when possible, but |
|
|
|
|
client code should no longer depending on it. Application code |
|
|
|
|
should use the new <literal>pg_type.typarray</literal> column to |
|
|
|
|
determine the array data type. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
Server configuration parameters can now be set on a per-function |
|
|
|
@ -1162,7 +1220,6 @@ do it for earlier branch release files. |
|
|
|
|
procedural languages in their databases by default (Jeremy Drake) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
While this is reasonably safe, some administrators may wish to |
|
|
|
|
revoke the privilege. It is controlled by |
|
|
|
@ -1170,18 +1227,6 @@ do it for earlier branch release files. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
<command>SET LOCAL</command> changes now persist until |
|
|
|
|
the end of the top-most transaction, unless rolled back (Tom) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
Previously <command>SET LOCAL</command>'s effects reverted |
|
|
|
|
during subtransaction commit and <command>RELEASE</>. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
Allow a session's current parameter setting to be used as the |
|
|
|
@ -1259,19 +1304,6 @@ do it for earlier branch release files. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
Commands that are disallowed in transaction blocks are now also |
|
|
|
|
disallowed in multiple-statement query strings (Tom) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
For example, <literal>BEGIN; DROP DATABASE; COMMIT</> will now be |
|
|
|
|
rejected even if submitted as a single query message. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
Make CREATE/DROP/RENAME DATABASE wait briefly for other backends |
|
|
|
@ -1471,102 +1503,6 @@ do it for earlier branch release files. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
More checks for invalidly-encoded data (Andrew) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
This change plugs some holes that existed in literal backslash |
|
|
|
|
escape string processing and <command>COPY</command> escape |
|
|
|
|
processing. Now the de-escaped string is rechecked to see if the |
|
|
|
|
result created an invalid multi-byte character. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
Ensure that <function>chr()</function> cannot create invalidly |
|
|
|
|
encoded values (Andrew) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
In UTF8-encoded databases the argument is processed as a Unicode |
|
|
|
|
code point. In other multi-byte encodings the argument must |
|
|
|
|
designate a 7-bit ASCII character, or an error is raised. Zero |
|
|
|
|
also causes an error. <function>ascii()</function> has been |
|
|
|
|
adjusted as well to match this behavior. |
|
|
|
|
|
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
Adjust <function>convert()</function> behavior to ensure encoding |
|
|
|
|
validity (Andrew) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
The two argument form of <function>convert()</function> has been |
|
|
|
|
removed. The three argument form now takes a <type>BYTEA</type> |
|
|
|
|
first argument and returns a <type>BYTEA</type>. To cover this |
|
|
|
|
loss three new functions are introduced: |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<itemizedlist> |
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
<function>convert_from(bytea, name)</function> returns |
|
|
|
|
<type>TEXT</> — converts the first argument from the named |
|
|
|
|
encoding to the database encoding. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
<function>convert_to(text, name)</function> returns |
|
|
|
|
<type>BYTEA</> — converts the first argument from the |
|
|
|
|
database encoding to the named encoding. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
<function>length(bytea, name)</function> returns |
|
|
|
|
<type>INTEGER</> — gives the length of the first |
|
|
|
|
argument in characters in the named encoding. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
</itemizedlist> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
Remove <literal>convert(argument USING conversion_name)</literal> |
|
|
|
|
(Andrew) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
Its behavior did not match the SQL standard and could not be |
|
|
|
|
implemented in this release. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
Restrict object size functions to users who have reasonable |
|
|
|
|
permissions to view such information (Tom) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
For example, <function>pg_database_size()</function> now |
|
|
|
|
requires <literal>CONNECT</> permission, which is granted to |
|
|
|
|
everyone by default. <function>pg_tablespace_size()</function> |
|
|
|
|
requires <literal>CREATE</> permission in the tablespace, or the |
|
|
|
|
tablespace is the default tablespace for the database. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
Make <function>currtid()</function> functions require |
|
|
|
@ -2026,20 +1962,6 @@ do it for earlier branch release files. |
|
|
|
|
<title>Source Code Changes</title> |
|
|
|
|
<itemizedlist> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
New C macros for handling variable-length data values (Greg |
|
|
|
|
Stark, Tom) |
|
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
|
The new <function>SET_VARSIZE()</> macro <emphasis>must</> be |
|
|
|
|
used to set the length of generated values. Also, it might be |
|
|
|
|
necessary to expand (<quote>de-TOAST</quote>) input values in |
|
|
|
|
additional places. |
|
|
|
|
</para> |
|
|
|
|
</listitem> |
|
|
|
|
|
|
|
|
|
<listitem> |
|
|
|
|
<para> |
|
|
|
|
Rename macro <literal>DLLIMPORT</> to <literal>PGDLLIMPORT</> to |
|
|
|
|