1 <!-- doc/src/sgml/release-8.4.sgml -->
2 <!-- See header comment in release.sgml about typical markup -->
4 <sect1 id="release-8-4-5">
5 <title>Release 8.4.5</title>
8 <title>Release date</title>
9 <simpara>2010-10-04</simpara>
13 This release contains a variety of fixes from 8.4.4.
14 For information about new features in the 8.4 major release, see
15 <xref linkend="release-8-4">.
19 <title>Migration to Version 8.4.5</title>
22 A dump/restore is not required for those running 8.4.X.
23 However, if you are upgrading from a version earlier than 8.4.2,
24 see the release notes for 8.4.2.
30 <title>Changes</title>
36 Use a separate interpreter for each calling SQL userid in PL/Perl and
41 This change prevents security problems that can be caused by subverting
42 Perl or Tcl code that will be executed later in the same session under
43 another SQL user identity (for example, within a <literal>SECURITY
44 DEFINER</> function). Most scripting languages offer numerous ways that
45 that might be done, such as redefining standard functions or operators
46 called by the target function. Without this change, any SQL user with
47 Perl or Tcl language usage rights can do essentially anything with the
48 SQL privileges of the target function's owner.
52 The cost of this change is that intentional communication among Perl
53 and Tcl functions becomes more difficult. To provide an escape hatch,
54 PL/PerlU and PL/TclU functions continue to use only one interpreter
55 per session. This is not considered a security issue since all such
56 functions execute at the trust level of a database superuser already.
60 It is likely that third-party procedural languages that claim to offer
61 trusted execution have similar security issues. We advise contacting
62 the authors of any PL you are depending on for security-critical
67 Our thanks to Tim Bunce for pointing out this issue (CVE-2010-3433).
73 Prevent possible crashes in <function>pg_get_expr()</> by disallowing
74 it from being called with an argument that is not one of the system
75 catalog columns it's intended to be used with
76 (Heikki Linnakangas, Tom Lane)
82 Treat exit code 128 (<literal>ERROR_WAIT_NO_CHILDREN</>) as non-fatal on
83 Windows (Magnus Hagander)
87 Under high load, Windows processes will sometimes fail at startup with
88 this error code. Formerly the postmaster treated this as a panic
89 condition and restarted the whole database, but that seems to be
96 Fix incorrect placement of placeholder evaluation (Tom Lane)
100 This bug could result in query outputs being non-null when they
101 should be null, in cases where the inner side of an outer join
102 is a sub-select with non-strict expressions in its output list.
108 Fix possible duplicate scans of <literal>UNION ALL</> member relations
115 Fix <quote>cannot handle unplanned sub-select</quote> error (Tom Lane)
119 This occurred when a sub-select contains a join alias reference that
120 expands into an expression containing another sub-select.
126 Fix mishandling of whole-row Vars that reference a view or sub-select
127 and appear within a nested sub-select (Tom Lane)
133 Fix mishandling of cross-type <literal>IN</> comparisons (Tom Lane)
137 This could result in failures if the planner tried to implement an
138 <literal>IN</> join with a sort-then-unique-then-plain-join plan.
144 Fix computation of <command>ANALYZE</> statistics for <type>tsvector</>
145 columns (Jan Urbanski)
149 The original coding could produce incorrect statistics, leading to
150 poor plan choices later.
156 Improve planner's estimate of memory used by <function>array_agg()</>,
157 <function>string_agg()</>, and similar aggregate functions
162 The previous drastic underestimate could lead to out-of-memory failures
163 due to inappropriate choice of a hash-aggregation plan.
169 Fix failure to mark cached plans as transient (Tom Lane)
173 If a plan is prepared while <command>CREATE INDEX CONCURRENTLY</> is
174 in progress for one of the referenced tables, it is supposed to be
175 re-planned once the index is ready for use. This was not happening
182 Reduce PANIC to ERROR in some occasionally-reported btree failure cases,
183 and provide additional detail in the resulting error messages
188 This should improve the system's robustness with corrupted indexes.
194 Fix incorrect search logic for partial-match queries with GIN indexes
199 Cases involving AND/OR combination of several GIN index conditions
200 didn't always give the right answer, and were sometimes much slower
207 Prevent show_session_authorization() from crashing within autovacuum
214 Defend against functions returning setof record where not all the
215 returned rows are actually of the same rowtype (Tom Lane)
221 Fix possible corruption of pending trigger event lists during
222 subtransaction rollback (Tom Lane)
226 This could lead to a crash or incorrect firing of triggers.
232 Fix possible failure when hashing a pass-by-reference function result
239 Improve merge join's handling of NULLs in the join columns (Tom Lane)
243 A merge join can now stop entirely upon reaching the first NULL,
244 if the sort order is such that NULLs sort high.
250 Take care to fsync the contents of lockfiles (both
251 <filename>postmaster.pid</> and the socket lockfile) while writing them
256 This omission could result in corrupted lockfile contents if the
257 machine crashes shortly after postmaster start. That could in turn
258 prevent subsequent attempts to start the postmaster from succeeding,
259 until the lockfile is manually removed.
265 Avoid recursion while assigning XIDs to heavily-nested
266 subtransactions (Andres Freund, Robert Haas)
270 The original coding could result in a crash if there was limited
277 Avoid holding open old WAL segments in the walwriter process
278 (Magnus Hagander, Heikki Linnakangas)
282 The previous coding would prevent removal of no-longer-needed segments.
288 Fix <varname>log_line_prefix</>'s <literal>%i</> escape,
289 which could produce junk early in backend startup (Tom Lane)
295 Prevent misinterpretation of partially-specified relation options
296 for TOAST tables (Itagaki Takahiro)
300 In particular, <literal>fillfactor</> would be read as zero if any
301 other reloption had been set for the table, leading to serious bloat.
307 Fix inheritance count tracking in <command>ALTER TABLE ... ADD
308 CONSTRAINT</> (Robert Haas)
314 Fix possible data corruption in <command>ALTER TABLE ... SET
315 TABLESPACE</> when archiving is enabled (Jeff Davis)
321 Allow <command>CREATE DATABASE</> and <command>ALTER DATABASE ... SET
322 TABLESPACE</> to be interrupted by query-cancel (Guillaume Lelarge)
328 Improve <command>CREATE INDEX</>'s checking of whether proposed index
329 expressions are immutable (Tom Lane)
335 Fix <command>REASSIGN OWNED</> to handle operator classes and families
342 Fix possible core dump when comparing two empty <type>tsquery</> values
349 Fix <literal>LIKE</>'s handling of patterns containing <literal>%</>
350 followed by <literal>_</> (Tom Lane)
354 We've fixed this before, but there were still some incorrectly-handled
361 Re-allow input of Julian dates prior to 0001-01-01 AD (Tom Lane)
365 Input such as <literal>'J100000'::date</> worked before 8.4,
366 but was unintentionally broken by added error-checking.
372 Fix PL/pgSQL to throw an error, not crash, if a cursor is closed within
373 a <literal>FOR</> loop that is iterating over that cursor
380 In PL/Python, defend against null pointer results from
381 <function>PyCObject_AsVoidPtr</> and <function>PyCObject_FromVoidPtr</>
388 In <application>libpq</>, fix full SSL certificate verification for the
389 case where both <literal>host</> and <literal>hostaddr</> are specified
396 Make psql recognize <command>DISCARD ALL</> as a command that should
397 not be encased in a transaction block in autocommit-off mode
404 Fix some issues in <application>pg_dump</>'s handling of SQL/MED objects
409 Notably, <application>pg_dump</> would always fail if run by a
410 non-superuser, which was not intended.
416 Improve <application>pg_dump</> and <application>pg_restore</>'s
417 handling of non-seekable archive files (Tom Lane, Robert Haas)
421 This is important for proper functioning of parallel restore.
427 Improve parallel pg_restore's ability to cope with selective restore
428 (<literal>-L</> option) (Tom Lane)
432 The original code tended to fail if the <literal>-L</> file commanded
433 a non-default restore ordering.
439 Fix <application>ecpg</> to process data from <literal>RETURNING</>
440 clauses correctly (Michael Meskes)
446 Fix some memory leaks in <application>ecpg</> (Zoltan Boszormenyi)
452 Improve <filename>contrib/dblink</>'s handling of tables containing
453 dropped columns (Tom Lane)
459 Fix connection leak after <quote>duplicate connection name</quote>
460 errors in <filename>contrib/dblink</> (Itagaki Takahiro)
466 Fix <filename>contrib/dblink</> to handle connection names longer than
467 62 bytes correctly (Itagaki Takahiro)
473 Add <function>hstore(text, text)</>
474 function to <filename>contrib/hstore</> (Robert Haas)
478 This function is the recommended substitute for the now-deprecated
479 <literal>=></> operator. It was back-patched so that future-proofed
480 code can be used with older server versions. Note that the patch will
481 be effective only after <filename>contrib/hstore</> is installed or
482 reinstalled in a particular database. Users might prefer to execute
483 the <command>CREATE FUNCTION</> command by hand, instead.
489 Update build infrastructure and documentation to reflect the source code
490 repository's move from CVS to Git (Magnus Hagander and others)
496 Update time zone data files to <application>tzdata</> release 2010l
497 for DST law changes in Egypt and Palestine; also historical corrections
502 This change also adds new names for two Micronesian timezones:
503 Pacific/Chuuk is now preferred over Pacific/Truk (and the preferred
504 abbreviation is CHUT not TRUT) and Pacific/Pohnpei is preferred over
511 Make Windows' <quote>N. Central Asia Standard Time</> timezone map to
512 Asia/Novosibirsk, not Asia/Almaty (Magnus Hagander)
516 Microsoft changed the DST behavior of this zone in the timezone update
517 from KB976098. Asia/Novosibirsk is a better match to its new behavior.
526 <sect1 id="release-8-4-4">
527 <title>Release 8.4.4</title>
530 <title>Release date</title>
531 <simpara>2010-05-17</simpara>
535 This release contains a variety of fixes from 8.4.3.
536 For information about new features in the 8.4 major release, see
537 <xref linkend="release-8-4">.
541 <title>Migration to Version 8.4.4</title>
544 A dump/restore is not required for those running 8.4.X.
545 However, if you are upgrading from a version earlier than 8.4.2,
546 see the release notes for 8.4.2.
552 <title>Changes</title>
558 Enforce restrictions in <literal>plperl</> using an opmask applied to
559 the whole interpreter, instead of using <filename>Safe.pm</>
560 (Tim Bunce, Andrew Dunstan)
564 Recent developments have convinced us that <filename>Safe.pm</> is too
565 insecure to rely on for making <literal>plperl</> trustable. This
566 change removes use of <filename>Safe.pm</> altogether, in favor of using
567 a separate interpreter with an opcode mask that is always applied.
568 Pleasant side effects of the change include that it is now possible to
569 use Perl's <literal>strict</> pragma in a natural way in
570 <literal>plperl</>, and that Perl's <literal>$a</> and <literal>$b</>
571 variables work as expected in sort routines, and that function
572 compilation is significantly faster. (CVE-2010-1169)
578 Prevent PL/Tcl from executing untrustworthy code from
579 <structname>pltcl_modules</> (Tom)
583 PL/Tcl's feature for autoloading Tcl code from a database table
584 could be exploited for trojan-horse attacks, because there was no
585 restriction on who could create or insert into that table. This change
586 disables the feature unless <structname>pltcl_modules</> is owned by a
587 superuser. (However, the permissions on the table are not checked, so
588 installations that really need a less-than-secure modules table can
589 still grant suitable privileges to trusted non-superusers.) Also,
590 prevent loading code into the unrestricted <quote>normal</> Tcl
591 interpreter unless we are really going to execute a <literal>pltclu</>
592 function. (CVE-2010-1170)
598 Fix data corruption during WAL replay of
599 <literal>ALTER ... SET TABLESPACE</> (Tom)
603 When <varname>archive_mode</> is on, <literal>ALTER ... SET TABLESPACE</>
604 generates a WAL record whose replay logic was incorrect. It could write
605 the data to the wrong place, leading to possibly-unrecoverable data
606 corruption. Data corruption would be observed on standby slaves, and
607 could occur on the master as well if a database crash and recovery
608 occurred after committing the <literal>ALTER</> and before the next
615 Fix possible crash if a cache reset message is received during
616 rebuild of a relcache entry (Heikki)
620 This error was introduced in 8.4.3 while fixing a related failure.
626 Apply per-function GUC settings while running the language validator
627 for the function (Itagaki Takahiro)
631 This avoids failures if the function's code is invalid without the
632 setting; an example is that SQL functions may not parse if the
633 <varname>search_path</> is not correct.
639 Do constraint exclusion for inherited <command>UPDATE</> and
640 <command>DELETE</> target tables when
641 <varname>constraint_exclusion</> = <literal>partition</> (Tom)
645 Due to an oversight, this setting previously only caused constraint
646 exclusion to be checked in <command>SELECT</> commands.
652 Do not allow an unprivileged user to reset superuser-only parameter
657 Previously, if an unprivileged user ran <literal>ALTER USER ... RESET
658 ALL</> for himself, or <literal>ALTER DATABASE ... RESET ALL</> for
659 a database he owns, this would remove all special parameter settings
660 for the user or database, even ones that are only supposed to be
661 changeable by a superuser. Now, the <command>ALTER</> will only
662 remove the parameters that the user has permission to change.
668 Avoid possible crash during backend shutdown if shutdown occurs
669 when a <literal>CONTEXT</> addition would be made to log entries (Tom)
673 In some cases the context-printing function would fail because the
674 current transaction had already been rolled back when it came time
675 to print a log message.
681 Fix erroneous handling of <literal>%r</> parameter in
682 <varname>recovery_end_command</> (Heikki)
686 The value always came out zero.
692 Ensure the archiver process responds to changes in
693 <varname>archive_command</> as soon as possible (Tom)
699 Fix pl/pgsql's <literal>CASE</> statement to not fail when the
700 case expression is a query that returns no rows (Tom)
706 Update pl/perl's <filename>ppport.h</> for modern Perl versions
713 Fix assorted memory leaks in pl/python (Andreas Freund, Tom)
719 Handle empty-string connect parameters properly in ecpg (Michael)
725 Prevent infinite recursion in <application>psql</> when expanding
726 a variable that refers to itself (Tom)
732 Fix <application>psql</>'s <literal>\copy</> to not add spaces around
733 a dot within <literal>\copy (select ...)</> (Tom)
737 Addition of spaces around the decimal point in a numeric literal would
738 result in a syntax error.
744 Avoid formatting failure in <application>psql</> when running in a
745 locale context that doesn't match the <varname>client_encoding</>
752 Fix unnecessary <quote>GIN indexes do not support whole-index scans</>
753 errors for unsatisfiable queries using <filename>contrib/intarray</>
760 Ensure that <filename>contrib/pgstattuple</> functions respond to cancel
761 interrupts promptly (Tatsuhito Kasahara)
767 Make server startup deal properly with the case that
768 <function>shmget()</> returns <literal>EINVAL</> for an existing
769 shared memory segment (Tom)
773 This behavior has been observed on BSD-derived kernels including OS X.
774 It resulted in an entirely-misleading startup failure complaining that
775 the shared memory request size was too large.
781 Avoid possible crashes in syslogger process on Windows (Heikki)
787 Deal more robustly with incomplete time zone information in the
788 Windows registry (Magnus)
794 Update the set of known Windows time zone names (Magnus)
800 Update time zone data files to <application>tzdata</> release 2010j
801 for DST law changes in Argentina, Australian Antarctic, Bangladesh,
802 Mexico, Morocco, Pakistan, Palestine, Russia, Syria, Tunisia;
803 also historical corrections for Taiwan.
807 Also, add <literal>PKST</> (Pakistan Summer Time) to the default set of
808 timezone abbreviations.
817 <sect1 id="release-8-4-3">
818 <title>Release 8.4.3</title>
821 <title>Release date</title>
822 <simpara>2010-03-15</simpara>
826 This release contains a variety of fixes from 8.4.2.
827 For information about new features in the 8.4 major release, see
828 <xref linkend="release-8-4">.
832 <title>Migration to Version 8.4.3</title>
835 A dump/restore is not required for those running 8.4.X.
836 However, if you are upgrading from a version earlier than 8.4.2,
837 see the release notes for 8.4.2.
843 <title>Changes</title>
849 Add new configuration parameter <varname>ssl_renegotiation_limit</> to
850 control how often we do session key renegotiation for an SSL connection
855 This can be set to zero to disable renegotiation completely, which may
856 be required if a broken SSL library is used. In particular, some
857 vendors are shipping stopgap patches for CVE-2009-3555 that cause
858 renegotiation attempts to fail.
864 Fix possible deadlock during backend startup (Tom)
870 Fix possible crashes due to not handling errors during relcache reload
877 Fix possible crash due to use of dangling pointer to a cached plan
884 Fix possible crash due to overenthusiastic invalidation of cached
885 plan for <command>ROLLBACK</> (Tom)
891 Fix possible crashes when trying to recover from a failure in
892 subtransaction start (Tom)
898 Fix server memory leak associated with use of savepoints and a client
899 encoding different from server's encoding (Tom)
905 Fix incorrect WAL data emitted during end-of-recovery cleanup of a GIST
906 index page split (Yoichi Hirai)
910 This would result in index corruption, or even more likely an error
911 during WAL replay, if we were unlucky enough to crash during
912 end-of-recovery cleanup after having completed an incomplete GIST
919 Fix bug in WAL redo cleanup method for GIN indexes (Heikki)
925 Fix incorrect comparison of scan key in GIN index search (Teodor)
931 Make <function>substring()</> for <type>bit</> types treat any negative
932 length as meaning <quote>all the rest of the string</> (Tom)
936 The previous coding treated only -1 that way, and would produce an
937 invalid result value for other negative values, possibly leading to
938 a crash (CVE-2010-0442).
944 Fix integer-to-bit-string conversions to handle the first fractional
945 byte correctly when the output bit width is wider than the given
946 integer by something other than a multiple of 8 bits (Tom)
952 Fix some cases of pathologically slow regular expression matching (Tom)
958 Fix bug occurring when trying to inline a SQL function that returns
959 a set of a composite type that contains dropped columns (Tom)
965 Fix bug with trying to update a field of an element of a
966 composite-type array column (Tom)
972 Avoid failure when <command>EXPLAIN</> has to print a FieldStore or
973 assignment ArrayRef expression (Tom)
977 These cases can arise now that <command>EXPLAIN VERBOSE</> tries to
978 print plan node target lists.
984 Avoid an unnecessary coercion failure in some cases where an undecorated
985 literal string appears in a subquery within
986 <command>UNION</>/<command>INTERSECT</>/<command>EXCEPT</> (Tom)
990 This fixes a regression for some cases that worked before 8.4.
996 Avoid undesirable rowtype compatibility check failures in some cases
997 where a whole-row Var has a rowtype that contains dropped columns (Tom)
1003 Fix the <literal>STOP WAL LOCATION</> entry in backup history files to
1004 report the next WAL segment's name when the end location is exactly at a
1005 segment boundary (Itagaki Takahiro)
1011 Always pass the catalog ID to an option validator function specified in
1012 <command>CREATE FOREIGN DATA WRAPPER</> (Martin Pihlak)
1018 Fix some more cases of temporary-file leakage (Heikki)
1022 This corrects a problem introduced in the previous minor release.
1023 One case that failed is when a plpgsql function returning set is
1024 called within another function's exception handler.
1030 Add support for doing <literal>FULL JOIN ON FALSE</> (Tom)
1034 This prevents a regression from pre-8.4 releases for some queries that
1035 can now be simplified to a constant-false join condition.
1041 Improve constraint exclusion processing of boolean-variable cases,
1042 in particular make it possible to exclude a partition that has a
1043 <quote>bool_column = false</> constraint (Tom)
1049 Prevent treating an <literal>INOUT</> cast as representing binary
1050 compatibility (Heikki)
1056 Include column name in the message when warning about inability to
1057 grant or revoke column-level privileges (Stephen Frost)
1061 This is more useful than before and helps to prevent confusion when
1062 a <command>REVOKE</> generates multiple messages, which formerly
1063 appeared to be duplicates.
1069 When reading <filename>pg_hba.conf</> and related files, do not treat
1070 <literal>@something</> as a file inclusion request if the <literal>@</>
1071 appears inside quote marks; also, never treat <literal>@</> by itself
1072 as a file inclusion request (Tom)
1076 This prevents erratic behavior if a role or database name starts with
1077 <literal>@</>. If you need to include a file whose path name
1078 contains spaces, you can still do so, but you must write
1079 <literal>@"/path to/file"</> rather than putting the quotes around
1080 the whole construct.
1086 Prevent infinite loop on some platforms if a directory is named as
1087 an inclusion target in <filename>pg_hba.conf</> and related files
1094 Fix possible infinite loop if <function>SSL_read</> or
1095 <function>SSL_write</> fails without setting <varname>errno</> (Tom)
1099 This is reportedly possible with some Windows versions of
1100 <application>openssl</>.
1106 Disallow <acronym>GSSAPI</> authentication on local connections,
1107 since it requires a hostname to function correctly (Magnus)
1113 Protect <application>ecpg</> against applications freeing strings
1114 unexpectedly (Michael)
1120 Make <application>ecpg</> report the proper SQLSTATE if the connection
1121 disappears (Michael)
1127 Fix translation of cell contents in <application>psql</> <literal>\d</>
1134 Fix <application>psql</>'s <literal>numericlocale</> option to not
1135 format strings it shouldn't in latex and troff output formats (Heikki)
1141 Fix a small per-query memory leak in <application>psql</> (Tom)
1147 Make <application>psql</> return the correct exit status (3) when
1148 <literal>ON_ERROR_STOP</> and <literal>--single-transaction</> are
1149 both specified and an error occurs during the implied <command>COMMIT</>
1156 Fix <application>pg_dump</>'s output of permissions for foreign servers
1163 Fix possible crash in parallel <application>pg_restore</> due to
1164 out-of-range dependency IDs (Tom)
1170 Fix plpgsql failure in one case where a composite column is set to NULL
1177 Fix possible failure when calling PL/Perl functions from PL/PerlU
1178 or vice versa (Tim Bunce)
1184 Add <literal>volatile</> markings in PL/Python to avoid possible
1185 compiler-specific misbehavior (Zdenek Kotala)
1191 Ensure PL/Tcl initializes the Tcl interpreter fully (Tom)
1195 The only known symptom of this oversight is that the Tcl
1196 <literal>clock</> command misbehaves if using Tcl 8.5 or later.
1202 Prevent <function>ExecutorEnd</> from being run on portals created
1203 within a failed transaction or subtransaction (Tom)
1207 This is known to cause issues when using
1208 <filename>contrib/auto_explain</>.
1214 Prevent crash in <filename>contrib/dblink</> when too many key
1215 columns are specified to a <function>dblink_build_sql_*</> function
1216 (Rushabh Lathia, Joe Conway)
1222 Allow zero-dimensional arrays in <filename>contrib/ltree</> operations
1227 This case was formerly rejected as an error, but it's more convenient to
1228 treat it the same as a zero-element array. In particular this avoids
1229 unnecessary failures when an <type>ltree</> operation is applied to the
1230 result of <literal>ARRAY(SELECT ...)</> and the sub-select returns no
1237 Fix assorted crashes in <filename>contrib/xml2</> caused by sloppy
1238 memory management (Tom)
1244 Make building of <filename>contrib/xml2</> more robust on Windows
1251 Fix race condition in Windows signal handling (Radu Ilie)
1255 One known symptom of this bug is that rows in <structname>pg_listener</>
1256 could be dropped under heavy load.
1262 Make the configure script report failure if the C compiler does
1263 not provide a working 64-bit integer datatype (Tom)
1267 This case has been broken for some time, and no longer seems worth
1268 supporting, so just reject it at configure time instead.
1274 Update time zone data files to <application>tzdata</> release 2010e
1275 for DST law changes in Bangladesh, Chile, Fiji, Mexico, Paraguay, Samoa.
1284 <sect1 id="release-8-4-2">
1285 <title>Release 8.4.2</title>
1288 <title>Release date</title>
1289 <simpara>2009-12-14</simpara>
1293 This release contains a variety of fixes from 8.4.1.
1294 For information about new features in the 8.4 major release, see
1295 <xref linkend="release-8-4">.
1299 <title>Migration to Version 8.4.2</title>
1302 A dump/restore is not required for those running 8.4.X.
1303 However, if you have any hash indexes,
1304 you should <command>REINDEX</> them after updating to 8.4.2,
1305 to repair possible damage.
1311 <title>Changes</title>
1317 Protect against indirect security threats caused by index functions
1318 changing session-local state (Gurjeet Singh, Tom)
1322 This change prevents allegedly-immutable index functions from possibly
1323 subverting a superuser's session (CVE-2009-4136).
1329 Reject SSL certificates containing an embedded null byte in the common
1330 name (CN) field (Magnus)
1334 This prevents unintended matching of a certificate to a server or client
1335 name during SSL validation (CVE-2009-4034).
1341 Fix hash index corruption (Tom)
1345 The 8.4 change that made hash indexes keep entries sorted by hash value
1346 failed to update the bucket splitting and compaction routines to
1347 preserve the ordering. So application of either of those operations
1348 could lead to permanent corruption of an index, in the sense that
1349 searches might fail to find entries that are present. To deal with
1350 this, it is recommended to <literal>REINDEX</> any hash indexes you may
1351 have after installing this update.
1357 Fix possible crash during backend-startup-time cache initialization (Tom)
1363 Avoid crash on empty thesaurus dictionary (Tom)
1369 Prevent signals from interrupting <literal>VACUUM</> at unsafe times
1374 This fix prevents a PANIC if a <literal>VACUUM FULL</> is cancelled
1375 after it's already committed its tuple movements, as well as transient
1376 errors if a plain <literal>VACUUM</> is interrupted after having
1377 truncated the table.
1383 Fix possible crash due to integer overflow in hash table size
1388 This could occur with extremely large planner estimates for the size of
1389 a hashjoin's result.
1395 Fix crash if a <literal>DROP</> is attempted on an internally-dependent
1402 Fix very rare crash in <type>inet</>/<type>cidr</> comparisons (Chris
1409 Ensure that shared tuple-level locks held by prepared transactions are
1410 not ignored (Heikki)
1416 Fix premature drop of temporary files used for a cursor that is accessed
1417 within a subtransaction (Heikki)
1423 Fix memory leak in syslogger process when rotating to a new CSV logfile
1430 Fix memory leak in postmaster when re-parsing <filename>pg_hba.conf</>
1437 Fix Windows permission-downgrade logic (Jesse Morris)
1441 This fixes some cases where the database failed to start on Windows,
1442 often with misleading error messages such as <quote>could not locate
1443 matching postgres executable</quote>.
1449 Make <literal>FOR UPDATE/SHARE</> in the primary query not propagate
1450 into <literal>WITH</> queries (Tom)
1456 WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE
1458 the <literal>FOR UPDATE</> will now affect <literal>bar</> but not
1459 <literal>foo</>. This is more useful and consistent than the original
1460 8.4 behavior, which tried to propagate <literal>FOR UPDATE</> into the
1461 <literal>WITH</> query but always failed due to assorted implementation
1462 restrictions. It also follows the design rule that <literal>WITH</>
1463 queries are executed as if independent of the main query.
1469 Fix bug with a <literal>WITH RECURSIVE</> query immediately inside
1476 Fix concurrency bug in hash indexes (Tom)
1480 Concurrent insertions could cause index scans to transiently report
1487 Fix incorrect logic for GiST index page splits, when the split depends
1488 on a non-first column of the index (Paul Ramsey)
1494 Fix wrong search results for a multi-column GIN index with
1495 <literal>fastupdate</> enabled (Teodor)
1501 Fix bugs in WAL entry creation for GIN indexes (Tom)
1505 These bugs were masked when <varname>full_page_writes</> was on, but
1506 with it off a WAL replay failure was certain if a crash occurred before
1507 the next checkpoint.
1513 Don't error out if recycling or removing an old WAL file fails at the
1514 end of checkpoint (Heikki)
1518 It's better to treat the problem as non-fatal and allow the checkpoint
1519 to complete. Future checkpoints will retry the removal. Such problems
1520 are not expected in normal operation, but have been seen to be
1521 caused by misdesigned Windows anti-virus and backup software.
1527 Ensure WAL files aren't repeatedly archived on Windows (Heikki)
1531 This is another symptom that could happen if some other process
1532 interfered with deletion of a no-longer-needed file.
1538 Fix PAM password processing to be more robust (Tom)
1542 The previous code is known to fail with the combination of the Linux
1543 <literal>pam_krb5</> PAM module with Microsoft Active Directory as the
1544 domain controller. It might have problems elsewhere too, since it was
1545 making unjustified assumptions about what arguments the PAM stack would
1552 Raise the maximum authentication token (Kerberos ticket) size in GSSAPI
1553 and SSPI authentication methods (Ian Turner)
1557 While the old 2000-byte limit was more than enough for Unix Kerberos
1558 implementations, tickets issued by Windows Domain Controllers can be
1565 Ensure that domain constraints are enforced in constructs like
1566 <literal>ARRAY[...]::domain</>, where the domain is over an array type
1573 Fix foreign-key logic for some cases involving composite-type columns
1574 as foreign keys (Tom)
1580 Ensure that a cursor's snapshot is not modified after it is created
1585 This could lead to a cursor delivering wrong results if later operations
1586 in the same transaction modify the data the cursor is supposed to return.
1592 Fix <literal>CREATE TABLE</> to properly merge default expressions
1593 coming from different inheritance parent tables (Tom)
1597 This used to work but was broken in 8.4.
1603 Re-enable collection of access statistics for sequences (Akira Kurosawa)
1607 This used to work but was broken in 8.3.
1613 Fix processing of ownership dependencies during <literal>CREATE OR
1614 REPLACE FUNCTION</> (Tom)
1620 Fix incorrect handling of <literal>WHERE</>
1621 <replaceable>x</>=<replaceable>x</> conditions (Tom)
1625 In some cases these could get ignored as redundant, but they aren't
1626 — they're equivalent to <replaceable>x</> <literal>IS NOT NULL</>.
1632 Fix incorrect plan construction when using hash aggregation to implement
1633 <literal>DISTINCT</> for textually identical volatile expressions (Tom)
1639 Fix Assert failure for a volatile <literal>SELECT DISTINCT ON</>
1646 Fix <function>ts_stat()</> to not fail on an empty <type>tsvector</>
1653 Make text search parser accept underscores in XML attributes (Peter)
1659 Fix encoding handling in <type>xml</> binary input (Heikki)
1663 If the XML header doesn't specify an encoding, we now assume UTF-8 by
1664 default; the previous handling was inconsistent.
1670 Fix bug with calling <literal>plperl</> from <literal>plperlu</> or vice
1675 An error exit from the inner function could result in crashes due to
1676 failure to re-select the correct Perl interpreter for the outer function.
1682 Fix session-lifespan memory leak when a PL/Perl function is redefined
1689 Ensure that Perl arrays are properly converted to
1690 <productname>PostgreSQL</> arrays when returned by a set-returning
1691 PL/Perl function (Andrew Dunstan, Abhijit Menon-Sen)
1695 This worked correctly already for non-set-returning functions.
1701 Fix rare crash in exception processing in PL/Python (Peter)
1707 Fix <application>ecpg</> problem with comments in <literal>DECLARE
1708 CURSOR</> statements (Michael)
1714 Fix <application>ecpg</> to not treat recently-added keywords as
1715 reserved words (Tom)
1719 This affected the keywords <literal>CALLED</>, <literal>CATALOG</>,
1720 <literal>DEFINER</>, <literal>ENUM</>, <literal>FOLLOWING</>,
1721 <literal>INVOKER</>, <literal>OPTIONS</>, <literal>PARTITION</>,
1722 <literal>PRECEDING</>, <literal>RANGE</>, <literal>SECURITY</>,
1723 <literal>SERVER</>, <literal>UNBOUNDED</>, and <literal>WRAPPER</>.
1729 Re-allow regular expression special characters in <application>psql</>'s
1730 <literal>\df</> function name parameter (Tom)
1736 In <filename>contrib/fuzzystrmatch</>, correct the calculation of
1737 <function>levenshtein</> distances with non-default costs (Marcin Mank)
1743 In <filename>contrib/pg_standby</>, disable triggering failover with a
1744 signal on Windows (Fujii Masao)
1748 This never did anything useful, because Windows doesn't have Unix-style
1749 signals, but recent changes made it actually crash.
1755 Put <literal>FREEZE</> and <literal>VERBOSE</> options in the right
1756 order in the <literal>VACUUM</> command that
1757 <filename>contrib/vacuumdb</> produces (Heikki)
1763 Fix possible leak of connections when <filename>contrib/dblink</>
1764 encounters an error (Tatsuhito Kasahara)
1770 Ensure <application>psql</>'s flex module is compiled with the correct
1771 system header definitions (Tom)
1775 This fixes build failures on platforms where
1776 <literal>--enable-largefile</> causes incompatible changes in the
1783 Make the postmaster ignore any <literal>application_name</> parameter in
1784 connection request packets, to improve compatibility with future libpq
1791 Update the timezone abbreviation files to match current reality (Joachim
1796 This includes adding <literal>IDT</> to the default
1797 timezone abbreviation set.
1803 Update time zone data files to <application>tzdata</> release 2009s
1804 for DST law changes in Antarctica, Argentina, Bangladesh, Fiji,
1805 Novokuznetsk, Pakistan, Palestine, Samoa, Syria; also historical
1806 corrections for Hong Kong.
1815 <sect1 id="release-8-4-1">
1816 <title>Release 8.4.1</title>
1819 <title>Release date</title>
1820 <simpara>2009-09-09</simpara>
1824 This release contains a variety of fixes from 8.4.
1825 For information about new features in the 8.4 major release, see
1826 <xref linkend="release-8-4">.
1830 <title>Migration to Version 8.4.1</title>
1833 A dump/restore is not required for those running 8.4.X.
1839 <title>Changes</title>
1845 Fix WAL page header initialization at the end of archive recovery
1850 This could lead to failure to process the WAL in a subsequent
1857 Fix <quote>cannot make new WAL entries during recovery</> error (Tom)
1863 Fix problem that could make expired rows visible after a crash (Tom)
1867 This bug involved a page status bit potentially not being set
1868 correctly after a server crash.
1874 Disallow <command>RESET ROLE</> and <command>RESET SESSION
1875 AUTHORIZATION</> inside security-definer functions (Tom, Heikki)
1879 This covers a case that was missed in the previous patch that
1880 disallowed <command>SET ROLE</> and <command>SET SESSION
1881 AUTHORIZATION</> inside security-definer functions.
1888 Make <command>LOAD</> of an already-loaded loadable module
1893 Formerly, <command>LOAD</> would attempt to unload and re-load the
1894 module, but this is unsafe and not all that useful.
1900 Make window function <literal>PARTITION BY</> and <literal>ORDER BY</>
1901 items always be interpreted as simple expressions (Tom)
1905 In 8.4.0 these lists were parsed following the rules used for
1906 top-level <literal>GROUP BY</> and <literal>ORDER BY</> lists.
1907 But this was not correct per the SQL standard, and it led to possible
1914 Fix several errors in planning of semi-joins (Tom)
1918 These led to wrong query results in some cases where <literal>IN</>
1919 or <literal>EXISTS</> was used together with another join.
1925 Fix handling of whole-row references to subqueries that are within
1931 <literal>SELECT COUNT(ss.*) FROM ... LEFT JOIN (SELECT ...) ss ON ...</>.
1932 Here, <literal>ss.*</> would be treated as <literal>ROW(NULL,NULL,...)</>
1933 for null-extended join rows, which is not the same as a simple NULL.
1934 Now it is treated as a simple NULL.
1940 Fix Windows shared-memory allocation code (Tsutomu Yamada, Magnus)
1944 This bug led to the often-reported <quote>could not reattach
1945 to shared memory</> error message.
1951 Fix locale handling with plperl (Heikki)
1955 This bug could cause the server's locale setting to change when a
1956 plperl function is called, leading to data corruption.
1962 Fix handling of reloptions to ensure setting one option doesn't
1963 force default values for others (Itagaki Takahiro)
1969 Ensure that a <quote>fast shutdown</> request will forcibly terminate
1970 open sessions, even if a <quote>smart shutdown</> was already in progress
1977 Avoid memory leak for <function>array_agg()</> in <literal>GROUP BY</>
1984 Treat <function>to_char(..., 'TH')</> as an uppercase ordinal
1985 suffix with <literal>'HH'</>/<literal>'HH12'</> (Heikki)
1989 It was previously handled as <literal>'th'</> (lowercase).
1995 Include the fractional part in the result of
1996 <function>EXTRACT(second)</> and
1997 <function>EXTRACT(milliseconds)</> for
1998 <type>time</> and <type>time with time zone</> inputs (Tom)
2002 This has always worked for floating-point datetime configurations,
2003 but was broken in the integer datetime code.
2009 Fix overflow for <literal>INTERVAL '<replaceable>x</> ms'</literal>
2010 when <replaceable>x</> is more than 2 million and integer
2011 datetimes are in use (Alex Hunsaker)
2017 Improve performance when processing toasted values in index scans (Tom)
2021 This is particularly useful for <ulink
2022 url="http://postgis.refractions.net/">PostGIS</ulink>.
2028 Fix a typo that disabled <varname>commit_delay</> (Jeff Janes)
2034 Output early-startup messages to <filename>postmaster.log</> if the
2035 server is started in silent mode (Tom)
2039 Previously such error messages were discarded, leading to
2040 difficulty in debugging.
2046 Remove translated FAQs (Peter)
2050 They are now on the <ulink
2051 url="http://wiki.postgresql.org/wiki/FAQ">wiki</ulink>. The
2052 main FAQ was moved to the wiki some time ago.
2058 Fix <application>pg_ctl</> to not go into an infinite loop if
2059 <filename>postgresql.conf</> is empty (Jeff Davis)
2065 Fix several errors in <application>pg_dump</>'s
2066 <literal>--binary-upgrade</> mode (Bruce, Tom)
2070 <literal>pg_dump --binary-upgrade</> is used by pg_migrator.
2076 Fix <filename>contrib/xml2</>'s <function>xslt_process()</> to
2077 properly handle the maximum number of parameters (twenty) (Tom)
2083 Improve robustness of <application>libpq</>'s code to recover
2084 from errors during <command>COPY FROM STDIN</> (Tom)
2090 Avoid including conflicting readline and editline header files
2091 when both libraries are installed (Zdenek Kotala)
2097 Work around gcc bug that causes <quote>floating-point exception</>
2098 instead of <quote>division by zero</> on some platforms (Tom)
2104 Update time zone data files to <application>tzdata</> release 2009l
2105 for DST law changes in Bangladesh, Egypt, Mauritius.
2114 <sect1 id="release-8-4">
2115 <title>Release 8.4</title>
2118 <title>Release date</title>
2119 <simpara>2009-07-01</simpara>
2123 <title>Overview</title>
2126 After many years of development, <productname>PostgreSQL</> has
2127 become feature-complete in many areas. This release shows a
2128 targeted approach to adding features (e.g., authentication,
2129 monitoring, space reuse), and adds capabilities defined in the
2130 later SQL standards. The major areas of enhancement are:
2135 <!-- This list duplicates items below, but without authors or details-->
2145 Common Table Expressions and Recursive Queries
2151 Default and variadic parameters for functions
2169 Per-database locale settings
2175 Improved hash indexes
2181 Improved join performance for <literal>EXISTS</> and <literal>NOT EXISTS</> queries
2187 Easier-to-use Warm Standby
2193 Automatic sizing of the Free Space Map
2199 Visibility Map (greatly reduces vacuum overhead for slowly-changing tables)
2205 Version-aware psql (backslash commands work against older servers)
2211 Support SSL certificates for user authentication
2217 Per-function runtime statistics
2223 Easy editing of functions in psql
2229 New contrib modules: pg_stat_statements, auto_explain, citext, btree_gin
2236 The above items are explained in more detail in the sections below.
2242 <title>Migration to Version 8.4</title>
2245 A dump/restore using <application>pg_dump</application> is
2246 required for those wishing to migrate data from any previous
2251 Observe the following incompatibilities:
2255 <title>General</title>
2260 Use 64-bit integer datetimes by default (Neil Conway)
2264 Previously this was selected by <application>configure</>'s
2265 <option>--enable-integer-datetimes</> option. To retain
2266 the old behavior, build with <option>--disable-integer-datetimes</>.
2272 Remove <application>ipcclean</> utility command (Bruce)
2276 The utility only worked on a few platforms. Users should use
2277 their operating system tools instead.
2286 <title>Server Settings</title>
2291 Change default setting for
2292 <literal>log_min_messages</> to <literal>warning</> (previously
2293 it was <literal>notice</>) to reduce log file volume (Tom)
2299 Change default setting for <literal>max_prepared_transactions</> to
2300 zero (previously it was 5) (Tom)
2306 Make <literal>debug_print_parse</>, <literal>debug_print_rewritten</>,
2307 and <literal>debug_print_plan</>
2308 output appear at <literal>LOG</> message level, not
2309 <literal>DEBUG1</> as formerly (Tom)
2315 Make <literal>debug_pretty_print</> default to <literal>on</> (Tom)
2321 Remove <varname>explain_pretty_print</> parameter (no longer needed) (Tom)
2327 Make <varname>log_temp_files</> settable by superusers only, like other
2328 logging options (Simon Riggs)
2334 Remove automatic appending of the epoch timestamp when no <literal>%</>
2335 escapes are present in <literal>log_filename</> (Robert Haas)
2339 This change was made because some users wanted a fixed log filename,
2340 for use with an external log rotation tool.
2346 Remove <varname>log_restartpoints</> from <filename>recovery.conf</>;
2347 instead use <varname>log_checkpoints</> (Simon)
2353 Remove <varname>krb_realm</> and <varname>krb_server_hostname</>;
2354 these are now set in <filename>pg_hba.conf</> instead (Magnus)
2360 There are also significant changes in <link
2361 linkend="release-8-4-pg-hba-conf"><filename>pg_hba.conf</></link>,
2371 <title>Queries</title>
2377 Change <command>TRUNCATE</> and <command>LOCK</> to
2378 apply to child tables of the specified table(s) (Peter)
2382 These commands now accept an <literal>ONLY</> option that prevents
2383 processing child tables; this option must be used if the old
2390 <command>SELECT DISTINCT</> and
2391 <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</>
2392 no longer always produce sorted output (Tom)
2396 Previously, these types of queries always removed duplicate rows
2397 by means of Sort/Unique processing (i.e., sort then remove adjacent
2398 duplicates). Now they can be implemented by hashing, which will not
2399 produce sorted output. If an application relied on the output being
2400 in sorted order, the recommended fix is to add an <literal>ORDER BY</>
2401 clause. As a short-term workaround, the previous behavior can be
2402 restored by disabling <literal>enable_hashagg</>, but that is a very
2403 performance-expensive fix. <literal>SELECT DISTINCT ON</> never uses
2404 hashing, however, so its behavior is unchanged.
2410 Force child tables to inherit <literal>CHECK</> constraints from parents
2411 (Alex Hunsaker, Nikhil Sontakke, Tom)
2415 Formerly it was possible to drop such a constraint from a child
2416 table, allowing rows that violate the constraint to be visible
2417 when scanning the parent table. This was deemed inconsistent,
2418 as well as contrary to SQL standard.
2424 Disallow negative <literal>LIMIT</> or <literal>OFFSET</>
2425 values, rather than treating them as zero (Simon)
2431 Disallow <command>LOCK TABLE</> outside a transaction block
2436 Such an operation is useless because the lock would be released
2443 Sequences now contain an additional <structfield>start_value</> column
2444 (Zoltan Boszormenyi)
2448 This supports <command>ALTER SEQUENCE ... RESTART</>.
2458 <title>Functions and Operators</title>
2464 Make <type>numeric</> zero raised to a fractional power return
2465 <literal>0</>, rather than throwing an error, and make
2466 <type>numeric</> zero raised to the zero power return <literal>1</>,
2467 rather than error (Bruce)
2471 This matches the longstanding <type>float8</> behavior.
2477 Allow unary minus of floating-point values to produce minus zero (Tom)
2481 The changed behavior is more <acronym>IEEE</>-standard
2488 Throw an error if an escape character is the last character in
2489 a <literal>LIKE</> pattern (i.e., it has nothing to escape) (Tom)
2493 Previously, such an escape character was silently ignored,
2494 thus possibly masking application logic errors.
2500 Remove <literal>~=~</> and <literal>~<>~</> operators
2501 formerly used for <literal>LIKE</> index comparisons (Tom)
2505 Pattern indexes now use the regular equality operator.
2511 <function>xpath()</> now passes its arguments to <application>libxml</>
2512 without any changes (Andrew)
2516 This means that the XML argument must be a well-formed XML document.
2517 The previous coding attempted to allow XML fragments, but it did not
2524 Make <function>xmlelement()</> format attribute values just like
2525 content values (Peter)
2529 Previously, attribute values were formatted according to the
2530 normal SQL output behavior, which is sometimes at odds with
2537 Rewrite memory management for <application>libxml</>-using functions
2542 This change should avoid some compatibility problems with use of
2543 <application>libxml</> in PL/Perl and other add-on code.
2549 Adopt a faster algorithm for hash functions (Kenneth Marshall,
2550 based on work of Bob Jenkins)
2554 Many of the built-in hash functions now deliver different results on
2555 little-endian and big-endian platforms.
2562 <title>Temporal Functions and Operators</title>
2568 <varname>DateStyle</> no longer controls <type>interval</> output
2569 formatting; instead there is a new variable <varname>IntervalStyle</>
2576 Improve consistency of handling of fractional seconds in
2577 <type>timestamp</> and <type>interval</> output (Ron Mayer)
2581 This may result in displaying a different number of fractional
2582 digits than before, or rounding instead of truncating.
2588 Make <function>to_char()</>'s localized month/day names depend
2589 on <varname>LC_TIME</>, not <varname>LC_MESSAGES</> (Euler
2590 Taveira de Oliveira)
2596 Cause <function>to_date()</> and <function>to_timestamp()</>
2597 to more consistently report errors for invalid input (Brendan
2602 Previous versions would often ignore or silently misread input
2603 that did not match the format string. Such cases will now
2610 Fix <function>to_timestamp()</> to not require upper/lower case
2611 matching for meridian (<literal>AM</>/<literal>PM</>) and era
2612 (<literal>BC</>/<literal>AD</>) format designations (Brendan
2617 For example, input value <literal>ad</> now matches the format
2618 string <literal>AD</>.
2631 <title>Changes</title>
2634 Below you will find a detailed account of the changes between
2635 <productname>PostgreSQL</productname> 8.4 and the previous major
2640 <title>Performance</title>
2645 Improve optimizer statistics calculations (Jan Urbanski, Tom)
2649 In particular, estimates for full-text-search operators are
2656 Allow <command>SELECT DISTINCT</> and
2657 <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</> to
2662 This means that these types of queries no longer automatically
2663 produce sorted output.
2669 Create explicit concepts of semi-joins and anti-joins (Tom)
2673 This work formalizes our previous ad-hoc treatment of <literal>IN
2674 (SELECT ...)</> clauses, and extends it to <literal>EXISTS</> and
2675 <literal>NOT EXISTS</> clauses. It should result in significantly
2676 better planning of <literal>EXISTS</> and <literal>NOT EXISTS</>
2677 queries. In general, logically equivalent <literal>IN</> and
2678 <literal>EXISTS</> clauses should now have similar performance,
2679 whereas previously <literal>IN</> often won.
2685 Improve optimization of sub-selects beneath outer joins (Tom)
2689 Formerly, a sub-select or view could not be optimized very well if it
2690 appeared within the nullable side of an outer join and contained
2691 non-strict expressions (for instance, constants) in its result list.
2697 Improve the performance of <function>text_position()</> and
2698 related functions by using Boyer-Moore-Horspool searching (David
2703 This is particularly helpful for long search patterns.
2709 Reduce I/O load of writing the statistics collection file
2710 by writing the file only when requested (Martin Pihlak)
2716 Improve performance for bulk inserts (Robert Haas, Simon)
2722 Increase the default value of <varname>default_statistics_target</>
2723 from <literal>10</> to <literal>100</> (Greg Sabino Mullane,
2728 The maximum value was also increased from <literal>1000</> to
2735 Perform <varname>constraint_exclusion</> checking by default
2736 in queries involving inheritance or <literal>UNION ALL</> (Tom)
2740 A new <varname>constraint_exclusion</> setting,
2741 <literal>partition</>, was added to specify this behavior.
2747 Allow I/O read-ahead for bitmap index scans (Greg Stark)
2751 The amount of read-ahead is controlled by
2752 <varname>effective_io_concurrency</>. This feature is available only
2753 if the kernel has <function>posix_fadvise()</> support.
2759 Inline simple set-returning <acronym>SQL</> functions in
2760 <literal>FROM</> clauses (Richard Rowell)
2766 Improve performance of multi-batch hash joins by providing a special
2767 case for join key values that are especially common in the outer
2768 relation (Bryce Cutt, Ramon Lawrence)
2774 Reduce volume of temporary data in multi-batch hash joins
2775 by suppressing <quote>physical tlist</> optimization (Michael
2776 Henderson, Ramon Lawrence)
2782 Avoid waiting for idle-in-transaction sessions during
2783 <command>CREATE INDEX CONCURRENTLY</> (Simon)
2789 Improve performance of shared cache invalidation (Tom)
2798 <title>Server</title>
2801 <title>Settings</title>
2807 Convert many <filename>postgresql.conf</> settings to enumerated
2808 values so that <literal>pg_settings</> can display the valid
2815 Add <varname>cursor_tuple_fraction</> parameter to control the
2816 fraction of a cursor's rows that the planner assumes will be
2817 fetched (Robert Hell)
2823 Allow underscores in the names of custom variable
2824 classes in <filename>postgresql.conf</> (Tom)
2833 <title>Authentication and security</title>
2838 Remove support for the (insecure) <literal>crypt</> authentication method
2843 This effectively obsoletes pre-<productname>PostgreSQL</> 7.2 client
2844 libraries, as there is no longer any non-plaintext password method that
2851 Support regular expressions in <filename>pg_ident.conf</>
2858 Allow <productname>Kerberos</>/<acronym>GSSAPI</> parameters
2859 to be changed without restarting the postmaster (Magnus)
2865 Support <acronym>SSL</> certificate chains in server certificate
2866 file (Andrew Gierth)
2870 Including the full certificate chain makes the client able
2871 to verify the certificate without having all intermediate CA
2872 certificates present in the local store, which is often the case for
2879 Report appropriate error message for combination of <literal>MD5</>
2880 authentication and <varname>db_user_namespace</> enabled (Bruce)
2887 <sect4 id="release-8-4-pg-hba-conf">
2888 <title><filename>pg_hba.conf</></title>
2893 Change all authentication options to use <literal>name=value</>
2898 This makes incompatible changes to the <literal>ldap</>,
2899 <literal>pam</> and <literal>ident</> authentication methods. All
2900 <filename>pg_hba.conf</> entries with these methods need to be
2901 rewritten using the new format.
2907 Remove the <literal>ident sameuser</> option, instead making that
2908 behavior the default if no usermap is specified (Magnus)
2914 Allow a usermap parameter for all external authentication methods
2919 Previously a usermap was only supported for <literal>ident</>
2926 Add <literal>clientcert</> option to control requesting of a
2927 client certificate (Magnus)
2931 Previously this was controlled by the presence of a root
2932 certificate file in the server's data directory.
2938 Add <literal>cert</> authentication method to allow
2939 <emphasis>user</> authentication via <acronym>SSL</> certificates
2944 Previously <acronym>SSL</> certificates could only verify that
2945 the client had access to a certificate, not authenticate a
2952 Allow <literal>krb5</>, <literal>gssapi</> and <literal>sspi</>
2953 realm and <literal>krb5</> host settings to be specified in
2954 <filename>pg_hba.conf</> (Magnus)
2958 These override the settings in <filename>postgresql.conf</>.
2964 Add <varname>include_realm</> parameter for <literal>krb5</>,
2965 <literal>gssapi</>, and <literal>sspi</> methods (Magnus)
2969 This allows identical usernames from different realms to be
2970 authenticated as different database users using usermaps.
2976 Parse <filename>pg_hba.conf</> fully when it is loaded,
2977 so that errors are reported immediately (Magnus)
2981 Previously, most errors in the file wouldn't be detected until clients
2982 tried to connect, so an erroneous file could render the system
2983 unusable. With the new behavior, if an error is detected during
2984 reload then the bad file is rejected and the postmaster continues
2985 to use its old copy.
2991 Show all parsing errors in <filename>pg_hba.conf</> instead of
2992 aborting after the first one (Selena Deckelmann)
2998 Support <literal>ident</> authentication over Unix-domain sockets
2999 on <productname>Solaris</> (Garick Hamlin)
3008 <title>Continuous Archiving</title>
3013 Provide an option to <function>pg_start_backup()</> to force its
3014 implied checkpoint to finish as quickly as possible (Tom)
3018 The default behavior avoids excess I/O consumption, but that is
3019 pointless if no concurrent query activity is going on.
3025 Make <function>pg_stop_backup()</> wait for modified <acronym>WAL</>
3026 files to be archived (Simon)
3030 This guarantees that the backup is valid at the time
3031 <function>pg_stop_backup()</> completes.
3037 When archiving is enabled, rotate the last WAL segment at shutdown
3038 so that all transactions can be archived immediately
3039 (Guillaume Smet, Heikki)
3045 Delay <quote>smart</> shutdown while a continuous archiving base backup
3046 is in progress (Laurenz Albe)
3052 Cancel a continuous archiving base backup if <quote>fast</> shutdown
3053 is requested (Laurenz Albe)
3059 Allow <filename>recovery.conf</> boolean variables to take the
3060 same range of string values as <filename>postgresql.conf</>
3071 <title>Monitoring</title>
3076 Add <function>pg_conf_load_time()</> to report when
3077 the <productname>PostgreSQL</> configuration files were last loaded
3084 Add <function>pg_terminate_backend()</> to safely terminate a
3085 backend (the <literal>SIGTERM</> signal works also) (Tom, Bruce)
3089 While it's always been possible to <literal>SIGTERM</> a single
3090 backend, this was previously considered unsupported; and testing
3091 of the case found some bugs that are now fixed.
3097 Add ability to track user-defined functions' call counts and
3098 runtimes (Martin Pihlak)
3102 Function statistics appear in a new system view,
3103 <literal>pg_stat_user_functions</>. Tracking is controlled
3104 by the new parameter <varname>track_functions</>.
3110 Allow specification of the maximum query string size in
3111 <literal>pg_stat_activity</> via new
3112 <varname>track_activity_query_size</> parameter (Thomas Lee)
3118 Increase the maximum line length sent to <application>syslog</>, in
3119 hopes of improving performance (Tom)
3125 Add read-only configuration variables <varname>segment_size</>,
3126 <varname>wal_block_size</>, and <varname>wal_segment_size</>
3133 When reporting a deadlock, report the text of all queries involved
3134 in the deadlock to the server log (Itagaki Takahiro)
3140 Add <function>pg_stat_get_activity(pid)</> function to return
3141 information about a specific process id (Magnus)
3147 Allow the location of the server's statistics file to be specified
3148 via <varname>stats_temp_directory</> (Magnus)
3152 This allows the statistics file to be placed in a
3153 <acronym>RAM</>-resident directory to reduce I/O requirements.
3154 On startup/shutdown, the file is copied to its traditional location
3155 (<literal>$PGDATA/global/</>) so it is preserved across restarts.
3166 <title>Queries</title>
3171 Add support for <literal>WINDOW</> functions (Hitoshi Harada)
3177 Add support for <literal>WITH</> clauses (CTEs), including <literal>WITH
3178 RECURSIVE</> (Yoshiyuki Asaba, Tatsuo Ishii, Tom)
3184 Add <command>TABLE</> command (Peter)
3188 <literal>TABLE tablename</> is a SQL standard short-hand for
3189 <literal>SELECT * FROM tablename</>.
3195 Allow <literal>AS</> to be optional when specifying a
3196 <command>SELECT</> (or <literal>RETURNING</>) column output
3197 label (Hiroshi Saito)
3201 This works so long as the column label is not any
3202 <productname>PostgreSQL</> keyword; otherwise <literal>AS</> is still
3209 Support set-returning functions in <command>SELECT</> result lists
3210 even for functions that return their result via a tuplestore (Tom)
3214 In particular, this means that functions written in PL/pgSQL
3215 and other PL languages can now be called this way.
3221 Support set-returning functions in the output of aggregation
3222 and grouping queries (Tom)
3228 Allow <command>SELECT FOR UPDATE</>/<literal>SHARE</> to work
3229 on inheritance trees (Tom)
3235 Add infrastructure for <acronym>SQL/MED</> (Martin Pihlak,
3240 There are no remote or external <acronym>SQL/MED</> capabilities
3241 yet, but this change provides a standardized and future-proof
3242 system for managing connection information for modules like
3243 <filename>dblink</> and <filename>plproxy</>.
3249 Invalidate cached plans when referenced schemas, functions, operators,
3250 or operator classes are modified (Martin Pihlak, Tom)
3254 This improves the system's ability to respond to on-the-fly
3260 Allow comparison of composite types and allow arrays of
3261 anonymous composite types (Tom)
3265 This allows constructs such as
3266 <literal>row(1, 1.1) = any (array[row(7, 7.7), row(1, 1.0)])</>.
3267 This is particularly useful in recursive queries.
3273 Add support for Unicode string literal and identifier specifications
3274 using code points, e.g. <literal>U&'d\0061t\+000061'</>
3281 Reject <literal>\000</> in string literals and <command>COPY</> data
3286 Previously, this was accepted but had the effect of terminating
3287 the string contents.
3293 Improve the parser's ability to report error locations (Tom)
3297 An error location is now reported for many semantic errors,
3298 such as mismatched datatypes, that previously could not be localized.
3305 <title><command>TRUNCATE</></title>
3310 Support statement-level <literal>ON TRUNCATE</> triggers (Simon)
3316 Add <literal>RESTART</>/<literal>CONTINUE IDENTITY</> options
3317 for <command>TRUNCATE TABLE</>
3318 (Zoltan Boszormenyi)
3322 The start value of a sequence can be changed by <command>ALTER
3323 SEQUENCE START WITH</>.
3329 Allow <command>TRUNCATE tab1, tab1</> to succeed (Bruce)
3335 Add a separate <command>TRUNCATE</> permission (Robert Haas)
3344 <title><command>EXPLAIN</></title>
3349 Make <command>EXPLAIN VERBOSE</> show the output columns of each
3354 Previously <command>EXPLAIN VERBOSE</> output an internal
3355 representation of the query plan. (That behavior is now
3356 available via <varname>debug_print_plan</>.)
3362 Make <command>EXPLAIN</> identify subplans and initplans with
3363 individual labels (Tom)
3369 Make <command>EXPLAIN</> honor <varname>debug_print_plan</> (Tom)
3375 Allow <command>EXPLAIN</> on <command>CREATE TABLE AS</> (Peter)
3384 <title><literal>LIMIT</>/<literal>OFFSET</></title>
3389 Allow sub-selects in <literal>LIMIT</> and <literal>OFFSET</> (Tom)
3395 Add <acronym>SQL</>-standard syntax for
3396 <literal>LIMIT</>/<literal>OFFSET</> capabilities (Peter)
3401 <literal>OFFSET num {ROW|ROWS} FETCH {FIRST|NEXT} [num] {ROW|ROWS}
3413 <title>Object Manipulation</title>
3418 Add support for column-level privileges (Stephen Frost, KaiGai
3425 Refactor multi-object <command>DROP</> operations to reduce the
3426 need for <literal>CASCADE</> (Alex Hunsaker)
3430 For example, if table <literal>B</> has a dependency on table
3431 <literal>A</>, the command <literal>DROP TABLE A, B</> no longer
3432 requires the <literal>CASCADE</> option.
3438 Fix various problems with concurrent <command>DROP</> commands
3439 by ensuring that locks are taken before we begin to drop dependencies
3446 Improve reporting of dependencies during <command>DROP</>
3453 Add <literal>WITH [NO] DATA</> clause to <command>CREATE TABLE
3454 AS</>, per the <acronym>SQL</> standard (Peter, Tom)
3460 Add support for user-defined I/O conversion casts (Heikki)
3466 Allow <command>CREATE AGGREGATE</> to use an <type>internal</>
3467 transition datatype (Tom)
3473 Add <literal>LIKE</> clause to <command>CREATE TYPE</> (Tom)
3477 This simplifies creation of data types that use the same internal
3478 representation as an existing type.
3484 Allow specification of the type category and <quote>preferred</>
3485 status for user-defined base types (Tom)
3489 This allows more control over the coercion behavior of user-defined
3496 Allow <command>CREATE OR REPLACE VIEW</> to add columns to the
3497 end of a view (Robert Haas)
3504 <title><command>ALTER</></title>
3509 Add <command>ALTER TYPE RENAME</> (Petr Jelinek)
3515 Add <command>ALTER SEQUENCE ... RESTART</> (with no parameter) to
3516 reset a sequence to its initial value (Zoltan Boszormenyi)
3522 Modify the <command>ALTER TABLE</> syntax to allow all reasonable
3523 combinations for tables, indexes, sequences, and views (Tom)
3527 This change allows the following new syntaxes:
3532 <command>ALTER SEQUENCE OWNER TO</>
3537 <command>ALTER VIEW ALTER COLUMN SET/DROP DEFAULT</>
3542 <command>ALTER VIEW OWNER TO</>
3547 <command>ALTER VIEW SET SCHEMA</>
3552 There is no actual new functionality here, but formerly
3553 you had to say <command>ALTER TABLE</> to do these things,
3554 which was confusing.
3560 Add support for the syntax <command>ALTER TABLE ... ALTER COLUMN
3561 ... SET DATA TYPE</> (Peter)
3565 This is <acronym>SQL</>-standard syntax for functionality that
3566 was already supported.
3572 Make <command>ALTER TABLE SET WITHOUT OIDS</> rewrite the table
3573 to physically remove <type>OID</> values (Tom)
3577 Also, add <command>ALTER TABLE SET WITH OIDS</> to rewrite the
3578 table to add <type>OID</>s.
3587 <title>Database Manipulation</title>
3592 Improve reporting of
3593 <command>CREATE</>/<command>DROP</>/<command>RENAME DATABASE</>
3594 failure when uncommitted prepared transactions are the cause
3601 Make <varname>LC_COLLATE</> and <varname>LC_CTYPE</> into
3602 per-database settings (Radek Strnad, Heikki)
3606 This makes collation similar to encoding, which was always
3607 configurable per database.
3613 Improve checks that the database encoding, collation
3614 (<varname>LC_COLLATE</>), and character classes
3615 (<varname>LC_CTYPE</>) match (Heikki, Tom)
3619 Note in particular that a new database's encoding and locale
3620 settings can be changed only when copying from <literal>template0</>.
3621 This prevents possibly copying data that doesn't match the settings.
3627 Add <command>ALTER DATABASE SET TABLESPACE</> to move a database
3628 to a new tablespace (Guillaume Lelarge, Bernd Helmle)
3639 <title>Utility Operations</title>
3645 Add a <literal>VERBOSE</> option to the <command>CLUSTER</> command and
3646 <application>clusterdb</> (Jim Cox)
3652 Decrease memory requirements for recording pending trigger
3660 <title>Indexes</title>
3665 Dramatically improve the speed of building and accessing hash
3666 indexes (Tom Raney, Shreya Bhargava)
3670 This allows hash indexes to be sometimes faster than btree
3671 indexes. However, hash indexes are still not crash-safe.
3677 Make hash indexes store only the hash code, not the full value of
3678 the indexed column (Xiao Meng)
3682 This greatly reduces the size of hash indexes for long indexed
3683 values, improving performance.
3689 Implement fast update option for GIN indexes (Teodor, Oleg)
3693 This option greatly improves update speed at a small penalty in search
3700 <literal>xxx_pattern_ops</> indexes can now be used for simple
3701 equality comparisons, not only for <literal>LIKE</> (Tom)
3710 <title>Full Text Indexes</title>
3715 Remove the requirement to use <literal>@@@</> when doing
3716 <acronym>GIN</> weighted lookups on full text indexes (Tom, Teodor)
3720 The normal <literal>@@</> text search operator can be used
3727 Add an optimizer selectivity function for <literal>@@</> text
3728 search operations (Jan Urbanski)
3734 Allow prefix matching in full text searches (Teodor Sigaev,
3741 Support multi-column <acronym>GIN</> indexes (Teodor Sigaev)
3747 Improve support for Nepali language and Devanagari alphabet (Teodor)
3756 <title><command>VACUUM</></title>
3761 Track free space in separate per-relation <quote>fork</> files (Heikki)
3765 Free space discovered by <command>VACUUM</> is now recorded in
3766 <filename>*_fsm</> files, rather than in a fixed-sized shared memory
3767 area. The <varname>max_fsm_pages</> and <varname>max_fsm_relations</>
3768 settings have been removed, greatly simplifying administration of
3769 free space management.
3775 Add a visibility map to track pages that do not require
3780 This allows <command>VACUUM</> to avoid scanning all of
3781 a table when only a portion of the table needs vacuuming.
3782 The visibility map is stored in per-relation <quote>fork</> files.
3788 Add <varname>vacuum_freeze_table_age</> parameter to control
3789 when <command>VACUUM</> should ignore the visibility map and
3790 do a full table scan to freeze tuples (Heikki)
3796 Track transaction snapshots more carefully (Alvaro)
3800 This improves <command>VACUUM</>'s ability to reclaim space
3801 in the presence of long-running transactions.
3807 Add ability to specify per-relation autovacuum and <acronym>TOAST</>
3808 parameters in <command>CREATE TABLE</> (Alvaro, Euler Taveira de
3813 Autovacuum options used to be stored in a system table.
3819 Add <literal>--freeze</> option to <application>vacuumdb</>
3831 <title>Data Types</title>
3836 Add a <literal>CaseSensitive</> option for text search synonym
3837 dictionaries (Simon)
3843 Improve the precision of <type>NUMERIC</> division (Tom)
3849 Add basic arithmetic operators for <type>int2</> with <type>int8</>
3854 This eliminates the need for explicit casting in some situations.
3860 Allow <type>UUID</> input to accept an optional hyphen after
3861 every fourth digit (Robert Haas)
3867 Allow <literal>on</>/<literal>off</> as input for the boolean data type
3874 Allow spaces around <literal>NaN</> in the input string for
3875 type <type>numeric</> (Sam Mason)
3882 <title>Temporal Data Types</title>
3887 Reject year <literal>0 BC</> and years <literal>000</> and
3888 <literal>0000</> (Tom)
3892 Previously these were interpreted as <literal>1 BC</>.
3893 (Note: years <literal>0</> and <literal>00</> are still assumed to be
3900 Include <literal>SGT</> (Singapore time) in the default list of
3901 known time zone abbreviations (Tom)
3907 Support <literal>infinity</> and <literal>-infinity</> as
3908 values of type <type>date</> (Tom)
3914 Make parsing of <type>interval</> literals more standard-compliant
3919 For example, <literal>INTERVAL '1' YEAR</> now does what it's
3926 Allow <type>interval</> fractional-seconds precision to be specified
3927 after the <literal>second</> keyword, for <acronym>SQL</> standard
3932 Formerly the precision had to be specified after the keyword
3933 <type>interval</>. (For backwards compatibility, this syntax is still
3934 supported, though deprecated.) Data type definitions will now be
3935 output using the standard format.
3941 Support the <acronym>IS0 8601</> <type>interval</> syntax (Ron
3942 Mayer, Kevin Grittner)
3946 For example, <literal>INTERVAL 'P1Y2M3DT4H5M6.7S'</> is now
3953 Add <varname>IntervalStyle</> parameter
3954 which controls how <type>interval</> values are output (Ron Mayer)
3958 Valid values are: <literal>postgres</>, <literal>postgres_verbose</>,
3959 <literal>sql_standard</>, <literal>iso_8601</>. This setting also
3960 controls the handling of negative <type>interval</> input when only
3961 some fields have positive/negative designations.
3967 Improve consistency of handling of fractional seconds in
3968 <type>timestamp</> and <type>interval</> output (Ron Mayer)
3977 <title>Arrays</title>
3982 Improve the handling of casts applied to <literal>ARRAY[]</>
3983 constructs, such as <literal>ARRAY[...]::integer[]</>
3988 Formerly <productname>PostgreSQL</> attempted to determine a data type
3989 for the <literal>ARRAY[]</> construct without reference to the ensuing
3990 cast. This could fail unnecessarily in many cases, in particular when
3991 the <literal>ARRAY[]</> construct was empty or contained only
3992 ambiguous entries such as <literal>NULL</>. Now the cast is consulted
3993 to determine the type that the array elements must be.
3999 Make <acronym>SQL</>-syntax <type>ARRAY</> dimensions optional
4000 to match the <acronym>SQL</> standard (Peter)
4006 Add <function>array_ndims()</> to return the number
4007 of dimensions of an array (Robert Haas)
4013 Add <function>array_length()</> to return the length
4014 of an array for a specified dimension (Jim Nasby, Robert
4015 Haas, Peter Eisentraut)
4021 Add aggregate function <function>array_agg()</>, which
4022 returns all aggregated values as a single array (Robert Haas,
4029 Add <function>unnest()</>, which converts an array to
4030 individual row values (Tom)
4034 This is the opposite of <function>array_agg()</>.
4040 Add <function>array_fill()</> to create arrays initialized with
4041 a value (Pavel Stehule)
4047 Add <function>generate_subscripts()</> to simplify generating
4048 the range of an array's subscripts (Pavel Stehule)
4057 <title>Wide-Value Storage (<acronym>TOAST</>)</title>
4062 Consider <acronym>TOAST</> compression on values as short as
4063 32 bytes (previously 256 bytes) (Greg Stark)
4069 Require 25% minimum space savings before using <acronym>TOAST</>
4070 compression (previously 20% for small values and any-savings-at-all
4071 for large values) (Greg)
4077 Improve <acronym>TOAST</> heuristics for rows that have a mix of large
4078 and small toastable fields, so that we prefer to push large values out
4079 of line and don't compress small values unnecessarily (Greg, Tom)
4090 <title>Functions</title>
4095 Document that <function>setseed()</> allows values from
4096 <literal>-1</> to <literal>1</> (not just <literal>0</> to
4097 <literal>1</>), and enforce the valid range (Kris Jurka)
4103 Add server-side function <function>lo_import(filename, oid)</>
4110 Add <function>quote_nullable()</>, which behaves like
4111 <function>quote_literal()</> but returns the string <literal>NULL</> for
4112 a null argument (Brendan Jurd)
4118 Improve full text search <function>headline()</> function to
4119 allow extracting several fragments of text (Sushant Sinha)
4125 Add <function>suppress_redundant_updates_trigger()</> trigger
4126 function to avoid overhead for non-data-changing updates (Andrew)
4132 Add <function>div(numeric, numeric)</> to perform <type>numeric</>
4133 division without rounding (Tom)
4139 Add <type>timestamp</> and <type>timestamptz</> versions of
4140 <function>generate_series()</> (Hitoshi Harada)
4147 <title>Object Information Functions</title>
4152 Implement <function>current_query()</> for use by functions
4153 that need to know the currently running query (Tomas Doran)
4159 Add <function>pg_get_keywords()</> to return a list of the
4160 parser keywords (Dave Page)
4166 Add <function>pg_get_functiondef()</> to see a function's
4167 definition (Abhijit Menon-Sen)
4173 Allow the second argument of <function>pg_get_expr()</> to be zero
4174 when deparsing an expression that does not contain variables (Tom)
4180 Modify <function>pg_relation_size()</> to use <literal>regclass</>
4185 <function>pg_relation_size(data_type_name)</> no longer works.
4191 Add <literal>boot_val</> and <literal>reset_val</> columns to
4192 <literal>pg_settings</> output (Greg Smith)
4198 Add source file name and line number columns to
4199 <literal>pg_settings</> output for variables set in a configuration
4200 file (Magnus, Alvaro)
4204 For security reasons, these columns are only visible to superusers.
4210 Add support for <varname>CURRENT_CATALOG</>,
4211 <varname>CURRENT_SCHEMA</>, <varname>SET CATALOG</>, <varname>SET
4216 These provide <acronym>SQL</>-standard syntax for existing features.
4222 Add <function>pg_typeof()</> which returns the data type
4223 of any value (Brendan Jurd)
4229 Make <function>version()</> return information about whether
4230 the server is a 32- or 64-bit binary (Bruce)
4236 Fix the behavior of information schema columns
4237 <structfield>is_insertable_into</> and <structfield>is_updatable</> to
4238 be consistent (Peter)
4244 Improve the behavior of information schema
4245 <structfield>datetime_precision</> columns (Peter)
4249 These columns now show zero for <type>date</> columns, and 6
4250 (the default precision) for <type>time</>, <type>timestamp</>, and
4251 <type>interval</> without a declared precision, rather than showing
4258 Convert remaining builtin set-returning functions to use
4259 <literal>OUT</> parameters (Jaime Casanova)
4263 This makes it possible to call these functions without specifying
4264 a column list: <function>pg_show_all_settings()</>,
4265 <function>pg_lock_status()</>, <function>pg_prepared_xact()</>,
4266 <function>pg_prepared_statement()</>, <function>pg_cursor()</>
4272 Make <function>pg_*_is_visible()</> and
4273 <function>has_*_privilege()</> functions return <literal>NULL</>
4274 for invalid OIDs, rather than reporting an error (Tom)
4280 Extend <function>has_*_privilege()</> functions to allow inquiring
4281 about the OR of multiple privileges in one call (Stephen
4288 Add <function>has_column_privilege()</> and
4289 <function>has_any_column_privilege()</> functions (Stephen
4299 <title>Function Creation</title>
4304 Support variadic functions (functions with a variable number
4305 of arguments) (Pavel Stehule)
4309 Only trailing arguments can be optional, and they all must be
4310 of the same data type.
4316 Support default values for function arguments (Pavel Stehule)
4322 Add <command>CREATE FUNCTION ... RETURNS TABLE</> clause (Pavel
4329 Allow <acronym>SQL</>-language functions to return the output
4330 of an <command>INSERT</>/<command>UPDATE</>/<command>DELETE</>
4331 <literal>RETURNING</> clause (Tom)
4340 <title>PL/pgSQL Server-Side Language</title>
4345 Support <literal>EXECUTE USING</> for easier insertion of data
4346 values into a dynamic query string (Pavel Stehule)
4352 Allow looping over the results of a cursor using a <literal>FOR</>
4353 loop (Pavel Stehule)
4359 Support <literal>RETURN QUERY EXECUTE</> (Pavel
4366 Improve the <literal>RAISE</> command (Pavel Stehule)
4371 Support <literal>DETAIL</> and <literal>HINT</> fields
4376 Support specification of the <literal>SQLSTATE</> error code
4381 Support an exception name parameter
4386 Allow <literal>RAISE</> without parameters in an exception
4387 block to re-throw the current error
4396 Allow specification of <varname>SQLSTATE</> codes
4397 in <literal>EXCEPTION</> lists (Pavel Stehule)
4401 This is useful for handling custom <varname>SQLSTATE</> codes.
4407 Support the <literal>CASE</> statement (Pavel Stehule)
4413 Make <command>RETURN QUERY</> set the special <literal>FOUND</> and
4414 <command>GET DIAGNOSTICS</> <literal>ROW_COUNT</> variables
4421 Make <command>FETCH</> and <command>MOVE</> set the
4422 <command>GET DIAGNOSTICS</> <literal>ROW_COUNT</> variable
4429 Make <command>EXIT</> without a label always exit the innermost
4434 Formerly, if there were a <literal>BEGIN</> block more closely nested
4435 than any loop, it would exit that block instead. The new behavior
4436 matches Oracle(TM) and is also what was previously stated by our own
4443 Make processing of string literals and nested block comments
4444 match the main SQL parser's processing (Tom)
4448 In particular, the format string in <command>RAISE</> now works
4449 the same as any other string literal, including being subject
4450 to <varname>standard_conforming_strings</>. This change also
4451 fixes other cases in which valid commands would fail when
4452 <varname>standard_conforming_strings</> is on.
4458 Avoid memory leakage when the same function is called at varying
4459 exception-block nesting depths (Tom)
4470 <title>Client Applications</title>
4476 Fix <literal>pg_ctl restart</> to preserve command-line arguments
4483 Add <literal>-w</>/<literal>--no-password</> option that
4484 prevents password prompting in all utilities that have a
4485 <literal>-W</>/<literal>--password</> option (Peter)
4491 Remove <option>-q</> (quiet) option of <application>createdb</>,
4492 <application>createuser</>, <application>dropdb</>,
4493 <application>dropuser</> (Peter)
4497 These options have had no effect since <productname>PostgreSQL</>
4505 <title><application>psql</></title>
4510 Remove verbose startup banner; now just suggest <literal>help</>
4517 Make <literal>help</> show common backslash commands (Greg
4524 Add <literal>\pset format wrapped</> mode to wrap output to the
4525 screen width, or file/pipe output too if <literal>\pset columns</>
4526 is set (Bryce Nesbitt)
4532 Allow all supported spellings of boolean values in <command>\pset</>,
4533 rather than just <literal>on</> and <literal>off</> (Bruce)
4537 Formerly, any string other than <quote>off</> was silently taken
4538 to mean <literal>true</>. <application>psql</> will now complain
4539 about unrecognized spellings (but still take them as <literal>true</>).
4545 Use the pager for wide output (Bruce)
4551 Require a space between a one-letter backslash command and its first
4552 argument (Bernd Helmle)
4556 This removes a historical source of ambiguity.
4562 Improve tab completion support for schema-qualified and
4563 quoted identifiers (Greg Sabino Mullane)
4569 Add optional <literal>on</>/<literal>off</> argument for
4570 <command>\timing</> (David Fetter)
4576 Display access control rights on multiple lines (Brendan
4577 Jurd, Andreas Scherbaum)
4583 Make <command>\l</> show database access privileges (Andrew Gilligan)
4589 Make <command>\l+</> show database sizes, if permissions
4590 allow (Andrew Gilligan)
4596 Add the <command>\ef</> command to edit function definitions
4606 <title><application>psql</> \d* commands</title>
4612 Make <command>\d*</> commands that do not have a pattern argument
4613 show system objects only if the <literal>S</> modifier is specified
4614 (Greg Sabino Mullane, Bruce)
4618 The former behavior was inconsistent across different variants
4619 of <command>\d</>, and in most cases it provided no easy way to see
4626 Improve <command>\d*</> commands to work with older
4627 <productname>PostgreSQL</> server versions (back to 7.4),
4628 not only the current server version
4635 Make <command>\d</> show foreign-key constraints that reference
4636 the selected table (Kenneth D'Souza)
4642 Make <command>\d</> on a sequence show its column values
4643 (Euler Taveira de Oliveira)
4649 Add column storage type and other relation options to the
4650 <command>\d+</> display (Gregory Stark, Euler Taveira de
4657 Show relation size in <command>\dt+</> output (Dickson S.
4664 Show the possible values of <literal>enum</> types in <command>\dT+</>
4671 Allow <command>\dC</> to accept a wildcard pattern, which matches
4672 either datatype involved in the cast (Tom)
4678 Add a function type column to <command>\df</>'s output, and add
4679 options to list only selected types of functions (David Fetter)
4685 Make <command>\df</> not hide functions that take or return
4686 type <type>cstring</> (Tom)
4690 Previously, such functions were hidden because most of them are
4691 datatype I/O functions, which were deemed uninteresting. The new
4692 policy about hiding system functions by default makes this wart
4702 <title><application>pg_dump</></title>
4707 Add a <literal>--no-tablespaces</> option to
4708 <application>pg_dump</>/<application>pg_dumpall</>/<application>pg_restore</>
4709 so that dumps can be restored to clusters that have non-matching
4710 tablespace layouts (Gavin Roy)
4716 Remove <option>-d</> and <option>-D</> options from
4717 <application>pg_dump</> and <application>pg_dumpall</> (Tom)
4721 These options were too frequently confused with the option to
4722 select a database name in other <productname>PostgreSQL</>
4723 client applications. The functionality is still available,
4724 but you must now spell out the long option name
4725 <option>--inserts</> or <option>--column-inserts</>.
4731 Remove <option>-i</>/<option>--ignore-version</> option from
4732 <application>pg_dump</> and <application>pg_dumpall</> (Tom)
4736 Use of this option does not throw an error, but it has no
4737 effect. This option was removed because the version checks
4738 are necessary for safety.
4744 Disable <varname>statement_timeout</> during dump and restore
4751 Add <application>pg_dump</>/<application>pg_dumpall</> option
4752 <option>--lock-wait-timeout</> (David Gould)
4756 This allows dumps to fail if unable to acquire a shared lock
4757 within the specified amount of time.
4763 Reorder <application>pg_dump</> <literal>--data-only</> output
4764 to dump tables referenced by foreign keys before
4765 the referencing tables (Tom)
4769 This allows data loads when foreign keys are already present.
4770 If circular references make a safe ordering impossible, a
4771 <literal>NOTICE</> is issued.
4777 Allow <application>pg_dump</>, <application>pg_dumpall</>, and
4778 <application>pg_restore</> to use a specified role (Benedek
4785 Allow <application>pg_restore</> to use multiple concurrent
4786 connections to do the restore (Andrew)
4790 The number of concurrent connections is controlled by the option
4791 <literal>--jobs</>. This is supported only for custom-format archives.
4802 <title>Programming Tools</title>
4805 <title><application>libpq</></title>
4810 Allow the <type>OID</> to be specified when importing a large
4811 object, via new function <function>lo_import_with_oid()</> (Tatsuo)
4817 Add <quote>events</> support (Andrew Chernow, Merlin Moncure)
4821 This adds the ability to register callbacks to manage private
4822 data associated with <structname>PGconn</> and <structname>PGresult</>
4829 Improve error handling to allow the return of multiple
4830 error messages as multi-line error reports (Magnus)
4836 Make <function>PQexecParams()</> and related functions return
4837 <varname>PGRES_EMPTY_QUERY</> for an empty query (Tom)
4841 They previously returned <varname>PGRES_COMMAND_OK</>.
4847 Document how to avoid the overhead of <function>WSACleanup()</>
4848 on Windows (Andrew Chernow)
4854 Do not rely on Kerberos tickets to determine the default database
4859 Previously, a Kerberos-capable build of libpq would use the
4860 principal name from any available Kerberos ticket as default
4861 database username, even if the connection wasn't using Kerberos
4862 authentication. This was deemed inconsistent and confusing.
4863 The default username is now determined the same way with or
4864 without Kerberos. Note however that the database username must still
4865 match the ticket when Kerberos authentication is used.
4873 <title><application>libpq</> <acronym>SSL</> (Secure Sockets Layer)
4879 Fix certificate validation for <acronym>SSL</> connections
4884 <application>libpq</> now supports verifying both the certificate
4885 and the name of the server when making <acronym>SSL</>
4886 connections. If a root certificate is not available to use for
4887 verification, <acronym>SSL</> connections will fail. The
4888 <literal>sslmode</> parameter is used to enable certificate
4889 verification and set the level of checking.
4890 The default is still not to do any verification, allowing connections
4891 to SSL-enabled servers without requiring a root certificate on the
4898 Support wildcard server certificates (Magnus)
4902 If a certificate <acronym>CN</> starts with <literal>*</>, it will
4903 be treated as a wildcard when matching the hostname, allowing the
4904 use of the same certificate for multiple servers.
4910 Allow the file locations for client certificates to be specified
4911 (Mark Woodward, Alvaro, Magnus)
4917 Add a <function>PQinitOpenSSL</> function to allow greater control
4918 over OpenSSL/libcrypto initialization (Andrew Chernow)
4924 Make <application>libpq</> unregister its <application>OpenSSL</>
4925 callbacks when no database connections remain open
4926 (Bruce, Magnus, Russell Smith)
4930 This is required for applications that unload the libpq library,
4931 otherwise invalid <application>OpenSSL</> callbacks will remain.
4940 <title><application>ecpg</></title>
4945 Add localization support for messages (Euler Taveira de
4952 ecpg parser is now automatically generated from the server
4957 Previously the ecpg parser was hand-maintained.
4966 <title>Server Programming Interface (<acronym>SPI</>)</title>
4971 Add support for single-use plans with out-of-line
4978 Add new <varname>SPI_OK_REWRITTEN</> return code for
4979 <function>SPI_execute()</> (Heikki)
4983 This is used when a command is rewritten to another type of
4990 Remove unnecessary inclusions from <filename>executor/spi.h</> (Tom)
4994 SPI-using modules might need to add some <literal>#include</>
4995 lines if they were depending on <filename>spi.h</> to include
5007 <title>Build Options</title>
5012 Update build system to use <productname>Autoconf</> 2.61 (Peter)
5018 Require <productname>GNU bison</> for source code builds (Peter)
5022 This has effectively been required for several years, but now there
5023 is no infrastructure claiming to support other parser tools.
5029 Add <application>pg_config</> <literal>--htmldir</> option
5036 Pass <type>float4</> by value inside the server (Zoltan
5041 Add <application>configure</> option
5042 <literal>--disable-float4-byval</> to use the old behavior.
5043 External C functions that use old-style (version 0) call convention
5044 and pass or return <type>float4</> values will be broken by this
5045 change, so you may need the <application>configure</> option if you
5046 have such functions and don't want to update them.
5052 Pass <type>float8</>, <type>int8</>, and related datatypes
5053 by value inside the server on 64-bit platforms (Zoltan Boszormenyi)
5057 Add <application>configure</> option
5058 <literal>--disable-float8-byval</> to use the old behavior.
5059 As above, this change might break old-style external C functions.
5065 Add configure options <literal>--with-segsize</>,
5066 <literal>--with-blocksize</>, <literal>--with-wal-blocksize</>,
5067 <literal>--with-wal-segsize</> (Zdenek Kotala, Tom)
5071 This simplifies build-time control over several constants that
5072 previously could only be changed by editing
5073 <filename>pg_config_manual.h</>.
5079 Allow threaded builds on <productname>Solaris</> 2.5 (Bruce)
5085 Use the system's <function>getopt_long()</> on <productname>Solaris</>
5086 (Zdenek Kotala, Tom)
5090 This makes option processing more consistent with what Solaris users
5097 Add support for the <productname>Sun Studio</> compiler on
5098 <productname>Linux</> (Julius Stroffek)
5104 Append the major version number to the backend <application>gettext</>
5105 domain, and the <literal>soname</> major version number to
5106 libraries' <application>gettext</> domain (Peter)
5110 This simplifies parallel installations of multiple versions.
5116 Add support for code coverage testing with <application>gcov</>
5123 Allow out-of-tree builds on <productname>Mingw</> and
5124 <productname>Cygwin</> (Richard Evans)
5130 Fix the use of <productname>Mingw</> as a cross-compiling source
5140 <title>Source Code</title>
5145 Support 64-bit time zone data files (Heikki)
5149 This adds support for daylight saving time (<acronym>DST</>)
5150 calculations beyond the year 2038.
5156 Deprecate use of platform's <type>time_t</> data type (Tom)
5160 Some platforms have migrated to 64-bit <type>time_t</>, some have
5161 not, and Windows can't make up its mind what it's doing. Define
5162 <type>pg_time_t</> to have the same meaning as <type>time_t</>,
5163 but always be 64 bits (unless the platform has no 64-bit integer type),
5164 and use that type in all module APIs and on-disk data formats.
5170 Fix bug in handling of the time zone database when cross-compiling
5177 Link backend object files in one step, rather than in stages
5184 Improve <application>gettext</> support to allow better translation
5191 Add message translation support to the PL languages (Alvaro, Peter)
5197 Add more <application>DTrace</> probes (Robert Lor)
5203 Enable <application>DTrace</> support on <application>Mac OS X
5204 Leopard</> and other non-Solaris platforms (Robert Lor)
5210 Simplify and standardize conversions between C strings and
5211 <type>text</> datums, by providing common functions for the purpose
5218 Clean up the <filename>include/catalog/</> header files so that
5219 frontend programs can include them without including
5220 <filename>postgres.h</>
5227 Make <type>name</> char-aligned, and suppress zero-padding of
5228 <type>name</> entries in indexes (Tom)
5234 Recover better if dynamically-loaded code executes <function>exit()</>
5241 Add a hook to let plug-ins monitor the executor (Itagaki
5248 Add a hook to allow the planner's statistics lookup behavior to
5249 be overridden (Simon Riggs)
5255 Add <function>shmem_startup_hook()</> for custom shared memory
5262 Replace the index access method <function>amgetmulti</> entry point
5263 with <function>amgetbitmap</>, and extend the API for
5264 <function>amgettuple</> to support run-time determination of
5265 operator lossiness (Heikki, Tom, Teodor)
5269 The API for GIN and GiST opclass <function>consistent</> functions
5270 has been extended as well.
5276 Add support for partial-match searches in <acronym>GIN</> indexes
5277 (Teodor Sigaev, Oleg Bartunov)
5283 Replace <structname>pg_class</> column <structfield>reltriggers</>
5284 with boolean <structfield>relhastriggers</> (Simon)
5288 Also remove unused <structname>pg_class</> columns
5289 <structfield>relukeys</>, <structfield>relfkeys</>, and
5290 <structfield>relrefs</>.
5296 Add a <structfield>relistemp</> column to <structname>pg_class</>
5297 to ease identification of temporary tables (Tom)
5303 Move platform <acronym>FAQ</>s into the main documentation
5310 Prevent parser input files from being built with any conflicts
5317 Add support for the <literal>KOI8U</> (Ukrainian) encoding
5324 Add Japanese message translations (Japan PostgreSQL Users Group)
5328 This used to be maintained as a separate project.
5334 Fix problem when setting <varname>LC_MESSAGES</> on
5335 <application>MSVC</>-built systems (Hiroshi Inoue, Hiroshi
5345 <title>Contrib</title>
5351 Add <filename>contrib/auto_explain</> to automatically run
5352 <command>EXPLAIN</> on queries exceeding a specified duration
5353 (Itagaki Takahiro, Tom)
5359 Add <filename>contrib/btree_gin</> to allow GIN indexes to
5360 handle more datatypes (Oleg, Teodor)
5366 Add <filename>contrib/citext</> to provide a case-insensitive,
5367 multibyte-aware text data type (David Wheeler)
5373 Add <filename>contrib/pg_stat_statements</> for server-wide
5374 tracking of statement execution statistics (Itagaki Takahiro)
5380 Add duration and query mode options to <filename>contrib/pgbench</>
5387 Make <filename>contrib/pgbench</> use table names
5388 <structname>pgbench_accounts</>, <structname>pgbench_branches</>,
5389 <structname>pgbench_history</>, and <structname>pgbench_tellers</>,
5390 rather than just <structname>accounts</>, <structname>branches</>,
5391 <structname>history</>, and <structname>tellers</> (Tom)
5395 This is to reduce the risk of accidentally destroying real data
5396 by running <application>pgbench</>.
5402 Fix <filename>contrib/pgstattuple</> to handle tables and
5403 indexes with over 2 billion pages (Tatsuhito Kasahara)
5409 In <filename>contrib/fuzzystrmatch</>, add a version of the
5410 Levenshtein string-distance function that allows the user to
5411 specify the costs of insertion, deletion, and substitution
5418 Make <filename>contrib/ltree</> support multibyte encodings
5425 Enable <filename>contrib/dblink</> to use connection information
5426 stored in the SQL/MED catalogs (Joe Conway)
5432 Improve <filename>contrib/dblink</>'s reporting of errors from
5433 the remote server (Joe Conway)
5439 Make <filename>contrib/dblink</> set <varname>client_encoding</>
5440 to match the local database's encoding (Joe Conway)
5444 This prevents encoding problems when communicating with a remote
5445 database that uses a different encoding.
5451 Make sure <filename>contrib/dblink</> uses a password supplied
5452 by the user, and not accidentally taken from the server's
5453 <filename>.pgpass</> file (Joe Conway)
5457 This is a minor security enhancement.
5463 Add <function>fsm_page_contents()</>
5464 to <filename>contrib/pageinspect</> (Heikki)
5470 Modify <function>get_raw_page()</> to support free space map
5471 (<filename>*_fsm</>) files. Also update
5472 <filename>contrib/pg_freespacemap</>.
5478 Add support for multibyte encodings to <filename>contrib/pg_trgm</>
5485 Rewrite <filename>contrib/intagg</> to use new
5486 functions <function>array_agg()</> and <function>unnest()</>
5493 Make <filename>contrib/pg_standby</> recover all available WAL before
5494 failover (Fujii Masao, Simon, Heikki)
5498 To make this work safely, you now need to set the new
5499 <literal>recovery_end_command</> option in <filename>recovery.conf</>
5500 to clean up the trigger file after failover. <application>pg_standby</>
5501 will no longer remove the trigger file itself.
5507 <filename>contrib/pg_standby</>'s <option>-l</> option is now a no-op,
5508 because it is unsafe to use a symlink (Simon)