From 5dbf48986840c3148933ea8ef584f77fd5da8c1a Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 29 Jun 2010 21:20:19 +0000 Subject: [PATCH] Add compatibility note warning that plpgsql is now stricter about the column datatypes of composite results, per gripe from Marcel Asio. Some desultory copy-editing of plpgsql-related sections of the release notes. --- doc/src/sgml/release-9.0.sgml | 173 ++++++++++++++++++++-------------- 1 file changed, 101 insertions(+), 72 deletions(-) diff --git a/doc/src/sgml/release-9.0.sgml b/doc/src/sgml/release-9.0.sgml index 980d59870c..ee5abc0da3 100644 --- a/doc/src/sgml/release-9.0.sgml +++ b/doc/src/sgml/release-9.0.sgml @@ -1,4 +1,4 @@ - + Release 9.0 @@ -30,10 +30,11 @@ - Built-in, binary, log-based replication. This advance consists of two features: - Hot Standby allows continuous archive standby database servers to accept read-only - queries, and Streaming Replication allows continuous archive (WAL) files - to be streamed over a network port to a standby database server. + Built-in, binary, log-based replication. This advance consists of two + features: Hot Standby allows continuous archive standby database servers + to accept read-only queries, and Streaming Replication allows continuous + archive (WAL) files to be streamed over a network port to a + standby database server. @@ -54,8 +55,9 @@ Broadly enhanced stored procedure support. The DO statement permits ad-hoc or anonymous code blocks. Functions can now be called using named - parameters. PL/pgSQL is now installed by default, and PL/Perl and PL/Python - have been enhanced in several ways, including support for Python3. + parameters. PL/pgSQL is now installed by default, and PL/Perl and + PL/Python have been enhanced in several ways, including support for + Python3. @@ -63,7 +65,7 @@ Triggers now support two new features, SQL-compliant per-column triggers, and + linkend="SQL-CREATETRIGGER">per-column triggers, and conditional trigger execution. @@ -86,7 +88,7 @@ The LISTEN/NOTIFY + linkend="SQL-NOTIFY">NOTIFY feature has been overhauled to make it into a high-performance event queuing system. It now stores events in a memory-based queue, and it now allows delivery @@ -134,16 +136,17 @@ A dump/restore using pg_dump - or use of pg_upgrade is required + or use of pg_upgrade is required for those wishing to migrate data from any previous release. - Version 9.0 contains a number of changes which selectively break backwards compatibility - in order to support new features and code quality improvements. Particularly, users - who make extensive use of PL/pgSQL and/or PITR and Warm Standby should test their - solutions for breakage. Observe the following incompatibilities: + Version 9.0 contains a number of changes which selectively break backwards + compatibility in order to support new features and code quality + improvements. Particularly, users who make extensive use of PL/pgSQL + and/or PITR and Warm Standby should test their solutions for breakage. + Observe the following incompatibilities: @@ -270,15 +273,15 @@ - No longer change function input variable names via - REPLACE FUNCTION(Pavel Stehule). + CREATE OR REPLACE FUNCTION can no longer change + the declared names of function parameters (Pavel Stehule) - In order to support names parameter calls, it is - no longer possible to change the aliases for input variables - in the function declaration in place. You now have to DROP - and recreate the function. + In order to support named-parameter calls, it is + no longer allowed to change the aliases for input variables + in the declaration of an existing function. You now have to + DROP and recreate the function. @@ -287,46 +290,65 @@ - PL/pgSQL Variables + PL/pgSQL - Have PL/pgSQL throw an error if a variable name conflicts with a + PL/pgSQL now throws an error if a variable name conflicts with a column name used in a query (Tom Lane) - This behavior can be changed via the server variable plpgsql.variable_conflict, - or by the per-function option #variable_conflict. - The former behavior was to bind to variable names over - column names, but not consistently. Stored procedures - with naming conflicts will probably need to be refactored. + or via the per-function option #variable_conflict. - Remove PL/pgSQL's RENAME declaration option (Tom Lane) + PL/pgSQL no longer allows variable names that match SQL + reserved words (Tom Lane) - Instead, use ALIAS, - which can now alias any variable, not just dollar sign - variables, e.g. $1. + This is a consequence of aligning the PL/pgSQL parser to match the + core SQL parser more closely. If necessary, + variable names can be double-quoted to avoid this restriction. - PL/pgSQL no longer allows unquoted variables names that match SQL - reserved words (Tom Lane) + PL/pgSQL now requires columns of composite results to match the + expected type modifier as well as base type (Pavel Stehule, Tom Lane) + + + + For example, if a column of the result type is declared as + NUMERIC(30,2), it is no longer acceptable to return a + NUMERIC of some other precision in that column. Previous + versions neglected to check the type modifier and would thus allow + result rows that didn't actually conform to the declared restrictions. + + + + + + Remove PL/pgSQL's RENAME declaration option (Tom Lane) - Variables can be double-quoted to avoid this restriction. + Instead of RENAME, use ALIAS, + which can now alias any variable, not just dollar sign + parameter names (such as $1). @@ -339,12 +361,12 @@ Remove support for platforms that don't have a working 64-bit - integer data types (Tom Lane) + integer data type (Tom Lane) - It is believed all supported platforms have working 64-bit integer - data types. + It is believed all still-supported platforms have working 64-bit + integer data types. @@ -354,7 +376,7 @@ Changes - Version 9.0 has an unprecedented number of new major features, + Version 9.0 has an unprecedented number of new major features, and over 200 enhancements, improvements, new commands, new functions, and other changes. @@ -423,8 +445,9 @@ Performance - Version 9.0 also contains several performance and optimizer enhancements to - improve specific uses of PostgreSQL and remedy certain poor-performing cases. + Version 9.0 also contains several performance and optimizer enhancements + to improve specific uses of PostgreSQL and remedy certain poor-performing + cases. @@ -469,7 +492,7 @@ Outer joins where the inner side is unique and not referenced in - the query are unnecessary and are therefore now removed. This will + the query are unnecessary and are therefore now removed. This will accelerate many automatically generated queries, such as those created by object-relational mappers. @@ -651,7 +674,7 @@ Monitoring - With increased use of PostgreSQL in high-end production systems, + With increased use of PostgreSQL in high-end production systems, users need increased monitoring. PostgresSQL 9.0 continues to add more ways to monitor PostgreSQL applications. @@ -667,7 +690,7 @@ - This allows DBAs to characterize database traffic + This allows DBAs to characterize database traffic and troubleshoot problems by source application. @@ -746,7 +769,7 @@ in the new pg_db_role_setting system table. A new psql \drds command shows these settings. Backwards-compatible system views do not show this information. - The primary use of this feature is setting schema + The primary use of this feature is setting schema search_path. @@ -863,7 +886,7 @@ - For drivers which support this feature, this saves an entire + For drivers that support this feature, this saves an entire round-trip to the client, allowing result counts and pagination to be calculated without a second COUNT query. @@ -1057,13 +1080,13 @@ TABLE CONSTRAINT ... EXCLUDE clause. While uniqueness checks could be specified using this syntax, the real value of this feature is in using complex - operators that do not have built-in constraints. + operators that do not have built-in constraints. The primary use of exclusion constraints is to allow defining non-overlapping uniqueness, such as for time periods, arrays - or ranges of values. This supports data integrity at the + or ranges of values. This supports data integrity at the table level for calendaring, time-management, and scientific applications. @@ -1134,7 +1157,7 @@ LISTEN/NOTIFY may now be used as a full-featured, high-performance - event queue system for PostgreSQL, with transactional support + event queue system for PostgreSQL, with transactional support and guaranteed delivery. @@ -1201,7 +1224,7 @@ - The new output formats will support the development of new tools + The new output formats will support the development of new tools for analysis of EXPLAIN output. @@ -1255,7 +1278,7 @@ - The previous method was usually slower and caused index bloat. + The previous method was usually slower and caused index bloat. Note that the new method may use more disk space during VACUUM FULL. @@ -1306,9 +1329,9 @@ - This feature supports GiST indexing of point operations on polygons, + This feature supports GiST indexing of point operations on polygons, circles, and other points, such as "point is in polygon". Previously - indexing only worked for bounding boxes. This should make many + indexing only worked for bounding boxes. This should make many PostGIS queries faster. @@ -1688,21 +1711,30 @@ - Install server-side language PL/pgSQL by default (Bruce Momjian) + Install PL/pgSQL by default (Bruce Momjian) - Allow PL/pgSQL to handle row types with dropped columns (Pavel Stehule) + Improve PL/pgSQL's ability to handle row types with dropped columns + (Pavel Stehule) - Allow IN parameters to be assigned values within + Allow input parameters to be assigned values within PL/pgSQL functions (Steve Prentice) + + + Formerly, input parameters were treated as being declared + CONST. This restriction has been removed to simplify + porting of functions from other DBMSes that do not impose the + equivalent restriction. An input parameter now acts like a local + variable initialized to the passed-in value. + @@ -1713,21 +1745,19 @@ - Have PL/pgSQL use the main lexer, rather than a custom version (Tom Lane) + Make PL/pgSQL use the main lexer, rather than its own version + (Tom Lane) - - - - - - - <link linkend="plpgsql-cursors">PL/pgSQL Cursors</link> - + + This ensures accurate tracking of the main system's behavior for details + such as string escaping. + + - Add count and ALL options to MOVE + Add count and ALL options to MOVE FORWARD/BACKWARD in PL/pgSQL (Pavel Stehule) @@ -1741,8 +1771,8 @@ - Add PL/pgSQL's OPEN cursor FOR EXECUTE to use parameters - (Pavel Stehule, Itagaki Takahiro) + Allow PL/pgSQL's OPEN cursor FOR EXECUTE to + use parameters (Pavel Stehule, Itagaki Takahiro) @@ -2482,7 +2512,7 @@ - Enable the server lexer to be reentrant (Tom Lane) + Enable the server's lexer to be reentrant (Tom Lane) @@ -2796,9 +2826,8 @@ - This filter dictionary removes accents from tokens, and - makes full-text searches over multiple languages much - easier. + This filter dictionary removes accents from letters, which + makes full-text searches over multiple languages much easier. -- 2.40.0