1 <!-- $PostgreSQL: pgsql/doc/src/sgml/release-8.4.sgml,v 1.19 2010/05/13 21:26:59 tgl Exp $ -->
2 <!-- See header comment in release.sgml about typical markup -->
4 <sect1 id="release-8-4-4">
5 <title>Release 8.4.4</title>
8 <title>Release date</title>
9 <simpara>2010-05-17</simpara>
13 This release contains a variety of fixes from 8.4.3.
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.4</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 Enforce restrictions in <literal>plperl</> using an opmask applied to
37 the whole interpreter, instead of using <filename>Safe.pm</>
38 (Tim Bunce, Andrew Dunstan)
42 Recent developments have convinced us that <filename>Safe.pm</> is too
43 insecure to rely on for making <literal>plperl</> trustable. This
44 change removes use of <filename>Safe.pm</> altogether, in favor of using
45 a separate interpreter with an opcode mask that is always applied.
46 Pleasant side effects of the change include that it is now possible to
47 use Perl's <literal>strict</> pragma in a natural way in
48 <literal>plperl</>, and that Perl's <literal>$a</> and <literal>$b</>
49 variables work as expected in sort routines, and that function
50 compilation is significantly faster. (CVE-2010-1169)
56 Prevent PL/Tcl from executing untrustworthy code from
57 <structname>pltcl_modules</> (Tom)
61 PL/Tcl's feature for autoloading Tcl code from a database table
62 could be exploited for trojan-horse attacks, because there was no
63 restriction on who could create or insert into that table. This change
64 disables the feature unless <structname>pltcl_modules</> is owned by a
65 superuser. (However, the permissions on the table are not checked, so
66 installations that really need a less-than-secure modules table can
67 still grant suitable privileges to trusted non-superusers.) Also,
68 prevent loading code into the unrestricted <quote>normal</> Tcl
69 interpreter unless we are really going to execute a <literal>pltclu</>
70 function. (CVE-2010-1170)
76 Fix data corruption during WAL replay of
77 <literal>ALTER ... SET TABLESPACE</> (Tom)
81 When <varname>archive_mode</> is on, <literal>ALTER ... SET TABLESPACE</>
82 generates a WAL record whose replay logic was incorrect. It could write
83 the data to the wrong place, leading to possibly-unrecoverable data
84 corruption. Data corruption would be observed on standby slaves, and
85 could occur on the master as well if a database crash and recovery
86 occurred after committing the <literal>ALTER</> and before the next
93 Fix possible crash if a cache reset message is received during
94 rebuild of a relcache entry (Heikki)
98 This error was introduced in 8.4.3 while fixing a related failure.
104 Apply per-function GUC settings while running the language validator
105 for the function (Itagaki Takahiro)
109 This avoids failures if the function's code is invalid without the
110 setting; an example is that SQL functions may not parse if the
111 <varname>search_path</> is not correct.
117 Do constraint exclusion for inherited <command>UPDATE</> and
118 <command>DELETE</> target tables when
119 <varname>constraint_exclusion</> = <literal>partition</> (Tom)
123 Due to an oversight, this setting previously only caused constraint
124 exclusion to be checked in <command>SELECT</> commands.
130 Do not allow an unprivileged user to reset superuser-only parameter
135 Previously, if an unprivileged user ran <literal>ALTER USER ... RESET
136 ALL</> for himself, or <literal>ALTER DATABASE ... RESET ALL</> for
137 a database he owns, this would remove all special parameter settings
138 for the user or database, even ones that are only supposed to be
139 changeable by a superuser. Now, the <command>ALTER</> will only
140 remove the parameters that the user has permission to change.
146 Avoid possible crash during backend shutdown if shutdown occurs
147 when a <literal>CONTEXT</> addition would be made to log entries (Tom)
151 In some cases the context-printing function would fail because the
152 current transaction had already been rolled back when it came time
153 to print a log message.
159 Fix erroneous handling of <literal>%r</> parameter in
160 <varname>recovery_end_command</> (Heikki)
164 The value always came out zero.
170 Ensure the archiver process responds to changes in
171 <varname>archive_command</> as soon as possible (Tom)
177 Fix pl/pgsql's <literal>CASE</> statement to not fail when the
178 case expression is a query that returns no rows (Tom)
184 Update pl/perl's <filename>ppport.h</> for modern Perl versions
191 Fix assorted memory leaks in pl/python (Andreas Freund, Tom)
197 Handle empty-string connect parameters properly in ecpg (Michael)
203 Prevent infinite recursion in <application>psql</> when expanding
204 a variable that refers to itself (Tom)
210 Fix <application>psql</>'s <literal>\copy</> to not add spaces around
211 a dot within <literal>\copy (select ...)</> (Tom)
215 Addition of spaces around the decimal point in a numeric literal would
216 result in a syntax error.
222 Avoid formatting failure in <application>psql</> when running in a
223 locale context that doesn't match the <varname>client_encoding</>
230 Fix unnecessary <quote>GIN indexes do not support whole-index scans</>
231 errors for unsatisfiable queries using <filename>contrib/intarray</>
238 Ensure that <filename>contrib/pgstattuple</> functions respond to cancel
239 interrupts promptly (Tatsuhito Kasahara)
245 Make server startup deal properly with the case that
246 <function>shmget()</> returns <literal>EINVAL</> for an existing
247 shared memory segment (Tom)
251 This behavior has been observed on BSD-derived kernels including OS X.
252 It resulted in an entirely-misleading startup failure complaining that
253 the shared memory request size was too large.
259 Avoid possible crashes in syslogger process on Windows (Heikki)
265 Deal more robustly with incomplete time zone information in the
266 Windows registry (Magnus)
272 Update the set of known Windows time zone names (Magnus)
278 Update time zone data files to <application>tzdata</> release 2010j
279 for DST law changes in Argentina, Australian Antarctic, Bangladesh,
280 Mexico, Morocco, Pakistan, Palestine, Russia, Syria, Tunisia;
281 also historical corrections for Taiwan.
285 Also, add <literal>PKST</> (Pakistan Summer Time) to the default set of
286 timezone abbreviations.
295 <sect1 id="release-8-4-3">
296 <title>Release 8.4.3</title>
299 <title>Release date</title>
300 <simpara>2010-03-15</simpara>
304 This release contains a variety of fixes from 8.4.2.
305 For information about new features in the 8.4 major release, see
306 <xref linkend="release-8-4">.
310 <title>Migration to Version 8.4.3</title>
313 A dump/restore is not required for those running 8.4.X.
314 However, if you are upgrading from a version earlier than 8.4.2,
315 see the release notes for 8.4.2.
321 <title>Changes</title>
327 Add new configuration parameter <varname>ssl_renegotiation_limit</> to
328 control how often we do session key renegotiation for an SSL connection
333 This can be set to zero to disable renegotiation completely, which may
334 be required if a broken SSL library is used. In particular, some
335 vendors are shipping stopgap patches for CVE-2009-3555 that cause
336 renegotiation attempts to fail.
342 Fix possible deadlock during backend startup (Tom)
348 Fix possible crashes due to not handling errors during relcache reload
355 Fix possible crash due to use of dangling pointer to a cached plan
362 Fix possible crash due to overenthusiastic invalidation of cached
363 plan for <command>ROLLBACK</> (Tom)
369 Fix possible crashes when trying to recover from a failure in
370 subtransaction start (Tom)
376 Fix server memory leak associated with use of savepoints and a client
377 encoding different from server's encoding (Tom)
383 Fix incorrect WAL data emitted during end-of-recovery cleanup of a GIST
384 index page split (Yoichi Hirai)
388 This would result in index corruption, or even more likely an error
389 during WAL replay, if we were unlucky enough to crash during
390 end-of-recovery cleanup after having completed an incomplete GIST
397 Fix bug in WAL redo cleanup method for GIN indexes (Heikki)
403 Fix incorrect comparison of scan key in GIN index search (Teodor)
409 Make <function>substring()</> for <type>bit</> types treat any negative
410 length as meaning <quote>all the rest of the string</> (Tom)
414 The previous coding treated only -1 that way, and would produce an
415 invalid result value for other negative values, possibly leading to
416 a crash (CVE-2010-0442).
422 Fix integer-to-bit-string conversions to handle the first fractional
423 byte correctly when the output bit width is wider than the given
424 integer by something other than a multiple of 8 bits (Tom)
430 Fix some cases of pathologically slow regular expression matching (Tom)
436 Fix bug occurring when trying to inline a SQL function that returns
437 a set of a composite type that contains dropped columns (Tom)
443 Fix bug with trying to update a field of an element of a
444 composite-type array column (Tom)
450 Avoid failure when <command>EXPLAIN</> has to print a FieldStore or
451 assignment ArrayRef expression (Tom)
455 These cases can arise now that <command>EXPLAIN VERBOSE</> tries to
456 print plan node target lists.
462 Avoid an unnecessary coercion failure in some cases where an undecorated
463 literal string appears in a subquery within
464 <command>UNION</>/<command>INTERSECT</>/<command>EXCEPT</> (Tom)
468 This fixes a regression for some cases that worked before 8.4.
474 Avoid undesirable rowtype compatibility check failures in some cases
475 where a whole-row Var has a rowtype that contains dropped columns (Tom)
481 Fix the <literal>STOP WAL LOCATION</> entry in backup history files to
482 report the next WAL segment's name when the end location is exactly at a
483 segment boundary (Itagaki Takahiro)
489 Always pass the catalog ID to an option validator function specified in
490 <command>CREATE FOREIGN DATA WRAPPER</> (Martin Pihlak)
496 Fix some more cases of temporary-file leakage (Heikki)
500 This corrects a problem introduced in the previous minor release.
501 One case that failed is when a plpgsql function returning set is
502 called within another function's exception handler.
508 Add support for doing <literal>FULL JOIN ON FALSE</> (Tom)
512 This prevents a regression from pre-8.4 releases for some queries that
513 can now be simplified to a constant-false join condition.
519 Improve constraint exclusion processing of boolean-variable cases,
520 in particular make it possible to exclude a partition that has a
521 <quote>bool_column = false</> constraint (Tom)
527 Prevent treating an <literal>INOUT</> cast as representing binary
528 compatibility (Heikki)
534 Include column name in the message when warning about inability to
535 grant or revoke column-level privileges (Stephen Frost)
539 This is more useful than before and helps to prevent confusion when
540 a <command>REVOKE</> generates multiple messages, which formerly
541 appeared to be duplicates.
547 When reading <filename>pg_hba.conf</> and related files, do not treat
548 <literal>@something</> as a file inclusion request if the <literal>@</>
549 appears inside quote marks; also, never treat <literal>@</> by itself
550 as a file inclusion request (Tom)
554 This prevents erratic behavior if a role or database name starts with
555 <literal>@</>. If you need to include a file whose path name
556 contains spaces, you can still do so, but you must write
557 <literal>@"/path to/file"</> rather than putting the quotes around
564 Prevent infinite loop on some platforms if a directory is named as
565 an inclusion target in <filename>pg_hba.conf</> and related files
572 Fix possible infinite loop if <function>SSL_read</> or
573 <function>SSL_write</> fails without setting <varname>errno</> (Tom)
577 This is reportedly possible with some Windows versions of
578 <application>openssl</>.
584 Disallow <acronym>GSSAPI</> authentication on local connections,
585 since it requires a hostname to function correctly (Magnus)
591 Protect <application>ecpg</> against applications freeing strings
592 unexpectedly (Michael)
598 Make <application>ecpg</> report the proper SQLSTATE if the connection
605 Fix translation of cell contents in <application>psql</> <literal>\d</>
612 Fix <application>psql</>'s <literal>numericlocale</> option to not
613 format strings it shouldn't in latex and troff output formats (Heikki)
619 Fix a small per-query memory leak in <application>psql</> (Tom)
625 Make <application>psql</> return the correct exit status (3) when
626 <literal>ON_ERROR_STOP</> and <literal>--single-transaction</> are
627 both specified and an error occurs during the implied <command>COMMIT</>
634 Fix <application>pg_dump</>'s output of permissions for foreign servers
641 Fix possible crash in parallel <application>pg_restore</> due to
642 out-of-range dependency IDs (Tom)
648 Fix plpgsql failure in one case where a composite column is set to NULL
655 Fix possible failure when calling PL/Perl functions from PL/PerlU
656 or vice versa (Tim Bunce)
662 Add <literal>volatile</> markings in PL/Python to avoid possible
663 compiler-specific misbehavior (Zdenek Kotala)
669 Ensure PL/Tcl initializes the Tcl interpreter fully (Tom)
673 The only known symptom of this oversight is that the Tcl
674 <literal>clock</> command misbehaves if using Tcl 8.5 or later.
680 Prevent <function>ExecutorEnd</> from being run on portals created
681 within a failed transaction or subtransaction (Tom)
685 This is known to cause issues when using
686 <filename>contrib/auto_explain</>.
692 Prevent crash in <filename>contrib/dblink</> when too many key
693 columns are specified to a <function>dblink_build_sql_*</> function
694 (Rushabh Lathia, Joe Conway)
700 Allow zero-dimensional arrays in <filename>contrib/ltree</> operations
705 This case was formerly rejected as an error, but it's more convenient to
706 treat it the same as a zero-element array. In particular this avoids
707 unnecessary failures when an <type>ltree</> operation is applied to the
708 result of <literal>ARRAY(SELECT ...)</> and the sub-select returns no
715 Fix assorted crashes in <filename>contrib/xml2</> caused by sloppy
716 memory management (Tom)
722 Make building of <filename>contrib/xml2</> more robust on Windows
729 Fix race condition in Windows signal handling (Radu Ilie)
733 One known symptom of this bug is that rows in <structname>pg_listener</>
734 could be dropped under heavy load.
740 Make the configure script report failure if the C compiler does
741 not provide a working 64-bit integer datatype (Tom)
745 This case has been broken for some time, and no longer seems worth
746 supporting, so just reject it at configure time instead.
752 Update time zone data files to <application>tzdata</> release 2010e
753 for DST law changes in Bangladesh, Chile, Fiji, Mexico, Paraguay, Samoa.
762 <sect1 id="release-8-4-2">
763 <title>Release 8.4.2</title>
766 <title>Release date</title>
767 <simpara>2009-12-14</simpara>
771 This release contains a variety of fixes from 8.4.1.
772 For information about new features in the 8.4 major release, see
773 <xref linkend="release-8-4">.
777 <title>Migration to Version 8.4.2</title>
780 A dump/restore is not required for those running 8.4.X.
781 However, if you have any hash indexes,
782 you should <command>REINDEX</> them after updating to 8.4.2,
783 to repair possible damage.
789 <title>Changes</title>
795 Protect against indirect security threats caused by index functions
796 changing session-local state (Gurjeet Singh, Tom)
800 This change prevents allegedly-immutable index functions from possibly
801 subverting a superuser's session (CVE-2009-4136).
807 Reject SSL certificates containing an embedded null byte in the common
808 name (CN) field (Magnus)
812 This prevents unintended matching of a certificate to a server or client
813 name during SSL validation (CVE-2009-4034).
819 Fix hash index corruption (Tom)
823 The 8.4 change that made hash indexes keep entries sorted by hash value
824 failed to update the bucket splitting and compaction routines to
825 preserve the ordering. So application of either of those operations
826 could lead to permanent corruption of an index, in the sense that
827 searches might fail to find entries that are present. To deal with
828 this, it is recommended to <literal>REINDEX</> any hash indexes you may
829 have after installing this update.
835 Fix possible crash during backend-startup-time cache initialization (Tom)
841 Avoid crash on empty thesaurus dictionary (Tom)
847 Prevent signals from interrupting <literal>VACUUM</> at unsafe times
852 This fix prevents a PANIC if a <literal>VACUUM FULL</> is cancelled
853 after it's already committed its tuple movements, as well as transient
854 errors if a plain <literal>VACUUM</> is interrupted after having
861 Fix possible crash due to integer overflow in hash table size
866 This could occur with extremely large planner estimates for the size of
873 Fix crash if a <literal>DROP</> is attempted on an internally-dependent
880 Fix very rare crash in <type>inet</>/<type>cidr</> comparisons (Chris
887 Ensure that shared tuple-level locks held by prepared transactions are
894 Fix premature drop of temporary files used for a cursor that is accessed
895 within a subtransaction (Heikki)
901 Fix memory leak in syslogger process when rotating to a new CSV logfile
908 Fix memory leak in postmaster when re-parsing <filename>pg_hba.conf</>
915 Fix Windows permission-downgrade logic (Jesse Morris)
919 This fixes some cases where the database failed to start on Windows,
920 often with misleading error messages such as <quote>could not locate
921 matching postgres executable</quote>.
927 Make <literal>FOR UPDATE/SHARE</> in the primary query not propagate
928 into <literal>WITH</> queries (Tom)
934 WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE
936 the <literal>FOR UPDATE</> will now affect <literal>bar</> but not
937 <literal>foo</>. This is more useful and consistent than the original
938 8.4 behavior, which tried to propagate <literal>FOR UPDATE</> into the
939 <literal>WITH</> query but always failed due to assorted implementation
940 restrictions. It also follows the design rule that <literal>WITH</>
941 queries are executed as if independent of the main query.
947 Fix bug with a <literal>WITH RECURSIVE</> query immediately inside
954 Fix concurrency bug in hash indexes (Tom)
958 Concurrent insertions could cause index scans to transiently report
965 Fix incorrect logic for GiST index page splits, when the split depends
966 on a non-first column of the index (Paul Ramsey)
972 Fix wrong search results for a multi-column GIN index with
973 <literal>fastupdate</> enabled (Teodor)
979 Fix bugs in WAL entry creation for GIN indexes (Tom)
983 These bugs were masked when <varname>full_page_writes</> was on, but
984 with it off a WAL replay failure was certain if a crash occurred before
991 Don't error out if recycling or removing an old WAL file fails at the
992 end of checkpoint (Heikki)
996 It's better to treat the problem as non-fatal and allow the checkpoint
997 to complete. Future checkpoints will retry the removal. Such problems
998 are not expected in normal operation, but have been seen to be
999 caused by misdesigned Windows anti-virus and backup software.
1005 Ensure WAL files aren't repeatedly archived on Windows (Heikki)
1009 This is another symptom that could happen if some other process
1010 interfered with deletion of a no-longer-needed file.
1016 Fix PAM password processing to be more robust (Tom)
1020 The previous code is known to fail with the combination of the Linux
1021 <literal>pam_krb5</> PAM module with Microsoft Active Directory as the
1022 domain controller. It might have problems elsewhere too, since it was
1023 making unjustified assumptions about what arguments the PAM stack would
1030 Raise the maximum authentication token (Kerberos ticket) size in GSSAPI
1031 and SSPI authentication methods (Ian Turner)
1035 While the old 2000-byte limit was more than enough for Unix Kerberos
1036 implementations, tickets issued by Windows Domain Controllers can be
1043 Ensure that domain constraints are enforced in constructs like
1044 <literal>ARRAY[...]::domain</>, where the domain is over an array type
1051 Fix foreign-key logic for some cases involving composite-type columns
1052 as foreign keys (Tom)
1058 Ensure that a cursor's snapshot is not modified after it is created
1063 This could lead to a cursor delivering wrong results if later operations
1064 in the same transaction modify the data the cursor is supposed to return.
1070 Fix <literal>CREATE TABLE</> to properly merge default expressions
1071 coming from different inheritance parent tables (Tom)
1075 This used to work but was broken in 8.4.
1081 Re-enable collection of access statistics for sequences (Akira Kurosawa)
1085 This used to work but was broken in 8.3.
1091 Fix processing of ownership dependencies during <literal>CREATE OR
1092 REPLACE FUNCTION</> (Tom)
1098 Fix incorrect handling of <literal>WHERE</>
1099 <replaceable>x</>=<replaceable>x</> conditions (Tom)
1103 In some cases these could get ignored as redundant, but they aren't
1104 — they're equivalent to <replaceable>x</> <literal>IS NOT NULL</>.
1110 Fix incorrect plan construction when using hash aggregation to implement
1111 <literal>DISTINCT</> for textually identical volatile expressions (Tom)
1117 Fix Assert failure for a volatile <literal>SELECT DISTINCT ON</>
1124 Fix <function>ts_stat()</> to not fail on an empty <type>tsvector</>
1131 Make text search parser accept underscores in XML attributes (Peter)
1137 Fix encoding handling in <type>xml</> binary input (Heikki)
1141 If the XML header doesn't specify an encoding, we now assume UTF-8 by
1142 default; the previous handling was inconsistent.
1148 Fix bug with calling <literal>plperl</> from <literal>plperlu</> or vice
1153 An error exit from the inner function could result in crashes due to
1154 failure to re-select the correct Perl interpreter for the outer function.
1160 Fix session-lifespan memory leak when a PL/Perl function is redefined
1167 Ensure that Perl arrays are properly converted to
1168 <productname>PostgreSQL</> arrays when returned by a set-returning
1169 PL/Perl function (Andrew Dunstan, Abhijit Menon-Sen)
1173 This worked correctly already for non-set-returning functions.
1179 Fix rare crash in exception processing in PL/Python (Peter)
1185 Fix <application>ecpg</> problem with comments in <literal>DECLARE
1186 CURSOR</> statements (Michael)
1192 Fix <application>ecpg</> to not treat recently-added keywords as
1193 reserved words (Tom)
1197 This affected the keywords <literal>CALLED</>, <literal>CATALOG</>,
1198 <literal>DEFINER</>, <literal>ENUM</>, <literal>FOLLOWING</>,
1199 <literal>INVOKER</>, <literal>OPTIONS</>, <literal>PARTITION</>,
1200 <literal>PRECEDING</>, <literal>RANGE</>, <literal>SECURITY</>,
1201 <literal>SERVER</>, <literal>UNBOUNDED</>, and <literal>WRAPPER</>.
1207 Re-allow regular expression special characters in <application>psql</>'s
1208 <literal>\df</> function name parameter (Tom)
1214 In <filename>contrib/fuzzystrmatch</>, correct the calculation of
1215 <function>levenshtein</> distances with non-default costs (Marcin Mank)
1221 In <filename>contrib/pg_standby</>, disable triggering failover with a
1222 signal on Windows (Fujii Masao)
1226 This never did anything useful, because Windows doesn't have Unix-style
1227 signals, but recent changes made it actually crash.
1233 Put <literal>FREEZE</> and <literal>VERBOSE</> options in the right
1234 order in the <literal>VACUUM</> command that
1235 <filename>contrib/vacuumdb</> produces (Heikki)
1241 Fix possible leak of connections when <filename>contrib/dblink</>
1242 encounters an error (Tatsuhito Kasahara)
1248 Ensure <application>psql</>'s flex module is compiled with the correct
1249 system header definitions (Tom)
1253 This fixes build failures on platforms where
1254 <literal>--enable-largefile</> causes incompatible changes in the
1261 Make the postmaster ignore any <literal>application_name</> parameter in
1262 connection request packets, to improve compatibility with future libpq
1269 Update the timezone abbreviation files to match current reality (Joachim
1274 This includes adding <literal>IDT</> to the default
1275 timezone abbreviation set.
1281 Update time zone data files to <application>tzdata</> release 2009s
1282 for DST law changes in Antarctica, Argentina, Bangladesh, Fiji,
1283 Novokuznetsk, Pakistan, Palestine, Samoa, Syria; also historical
1284 corrections for Hong Kong.
1293 <sect1 id="release-8-4-1">
1294 <title>Release 8.4.1</title>
1297 <title>Release date</title>
1298 <simpara>2009-09-09</simpara>
1302 This release contains a variety of fixes from 8.4.
1303 For information about new features in the 8.4 major release, see
1304 <xref linkend="release-8-4">.
1308 <title>Migration to Version 8.4.1</title>
1311 A dump/restore is not required for those running 8.4.X.
1317 <title>Changes</title>
1323 Fix WAL page header initialization at the end of archive recovery
1328 This could lead to failure to process the WAL in a subsequent
1335 Fix <quote>cannot make new WAL entries during recovery</> error (Tom)
1341 Fix problem that could make expired rows visible after a crash (Tom)
1345 This bug involved a page status bit potentially not being set
1346 correctly after a server crash.
1352 Disallow <command>RESET ROLE</> and <command>RESET SESSION
1353 AUTHORIZATION</> inside security-definer functions (Tom, Heikki)
1357 This covers a case that was missed in the previous patch that
1358 disallowed <command>SET ROLE</> and <command>SET SESSION
1359 AUTHORIZATION</> inside security-definer functions.
1366 Make <command>LOAD</> of an already-loaded loadable module
1371 Formerly, <command>LOAD</> would attempt to unload and re-load the
1372 module, but this is unsafe and not all that useful.
1378 Make window function <literal>PARTITION BY</> and <literal>ORDER BY</>
1379 items always be interpreted as simple expressions (Tom)
1383 In 8.4.0 these lists were parsed following the rules used for
1384 top-level <literal>GROUP BY</> and <literal>ORDER BY</> lists.
1385 But this was not correct per the SQL standard, and it led to possible
1392 Fix several errors in planning of semi-joins (Tom)
1396 These led to wrong query results in some cases where <literal>IN</>
1397 or <literal>EXISTS</> was used together with another join.
1403 Fix handling of whole-row references to subqueries that are within
1409 <literal>SELECT COUNT(ss.*) FROM ... LEFT JOIN (SELECT ...) ss ON ...</>.
1410 Here, <literal>ss.*</> would be treated as <literal>ROW(NULL,NULL,...)</>
1411 for null-extended join rows, which is not the same as a simple NULL.
1412 Now it is treated as a simple NULL.
1418 Fix Windows shared-memory allocation code (Tsutomu Yamada, Magnus)
1422 This bug led to the often-reported <quote>could not reattach
1423 to shared memory</> error message.
1429 Fix locale handling with plperl (Heikki)
1433 This bug could cause the server's locale setting to change when a
1434 plperl function is called, leading to data corruption.
1440 Fix handling of reloptions to ensure setting one option doesn't
1441 force default values for others (Itagaki Takahiro)
1447 Ensure that a <quote>fast shutdown</> request will forcibly terminate
1448 open sessions, even if a <quote>smart shutdown</> was already in progress
1455 Avoid memory leak for <function>array_agg()</> in <literal>GROUP BY</>
1462 Treat <function>to_char(..., 'TH')</> as an uppercase ordinal
1463 suffix with <literal>'HH'</>/<literal>'HH12'</> (Heikki)
1467 It was previously handled as <literal>'th'</> (lowercase).
1473 Include the fractional part in the result of
1474 <function>EXTRACT(second)</> and
1475 <function>EXTRACT(milliseconds)</> for
1476 <type>time</> and <type>time with time zone</> inputs (Tom)
1480 This has always worked for floating-point datetime configurations,
1481 but was broken in the integer datetime code.
1487 Fix overflow for <literal>INTERVAL '<replaceable>x</> ms'</literal>
1488 when <replaceable>x</> is more than 2 million and integer
1489 datetimes are in use (Alex Hunsaker)
1495 Improve performance when processing toasted values in index scans (Tom)
1499 This is particularly useful for <ulink
1500 url="http://postgis.refractions.net/">PostGIS</ulink>.
1506 Fix a typo that disabled <varname>commit_delay</> (Jeff Janes)
1512 Output early-startup messages to <filename>postmaster.log</> if the
1513 server is started in silent mode (Tom)
1517 Previously such error messages were discarded, leading to
1518 difficulty in debugging.
1524 Remove translated FAQs (Peter)
1528 They are now on the <ulink
1529 url="http://wiki.postgresql.org/wiki/FAQ">wiki</ulink>. The
1530 main FAQ was moved to the wiki some time ago.
1536 Fix <application>pg_ctl</> to not go into an infinite loop if
1537 <filename>postgresql.conf</> is empty (Jeff Davis)
1543 Fix several errors in <application>pg_dump</>'s
1544 <literal>--binary-upgrade</> mode (Bruce, Tom)
1548 <literal>pg_dump --binary-upgrade</> is used by pg_migrator.
1554 Fix <filename>contrib/xml2</>'s <function>xslt_process()</> to
1555 properly handle the maximum number of parameters (twenty) (Tom)
1561 Improve robustness of <application>libpq</>'s code to recover
1562 from errors during <command>COPY FROM STDIN</> (Tom)
1568 Avoid including conflicting readline and editline header files
1569 when both libraries are installed (Zdenek Kotala)
1575 Work around gcc bug that causes <quote>floating-point exception</>
1576 instead of <quote>division by zero</> on some platforms (Tom)
1582 Update time zone data files to <application>tzdata</> release 2009l
1583 for DST law changes in Bangladesh, Egypt, Mauritius.
1592 <sect1 id="release-8-4">
1593 <title>Release 8.4</title>
1596 <title>Release date</title>
1597 <simpara>2009-07-01</simpara>
1601 <title>Overview</title>
1604 After many years of development, <productname>PostgreSQL</> has
1605 become feature-complete in many areas. This release shows a
1606 targeted approach to adding features (e.g., authentication,
1607 monitoring, space reuse), and adds capabilities defined in the
1608 later SQL standards. The major areas of enhancement are:
1613 <!-- This list duplicates items below, but without authors or details-->
1623 Common Table Expressions and Recursive Queries
1629 Default and variadic parameters for functions
1647 Per-database locale settings
1653 Improved hash indexes
1659 Improved join performance for <literal>EXISTS</> and <literal>NOT EXISTS</> queries
1665 Easier-to-use Warm Standby
1671 Automatic sizing of the Free Space Map
1677 Visibility Map (greatly reduces vacuum overhead for slowly-changing tables)
1683 Version-aware psql (backslash commands work against older servers)
1689 Support SSL certificates for user authentication
1695 Per-function runtime statistics
1701 Easy editing of functions in psql
1707 New contrib modules: pg_stat_statements, auto_explain, citext, btree_gin
1714 The above items are explained in more detail in the sections below.
1720 <title>Migration to Version 8.4</title>
1723 A dump/restore using <application>pg_dump</application> is
1724 required for those wishing to migrate data from any previous
1729 Observe the following incompatibilities:
1733 <title>General</title>
1738 Use 64-bit integer datetimes by default (Neil Conway)
1742 Previously this was selected by <application>configure</>'s
1743 <option>--enable-integer-datetimes</> option. To retain
1744 the old behavior, build with <option>--disable-integer-datetimes</>.
1750 Remove <application>ipcclean</> utility command (Bruce)
1754 The utility only worked on a few platforms. Users should use
1755 their operating system tools instead.
1764 <title>Server Settings</title>
1769 Change default setting for
1770 <literal>log_min_messages</> to <literal>warning</> (previously
1771 it was <literal>notice</>) to reduce log file volume (Tom)
1777 Change default setting for <literal>max_prepared_transactions</> to
1778 zero (previously it was 5) (Tom)
1784 Make <literal>debug_print_parse</>, <literal>debug_print_rewritten</>,
1785 and <literal>debug_print_plan</>
1786 output appear at <literal>LOG</> message level, not
1787 <literal>DEBUG1</> as formerly (Tom)
1793 Make <literal>debug_pretty_print</> default to <literal>on</> (Tom)
1799 Remove <varname>explain_pretty_print</> parameter (no longer needed) (Tom)
1805 Make <varname>log_temp_files</> settable by superusers only, like other
1806 logging options (Simon Riggs)
1812 Remove automatic appending of the epoch timestamp when no <literal>%</>
1813 escapes are present in <literal>log_filename</> (Robert Haas)
1817 This change was made because some users wanted a fixed log filename,
1818 for use with an external log rotation tool.
1824 Remove <varname>log_restartpoints</> from <filename>recovery.conf</>;
1825 instead use <varname>log_checkpoints</> (Simon)
1831 Remove <varname>krb_realm</> and <varname>krb_server_hostname</>;
1832 these are now set in <filename>pg_hba.conf</> instead (Magnus)
1838 There are also significant changes in <link
1839 linkend="release-8-4-pg-hba-conf"><filename>pg_hba.conf</></link>,
1849 <title>Queries</title>
1855 Change <command>TRUNCATE</> and <command>LOCK</> to
1856 apply to child tables of the specified table(s) (Peter)
1860 These commands now accept an <literal>ONLY</> option that prevents
1861 processing child tables; this option must be used if the old
1868 <command>SELECT DISTINCT</> and
1869 <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</>
1870 no longer always produce sorted output (Tom)
1874 Previously, these types of queries always removed duplicate rows
1875 by means of Sort/Unique processing (i.e., sort then remove adjacent
1876 duplicates). Now they can be implemented by hashing, which will not
1877 produce sorted output. If an application relied on the output being
1878 in sorted order, the recommended fix is to add an <literal>ORDER BY</>
1879 clause. As a short-term workaround, the previous behavior can be
1880 restored by disabling <literal>enable_hashagg</>, but that is a very
1881 performance-expensive fix. <literal>SELECT DISTINCT ON</> never uses
1882 hashing, however, so its behavior is unchanged.
1888 Force child tables to inherit <literal>CHECK</> constraints from parents
1889 (Alex Hunsaker, Nikhil Sontakke, Tom)
1893 Formerly it was possible to drop such a constraint from a child
1894 table, allowing rows that violate the constraint to be visible
1895 when scanning the parent table. This was deemed inconsistent,
1896 as well as contrary to SQL standard.
1902 Disallow negative <literal>LIMIT</> or <literal>OFFSET</>
1903 values, rather than treating them as zero (Simon)
1909 Disallow <command>LOCK TABLE</> outside a transaction block
1914 Such an operation is useless because the lock would be released
1921 Sequences now contain an additional <structfield>start_value</> column
1922 (Zoltan Boszormenyi)
1926 This supports <command>ALTER SEQUENCE ... RESTART</>.
1936 <title>Functions and Operators</title>
1942 Make <type>numeric</> zero raised to a fractional power return
1943 <literal>0</>, rather than throwing an error, and make
1944 <type>numeric</> zero raised to the zero power return <literal>1</>,
1945 rather than error (Bruce)
1949 This matches the longstanding <type>float8</> behavior.
1955 Allow unary minus of floating-point values to produce minus zero (Tom)
1959 The changed behavior is more <acronym>IEEE</>-standard
1966 Throw an error if an escape character is the last character in
1967 a <literal>LIKE</> pattern (i.e., it has nothing to escape) (Tom)
1971 Previously, such an escape character was silently ignored,
1972 thus possibly masking application logic errors.
1978 Remove <literal>~=~</> and <literal>~<>~</> operators
1979 formerly used for <literal>LIKE</> index comparisons (Tom)
1983 Pattern indexes now use the regular equality operator.
1989 <function>xpath()</> now passes its arguments to <application>libxml</>
1990 without any changes (Andrew)
1994 This means that the XML argument must be a well-formed XML document.
1995 The previous coding attempted to allow XML fragments, but it did not
2002 Make <function>xmlelement()</> format attribute values just like
2003 content values (Peter)
2007 Previously, attribute values were formatted according to the
2008 normal SQL output behavior, which is sometimes at odds with
2015 Rewrite memory management for <application>libxml</>-using functions
2020 This change should avoid some compatibility problems with use of
2021 <application>libxml</> in PL/Perl and other add-on code.
2027 Adopt a faster algorithm for hash functions (Kenneth Marshall,
2028 based on work of Bob Jenkins)
2032 Many of the built-in hash functions now deliver different results on
2033 little-endian and big-endian platforms.
2040 <title>Temporal Functions and Operators</title>
2046 <varname>DateStyle</> no longer controls <type>interval</> output
2047 formatting; instead there is a new variable <varname>IntervalStyle</>
2054 Improve consistency of handling of fractional seconds in
2055 <type>timestamp</> and <type>interval</> output (Ron Mayer)
2059 This may result in displaying a different number of fractional
2060 digits than before, or rounding instead of truncating.
2066 Make <function>to_char()</>'s localized month/day names depend
2067 on <varname>LC_TIME</>, not <varname>LC_MESSAGES</> (Euler
2068 Taveira de Oliveira)
2074 Cause <function>to_date()</> and <function>to_timestamp()</>
2075 to more consistently report errors for invalid input (Brendan
2080 Previous versions would often ignore or silently misread input
2081 that did not match the format string. Such cases will now
2088 Fix <function>to_timestamp()</> to not require upper/lower case
2089 matching for meridian (<literal>AM</>/<literal>PM</>) and era
2090 (<literal>BC</>/<literal>AD</>) format designations (Brendan
2095 For example, input value <literal>ad</> now matches the format
2096 string <literal>AD</>.
2109 <title>Changes</title>
2112 Below you will find a detailed account of the changes between
2113 <productname>PostgreSQL</productname> 8.4 and the previous major
2118 <title>Performance</title>
2123 Improve optimizer statistics calculations (Jan Urbanski, Tom)
2127 In particular, estimates for full-text-search operators are
2134 Allow <command>SELECT DISTINCT</> and
2135 <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</> to
2140 This means that these types of queries no longer automatically
2141 produce sorted output.
2147 Create explicit concepts of semi-joins and anti-joins (Tom)
2151 This work formalizes our previous ad-hoc treatment of <literal>IN
2152 (SELECT ...)</> clauses, and extends it to <literal>EXISTS</> and
2153 <literal>NOT EXISTS</> clauses. It should result in significantly
2154 better planning of <literal>EXISTS</> and <literal>NOT EXISTS</>
2155 queries. In general, logically equivalent <literal>IN</> and
2156 <literal>EXISTS</> clauses should now have similar performance,
2157 whereas previously <literal>IN</> often won.
2163 Improve optimization of sub-selects beneath outer joins (Tom)
2167 Formerly, a sub-select or view could not be optimized very well if it
2168 appeared within the nullable side of an outer join and contained
2169 non-strict expressions (for instance, constants) in its result list.
2175 Improve the performance of <function>text_position()</> and
2176 related functions by using Boyer-Moore-Horspool searching (David
2181 This is particularly helpful for long search patterns.
2187 Reduce I/O load of writing the statistics collection file
2188 by writing the file only when requested (Martin Pihlak)
2194 Improve performance for bulk inserts (Robert Haas, Simon)
2200 Increase the default value of <varname>default_statistics_target</>
2201 from <literal>10</> to <literal>100</> (Greg Sabino Mullane,
2206 The maximum value was also increased from <literal>1000</> to
2213 Perform <varname>constraint_exclusion</> checking by default
2214 in queries involving inheritance or <literal>UNION ALL</> (Tom)
2218 A new <varname>constraint_exclusion</> setting,
2219 <literal>partition</>, was added to specify this behavior.
2225 Allow I/O read-ahead for bitmap index scans (Greg Stark)
2229 The amount of read-ahead is controlled by
2230 <varname>effective_io_concurrency</>. This feature is available only
2231 if the kernel has <function>posix_fadvise()</> support.
2237 Inline simple set-returning <acronym>SQL</> functions in
2238 <literal>FROM</> clauses (Richard Rowell)
2244 Improve performance of multi-batch hash joins by providing a special
2245 case for join key values that are especially common in the outer
2246 relation (Bryce Cutt, Ramon Lawrence)
2252 Reduce volume of temporary data in multi-batch hash joins
2253 by suppressing <quote>physical tlist</> optimization (Michael
2254 Henderson, Ramon Lawrence)
2260 Avoid waiting for idle-in-transaction sessions during
2261 <command>CREATE INDEX CONCURRENTLY</> (Simon)
2267 Improve performance of shared cache invalidation (Tom)
2276 <title>Server</title>
2279 <title>Settings</title>
2285 Convert many <filename>postgresql.conf</> settings to enumerated
2286 values so that <literal>pg_settings</> can display the valid
2293 Add <varname>cursor_tuple_fraction</> parameter to control the
2294 fraction of a cursor's rows that the planner assumes will be
2295 fetched (Robert Hell)
2301 Allow underscores in the names of custom variable
2302 classes in <filename>postgresql.conf</> (Tom)
2311 <title>Authentication and security</title>
2316 Remove support for the (insecure) <literal>crypt</> authentication method
2321 This effectively obsoletes pre-<productname>PostgreSQL</> 7.2 client
2322 libraries, as there is no longer any non-plaintext password method that
2329 Support regular expressions in <filename>pg_ident.conf</>
2336 Allow <productname>Kerberos</>/<acronym>GSSAPI</> parameters
2337 to be changed without restarting the postmaster (Magnus)
2343 Support <acronym>SSL</> certificate chains in server certificate
2344 file (Andrew Gierth)
2348 Including the full certificate chain makes the client able
2349 to verify the certificate without having all intermediate CA
2350 certificates present in the local store, which is often the case for
2357 Report appropriate error message for combination of <literal>MD5</>
2358 authentication and <varname>db_user_namespace</> enabled (Bruce)
2365 <sect4 id="release-8-4-pg-hba-conf">
2366 <title><filename>pg_hba.conf</></title>
2371 Change all authentication options to use <literal>name=value</>
2376 This makes incompatible changes to the <literal>ldap</>,
2377 <literal>pam</> and <literal>ident</> authentication methods. All
2378 <filename>pg_hba.conf</> entries with these methods need to be
2379 rewritten using the new format.
2385 Remove the <literal>ident sameuser</> option, instead making that
2386 behavior the default if no usermap is specified (Magnus)
2392 Allow a usermap parameter for all external authentication methods
2397 Previously a usermap was only supported for <literal>ident</>
2404 Add <literal>clientcert</> option to control requesting of a
2405 client certificate (Magnus)
2409 Previously this was controlled by the presence of a root
2410 certificate file in the server's data directory.
2416 Add <literal>cert</> authentication method to allow
2417 <emphasis>user</> authentication via <acronym>SSL</> certificates
2422 Previously <acronym>SSL</> certificates could only verify that
2423 the client had access to a certificate, not authenticate a
2430 Allow <literal>krb5</>, <literal>gssapi</> and <literal>sspi</>
2431 realm and <literal>krb5</> host settings to be specified in
2432 <filename>pg_hba.conf</> (Magnus)
2436 These override the settings in <filename>postgresql.conf</>.
2442 Add <varname>include_realm</> parameter for <literal>krb5</>,
2443 <literal>gssapi</>, and <literal>sspi</> methods (Magnus)
2447 This allows identical usernames from different realms to be
2448 authenticated as different database users using usermaps.
2454 Parse <filename>pg_hba.conf</> fully when it is loaded,
2455 so that errors are reported immediately (Magnus)
2459 Previously, most errors in the file wouldn't be detected until clients
2460 tried to connect, so an erroneous file could render the system
2461 unusable. With the new behavior, if an error is detected during
2462 reload then the bad file is rejected and the postmaster continues
2463 to use its old copy.
2469 Show all parsing errors in <filename>pg_hba.conf</> instead of
2470 aborting after the first one (Selena Deckelmann)
2476 Support <literal>ident</> authentication over Unix-domain sockets
2477 on <productname>Solaris</> (Garick Hamlin)
2486 <title>Continuous Archiving</title>
2491 Provide an option to <function>pg_start_backup()</> to force its
2492 implied checkpoint to finish as quickly as possible (Tom)
2496 The default behavior avoids excess I/O consumption, but that is
2497 pointless if no concurrent query activity is going on.
2503 Make <function>pg_stop_backup()</> wait for modified <acronym>WAL</>
2504 files to be archived (Simon)
2508 This guarantees that the backup is valid at the time
2509 <function>pg_stop_backup()</> completes.
2515 When archiving is enabled, rotate the last WAL segment at shutdown
2516 so that all transactions can be archived immediately
2517 (Guillaume Smet, Heikki)
2523 Delay <quote>smart</> shutdown while a continuous archiving base backup
2524 is in progress (Laurenz Albe)
2530 Cancel a continuous archiving base backup if <quote>fast</> shutdown
2531 is requested (Laurenz Albe)
2537 Allow <filename>recovery.conf</> boolean variables to take the
2538 same range of string values as <filename>postgresql.conf</>
2549 <title>Monitoring</title>
2554 Add <function>pg_conf_load_time()</> to report when
2555 the <productname>PostgreSQL</> configuration files were last loaded
2562 Add <function>pg_terminate_backend()</> to safely terminate a
2563 backend (the <literal>SIGTERM</> signal works also) (Tom, Bruce)
2567 While it's always been possible to <literal>SIGTERM</> a single
2568 backend, this was previously considered unsupported; and testing
2569 of the case found some bugs that are now fixed.
2575 Add ability to track user-defined functions' call counts and
2576 runtimes (Martin Pihlak)
2580 Function statistics appear in a new system view,
2581 <literal>pg_stat_user_functions</>. Tracking is controlled
2582 by the new parameter <varname>track_functions</>.
2588 Allow specification of the maximum query string size in
2589 <literal>pg_stat_activity</> via new
2590 <varname>track_activity_query_size</> parameter (Thomas Lee)
2596 Increase the maximum line length sent to <application>syslog</>, in
2597 hopes of improving performance (Tom)
2603 Add read-only configuration variables <varname>segment_size</>,
2604 <varname>wal_block_size</>, and <varname>wal_segment_size</>
2611 When reporting a deadlock, report the text of all queries involved
2612 in the deadlock to the server log (Itagaki Takahiro)
2618 Add <function>pg_stat_get_activity(pid)</> function to return
2619 information about a specific process id (Magnus)
2625 Allow the location of the server's statistics file to be specified
2626 via <varname>stats_temp_directory</> (Magnus)
2630 This allows the statistics file to be placed in a
2631 <acronym>RAM</>-resident directory to reduce I/O requirements.
2632 On startup/shutdown, the file is copied to its traditional location
2633 (<literal>$PGDATA/global/</>) so it is preserved across restarts.
2644 <title>Queries</title>
2649 Add support for <literal>WINDOW</> functions (Hitoshi Harada)
2655 Add support for <literal>WITH</> clauses (CTEs), including <literal>WITH
2656 RECURSIVE</> (Yoshiyuki Asaba, Tatsuo Ishii, Tom)
2662 Add <command>TABLE</> command (Peter)
2666 <literal>TABLE tablename</> is a SQL standard short-hand for
2667 <literal>SELECT * FROM tablename</>.
2673 Allow <literal>AS</> to be optional when specifying a
2674 <command>SELECT</> (or <literal>RETURNING</>) column output
2675 label (Hiroshi Saito)
2679 This works so long as the column label is not any
2680 <productname>PostgreSQL</> keyword; otherwise <literal>AS</> is still
2687 Support set-returning functions in <command>SELECT</> result lists
2688 even for functions that return their result via a tuplestore (Tom)
2692 In particular, this means that functions written in PL/PgSQL
2693 and other PL languages can now be called this way.
2699 Support set-returning functions in the output of aggregation
2700 and grouping queries (Tom)
2706 Allow <command>SELECT FOR UPDATE</>/<literal>SHARE</> to work
2707 on inheritance trees (Tom)
2713 Add infrastructure for <acronym>SQL/MED</> (Martin Pihlak,
2718 There are no remote or external <acronym>SQL/MED</> capabilities
2719 yet, but this change provides a standardized and future-proof
2720 system for managing connection information for modules like
2721 <filename>dblink</> and <filename>plproxy</>.
2727 Invalidate cached plans when referenced schemas, functions, operators,
2728 or operator classes are modified (Martin Pihlak, Tom)
2732 This improves the system's ability to respond to on-the-fly
2738 Allow comparison of composite types and allow arrays of
2739 anonymous composite types (Tom)
2743 This allows constructs such as
2744 <literal>row(1, 1.1) = any (array[row(7, 7.7), row(1, 1.0)])</>.
2745 This is particularly useful in recursive queries.
2751 Add support for Unicode string literal and identifier specifications
2752 using code points, e.g. <literal>U&'d\0061t\+000061'</>
2759 Reject <literal>\000</> in string literals and <command>COPY</> data
2764 Previously, this was accepted but had the effect of terminating
2765 the string contents.
2771 Improve the parser's ability to report error locations (Tom)
2775 An error location is now reported for many semantic errors,
2776 such as mismatched datatypes, that previously could not be localized.
2783 <title><command>TRUNCATE</></title>
2788 Support statement-level <literal>ON TRUNCATE</> triggers (Simon)
2794 Add <literal>RESTART</>/<literal>CONTINUE IDENTITY</> options
2795 for <command>TRUNCATE TABLE</>
2796 (Zoltan Boszormenyi)
2800 The start value of a sequence can be changed by <command>ALTER
2801 SEQUENCE START WITH</>.
2807 Allow <command>TRUNCATE tab1, tab1</> to succeed (Bruce)
2813 Add a separate <command>TRUNCATE</> permission (Robert Haas)
2822 <title><command>EXPLAIN</></title>
2827 Make <command>EXPLAIN VERBOSE</> show the output columns of each
2832 Previously <command>EXPLAIN VERBOSE</> output an internal
2833 representation of the query plan. (That behavior is now
2834 available via <varname>debug_print_plan</>.)
2840 Make <command>EXPLAIN</> identify subplans and initplans with
2841 individual labels (Tom)
2847 Make <command>EXPLAIN</> honor <varname>debug_print_plan</> (Tom)
2853 Allow <command>EXPLAIN</> on <command>CREATE TABLE AS</> (Peter)
2862 <title><literal>LIMIT</>/<literal>OFFSET</></title>
2867 Allow sub-selects in <literal>LIMIT</> and <literal>OFFSET</> (Tom)
2873 Add <acronym>SQL</>-standard syntax for
2874 <literal>LIMIT</>/<literal>OFFSET</> capabilities (Peter)
2879 <literal>OFFSET num {ROW|ROWS} FETCH {FIRST|NEXT} [num] {ROW|ROWS}
2891 <title>Object Manipulation</title>
2896 Add support for column-level privileges (Stephen Frost, KaiGai
2903 Refactor multi-object <command>DROP</> operations to reduce the
2904 need for <literal>CASCADE</> (Alex Hunsaker)
2908 For example, if table <literal>B</> has a dependency on table
2909 <literal>A</>, the command <literal>DROP TABLE A, B</> no longer
2910 requires the <literal>CASCADE</> option.
2916 Fix various problems with concurrent <command>DROP</> commands
2917 by ensuring that locks are taken before we begin to drop dependencies
2924 Improve reporting of dependencies during <command>DROP</>
2931 Add <literal>WITH [NO] DATA</> clause to <command>CREATE TABLE
2932 AS</>, per the <acronym>SQL</> standard (Peter, Tom)
2938 Add support for user-defined I/O conversion casts (Heikki)
2944 Allow <command>CREATE AGGREGATE</> to use an <type>internal</>
2945 transition datatype (Tom)
2951 Add <literal>LIKE</> clause to <command>CREATE TYPE</> (Tom)
2955 This simplifies creation of data types that use the same internal
2956 representation as an existing type.
2962 Allow specification of the type category and <quote>preferred</>
2963 status for user-defined base types (Tom)
2967 This allows more control over the coercion behavior of user-defined
2974 Allow <command>CREATE OR REPLACE VIEW</> to add columns to the
2975 end of a view (Robert Haas)
2982 <title><command>ALTER</></title>
2987 Add <command>ALTER TYPE RENAME</> (Petr Jelinek)
2993 Add <command>ALTER SEQUENCE ... RESTART</> (with no parameter) to
2994 reset a sequence to its initial value (Zoltan Boszormenyi)
3000 Modify the <command>ALTER TABLE</> syntax to allow all reasonable
3001 combinations for tables, indexes, sequences, and views (Tom)
3005 This change allows the following new syntaxes:
3010 <command>ALTER SEQUENCE OWNER TO</>
3015 <command>ALTER VIEW ALTER COLUMN SET/DROP DEFAULT</>
3020 <command>ALTER VIEW OWNER TO</>
3025 <command>ALTER VIEW SET SCHEMA</>
3030 There is no actual new functionality here, but formerly
3031 you had to say <command>ALTER TABLE</> to do these things,
3032 which was confusing.
3038 Add support for the syntax <command>ALTER TABLE ... ALTER COLUMN
3039 ... SET DATA TYPE</> (Peter)
3043 This is <acronym>SQL</>-standard syntax for functionality that
3044 was already supported.
3050 Make <command>ALTER TABLE SET WITHOUT OIDS</> rewrite the table
3051 to physically remove <type>OID</> values (Tom)
3055 Also, add <command>ALTER TABLE SET WITH OIDS</> to rewrite the
3056 table to add <type>OID</>s.
3065 <title>Database Manipulation</title>
3070 Improve reporting of
3071 <command>CREATE</>/<command>DROP</>/<command>RENAME DATABASE</>
3072 failure when uncommitted prepared transactions are the cause
3079 Make <varname>LC_COLLATE</> and <varname>LC_CTYPE</> into
3080 per-database settings (Radek Strnad, Heikki)
3084 This makes collation similar to encoding, which was always
3085 configurable per database.
3091 Improve checks that the database encoding, collation
3092 (<varname>LC_COLLATE</>), and character classes
3093 (<varname>LC_CTYPE</>) match (Heikki, Tom)
3097 Note in particular that a new database's encoding and locale
3098 settings can be changed only when copying from <literal>template0</>.
3099 This prevents possibly copying data that doesn't match the settings.
3105 Add <command>ALTER DATABASE SET TABLESPACE</> to move a database
3106 to a new tablespace (Guillaume Lelarge, Bernd Helmle)
3117 <title>Utility Operations</title>
3123 Add a <literal>VERBOSE</> option to the <command>CLUSTER</> command and
3124 <application>clusterdb</> (Jim Cox)
3130 Decrease memory requirements for recording pending trigger
3138 <title>Indexes</title>
3143 Dramatically improve the speed of building and accessing hash
3144 indexes (Tom Raney, Shreya Bhargava)
3148 This allows hash indexes to be sometimes faster than btree
3149 indexes. However, hash indexes are still not crash-safe.
3155 Make hash indexes store only the hash code, not the full value of
3156 the indexed column (Xiao Meng)
3160 This greatly reduces the size of hash indexes for long indexed
3161 values, improving performance.
3167 Implement fast update option for GIN indexes (Teodor, Oleg)
3171 This option greatly improves update speed at a small penalty in search
3178 <literal>xxx_pattern_ops</> indexes can now be used for simple
3179 equality comparisons, not only for <literal>LIKE</> (Tom)
3188 <title>Full Text Indexes</title>
3193 Remove the requirement to use <literal>@@@</> when doing
3194 <acronym>GIN</> weighted lookups on full text indexes (Tom, Teodor)
3198 The normal <literal>@@</> text search operator can be used
3205 Add an optimizer selectivity function for <literal>@@</> text
3206 search operations (Jan Urbanski)
3212 Allow prefix matching in full text searches (Teodor Sigaev,
3219 Support multi-column <acronym>GIN</> indexes (Teodor Sigaev)
3225 Improve support for Nepali language and Devanagari alphabet (Teodor)
3234 <title><command>VACUUM</></title>
3239 Track free space in separate per-relation <quote>fork</> files (Heikki)
3243 Free space discovered by <command>VACUUM</> is now recorded in
3244 <filename>*_fsm</> files, rather than in a fixed-sized shared memory
3245 area. The <varname>max_fsm_pages</> and <varname>max_fsm_relations</>
3246 settings have been removed, greatly simplifying administration of
3247 free space management.
3253 Add a visibility map to track pages that do not require
3258 This allows <command>VACUUM</> to avoid scanning all of
3259 a table when only a portion of the table needs vacuuming.
3260 The visibility map is stored in per-relation <quote>fork</> files.
3266 Add <varname>vacuum_freeze_table_age</> parameter to control
3267 when <command>VACUUM</> should ignore the visibility map and
3268 do a full table scan to freeze tuples (Heikki)
3274 Track transaction snapshots more carefully (Alvaro)
3278 This improves <command>VACUUM</>'s ability to reclaim space
3279 in the presence of long-running transactions.
3285 Add ability to specify per-relation autovacuum and <acronym>TOAST</>
3286 parameters in <command>CREATE TABLE</> (Alvaro, Euler Taveira de
3291 Autovacuum options used to be stored in a system table.
3297 Add <literal>--freeze</> option to <application>vacuumdb</>
3309 <title>Data Types</title>
3314 Add a <literal>CaseSensitive</> option for text search synonym
3315 dictionaries (Simon)
3321 Improve the precision of <type>NUMERIC</> division (Tom)
3327 Add basic arithmetic operators for <type>int2</> with <type>int8</>
3332 This eliminates the need for explicit casting in some situations.
3338 Allow <type>UUID</> input to accept an optional hyphen after
3339 every fourth digit (Robert Haas)
3345 Allow <literal>on</>/<literal>off</> as input for the boolean data type
3352 Allow spaces around <literal>NaN</> in the input string for
3353 type <type>numeric</> (Sam Mason)
3360 <title>Temporal Data Types</title>
3365 Reject year <literal>0 BC</> and years <literal>000</> and
3366 <literal>0000</> (Tom)
3370 Previously these were interpreted as <literal>1 BC</>.
3371 (Note: years <literal>0</> and <literal>00</> are still assumed to be
3378 Include <literal>SGT</> (Singapore time) in the default list of
3379 known time zone abbreviations (Tom)
3385 Support <literal>infinity</> and <literal>-infinity</> as
3386 values of type <type>date</> (Tom)
3392 Make parsing of <type>interval</> literals more standard-compliant
3397 For example, <literal>INTERVAL '1' YEAR</> now does what it's
3404 Allow <type>interval</> fractional-seconds precision to be specified
3405 after the <literal>second</> keyword, for <acronym>SQL</> standard
3410 Formerly the precision had to be specified after the keyword
3411 <type>interval</>. (For backwards compatibility, this syntax is still
3412 supported, though deprecated.) Data type definitions will now be
3413 output using the standard format.
3419 Support the <acronym>IS0 8601</> <type>interval</> syntax (Ron
3420 Mayer, Kevin Grittner)
3424 For example, <literal>INTERVAL 'P1Y2M3DT4H5M6.7S'</> is now
3431 Add <varname>IntervalStyle</> parameter
3432 which controls how <type>interval</> values are output (Ron Mayer)
3436 Valid values are: <literal>postgres</>, <literal>postgres_verbose</>,
3437 <literal>sql_standard</>, <literal>iso_8601</>. This setting also
3438 controls the handling of negative <type>interval</> input when only
3439 some fields have positive/negative designations.
3445 Improve consistency of handling of fractional seconds in
3446 <type>timestamp</> and <type>interval</> output (Ron Mayer)
3455 <title>Arrays</title>
3460 Improve the handling of casts applied to <literal>ARRAY[]</>
3461 constructs, such as <literal>ARRAY[...]::integer[]</>
3466 Formerly <productname>PostgreSQL</> attempted to determine a data type
3467 for the <literal>ARRAY[]</> construct without reference to the ensuing
3468 cast. This could fail unnecessarily in many cases, in particular when
3469 the <literal>ARRAY[]</> construct was empty or contained only
3470 ambiguous entries such as <literal>NULL</>. Now the cast is consulted
3471 to determine the type that the array elements must be.
3477 Make <acronym>SQL</>-syntax <type>ARRAY</> dimensions optional
3478 to match the <acronym>SQL</> standard (Peter)
3484 Add <function>array_ndims()</> to return the number
3485 of dimensions of an array (Robert Haas)
3491 Add <function>array_length()</> to return the length
3492 of an array for a specified dimension (Jim Nasby, Robert
3493 Haas, Peter Eisentraut)
3499 Add aggregate function <function>array_agg()</>, which
3500 returns all aggregated values as a single array (Robert Haas,
3507 Add <function>unnest()</>, which converts an array to
3508 individual row values (Tom)
3512 This is the opposite of <function>array_agg()</>.
3518 Add <function>array_fill()</> to create arrays initialized with
3519 a value (Pavel Stehule)
3525 Add <function>generate_subscripts()</> to simplify generating
3526 the range of an array's subscripts (Pavel Stehule)
3535 <title>Wide-Value Storage (<acronym>TOAST</>)</title>
3540 Consider <acronym>TOAST</> compression on values as short as
3541 32 bytes (previously 256 bytes) (Greg Stark)
3547 Require 25% minimum space savings before using <acronym>TOAST</>
3548 compression (previously 20% for small values and any-savings-at-all
3549 for large values) (Greg)
3555 Improve <acronym>TOAST</> heuristics for rows that have a mix of large
3556 and small toastable fields, so that we prefer to push large values out
3557 of line and don't compress small values unnecessarily (Greg, Tom)
3568 <title>Functions</title>
3573 Document that <function>setseed()</> allows values from
3574 <literal>-1</> to <literal>1</> (not just <literal>0</> to
3575 <literal>1</>), and enforce the valid range (Kris Jurka)
3581 Add server-side function <function>lo_import(filename, oid)</>
3588 Add <function>quote_nullable()</>, which behaves like
3589 <function>quote_literal()</> but returns the string <literal>NULL</> for
3590 a null argument (Brendan Jurd)
3596 Improve full text search <function>headline()</> function to
3597 allow extracting several fragments of text (Sushant Sinha)
3603 Add <function>suppress_redundant_updates_trigger()</> trigger
3604 function to avoid overhead for non-data-changing updates (Andrew)
3610 Add <function>div(numeric, numeric)</> to perform <type>numeric</>
3611 division without rounding (Tom)
3617 Add <type>timestamp</> and <type>timestamptz</> versions of
3618 <function>generate_series()</> (Hitoshi Harada)
3625 <title>Object Information Functions</title>
3630 Implement <function>current_query()</> for use by functions
3631 that need to know the currently running query (Tomas Doran)
3637 Add <function>pg_get_keywords()</> to return a list of the
3638 parser keywords (Dave Page)
3644 Add <function>pg_get_functiondef()</> to see a function's
3645 definition (Abhijit Menon-Sen)
3651 Allow the second argument of <function>pg_get_expr()</> to be zero
3652 when deparsing an expression that does not contain variables (Tom)
3658 Modify <function>pg_relation_size()</> to use <literal>regclass</>
3663 <function>pg_relation_size(data_type_name)</> no longer works.
3669 Add <literal>boot_val</> and <literal>reset_val</> columns to
3670 <literal>pg_settings</> output (Greg Smith)
3676 Add source file name and line number columns to
3677 <literal>pg_settings</> output for variables set in a configuration
3678 file (Magnus, Alvaro)
3682 For security reasons, these columns are only visible to superusers.
3688 Add support for <varname>CURRENT_CATALOG</>,
3689 <varname>CURRENT_SCHEMA</>, <varname>SET CATALOG</>, <varname>SET
3694 These provide <acronym>SQL</>-standard syntax for existing features.
3700 Add <function>pg_typeof()</> which returns the data type
3701 of any value (Brendan Jurd)
3707 Make <function>version()</> return information about whether
3708 the server is a 32- or 64-bit binary (Bruce)
3714 Fix the behavior of information schema columns
3715 <structfield>is_insertable_into</> and <structfield>is_updatable</> to
3716 be consistent (Peter)
3722 Improve the behavior of information schema
3723 <structfield>datetime_precision</> columns (Peter)
3727 These columns now show zero for <type>date</> columns, and 6
3728 (the default precision) for <type>time</>, <type>timestamp</>, and
3729 <type>interval</> without a declared precision, rather than showing
3736 Convert remaining builtin set-returning functions to use
3737 <literal>OUT</> parameters (Jaime Casanova)
3741 This makes it possible to call these functions without specifying
3742 a column list: <function>pg_show_all_settings()</>,
3743 <function>pg_lock_status()</>, <function>pg_prepared_xact()</>,
3744 <function>pg_prepared_statement()</>, <function>pg_cursor()</>
3750 Make <function>pg_*_is_visible()</> and
3751 <function>has_*_privilege()</> functions return <literal>NULL</>
3752 for invalid OIDs, rather than reporting an error (Tom)
3758 Extend <function>has_*_privilege()</> functions to allow inquiring
3759 about the OR of multiple privileges in one call (Stephen
3766 Add <function>has_column_privilege()</> and
3767 <function>has_any_column_privilege()</> functions (Stephen
3777 <title>Function Creation</title>
3782 Support variadic functions (functions with a variable number
3783 of arguments) (Pavel Stehule)
3787 Only trailing arguments can be optional, and they all must be
3788 of the same data type.
3794 Support default values for function arguments (Pavel Stehule)
3800 Add <command>CREATE FUNCTION ... RETURNS TABLE</> clause (Pavel
3807 Allow <acronym>SQL</>-language functions to return the output
3808 of an <command>INSERT</>/<command>UPDATE</>/<command>DELETE</>
3809 <literal>RETURNING</> clause (Tom)
3818 <title>PL/PgSQL Server-Side Language</title>
3823 Support <literal>EXECUTE USING</> for easier insertion of data
3824 values into a dynamic query string (Pavel Stehule)
3830 Allow looping over the results of a cursor using a <literal>FOR</>
3831 loop (Pavel Stehule)
3837 Support <literal>RETURN QUERY EXECUTE</> (Pavel
3844 Improve the <literal>RAISE</> command (Pavel Stehule)
3849 Support <literal>DETAIL</> and <literal>HINT</> fields
3854 Support specification of the <literal>SQLSTATE</> error code
3859 Support an exception name parameter
3864 Allow <literal>RAISE</> without parameters in an exception
3865 block to re-throw the current error
3874 Allow specification of <varname>SQLSTATE</> codes
3875 in <literal>EXCEPTION</> lists (Pavel Stehule)
3879 This is useful for handling custom <varname>SQLSTATE</> codes.
3885 Support the <literal>CASE</> statement (Pavel Stehule)
3891 Make <command>RETURN QUERY</> set the special <literal>FOUND</> and
3892 <command>GET DIAGNOSTICS</> <literal>ROW_COUNT</> variables
3899 Make <command>FETCH</> and <command>MOVE</> set the
3900 <command>GET DIAGNOSTICS</> <literal>ROW_COUNT</> variable
3907 Make <command>EXIT</> without a label always exit the innermost
3912 Formerly, if there were a <literal>BEGIN</> block more closely nested
3913 than any loop, it would exit that block instead. The new behavior
3914 matches Oracle(TM) and is also what was previously stated by our own
3921 Make processing of string literals and nested block comments
3922 match the main SQL parser's processing (Tom)
3926 In particular, the format string in <command>RAISE</> now works
3927 the same as any other string literal, including being subject
3928 to <varname>standard_conforming_strings</>. This change also
3929 fixes other cases in which valid commands would fail when
3930 <varname>standard_conforming_strings</> is on.
3936 Avoid memory leakage when the same function is called at varying
3937 exception-block nesting depths (Tom)
3948 <title>Client Applications</title>
3954 Fix <literal>pg_ctl restart</> to preserve command-line arguments
3961 Add <literal>-w</>/<literal>--no-password</> option that
3962 prevents password prompting in all utilities that have a
3963 <literal>-W</>/<literal>--password</> option (Peter)
3969 Remove <option>-q</> (quiet) option of <application>createdb</>,
3970 <application>createuser</>, <application>dropdb</>,
3971 <application>dropuser</> (Peter)
3975 These options have had no effect since <productname>PostgreSQL</>
3983 <title><application>psql</></title>
3988 Remove verbose startup banner; now just suggest <literal>help</>
3995 Make <literal>help</> show common backslash commands (Greg
4002 Add <literal>\pset format wrapped</> mode to wrap output to the
4003 screen width, or file/pipe output too if <literal>\pset columns</>
4004 is set (Bryce Nesbitt)
4010 Allow all supported spellings of boolean values in <command>\pset</>,
4011 rather than just <literal>on</> and <literal>off</> (Bruce)
4015 Formerly, any string other than <quote>off</> was silently taken
4016 to mean <literal>true</>. <application>psql</> will now complain
4017 about unrecognized spellings (but still take them as <literal>true</>).
4023 Use the pager for wide output (Bruce)
4029 Require a space between a one-letter backslash command and its first
4030 argument (Bernd Helmle)
4034 This removes a historical source of ambiguity.
4040 Improve tab completion support for schema-qualified and
4041 quoted identifiers (Greg Sabino Mullane)
4047 Add optional <literal>on</>/<literal>off</> argument for
4048 <command>\timing</> (David Fetter)
4054 Display access control rights on multiple lines (Brendan
4055 Jurd, Andreas Scherbaum)
4061 Make <command>\l</> show database access privileges (Andrew Gilligan)
4067 Make <command>\l+</> show database sizes, if permissions
4068 allow (Andrew Gilligan)
4074 Add the <command>\ef</> command to edit function definitions
4084 <title><application>psql</> \d* commands</title>
4090 Make <command>\d*</> commands that do not have a pattern argument
4091 show system objects only if the <literal>S</> modifier is specified
4092 (Greg Sabino Mullane, Bruce)
4096 The former behavior was inconsistent across different variants
4097 of <command>\d</>, and in most cases it provided no easy way to see
4104 Improve <command>\d*</> commands to work with older
4105 <productname>PostgreSQL</> server versions (back to 7.4),
4106 not only the current server version
4113 Make <command>\d</> show foreign-key constraints that reference
4114 the selected table (Kenneth D'Souza)
4120 Make <command>\d</> on a sequence show its column values
4121 (Euler Taveira de Oliveira)
4127 Add column storage type and other relation options to the
4128 <command>\d+</> display (Gregory Stark, Euler Taveira de
4135 Show relation size in <command>\dt+</> output (Dickson S.
4142 Show the possible values of <literal>enum</> types in <command>\dT+</>
4149 Allow <command>\dC</> to accept a wildcard pattern, which matches
4150 either datatype involved in the cast (Tom)
4156 Add a function type column to <command>\df</>'s output, and add
4157 options to list only selected types of functions (David Fetter)
4163 Make <command>\df</> not hide functions that take or return
4164 type <type>cstring</> (Tom)
4168 Previously, such functions were hidden because most of them are
4169 datatype I/O functions, which were deemed uninteresting. The new
4170 policy about hiding system functions by default makes this wart
4180 <title><application>pg_dump</></title>
4185 Add a <literal>--no-tablespaces</> option to
4186 <application>pg_dump</>/<application>pg_dumpall</>/<application>pg_restore</>
4187 so that dumps can be restored to clusters that have non-matching
4188 tablespace layouts (Gavin Roy)
4194 Remove <option>-d</> and <option>-D</> options from
4195 <application>pg_dump</> and <application>pg_dumpall</> (Tom)
4199 These options were too frequently confused with the option to
4200 select a database name in other <productname>PostgreSQL</>
4201 client applications. The functionality is still available,
4202 but you must now spell out the long option name
4203 <option>--inserts</> or <option>--column-inserts</>.
4209 Remove <option>-i</>/<option>--ignore-version</> option from
4210 <application>pg_dump</> and <application>pg_dumpall</> (Tom)
4214 Use of this option does not throw an error, but it has no
4215 effect. This option was removed because the version checks
4216 are necessary for safety.
4222 Disable <varname>statement_timeout</> during dump and restore
4229 Add <application>pg_dump</>/<application>pg_dumpall</> option
4230 <option>--lock-wait-timeout</> (David Gould)
4234 This allows dumps to fail if unable to acquire a shared lock
4235 within the specified amount of time.
4241 Reorder <application>pg_dump</> <literal>--data-only</> output
4242 to dump tables referenced by foreign keys before
4243 the referencing tables (Tom)
4247 This allows data loads when foreign keys are already present.
4248 If circular references make a safe ordering impossible, a
4249 <literal>NOTICE</> is issued.
4255 Allow <application>pg_dump</>, <application>pg_dumpall</>, and
4256 <application>pg_restore</> to use a specified role (Benedek
4263 Allow <application>pg_restore</> to use multiple concurrent
4264 connections to do the restore (Andrew)
4268 The number of concurrent connections is controlled by the option
4269 <literal>--jobs</>. This is supported only for custom-format archives.
4280 <title>Programming Tools</title>
4283 <title><application>libpq</></title>
4288 Allow the <type>OID</> to be specified when importing a large
4289 object, via new function <function>lo_import_with_oid()</> (Tatsuo)
4295 Add <quote>events</> support (Andrew Chernow, Merlin Moncure)
4299 This adds the ability to register callbacks to manage private
4300 data associated with <structname>PGconn</> and <structname>PGresult</>
4307 Improve error handling to allow the return of multiple
4308 error messages as multi-line error reports (Magnus)
4314 Make <function>PQexecParams()</> and related functions return
4315 <varname>PGRES_EMPTY_QUERY</> for an empty query (Tom)
4319 They previously returned <varname>PGRES_COMMAND_OK</>.
4325 Document how to avoid the overhead of <function>WSACleanup()</>
4326 on Windows (Andrew Chernow)
4332 Do not rely on Kerberos tickets to determine the default database
4337 Previously, a Kerberos-capable build of libpq would use the
4338 principal name from any available Kerberos ticket as default
4339 database username, even if the connection wasn't using Kerberos
4340 authentication. This was deemed inconsistent and confusing.
4341 The default username is now determined the same way with or
4342 without Kerberos. Note however that the database username must still
4343 match the ticket when Kerberos authentication is used.
4351 <title><application>libpq</> <acronym>SSL</> (Secure Sockets Layer)
4357 Fix certificate validation for <acronym>SSL</> connections
4362 <application>libpq</> now supports verifying both the certificate
4363 and the name of the server when making <acronym>SSL</>
4364 connections. If a root certificate is not available to use for
4365 verification, <acronym>SSL</> connections will fail. The
4366 <literal>sslmode</> parameter is used to enable certificate
4367 verification and set the level of checking.
4368 The default is still not to do any verification, allowing connections
4369 to SSL-enabled servers without requiring a root certificate on the
4376 Support wildcard server certificates (Magnus)
4380 If a certificate <acronym>CN</> starts with <literal>*</>, it will
4381 be treated as a wildcard when matching the hostname, allowing the
4382 use of the same certificate for multiple servers.
4388 Allow the file locations for client certificates to be specified
4389 (Mark Woodward, Alvaro, Magnus)
4395 Add a <function>PQinitOpenSSL</> function to allow greater control
4396 over OpenSSL/libcrypto initialization (Andrew Chernow)
4402 Make <application>libpq</> unregister its <application>OpenSSL</>
4403 callbacks when no database connections remain open
4404 (Bruce, Magnus, Russell Smith)
4408 This is required for applications that unload the libpq library,
4409 otherwise invalid <application>OpenSSL</> callbacks will remain.
4418 <title><application>ecpg</></title>
4423 Add localization support for messages (Euler Taveira de
4430 ecpg parser is now automatically generated from the server
4435 Previously the ecpg parser was hand-maintained.
4444 <title>Server Programming Interface (<acronym>SPI</>)</title>
4449 Add support for single-use plans with out-of-line
4456 Add new <varname>SPI_OK_REWRITTEN</> return code for
4457 <function>SPI_execute()</> (Heikki)
4461 This is used when a command is rewritten to another type of
4468 Remove unnecessary inclusions from <filename>executor/spi.h</> (Tom)
4472 SPI-using modules might need to add some <literal>#include</>
4473 lines if they were depending on <filename>spi.h</> to include
4485 <title>Build Options</title>
4490 Update build system to use <productname>Autoconf</> 2.61 (Peter)
4496 Require <productname>GNU bison</> for source code builds (Peter)
4500 This has effectively been required for several years, but now there
4501 is no infrastructure claiming to support other parser tools.
4507 Add <application>pg_config</> <literal>--htmldir</> option
4514 Pass <type>float4</> by value inside the server (Zoltan
4519 Add <application>configure</> option
4520 <literal>--disable-float4-byval</> to use the old behavior.
4521 External C functions that use old-style (version 0) call convention
4522 and pass or return <type>float4</> values will be broken by this
4523 change, so you may need the <application>configure</> option if you
4524 have such functions and don't want to update them.
4530 Pass <type>float8</>, <type>int8</>, and related datatypes
4531 by value inside the server on 64-bit platforms (Zoltan Boszormenyi)
4535 Add <application>configure</> option
4536 <literal>--disable-float8-byval</> to use the old behavior.
4537 As above, this change might break old-style external C functions.
4543 Add configure options <literal>--with-segsize</>,
4544 <literal>--with-blocksize</>, <literal>--with-wal-blocksize</>,
4545 <literal>--with-wal-segsize</> (Zdenek Kotala, Tom)
4549 This simplifies build-time control over several constants that
4550 previously could only be changed by editing
4551 <filename>pg_config_manual.h</>.
4557 Allow threaded builds on <productname>Solaris</> 2.5 (Bruce)
4563 Use the system's <function>getopt_long()</> on <productname>Solaris</>
4564 (Zdenek Kotala, Tom)
4568 This makes option processing more consistent with what Solaris users
4575 Add support for the <productname>Sun Studio</> compiler on
4576 <productname>Linux</> (Julius Stroffek)
4582 Append the major version number to the backend <application>gettext</>
4583 domain, and the <literal>soname</> major version number to
4584 libraries' <application>gettext</> domain (Peter)
4588 This simplifies parallel installations of multiple versions.
4594 Add support for code coverage testing with <application>gcov</>
4601 Allow out-of-tree builds on <productname>Mingw</> and
4602 <productname>Cygwin</> (Richard Evans)
4608 Fix the use of <productname>Mingw</> as a cross-compiling source
4618 <title>Source Code</title>
4623 Support 64-bit time zone data files (Heikki)
4627 This adds support for daylight saving time (<acronym>DST</>)
4628 calculations beyond the year 2038.
4634 Deprecate use of platform's <type>time_t</> data type (Tom)
4638 Some platforms have migrated to 64-bit <type>time_t</>, some have
4639 not, and Windows can't make up its mind what it's doing. Define
4640 <type>pg_time_t</> to have the same meaning as <type>time_t</>,
4641 but always be 64 bits (unless the platform has no 64-bit integer type),
4642 and use that type in all module APIs and on-disk data formats.
4648 Fix bug in handling of the time zone database when cross-compiling
4655 Link backend object files in one step, rather than in stages
4662 Improve <application>gettext</> support to allow better translation
4669 Add message translation support to the PL languages (Alvaro, Peter)
4675 Add more <application>DTrace</> probes (Robert Lor)
4681 Enable <application>DTrace</> support on <application>Mac OS X
4682 Leopard</> and other non-Solaris platforms (Robert Lor)
4688 Simplify and standardize conversions between C strings and
4689 <type>text</> datums, by providing common functions for the purpose
4696 Clean up the <filename>include/catalog/</> header files so that
4697 frontend programs can include them without including
4698 <filename>postgres.h</>
4705 Make <type>name</> char-aligned, and suppress zero-padding of
4706 <type>name</> entries in indexes (Tom)
4712 Recover better if dynamically-loaded code executes <function>exit()</>
4719 Add a hook to let plug-ins monitor the executor (Itagaki
4726 Add a hook to allow the planner's statistics lookup behavior to
4727 be overridden (Simon Riggs)
4733 Add <function>shmem_startup_hook()</> for custom shared memory
4740 Replace the index access method <function>amgetmulti</> entry point
4741 with <function>amgetbitmap</>, and extend the API for
4742 <function>amgettuple</> to support run-time determination of
4743 operator lossiness (Heikki, Tom, Teodor)
4747 The API for GIN and GiST opclass <function>consistent</> functions
4748 has been extended as well.
4754 Add support for partial-match searches in <acronym>GIN</> indexes
4755 (Teodor Sigaev, Oleg Bartunov)
4761 Replace <structname>pg_class</> column <structfield>reltriggers</>
4762 with boolean <structfield>relhastriggers</> (Simon)
4766 Also remove unused <structname>pg_class</> columns
4767 <structfield>relukeys</>, <structfield>relfkeys</>, and
4768 <structfield>relrefs</>.
4774 Add a <structfield>relistemp</> column to <structname>pg_class</>
4775 to ease identification of temporary tables (Tom)
4781 Move platform <acronym>FAQ</>s into the main documentation
4788 Prevent parser input files from being built with any conflicts
4795 Add support for the <literal>KOI8U</> (Ukrainian) encoding
4802 Add Japanese message translations (Japan PostgreSQL Users Group)
4806 This used to be maintained as a separate project.
4812 Fix problem when setting <varname>LC_MESSAGES</> on
4813 <application>MSVC</>-built systems (Hiroshi Inoue, Hiroshi
4823 <title>Contrib</title>
4829 Add <filename>contrib/auto_explain</> to automatically run
4830 <command>EXPLAIN</> on queries exceeding a specified duration
4831 (Itagaki Takahiro, Tom)
4837 Add <filename>contrib/btree_gin</> to allow GIN indexes to
4838 handle more datatypes (Oleg, Teodor)
4844 Add <filename>contrib/citext</> to provide a case-insensitive,
4845 multibyte-aware text data type (David Wheeler)
4851 Add <filename>contrib/pg_stat_statements</> for server-wide
4852 tracking of statement execution statistics (Itagaki Takahiro)
4858 Add duration and query mode options to <filename>contrib/pgbench</>
4865 Make <filename>contrib/pgbench</> use table names
4866 <structname>pgbench_accounts</>, <structname>pgbench_branches</>,
4867 <structname>pgbench_history</>, and <structname>pgbench_tellers</>,
4868 rather than just <structname>accounts</>, <structname>branches</>,
4869 <structname>history</>, and <structname>tellers</> (Tom)
4873 This is to reduce the risk of accidentally destroying real data
4874 by running <application>pgbench</>.
4880 Fix <filename>contrib/pgstattuple</> to handle tables and
4881 indexes with over 2 billion pages (Tatsuhito Kasahara)
4887 In <filename>contrib/fuzzystrmatch</>, add a version of the
4888 Levenshtein string-distance function that allows the user to
4889 specify the costs of insertion, deletion, and substitution
4896 Make <filename>contrib/ltree</> support multibyte encodings
4903 Enable <filename>contrib/dblink</> to use connection information
4904 stored in the SQL/MED catalogs (Joe Conway)
4910 Improve <filename>contrib/dblink</>'s reporting of errors from
4911 the remote server (Joe Conway)
4917 Make <filename>contrib/dblink</> set <varname>client_encoding</>
4918 to match the local database's encoding (Joe Conway)
4922 This prevents encoding problems when communicating with a remote
4923 database that uses a different encoding.
4929 Make sure <filename>contrib/dblink</> uses a password supplied
4930 by the user, and not accidentally taken from the server's
4931 <filename>.pgpass</> file (Joe Conway)
4935 This is a minor security enhancement.
4941 Add <function>fsm_page_contents()</>
4942 to <filename>contrib/pageinspect</> (Heikki)
4948 Modify <function>get_raw_page()</> to support free space map
4949 (<filename>*_fsm</>) files. Also update
4950 <filename>contrib/pg_freespacemap</>.
4956 Add support for multibyte encodings to <filename>contrib/pg_trgm</>
4963 Rewrite <filename>contrib/intagg</> to use new
4964 functions <function>array_agg()</> and <function>unnest()</>
4971 Make <filename>contrib/pg_standby</> recover all available WAL before
4972 failover (Fujii Masao, Simon, Heikki)
4976 To make this work safely, you now need to set the new
4977 <literal>recovery_end_command</> option in <filename>recovery.conf</>
4978 to clean up the trigger file after failover. <application>pg_standby</>
4979 will no longer remove the trigger file itself.
4985 <filename>contrib/pg_standby</>'s <option>-l</> option is now a no-op,
4986 because it is unsafe to use a symlink (Simon)