OSDN Git Service

Update release notes with security issues.
[pg-rex/syncrep.git] / doc / src / sgml / release-8.4.sgml
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 -->
3
4  <sect1 id="release-8-4-4">
5   <title>Release 8.4.4</title>
6
7   <note>
8   <title>Release date</title>
9   <simpara>2010-05-17</simpara>
10   </note>
11
12   <para>
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">.
16   </para>
17
18   <sect2>
19    <title>Migration to Version 8.4.4</title>
20
21    <para>
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.
25    </para>
26
27   </sect2>
28
29   <sect2>
30    <title>Changes</title>
31
32    <itemizedlist>
33
34     <listitem>
35      <para>
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)
39      </para>
40
41      <para>
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)
51      </para>
52     </listitem>
53
54     <listitem>
55      <para>
56       Prevent PL/Tcl from executing untrustworthy code from
57       <structname>pltcl_modules</> (Tom)
58      </para>
59
60      <para>
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)
71      </para>
72     </listitem>
73
74     <listitem>
75      <para>
76       Fix data corruption during WAL replay of
77       <literal>ALTER ... SET TABLESPACE</> (Tom)
78      </para>
79
80      <para>
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
87       checkpoint.
88      </para>
89     </listitem>
90
91     <listitem>
92      <para>
93       Fix possible crash if a cache reset message is received during
94       rebuild of a relcache entry (Heikki)
95      </para>
96
97      <para>
98       This error was introduced in 8.4.3 while fixing a related failure.
99      </para>
100     </listitem>
101
102     <listitem>
103      <para>
104       Apply per-function GUC settings while running the language validator
105       for the function (Itagaki Takahiro)
106      </para>
107
108      <para>
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.
112      </para>
113     </listitem>
114
115     <listitem>
116      <para>
117       Do constraint exclusion for inherited <command>UPDATE</> and
118       <command>DELETE</> target tables when
119       <varname>constraint_exclusion</> = <literal>partition</> (Tom)
120      </para>
121
122      <para>
123       Due to an oversight, this setting previously only caused constraint
124       exclusion to be checked in <command>SELECT</> commands.
125      </para>
126     </listitem>
127
128     <listitem>
129      <para>
130       Do not allow an unprivileged user to reset superuser-only parameter
131       settings (Alvaro)
132      </para>
133
134      <para>
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.
141      </para>
142     </listitem>
143
144     <listitem>
145      <para>
146       Avoid possible crash during backend shutdown if shutdown occurs
147       when a <literal>CONTEXT</> addition would be made to log entries (Tom)
148      </para>
149
150      <para>
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.
154      </para>
155     </listitem>
156
157     <listitem>
158      <para>
159       Fix erroneous handling of <literal>%r</> parameter in
160       <varname>recovery_end_command</> (Heikki)
161      </para>
162
163      <para>
164       The value always came out zero.
165      </para>
166     </listitem>
167
168     <listitem>
169      <para>
170       Ensure the archiver process responds to changes in
171       <varname>archive_command</> as soon as possible (Tom)
172      </para>
173     </listitem>
174
175     <listitem>
176      <para>
177       Fix pl/pgsql's <literal>CASE</> statement to not fail when the
178       case expression is a query that returns no rows (Tom)
179      </para>
180     </listitem>
181
182     <listitem>
183      <para>
184       Update pl/perl's <filename>ppport.h</> for modern Perl versions
185       (Andrew)
186      </para>
187     </listitem>
188
189     <listitem>
190      <para>
191       Fix assorted memory leaks in pl/python (Andreas Freund, Tom)
192      </para>
193     </listitem>
194
195     <listitem>
196      <para>
197       Handle empty-string connect parameters properly in ecpg (Michael)
198      </para>
199     </listitem>
200
201     <listitem>
202      <para>
203       Prevent infinite recursion in <application>psql</> when expanding
204       a variable that refers to itself (Tom)
205      </para>
206     </listitem>
207
208     <listitem>
209      <para>
210       Fix <application>psql</>'s <literal>\copy</> to not add spaces around
211       a dot within <literal>\copy (select ...)</> (Tom)
212      </para>
213
214      <para>
215       Addition of spaces around the decimal point in a numeric literal would
216       result in a syntax error.
217      </para>
218     </listitem>
219
220     <listitem>
221      <para>
222       Avoid formatting failure in <application>psql</> when running in a
223       locale context that doesn't match the <varname>client_encoding</>
224       (Tom)
225      </para>
226     </listitem>
227
228     <listitem>
229      <para>
230       Fix unnecessary <quote>GIN indexes do not support whole-index scans</>
231       errors for unsatisfiable queries using <filename>contrib/intarray</>
232       operators (Tom)
233      </para>
234     </listitem>
235
236     <listitem>
237      <para>
238       Ensure that <filename>contrib/pgstattuple</> functions respond to cancel
239       interrupts promptly (Tatsuhito Kasahara)
240      </para>
241     </listitem>
242
243     <listitem>
244      <para>
245       Make server startup deal properly with the case that
246       <function>shmget()</> returns <literal>EINVAL</> for an existing
247       shared memory segment (Tom)
248      </para>
249
250      <para>
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.
254      </para>
255     </listitem>
256
257     <listitem>
258      <para>
259       Avoid possible crashes in syslogger process on Windows (Heikki)
260      </para>
261     </listitem>
262
263     <listitem>
264      <para>
265       Deal more robustly with incomplete time zone information in the
266       Windows registry (Magnus)
267      </para>
268     </listitem>
269
270     <listitem>
271      <para>
272       Update the set of known Windows time zone names (Magnus)
273      </para>
274     </listitem>
275
276     <listitem>
277      <para>
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.
282      </para>
283
284      <para>
285       Also, add <literal>PKST</> (Pakistan Summer Time) to the default set of
286       timezone abbreviations.
287      </para>
288     </listitem>
289
290    </itemizedlist>
291
292   </sect2>
293  </sect1>
294
295  <sect1 id="release-8-4-3">
296   <title>Release 8.4.3</title>
297
298   <note>
299   <title>Release date</title>
300   <simpara>2010-03-15</simpara>
301   </note>
302
303   <para>
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">.
307   </para>
308
309   <sect2>
310    <title>Migration to Version 8.4.3</title>
311
312    <para>
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.
316    </para>
317
318   </sect2>
319
320   <sect2>
321    <title>Changes</title>
322
323    <itemizedlist>
324
325     <listitem>
326      <para>
327       Add new configuration parameter <varname>ssl_renegotiation_limit</> to
328       control how often we do session key renegotiation for an SSL connection
329       (Magnus)
330      </para>
331
332      <para>
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.
337      </para>
338     </listitem>
339
340     <listitem>
341      <para>
342       Fix possible deadlock during backend startup (Tom)
343      </para>
344     </listitem>
345
346     <listitem>
347      <para>
348       Fix possible crashes due to not handling errors during relcache reload
349       cleanly (Tom)
350      </para>
351     </listitem>
352
353     <listitem>
354      <para>
355       Fix possible crash due to use of dangling pointer to a cached plan
356       (Tatsuo)
357      </para>
358     </listitem>
359
360     <listitem>
361      <para>
362       Fix possible crash due to overenthusiastic invalidation of cached
363       plan for <command>ROLLBACK</> (Tom)
364      </para>
365     </listitem>
366
367     <listitem>
368      <para>
369       Fix possible crashes when trying to recover from a failure in
370       subtransaction start (Tom)
371      </para>
372     </listitem>
373
374     <listitem>
375      <para>
376       Fix server memory leak associated with use of savepoints and a client
377       encoding different from server's encoding (Tom)
378      </para>
379     </listitem>
380
381     <listitem>
382      <para>
383       Fix incorrect WAL data emitted during end-of-recovery cleanup of a GIST
384       index page split (Yoichi Hirai)
385      </para>
386
387      <para>
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
391       insertion.
392      </para>
393     </listitem>
394
395     <listitem>
396      <para>
397       Fix bug in WAL redo cleanup method for GIN indexes (Heikki)
398      </para>
399     </listitem>
400
401     <listitem>
402      <para>
403       Fix incorrect comparison of scan key in GIN index search (Teodor)
404      </para>
405     </listitem>
406
407     <listitem>
408      <para>
409       Make <function>substring()</> for <type>bit</> types treat any negative
410       length as meaning <quote>all the rest of the string</> (Tom)
411      </para>
412
413      <para>
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).
417      </para>
418     </listitem>
419
420     <listitem>
421      <para>
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)
425      </para>
426     </listitem>
427
428     <listitem>
429      <para>
430       Fix some cases of pathologically slow regular expression matching (Tom)
431      </para>
432     </listitem>
433
434     <listitem>
435      <para>
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)
438      </para>
439     </listitem>
440
441     <listitem>
442      <para>
443       Fix bug with trying to update a field of an element of a
444       composite-type array column (Tom)
445      </para>
446     </listitem>
447
448     <listitem>
449      <para>
450       Avoid failure when <command>EXPLAIN</> has to print a FieldStore or
451       assignment ArrayRef expression (Tom)
452      </para>
453
454      <para>
455       These cases can arise now that <command>EXPLAIN VERBOSE</> tries to
456       print plan node target lists.
457      </para>
458     </listitem>
459
460     <listitem>
461      <para>
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)
465      </para>
466
467      <para>
468       This fixes a regression for some cases that worked before 8.4.
469      </para>
470     </listitem>
471
472     <listitem>
473      <para>
474       Avoid undesirable rowtype compatibility check failures in some cases
475       where a whole-row Var has a rowtype that contains dropped columns (Tom)
476      </para>
477     </listitem>
478
479     <listitem>
480      <para>
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)
484      </para>
485     </listitem>
486
487     <listitem>
488      <para>
489       Always pass the catalog ID to an option validator function specified in
490       <command>CREATE FOREIGN DATA WRAPPER</> (Martin Pihlak)
491      </para>
492     </listitem>
493
494     <listitem>
495      <para>
496       Fix some more cases of temporary-file leakage (Heikki)
497      </para>
498
499      <para>
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.
503      </para>
504     </listitem>
505
506     <listitem>
507      <para>
508       Add support for doing <literal>FULL JOIN ON FALSE</> (Tom)
509      </para>
510
511      <para>
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.
514      </para>
515     </listitem>
516
517     <listitem>
518      <para>
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)
522      </para>
523     </listitem>
524
525     <listitem>
526      <para>
527       Prevent treating an <literal>INOUT</> cast as representing binary
528       compatibility (Heikki)
529      </para>
530     </listitem>
531
532     <listitem>
533      <para>
534       Include column name in the message when warning about inability to
535       grant or revoke column-level privileges (Stephen Frost)
536      </para>
537
538      <para>
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.
542      </para>
543     </listitem>
544
545     <listitem>
546      <para>
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)
551      </para>
552
553      <para>
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
558       the whole construct.
559      </para>
560     </listitem>
561
562     <listitem>
563      <para>
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
566       (Tom)
567      </para>
568     </listitem>
569
570     <listitem>
571      <para>
572       Fix possible infinite loop if <function>SSL_read</> or
573       <function>SSL_write</> fails without setting <varname>errno</> (Tom)
574      </para>
575
576      <para>
577       This is reportedly possible with some Windows versions of
578       <application>openssl</>.
579      </para>
580     </listitem>
581
582     <listitem>
583      <para>
584       Disallow <acronym>GSSAPI</> authentication on local connections,
585       since it requires a hostname to function correctly (Magnus)
586      </para>
587     </listitem>
588
589     <listitem>
590      <para>
591       Protect <application>ecpg</> against applications freeing strings
592       unexpectedly (Michael)
593      </para>
594     </listitem>
595
596     <listitem>
597      <para>
598       Make <application>ecpg</> report the proper SQLSTATE if the connection
599       disappears (Michael)
600      </para>
601     </listitem>
602
603     <listitem>
604      <para>
605       Fix translation of cell contents in <application>psql</> <literal>\d</>
606       output (Heikki)
607      </para>
608     </listitem>
609
610     <listitem>
611      <para>
612       Fix <application>psql</>'s <literal>numericlocale</> option to not
613       format strings it shouldn't in latex and troff output formats (Heikki)
614      </para>
615     </listitem>
616
617     <listitem>
618      <para>
619       Fix a small per-query memory leak in <application>psql</> (Tom)
620      </para>
621     </listitem>
622
623     <listitem>
624      <para>
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</>
628       (Bruce)
629      </para>
630     </listitem>
631
632     <listitem>
633      <para>
634       Fix <application>pg_dump</>'s output of permissions for foreign servers
635       (Heikki)
636      </para>
637     </listitem>
638
639     <listitem>
640      <para>
641       Fix possible crash in parallel <application>pg_restore</> due to
642       out-of-range dependency IDs (Tom)
643      </para>
644     </listitem>
645
646     <listitem>
647      <para>
648       Fix plpgsql failure in one case where a composite column is set to NULL
649       (Tom)
650      </para>
651     </listitem>
652
653     <listitem>
654      <para>
655       Fix possible failure when calling PL/Perl functions from PL/PerlU
656       or vice versa (Tim Bunce)
657      </para>
658     </listitem>
659
660     <listitem>
661      <para>
662       Add <literal>volatile</> markings in PL/Python to avoid possible
663       compiler-specific misbehavior (Zdenek Kotala)
664      </para>
665     </listitem>
666
667     <listitem>
668      <para>
669       Ensure PL/Tcl initializes the Tcl interpreter fully (Tom)
670      </para>
671
672      <para>
673       The only known symptom of this oversight is that the Tcl
674       <literal>clock</> command misbehaves if using Tcl 8.5 or later.
675      </para>
676     </listitem>
677
678     <listitem>
679      <para>
680       Prevent <function>ExecutorEnd</> from being run on portals created
681       within a failed transaction or subtransaction (Tom)
682      </para>
683
684      <para>
685       This is known to cause issues when using
686       <filename>contrib/auto_explain</>.
687      </para>
688     </listitem>
689
690     <listitem>
691      <para>
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)
695      </para>
696     </listitem>
697
698     <listitem>
699      <para>
700       Allow zero-dimensional arrays in <filename>contrib/ltree</> operations
701       (Tom)
702      </para>
703
704      <para>
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
709       rows.
710      </para>
711     </listitem>
712
713     <listitem>
714      <para>
715       Fix assorted crashes in <filename>contrib/xml2</> caused by sloppy
716       memory management (Tom)
717      </para>
718     </listitem>
719
720     <listitem>
721      <para>
722       Make building of <filename>contrib/xml2</> more robust on Windows
723       (Andrew)
724      </para>
725     </listitem>
726
727     <listitem>
728      <para>
729       Fix race condition in Windows signal handling (Radu Ilie)
730      </para>
731
732      <para>
733       One known symptom of this bug is that rows in <structname>pg_listener</>
734       could be dropped under heavy load.
735      </para>
736     </listitem>
737
738     <listitem>
739      <para>
740       Make the configure script report failure if the C compiler does
741       not provide a working 64-bit integer datatype (Tom)
742      </para>
743
744      <para>
745       This case has been broken for some time, and no longer seems worth
746       supporting, so just reject it at configure time instead.
747      </para>
748     </listitem>
749
750     <listitem>
751      <para>
752       Update time zone data files to <application>tzdata</> release 2010e
753       for DST law changes in Bangladesh, Chile, Fiji, Mexico, Paraguay, Samoa.
754      </para>
755     </listitem>
756
757    </itemizedlist>
758
759   </sect2>
760  </sect1>
761
762  <sect1 id="release-8-4-2">
763   <title>Release 8.4.2</title>
764
765   <note>
766   <title>Release date</title>
767   <simpara>2009-12-14</simpara>
768   </note>
769
770   <para>
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">.
774   </para>
775
776   <sect2>
777    <title>Migration to Version 8.4.2</title>
778
779    <para>
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.
784    </para>
785
786   </sect2>
787
788   <sect2>
789    <title>Changes</title>
790
791    <itemizedlist>
792
793     <listitem>
794      <para>
795       Protect against indirect security threats caused by index functions
796       changing session-local state (Gurjeet Singh, Tom)
797      </para>
798
799      <para>
800       This change prevents allegedly-immutable index functions from possibly
801       subverting a superuser's session (CVE-2009-4136).
802      </para>
803     </listitem>
804
805     <listitem>
806      <para>
807       Reject SSL certificates containing an embedded null byte in the common
808       name (CN) field (Magnus)
809      </para>
810
811      <para>
812       This prevents unintended matching of a certificate to a server or client
813       name during SSL validation (CVE-2009-4034).
814      </para>
815     </listitem>
816
817     <listitem>
818      <para>
819       Fix hash index corruption (Tom)
820      </para>
821
822      <para>
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.
830      </para>
831     </listitem>
832
833     <listitem>
834      <para>
835       Fix possible crash during backend-startup-time cache initialization (Tom)
836      </para>
837     </listitem>
838
839     <listitem>
840      <para>
841       Avoid crash on empty thesaurus dictionary (Tom)
842      </para>
843     </listitem>
844
845     <listitem>
846      <para>
847       Prevent signals from interrupting <literal>VACUUM</> at unsafe times
848       (Alvaro)
849      </para>
850
851      <para>
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
855       truncated the table.
856      </para>
857     </listitem>
858
859     <listitem>
860      <para>
861       Fix possible crash due to integer overflow in hash table size
862       calculation (Tom)
863      </para>
864
865      <para>
866       This could occur with extremely large planner estimates for the size of
867       a hashjoin's result.
868      </para>
869     </listitem>
870
871     <listitem>
872      <para>
873       Fix crash if a <literal>DROP</> is attempted on an internally-dependent
874       object (Tom)
875      </para>
876     </listitem>
877
878     <listitem>
879      <para>
880       Fix very rare crash in <type>inet</>/<type>cidr</> comparisons (Chris
881       Mikkelson)
882      </para>
883     </listitem>
884
885     <listitem>
886      <para>
887       Ensure that shared tuple-level locks held by prepared transactions are
888       not ignored (Heikki)
889      </para>
890     </listitem>
891
892     <listitem>
893      <para>
894       Fix premature drop of temporary files used for a cursor that is accessed
895       within a subtransaction (Heikki)
896      </para>
897     </listitem>
898
899     <listitem>
900      <para>
901       Fix memory leak in syslogger process when rotating to a new CSV logfile
902       (Tom)
903      </para>
904     </listitem>
905
906     <listitem>
907      <para>
908       Fix memory leak in postmaster when re-parsing <filename>pg_hba.conf</>
909       (Tom)
910      </para>
911     </listitem>
912
913     <listitem>
914      <para>
915       Fix Windows permission-downgrade logic (Jesse Morris)
916      </para>
917
918      <para>
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>.
922      </para>
923     </listitem>
924
925     <listitem>
926      <para>
927       Make <literal>FOR UPDATE/SHARE</> in the primary query not propagate
928       into <literal>WITH</> queries (Tom)
929      </para>
930
931      <para>
932       For example, in
933 <programlisting>
934 WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE
935 </programlisting>
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.
942      </para>
943     </listitem>
944
945     <listitem>
946      <para>
947       Fix bug with a <literal>WITH RECURSIVE</> query immediately inside
948       another one (Tom)
949      </para>
950     </listitem>
951
952     <listitem>
953      <para>
954       Fix concurrency bug in hash indexes (Tom)
955      </para>
956
957      <para>
958       Concurrent insertions could cause index scans to transiently report
959       wrong results.
960      </para>
961     </listitem>
962
963     <listitem>
964      <para>
965       Fix incorrect logic for GiST index page splits, when the split depends
966       on a non-first column of the index (Paul Ramsey)
967      </para>
968     </listitem>
969
970     <listitem>
971      <para>
972       Fix wrong search results for a multi-column GIN index with
973       <literal>fastupdate</> enabled (Teodor)
974      </para>
975     </listitem>
976
977     <listitem>
978      <para>
979       Fix bugs in WAL entry creation for GIN indexes (Tom)
980      </para>
981
982      <para>
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
985       the next checkpoint.
986      </para>
987     </listitem>
988
989     <listitem>
990      <para>
991       Don't error out if recycling or removing an old WAL file fails at the
992       end of checkpoint (Heikki)
993      </para>
994
995      <para>
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.
1000      </para>
1001     </listitem>
1002
1003     <listitem>
1004      <para>
1005       Ensure WAL files aren't repeatedly archived on Windows (Heikki)
1006      </para>
1007
1008      <para>
1009       This is another symptom that could happen if some other process
1010       interfered with deletion of a no-longer-needed file.
1011      </para>
1012     </listitem>
1013
1014     <listitem>
1015      <para>
1016       Fix PAM password processing to be more robust (Tom)
1017      </para>
1018
1019      <para>
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
1024       pass to it.
1025      </para>
1026     </listitem>
1027
1028     <listitem>
1029      <para>
1030       Raise the maximum authentication token (Kerberos ticket) size in GSSAPI
1031       and SSPI authentication methods (Ian Turner)
1032      </para>
1033
1034      <para>
1035       While the old 2000-byte limit was more than enough for Unix Kerberos
1036       implementations, tickets issued by Windows Domain Controllers can be
1037       much larger.
1038      </para>
1039     </listitem>
1040
1041     <listitem>
1042      <para>
1043       Ensure that domain constraints are enforced in constructs like
1044       <literal>ARRAY[...]::domain</>, where the domain is over an array type
1045       (Heikki)
1046      </para>
1047     </listitem>
1048
1049     <listitem>
1050      <para>
1051       Fix foreign-key logic for some cases involving composite-type columns
1052       as foreign keys (Tom)
1053      </para>
1054     </listitem>
1055
1056     <listitem>
1057      <para>
1058       Ensure that a cursor's snapshot is not modified after it is created
1059       (Alvaro)
1060      </para>
1061
1062      <para>
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.
1065      </para>
1066     </listitem>
1067
1068     <listitem>
1069      <para>
1070       Fix <literal>CREATE TABLE</> to properly merge default expressions
1071       coming from different inheritance parent tables (Tom)
1072      </para>
1073
1074      <para>
1075       This used to work but was broken in 8.4.
1076      </para>
1077     </listitem>
1078
1079     <listitem>
1080      <para>
1081       Re-enable collection of access statistics for sequences (Akira Kurosawa)
1082      </para>
1083
1084      <para>
1085       This used to work but was broken in 8.3.
1086      </para>
1087     </listitem>
1088
1089     <listitem>
1090      <para>
1091       Fix processing of ownership dependencies during <literal>CREATE OR
1092       REPLACE FUNCTION</> (Tom)
1093      </para>
1094     </listitem>
1095
1096     <listitem>
1097      <para>
1098       Fix incorrect handling of <literal>WHERE</>
1099       <replaceable>x</>=<replaceable>x</> conditions (Tom)
1100      </para>
1101
1102      <para>
1103       In some cases these could get ignored as redundant, but they aren't
1104       &mdash; they're equivalent to <replaceable>x</> <literal>IS NOT NULL</>.
1105      </para>
1106     </listitem>
1107
1108     <listitem>
1109      <para>
1110       Fix incorrect plan construction when using hash aggregation to implement
1111       <literal>DISTINCT</> for textually identical volatile expressions (Tom)
1112      </para>
1113     </listitem>
1114
1115     <listitem>
1116      <para>
1117       Fix Assert failure for a volatile <literal>SELECT DISTINCT ON</>
1118       expression (Tom)
1119      </para>
1120     </listitem>
1121
1122     <listitem>
1123      <para>
1124       Fix <function>ts_stat()</> to not fail on an empty <type>tsvector</>
1125       value (Tom)
1126      </para>
1127     </listitem>
1128
1129     <listitem>
1130      <para>
1131       Make text search parser accept underscores in XML attributes (Peter)
1132      </para>
1133     </listitem>
1134
1135     <listitem>
1136      <para>
1137       Fix encoding handling in <type>xml</> binary input (Heikki)
1138      </para>
1139
1140      <para>
1141       If the XML header doesn't specify an encoding, we now assume UTF-8 by
1142       default; the previous handling was inconsistent.
1143      </para>
1144     </listitem>
1145
1146     <listitem>
1147      <para>
1148       Fix bug with calling <literal>plperl</> from <literal>plperlu</> or vice
1149       versa (Tom)
1150      </para>
1151
1152      <para>
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.
1155      </para>
1156     </listitem>
1157
1158     <listitem>
1159      <para>
1160       Fix session-lifespan memory leak when a PL/Perl function is redefined
1161       (Tom)
1162      </para>
1163     </listitem>
1164
1165     <listitem>
1166      <para>
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)
1170      </para>
1171
1172      <para>
1173       This worked correctly already for non-set-returning functions.
1174      </para>
1175     </listitem>
1176
1177     <listitem>
1178      <para>
1179       Fix rare crash in exception processing in PL/Python (Peter)
1180      </para>
1181     </listitem>
1182
1183     <listitem>
1184      <para>
1185       Fix <application>ecpg</> problem with comments in <literal>DECLARE
1186       CURSOR</> statements (Michael)
1187      </para>
1188     </listitem>
1189
1190     <listitem>
1191      <para>
1192       Fix <application>ecpg</> to not treat recently-added keywords as
1193       reserved words (Tom)
1194      </para>
1195
1196      <para>
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</>.
1202      </para>
1203     </listitem>
1204
1205     <listitem>
1206      <para>
1207       Re-allow regular expression special characters in <application>psql</>'s
1208       <literal>\df</> function name parameter (Tom)
1209      </para>
1210     </listitem>
1211
1212     <listitem>
1213      <para>
1214       In <filename>contrib/fuzzystrmatch</>, correct the calculation of
1215       <function>levenshtein</> distances with non-default costs (Marcin Mank)
1216      </para>
1217     </listitem>
1218
1219     <listitem>
1220      <para>
1221       In <filename>contrib/pg_standby</>, disable triggering failover with a
1222       signal on Windows (Fujii Masao)
1223      </para>
1224
1225      <para>
1226       This never did anything useful, because Windows doesn't have Unix-style
1227       signals, but recent changes made it actually crash.
1228      </para>
1229     </listitem>
1230
1231     <listitem>
1232      <para>
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)
1236      </para>
1237     </listitem>
1238
1239     <listitem>
1240      <para>
1241       Fix possible leak of connections when <filename>contrib/dblink</>
1242       encounters an error (Tatsuhito Kasahara)
1243      </para>
1244     </listitem>
1245
1246     <listitem>
1247      <para>
1248       Ensure <application>psql</>'s flex module is compiled with the correct
1249       system header definitions (Tom)
1250      </para>
1251
1252      <para>
1253       This fixes build failures on platforms where
1254       <literal>--enable-largefile</> causes incompatible changes in the
1255       generated code.
1256      </para>
1257     </listitem>
1258
1259     <listitem>
1260      <para>
1261       Make the postmaster ignore any <literal>application_name</> parameter in
1262       connection request packets, to improve compatibility with future libpq
1263       versions (Tom)
1264      </para>
1265     </listitem>
1266
1267     <listitem>
1268      <para>
1269       Update the timezone abbreviation files to match current reality (Joachim
1270       Wieland)
1271      </para>
1272
1273      <para>
1274       This includes adding <literal>IDT</> to the default
1275       timezone abbreviation set.
1276      </para>
1277     </listitem>
1278
1279     <listitem>
1280      <para>
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.
1285      </para>
1286     </listitem>
1287
1288    </itemizedlist>
1289
1290   </sect2>
1291  </sect1>
1292
1293  <sect1 id="release-8-4-1">
1294   <title>Release 8.4.1</title>
1295
1296   <note>
1297   <title>Release date</title>
1298   <simpara>2009-09-09</simpara>
1299   </note>
1300
1301   <para>
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">.
1305   </para>
1306
1307   <sect2>
1308    <title>Migration to Version 8.4.1</title>
1309
1310    <para>
1311     A dump/restore is not required for those running 8.4.X.
1312    </para>
1313
1314   </sect2>
1315
1316   <sect2>
1317    <title>Changes</title>
1318
1319    <itemizedlist>
1320
1321     <listitem>
1322      <para>
1323       Fix WAL page header initialization at the end of archive recovery
1324       (Heikki)
1325      </para>
1326
1327      <para>
1328       This could lead to failure to process the WAL in a subsequent
1329       archive recovery.
1330      </para>
1331     </listitem>
1332
1333     <listitem>
1334      <para>
1335       Fix <quote>cannot make new WAL entries during recovery</> error (Tom)
1336      </para>
1337     </listitem>
1338
1339     <listitem>
1340      <para>
1341       Fix problem that could make expired rows visible after a crash (Tom)
1342      </para>
1343
1344      <para>
1345       This bug involved a page status bit potentially not being set
1346       correctly after a server crash.
1347      </para>
1348     </listitem>
1349
1350     <listitem>
1351      <para>
1352       Disallow <command>RESET ROLE</> and <command>RESET SESSION
1353       AUTHORIZATION</> inside security-definer functions (Tom, Heikki)
1354      </para>
1355
1356      <para>
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.
1360       (See CVE-2007-6600)
1361      </para>
1362     </listitem>
1363
1364     <listitem>
1365      <para>
1366       Make <command>LOAD</> of an already-loaded loadable module
1367       into a no-op (Tom)
1368      </para>
1369
1370      <para>
1371       Formerly, <command>LOAD</> would attempt to unload and re-load the
1372       module, but this is unsafe and not all that useful.
1373      </para>
1374     </listitem>
1375
1376     <listitem>
1377      <para>
1378       Make window function <literal>PARTITION BY</> and <literal>ORDER BY</>
1379       items always be interpreted as simple expressions (Tom)
1380      </para>
1381
1382      <para>
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
1386       circularity.
1387      </para>
1388     </listitem>
1389
1390     <listitem>
1391      <para>
1392       Fix several errors in planning of semi-joins (Tom)
1393      </para>
1394
1395      <para>
1396       These led to wrong query results in some cases where <literal>IN</>
1397       or <literal>EXISTS</> was used together with another join.
1398      </para>
1399     </listitem>
1400
1401     <listitem>
1402      <para>
1403       Fix handling of whole-row references to subqueries that are within
1404       an outer join (Tom)
1405      </para>
1406
1407      <para>
1408       An example is
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.
1413      </para>
1414     </listitem>
1415
1416     <listitem>
1417      <para>
1418       Fix Windows shared-memory allocation code (Tsutomu Yamada, Magnus)
1419      </para>
1420
1421      <para>
1422       This bug led to the often-reported <quote>could not reattach
1423       to shared memory</> error message.
1424      </para>
1425     </listitem>
1426
1427     <listitem>
1428      <para>
1429       Fix locale handling with plperl (Heikki)
1430      </para>
1431
1432      <para>
1433       This bug could cause the server's locale setting to change when a
1434       plperl function is called, leading to data corruption.
1435      </para>
1436     </listitem>
1437
1438     <listitem>
1439      <para>
1440       Fix handling of reloptions to ensure setting one option doesn't
1441       force default values for others (Itagaki Takahiro)
1442      </para>
1443     </listitem>
1444
1445     <listitem>
1446      <para>
1447       Ensure that a <quote>fast shutdown</> request will forcibly terminate
1448       open sessions, even if a <quote>smart shutdown</> was already in progress
1449       (Fujii Masao)
1450      </para>
1451     </listitem>
1452
1453     <listitem>
1454      <para>
1455       Avoid memory leak for <function>array_agg()</> in <literal>GROUP BY</>
1456       queries (Tom)
1457      </para>
1458     </listitem>
1459
1460     <listitem>
1461      <para>
1462       Treat <function>to_char(..., 'TH')</> as an uppercase ordinal
1463       suffix with <literal>'HH'</>/<literal>'HH12'</> (Heikki)
1464      </para>
1465
1466      <para>
1467       It was previously handled as <literal>'th'</> (lowercase).
1468      </para>
1469     </listitem>
1470
1471     <listitem>
1472      <para>
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)
1477      </para>
1478
1479      <para>
1480       This has always worked for floating-point datetime configurations,
1481       but was broken in the integer datetime code.
1482      </para>
1483     </listitem>
1484
1485     <listitem>
1486      <para>
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)
1490      </para>
1491     </listitem>
1492
1493     <listitem>
1494      <para>
1495       Improve performance when processing toasted values in index scans (Tom)
1496      </para>
1497
1498      <para>
1499       This is particularly useful for <ulink
1500       url="http://postgis.refractions.net/">PostGIS</ulink>.
1501      </para>
1502     </listitem>
1503
1504     <listitem>
1505      <para>
1506       Fix a typo that disabled <varname>commit_delay</> (Jeff Janes)
1507      </para>
1508     </listitem>
1509
1510     <listitem>
1511      <para>
1512       Output early-startup messages to <filename>postmaster.log</> if the
1513       server is started in silent mode (Tom)
1514      </para>
1515
1516      <para>
1517       Previously such error messages were discarded, leading to
1518       difficulty in debugging.
1519      </para>
1520     </listitem>
1521
1522     <listitem>
1523      <para>
1524       Remove translated FAQs (Peter)
1525      </para>
1526
1527      <para>
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.
1531      </para>
1532     </listitem>
1533
1534     <listitem>
1535      <para>
1536       Fix <application>pg_ctl</> to not go into an infinite loop if
1537       <filename>postgresql.conf</> is empty (Jeff Davis)
1538      </para>
1539     </listitem>
1540
1541     <listitem>
1542      <para>
1543       Fix several errors in <application>pg_dump</>'s
1544       <literal>--binary-upgrade</> mode (Bruce, Tom)
1545      </para>
1546
1547      <para>
1548       <literal>pg_dump --binary-upgrade</> is used by pg_migrator.
1549      </para>
1550     </listitem>
1551
1552     <listitem>
1553      <para>
1554       Fix <filename>contrib/xml2</>'s <function>xslt_process()</> to
1555       properly handle the maximum number of parameters (twenty) (Tom)
1556      </para>
1557     </listitem>
1558
1559     <listitem>
1560      <para>
1561       Improve robustness of <application>libpq</>'s code to recover
1562       from errors during <command>COPY FROM STDIN</> (Tom)
1563      </para>
1564     </listitem>
1565
1566     <listitem>
1567      <para>
1568       Avoid including conflicting readline and editline header files
1569       when both libraries are installed (Zdenek Kotala)
1570      </para>
1571     </listitem>
1572
1573     <listitem>
1574      <para>
1575       Work around gcc bug that causes <quote>floating-point exception</>
1576       instead of <quote>division by zero</> on some platforms (Tom)
1577      </para>
1578     </listitem>
1579
1580     <listitem>
1581      <para>
1582       Update time zone data files to <application>tzdata</> release 2009l
1583       for DST law changes in Bangladesh, Egypt, Mauritius.
1584      </para>
1585     </listitem>
1586
1587    </itemizedlist>
1588
1589   </sect2>
1590  </sect1>
1591
1592  <sect1 id="release-8-4">
1593   <title>Release 8.4</title>
1594
1595   <note>
1596    <title>Release date</title>
1597    <simpara>2009-07-01</simpara>
1598   </note>
1599
1600   <sect2>
1601    <title>Overview</title>
1602
1603    <para>
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:
1609    </para>
1610
1611    <itemizedlist>
1612
1613     <!-- This list duplicates items below, but without authors or details-->
1614
1615     <listitem>
1616      <para>
1617       Windowing Functions
1618      </para>
1619     </listitem>
1620
1621     <listitem>
1622      <para>
1623       Common Table Expressions and Recursive Queries
1624      </para>
1625     </listitem>
1626
1627     <listitem>
1628      <para>
1629       Default and variadic parameters for functions
1630      </para>
1631     </listitem>
1632
1633     <listitem>
1634      <para>
1635       Parallel Restore
1636      </para>
1637     </listitem>
1638
1639     <listitem>
1640      <para>
1641       Column Permissions
1642      </para>
1643     </listitem>
1644
1645     <listitem>
1646      <para>
1647       Per-database locale settings
1648      </para>
1649     </listitem>
1650
1651     <listitem>
1652      <para>
1653       Improved hash indexes
1654      </para>
1655     </listitem>
1656
1657     <listitem>
1658      <para>
1659       Improved join performance for <literal>EXISTS</> and <literal>NOT EXISTS</> queries
1660      </para>
1661     </listitem>
1662
1663     <listitem>
1664      <para>
1665       Easier-to-use Warm Standby
1666      </para>
1667     </listitem>
1668
1669     <listitem>
1670      <para>
1671       Automatic sizing of the Free Space Map
1672      </para>
1673     </listitem>
1674
1675     <listitem>
1676      <para>
1677       Visibility Map (greatly reduces vacuum overhead for slowly-changing tables)
1678      </para>
1679     </listitem>
1680
1681     <listitem>
1682      <para>
1683       Version-aware psql (backslash commands work against older servers)
1684      </para>
1685     </listitem>
1686
1687     <listitem>
1688      <para>
1689       Support SSL certificates for user authentication
1690      </para>
1691     </listitem>
1692
1693     <listitem>
1694      <para>
1695       Per-function runtime statistics
1696      </para>
1697     </listitem>
1698
1699     <listitem>
1700      <para>
1701       Easy editing of functions in psql
1702      </para>
1703     </listitem>
1704
1705     <listitem>
1706      <para>
1707       New contrib modules: pg_stat_statements, auto_explain, citext, btree_gin
1708      </para>
1709     </listitem>
1710
1711    </itemizedlist>
1712
1713    <para>
1714     The above items are explained in more detail in the sections below.
1715    </para>
1716
1717   </sect2>
1718
1719   <sect2>
1720    <title>Migration to Version 8.4</title>
1721
1722    <para>
1723     A dump/restore using <application>pg_dump</application> is
1724     required for those wishing to migrate data from any previous
1725     release.
1726    </para>
1727
1728    <para>
1729     Observe the following incompatibilities:
1730    </para>
1731
1732    <sect3>
1733     <title>General</title>
1734     <itemizedlist>
1735
1736      <listitem>
1737       <para>
1738        Use 64-bit integer datetimes by default (Neil Conway)
1739       </para>
1740
1741       <para>
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</>.
1745       </para>
1746      </listitem>
1747
1748      <listitem>
1749       <para>
1750        Remove <application>ipcclean</> utility command (Bruce)
1751       </para>
1752
1753       <para>
1754        The utility only worked on a few platforms.  Users should use
1755        their operating system tools instead.
1756       </para>
1757      </listitem>
1758
1759     </itemizedlist>
1760
1761    </sect3>
1762
1763    <sect3>
1764     <title>Server Settings</title>
1765     <itemizedlist>
1766
1767      <listitem>
1768       <para>
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)
1772       </para>
1773      </listitem>
1774
1775      <listitem>
1776       <para>
1777        Change default setting for <literal>max_prepared_transactions</> to
1778        zero (previously it was 5) (Tom)
1779       </para>
1780      </listitem>
1781
1782      <listitem>
1783       <para>
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)
1788       </para>
1789      </listitem>
1790
1791      <listitem>
1792       <para>
1793        Make <literal>debug_pretty_print</> default to <literal>on</> (Tom)
1794       </para>
1795      </listitem>
1796
1797      <listitem>
1798       <para>
1799        Remove <varname>explain_pretty_print</> parameter (no longer needed) (Tom)
1800       </para>
1801      </listitem>
1802
1803      <listitem>
1804       <para>
1805        Make <varname>log_temp_files</> settable by superusers only, like other
1806        logging options (Simon Riggs)
1807       </para>
1808      </listitem>
1809
1810      <listitem>
1811       <para>
1812        Remove automatic appending of the epoch timestamp when no <literal>%</>
1813        escapes are present in <literal>log_filename</> (Robert Haas)
1814       </para>
1815
1816       <para>
1817        This change was made because some users wanted a fixed log filename,
1818        for use with an external log rotation tool.
1819       </para>
1820      </listitem>
1821
1822      <listitem>
1823       <para>
1824        Remove <varname>log_restartpoints</> from <filename>recovery.conf</>;
1825        instead use <varname>log_checkpoints</> (Simon)
1826       </para>
1827      </listitem>
1828
1829      <listitem>
1830       <para>
1831        Remove <varname>krb_realm</> and <varname>krb_server_hostname</>;
1832        these are now set in <filename>pg_hba.conf</> instead (Magnus)
1833       </para>
1834      </listitem>
1835
1836      <listitem>
1837       <para>
1838        There are also significant changes in <link
1839        linkend="release-8-4-pg-hba-conf"><filename>pg_hba.conf</></link>,
1840        as described below.
1841       </para>
1842      </listitem>
1843
1844     </itemizedlist>
1845
1846    </sect3>
1847
1848    <sect3>
1849     <title>Queries</title>
1850
1851     <itemizedlist>
1852
1853      <listitem>
1854       <para>
1855        Change <command>TRUNCATE</> and <command>LOCK</> to
1856        apply to child tables of the specified table(s) (Peter)
1857       </para>
1858
1859       <para>
1860        These commands now accept an <literal>ONLY</> option that prevents
1861        processing child tables; this option must be used if the old
1862        behavior is needed.
1863       </para>
1864      </listitem>
1865
1866      <listitem>
1867       <para>
1868        <command>SELECT DISTINCT</> and
1869        <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</>
1870        no longer always produce sorted output (Tom)
1871       </para>
1872
1873       <para>
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.
1883       </para>
1884      </listitem>
1885
1886      <listitem>
1887       <para>
1888        Force child tables to inherit <literal>CHECK</> constraints from parents
1889        (Alex Hunsaker, Nikhil Sontakke, Tom)
1890       </para>
1891
1892       <para>
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.
1897       </para>
1898      </listitem>
1899
1900      <listitem>
1901       <para>
1902        Disallow negative <literal>LIMIT</> or <literal>OFFSET</>
1903        values, rather than treating them as zero (Simon)
1904       </para>
1905      </listitem>
1906
1907      <listitem>
1908       <para>
1909        Disallow <command>LOCK TABLE</> outside a transaction block
1910        (Tom)
1911       </para>
1912
1913       <para>
1914        Such an operation is useless because the lock would be released
1915        immediately.
1916       </para>
1917      </listitem>
1918
1919      <listitem>
1920       <para>
1921        Sequences now contain an additional <structfield>start_value</> column
1922        (Zoltan Boszormenyi)
1923       </para>
1924
1925       <para>
1926        This supports <command>ALTER SEQUENCE ... RESTART</>.
1927       </para>
1928      </listitem>
1929
1930     </itemizedlist>
1931
1932    </sect3>
1933
1934
1935    <sect3>
1936     <title>Functions and Operators</title>
1937
1938     <itemizedlist>
1939
1940      <listitem>
1941       <para>
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)
1946       </para>
1947
1948       <para>
1949        This matches the longstanding <type>float8</> behavior.
1950       </para>
1951      </listitem>
1952
1953      <listitem>
1954       <para>
1955        Allow unary minus of floating-point values to produce minus zero (Tom)
1956       </para>
1957
1958       <para>
1959        The changed behavior is more <acronym>IEEE</>-standard
1960        compliant.
1961       </para>
1962      </listitem>
1963
1964      <listitem>
1965       <para>
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)
1968       </para>
1969
1970       <para>
1971        Previously, such an escape character was silently ignored,
1972        thus possibly masking application logic errors.
1973       </para>
1974      </listitem>
1975
1976      <listitem>
1977       <para>
1978        Remove <literal>~=~</> and <literal>~&lt;&gt;~</> operators
1979        formerly used for <literal>LIKE</> index comparisons (Tom)
1980       </para>
1981
1982       <para>
1983        Pattern indexes now use the regular equality operator.
1984       </para>
1985      </listitem>
1986
1987      <listitem>
1988       <para>
1989        <function>xpath()</> now passes its arguments to <application>libxml</>
1990        without any changes (Andrew)
1991       </para>
1992
1993       <para>
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
1996        work well.
1997       </para>
1998      </listitem>
1999
2000      <listitem>
2001       <para>
2002        Make <function>xmlelement()</> format attribute values just like
2003        content values (Peter)
2004       </para>
2005
2006       <para>
2007        Previously, attribute values were formatted according to the
2008        normal SQL output behavior, which is sometimes at odds with
2009        XML rules.
2010       </para>
2011      </listitem>
2012
2013      <listitem>
2014       <para>
2015        Rewrite memory management for <application>libxml</>-using functions
2016        (Tom)
2017       </para>
2018
2019       <para>
2020        This change should avoid some compatibility problems with use of
2021        <application>libxml</> in PL/Perl and other add-on code.
2022       </para>
2023      </listitem>
2024
2025      <listitem>
2026       <para>
2027        Adopt a faster algorithm for hash functions (Kenneth Marshall,
2028        based on work of Bob Jenkins)
2029       </para>
2030
2031       <para>
2032        Many of the built-in hash functions now deliver different results on
2033        little-endian and big-endian platforms.
2034       </para>
2035      </listitem>
2036
2037     </itemizedlist>
2038
2039     <sect4>
2040      <title>Temporal Functions and Operators</title>
2041
2042      <itemizedlist>
2043
2044       <listitem>
2045        <para>
2046         <varname>DateStyle</> no longer controls <type>interval</> output
2047         formatting; instead there is a new variable <varname>IntervalStyle</>
2048         (Ron Mayer)
2049        </para>
2050       </listitem>
2051
2052       <listitem>
2053        <para>
2054         Improve consistency of handling of fractional seconds in
2055         <type>timestamp</> and <type>interval</> output (Ron Mayer)
2056        </para>
2057
2058        <para>
2059         This may result in displaying a different number of fractional
2060         digits than before, or rounding instead of truncating.
2061        </para>
2062       </listitem>
2063
2064       <listitem>
2065        <para>
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)
2069        </para>
2070       </listitem>
2071
2072       <listitem>
2073        <para>
2074         Cause <function>to_date()</> and <function>to_timestamp()</>
2075         to more consistently report errors for invalid input (Brendan
2076         Jurd)
2077        </para>
2078
2079        <para>
2080         Previous versions would often ignore or silently misread input
2081         that did not match the format string.  Such cases will now
2082         result in an error.
2083        </para>
2084       </listitem>
2085
2086       <listitem>
2087        <para>
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
2091         Jurd)
2092        </para>
2093
2094        <para>
2095         For example, input value <literal>ad</> now matches the format
2096         string <literal>AD</>.
2097        </para>
2098       </listitem>
2099
2100      </itemizedlist>
2101
2102     </sect4>
2103
2104    </sect3>
2105
2106   </sect2>
2107
2108   <sect2>
2109    <title>Changes</title>
2110
2111    <para>
2112     Below you will find a detailed account of the changes between
2113     <productname>PostgreSQL</productname> 8.4 and the previous major
2114     release.
2115    </para>
2116
2117    <sect3>
2118     <title>Performance</title>
2119     <itemizedlist>
2120
2121      <listitem>
2122       <para>
2123        Improve optimizer statistics calculations (Jan Urbanski, Tom)
2124       </para>
2125
2126       <para>
2127        In particular, estimates for full-text-search operators are
2128        greatly improved.
2129       </para>
2130      </listitem>
2131
2132      <listitem>
2133       <para>
2134        Allow <command>SELECT DISTINCT</> and
2135        <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</> to
2136        use hashing (Tom)
2137       </para>
2138
2139       <para>
2140        This means that these types of queries no longer automatically
2141        produce sorted output.
2142       </para>
2143      </listitem>
2144
2145      <listitem>
2146       <para>
2147        Create explicit concepts of semi-joins and anti-joins (Tom)
2148       </para>
2149
2150       <para>
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.
2158       </para>
2159      </listitem>
2160
2161      <listitem>
2162       <para>
2163        Improve optimization of sub-selects beneath outer joins (Tom)
2164       </para>
2165
2166       <para>
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.
2170       </para>
2171      </listitem>
2172
2173      <listitem>
2174       <para>
2175        Improve the performance of <function>text_position()</> and
2176        related functions by using Boyer-Moore-Horspool searching (David
2177        Rowley)
2178       </para>
2179
2180       <para>
2181        This is particularly helpful for long search patterns.
2182       </para>
2183      </listitem>
2184
2185      <listitem>
2186       <para>
2187        Reduce I/O load of writing the statistics collection file
2188        by writing the file only when requested (Martin Pihlak)
2189       </para>
2190      </listitem>
2191
2192      <listitem>
2193       <para>
2194        Improve performance for bulk inserts (Robert Haas, Simon)
2195       </para>
2196      </listitem>
2197
2198      <listitem>
2199       <para>
2200        Increase the default value of <varname>default_statistics_target</>
2201        from <literal>10</> to <literal>100</> (Greg Sabino Mullane,
2202        Tom)
2203       </para>
2204
2205       <para>
2206        The maximum value was also increased from <literal>1000</> to
2207        <literal>10000</>.
2208       </para>
2209      </listitem>
2210
2211      <listitem>
2212       <para>
2213        Perform <varname>constraint_exclusion</> checking by default
2214        in queries involving inheritance or <literal>UNION ALL</> (Tom)
2215       </para>
2216
2217       <para>
2218        A new <varname>constraint_exclusion</> setting,
2219        <literal>partition</>, was added to specify this behavior.
2220       </para>
2221      </listitem>
2222
2223      <listitem>
2224       <para>
2225        Allow I/O read-ahead for bitmap index scans (Greg Stark)
2226       </para>
2227
2228       <para>
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.
2232       </para>
2233      </listitem>
2234
2235      <listitem>
2236       <para>
2237        Inline simple set-returning <acronym>SQL</> functions in
2238        <literal>FROM</> clauses (Richard Rowell)
2239       </para>
2240      </listitem>
2241
2242      <listitem>
2243       <para>
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)
2247       </para>
2248      </listitem>
2249
2250      <listitem>
2251       <para>
2252        Reduce volume of temporary data in multi-batch hash joins
2253        by suppressing <quote>physical tlist</> optimization (Michael
2254        Henderson, Ramon Lawrence)
2255       </para>
2256      </listitem>
2257
2258      <listitem>
2259       <para>
2260        Avoid waiting for idle-in-transaction sessions during
2261        <command>CREATE INDEX CONCURRENTLY</> (Simon)
2262       </para>
2263      </listitem>
2264
2265      <listitem>
2266       <para>
2267        Improve performance of shared cache invalidation (Tom)
2268       </para>
2269      </listitem>
2270
2271     </itemizedlist>
2272
2273    </sect3>
2274
2275    <sect3>
2276     <title>Server</title>
2277
2278     <sect4>
2279      <title>Settings</title>
2280
2281      <itemizedlist>
2282
2283       <listitem>
2284        <para>
2285         Convert many <filename>postgresql.conf</> settings to enumerated
2286         values so that <literal>pg_settings</> can display the valid
2287         values (Magnus)
2288        </para>
2289       </listitem>
2290
2291       <listitem>
2292        <para>
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)
2296        </para>
2297       </listitem>
2298
2299       <listitem>
2300        <para>
2301         Allow underscores in the names of custom variable
2302         classes in <filename>postgresql.conf</> (Tom)
2303        </para>
2304       </listitem>
2305
2306      </itemizedlist>
2307
2308     </sect4>
2309
2310     <sect4>
2311      <title>Authentication and security</title>
2312      <itemizedlist>
2313
2314       <listitem>
2315        <para>
2316         Remove support for the (insecure) <literal>crypt</> authentication method
2317         (Magnus)
2318        </para>
2319
2320        <para>
2321         This effectively obsoletes pre-<productname>PostgreSQL</> 7.2 client
2322         libraries, as there is no longer any non-plaintext password method that
2323         they can use.
2324        </para>
2325       </listitem>
2326
2327       <listitem>
2328        <para>
2329         Support regular expressions in <filename>pg_ident.conf</>
2330         (Magnus)
2331        </para>
2332       </listitem>
2333
2334       <listitem>
2335        <para>
2336         Allow <productname>Kerberos</>/<acronym>GSSAPI</> parameters
2337         to be changed without restarting the postmaster (Magnus)
2338        </para>
2339       </listitem>
2340
2341       <listitem>
2342        <para>
2343         Support <acronym>SSL</> certificate chains in server certificate
2344         file (Andrew Gierth)
2345        </para>
2346
2347        <para>
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
2351         commercial CAs.
2352        </para>
2353       </listitem>
2354
2355       <listitem>
2356        <para>
2357         Report appropriate error message for combination of <literal>MD5</>
2358         authentication and <varname>db_user_namespace</> enabled (Bruce)
2359        </para>
2360       </listitem>
2361      </itemizedlist>
2362
2363     </sect4>
2364
2365     <sect4 id="release-8-4-pg-hba-conf">
2366      <title><filename>pg_hba.conf</></title>
2367      <itemizedlist>
2368
2369       <listitem>
2370        <para>
2371         Change all authentication options to use <literal>name=value</>
2372         syntax (Magnus)
2373        </para>
2374
2375        <para>
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.
2380        </para>
2381       </listitem>
2382
2383       <listitem>
2384        <para>
2385         Remove the <literal>ident sameuser</> option, instead making that
2386         behavior the default if no usermap is specified (Magnus)
2387        </para>
2388       </listitem>
2389
2390       <listitem>
2391        <para>
2392         Allow a usermap parameter for all external authentication methods
2393         (Magnus)
2394        </para>
2395
2396        <para>
2397         Previously a usermap was only supported for <literal>ident</>
2398         authentication.
2399        </para>
2400       </listitem>
2401
2402       <listitem>
2403        <para>
2404         Add <literal>clientcert</> option to control requesting of a
2405         client certificate (Magnus)
2406        </para>
2407
2408        <para>
2409         Previously this was controlled by the presence of a root
2410         certificate file in the server's data directory.
2411        </para>
2412       </listitem>
2413
2414       <listitem>
2415        <para>
2416         Add <literal>cert</> authentication method to allow
2417         <emphasis>user</> authentication via <acronym>SSL</> certificates
2418         (Magnus)
2419        </para>
2420
2421        <para>
2422         Previously <acronym>SSL</> certificates could only verify that
2423         the client had access to a certificate, not authenticate a
2424         user.
2425        </para>
2426       </listitem>
2427
2428       <listitem>
2429        <para>
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)
2433        </para>
2434
2435        <para>
2436         These override the settings in <filename>postgresql.conf</>.
2437        </para>
2438       </listitem>
2439
2440       <listitem>
2441        <para>
2442         Add <varname>include_realm</> parameter for <literal>krb5</>,
2443         <literal>gssapi</>, and <literal>sspi</> methods (Magnus)
2444        </para>
2445
2446        <para>
2447         This allows identical usernames from different realms to be
2448         authenticated as different database users using usermaps.
2449        </para>
2450       </listitem>
2451
2452       <listitem>
2453        <para>
2454         Parse <filename>pg_hba.conf</> fully when it is loaded,
2455         so that errors are reported immediately (Magnus)
2456        </para>
2457
2458        <para>
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.
2464        </para>
2465       </listitem>
2466
2467       <listitem>
2468        <para>
2469         Show all parsing errors in <filename>pg_hba.conf</> instead of
2470         aborting after the first one (Selena Deckelmann)
2471        </para>
2472       </listitem>
2473
2474       <listitem>
2475        <para>
2476         Support <literal>ident</> authentication over Unix-domain sockets
2477         on <productname>Solaris</> (Garick Hamlin)
2478        </para>
2479       </listitem>
2480
2481      </itemizedlist>
2482
2483     </sect4>
2484
2485     <sect4>
2486      <title>Continuous Archiving</title>
2487      <itemizedlist>
2488
2489       <listitem>
2490        <para>
2491         Provide an option to <function>pg_start_backup()</> to force its
2492         implied checkpoint to finish as quickly as possible (Tom)
2493        </para>
2494
2495        <para>
2496         The default behavior avoids excess I/O consumption, but that is
2497         pointless if no concurrent query activity is going on.
2498        </para>
2499       </listitem>
2500
2501       <listitem>
2502        <para>
2503         Make <function>pg_stop_backup()</> wait for modified <acronym>WAL</>
2504         files to be archived (Simon)
2505        </para>
2506
2507        <para>
2508         This guarantees that the backup is valid at the time
2509         <function>pg_stop_backup()</> completes.
2510        </para>
2511       </listitem>
2512
2513       <listitem>
2514        <para>
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)
2518        </para>
2519       </listitem>
2520
2521       <listitem>
2522        <para>
2523         Delay <quote>smart</> shutdown while a continuous archiving base backup
2524         is in progress (Laurenz Albe)
2525        </para>
2526       </listitem>
2527
2528       <listitem>
2529        <para>
2530         Cancel a continuous archiving base backup if <quote>fast</> shutdown
2531         is requested (Laurenz Albe)
2532        </para>
2533       </listitem>
2534
2535       <listitem>
2536        <para>
2537         Allow <filename>recovery.conf</> boolean variables to take the
2538         same range of string values as <filename>postgresql.conf</>
2539         boolean variables
2540         (Bruce)
2541        </para>
2542       </listitem>
2543
2544      </itemizedlist>
2545
2546     </sect4>
2547
2548     <sect4>
2549      <title>Monitoring</title>
2550      <itemizedlist>
2551
2552       <listitem>
2553        <para>
2554         Add <function>pg_conf_load_time()</> to report when
2555         the <productname>PostgreSQL</> configuration files were last loaded
2556         (George Gensure)
2557        </para>
2558       </listitem>
2559
2560       <listitem>
2561        <para>
2562         Add <function>pg_terminate_backend()</> to safely terminate a
2563         backend (the <literal>SIGTERM</> signal works also) (Tom, Bruce)
2564        </para>
2565
2566        <para>
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.
2570        </para>
2571       </listitem>
2572
2573       <listitem>
2574        <para>
2575         Add ability to track user-defined functions' call counts and
2576         runtimes (Martin Pihlak)
2577        </para>
2578
2579        <para>
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</>.
2583        </para>
2584       </listitem>
2585
2586       <listitem>
2587        <para>
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)
2591        </para>
2592       </listitem>
2593
2594       <listitem>
2595        <para>
2596         Increase the maximum line length sent to <application>syslog</>, in
2597         hopes of improving performance (Tom)
2598        </para>
2599       </listitem>
2600
2601       <listitem>
2602        <para>
2603         Add read-only configuration variables <varname>segment_size</>,
2604         <varname>wal_block_size</>, and <varname>wal_segment_size</>
2605         (Bernd Helmle)
2606        </para>
2607       </listitem>
2608
2609       <listitem>
2610        <para>
2611         When reporting a deadlock, report the text of all queries involved
2612         in the deadlock to the server log  (Itagaki Takahiro)
2613        </para>
2614       </listitem>
2615
2616       <listitem>
2617        <para>
2618         Add <function>pg_stat_get_activity(pid)</> function to return
2619         information about a specific process id (Magnus)
2620        </para>
2621       </listitem>
2622
2623       <listitem>
2624        <para>
2625         Allow the location of the server's statistics file to be specified
2626         via <varname>stats_temp_directory</> (Magnus)
2627        </para>
2628
2629        <para>
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.
2634        </para>
2635       </listitem>
2636
2637      </itemizedlist>
2638
2639     </sect4>
2640
2641    </sect3>
2642
2643    <sect3>
2644     <title>Queries</title>
2645     <itemizedlist>
2646
2647      <listitem>
2648       <para>
2649        Add support for <literal>WINDOW</> functions (Hitoshi Harada)
2650       </para>
2651      </listitem>
2652
2653      <listitem>
2654       <para>
2655        Add support for <literal>WITH</> clauses (CTEs), including <literal>WITH
2656        RECURSIVE</> (Yoshiyuki Asaba, Tatsuo Ishii, Tom)
2657       </para>
2658      </listitem>
2659
2660      <listitem>
2661       <para>
2662        Add <command>TABLE</> command (Peter)
2663       </para>
2664
2665       <para>
2666        <literal>TABLE tablename</> is a SQL standard short-hand for
2667        <literal>SELECT * FROM tablename</>.
2668       </para>
2669      </listitem>
2670
2671      <listitem>
2672       <para>
2673        Allow <literal>AS</> to be optional when specifying a
2674        <command>SELECT</> (or <literal>RETURNING</>) column output
2675        label (Hiroshi Saito)
2676       </para>
2677
2678       <para>
2679        This works so long as the column label is not any
2680        <productname>PostgreSQL</> keyword; otherwise <literal>AS</> is still
2681        needed.
2682       </para>
2683      </listitem>
2684
2685      <listitem>
2686       <para>
2687        Support set-returning functions in <command>SELECT</> result lists
2688        even for functions that return their result via a tuplestore (Tom)
2689       </para>
2690
2691       <para>
2692        In particular, this means that functions written in PL/PgSQL
2693        and other PL languages can now be called this way.
2694       </para>
2695      </listitem>
2696
2697      <listitem>
2698       <para>
2699        Support set-returning functions in the output of aggregation
2700        and grouping queries (Tom)
2701       </para>
2702      </listitem>
2703
2704      <listitem>
2705       <para>
2706        Allow <command>SELECT FOR UPDATE</>/<literal>SHARE</> to work
2707        on inheritance trees (Tom)
2708       </para>
2709      </listitem>
2710
2711      <listitem>
2712       <para>
2713        Add infrastructure for <acronym>SQL/MED</> (Martin Pihlak,
2714        Peter)
2715       </para>
2716
2717       <para>
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</>.
2722       </para>
2723      </listitem>
2724
2725      <listitem>
2726       <para>
2727        Invalidate cached plans when referenced schemas, functions, operators,
2728        or operator classes are modified (Martin Pihlak, Tom)
2729       </para>
2730
2731       <para>
2732        This improves the system's ability to respond to on-the-fly
2733        DDL changes.
2734       </para>
2735      </listitem>
2736      <listitem>
2737       <para>
2738        Allow comparison of composite types and allow arrays of
2739        anonymous composite types (Tom)
2740       </para>
2741
2742       <para>
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.
2746       </para>
2747      </listitem>
2748
2749      <listitem>
2750       <para>
2751        Add support for Unicode string literal and identifier specifications
2752        using code points, e.g. <literal>U&amp;'d\0061t\+000061'</>
2753        (Peter)
2754       </para>
2755      </listitem>
2756
2757      <listitem>
2758       <para>
2759        Reject <literal>\000</> in string literals and <command>COPY</> data
2760        (Tom)
2761       </para>
2762
2763       <para>
2764        Previously, this was accepted but had the effect of terminating
2765        the string contents.
2766       </para>
2767      </listitem>
2768
2769      <listitem>
2770       <para>
2771        Improve the parser's ability to report error locations (Tom)
2772       </para>
2773
2774       <para>
2775        An error location is now reported for many semantic errors,
2776        such as mismatched datatypes, that previously could not be localized.
2777       </para>
2778      </listitem>
2779
2780     </itemizedlist>
2781
2782     <sect4>
2783      <title><command>TRUNCATE</></title>
2784      <itemizedlist>
2785
2786       <listitem>
2787        <para>
2788         Support statement-level <literal>ON TRUNCATE</> triggers (Simon)
2789        </para>
2790       </listitem>
2791
2792       <listitem>
2793        <para>
2794         Add <literal>RESTART</>/<literal>CONTINUE IDENTITY</> options
2795         for <command>TRUNCATE TABLE</>
2796         (Zoltan Boszormenyi)
2797        </para>
2798
2799        <para>
2800         The start value of a sequence can be changed by <command>ALTER
2801         SEQUENCE START WITH</>.
2802        </para>
2803       </listitem>
2804
2805       <listitem>
2806        <para>
2807         Allow <command>TRUNCATE tab1, tab1</> to succeed (Bruce)
2808        </para>
2809       </listitem>
2810
2811       <listitem>
2812        <para>
2813         Add a separate <command>TRUNCATE</> permission (Robert Haas)
2814        </para>
2815       </listitem>
2816
2817      </itemizedlist>
2818
2819     </sect4>
2820
2821     <sect4>
2822      <title><command>EXPLAIN</></title>
2823      <itemizedlist>
2824
2825       <listitem>
2826        <para>
2827         Make <command>EXPLAIN VERBOSE</> show the output columns of each
2828         plan node (Tom)
2829        </para>
2830
2831        <para>
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</>.)
2835        </para>
2836       </listitem>
2837
2838       <listitem>
2839        <para>
2840         Make <command>EXPLAIN</> identify subplans and initplans with
2841         individual labels (Tom)
2842        </para>
2843       </listitem>
2844
2845       <listitem>
2846        <para>
2847         Make <command>EXPLAIN</> honor <varname>debug_print_plan</> (Tom)
2848        </para>
2849       </listitem>
2850
2851       <listitem>
2852        <para>
2853         Allow <command>EXPLAIN</> on <command>CREATE TABLE AS</> (Peter)
2854        </para>
2855       </listitem>
2856
2857      </itemizedlist>
2858
2859     </sect4>
2860
2861     <sect4>
2862      <title><literal>LIMIT</>/<literal>OFFSET</></title>
2863      <itemizedlist>
2864
2865       <listitem>
2866        <para>
2867         Allow sub-selects in <literal>LIMIT</> and <literal>OFFSET</> (Tom)
2868        </para>
2869       </listitem>
2870
2871       <listitem>
2872        <para>
2873         Add <acronym>SQL</>-standard syntax for
2874         <literal>LIMIT</>/<literal>OFFSET</> capabilities (Peter)
2875        </para>
2876
2877        <para>
2878         To wit,
2879         <literal>OFFSET num {ROW|ROWS} FETCH {FIRST|NEXT} [num] {ROW|ROWS}
2880         ONLY</>.
2881        </para>
2882       </listitem>
2883
2884      </itemizedlist>
2885
2886     </sect4>
2887
2888    </sect3>
2889
2890    <sect3>
2891     <title>Object Manipulation</title>
2892     <itemizedlist>
2893
2894      <listitem>
2895       <para>
2896        Add support for column-level privileges (Stephen Frost, KaiGai
2897        Kohei)
2898       </para>
2899      </listitem>
2900
2901      <listitem>
2902       <para>
2903        Refactor multi-object <command>DROP</> operations to reduce the
2904        need for <literal>CASCADE</> (Alex Hunsaker)
2905       </para>
2906
2907       <para>
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.
2911       </para>
2912      </listitem>
2913
2914      <listitem>
2915       <para>
2916        Fix various problems with concurrent <command>DROP</> commands
2917        by ensuring that locks are taken before we begin to drop dependencies
2918        of an object (Tom)
2919       </para>
2920      </listitem>
2921
2922      <listitem>
2923       <para>
2924        Improve reporting of dependencies during <command>DROP</>
2925        commands (Tom)
2926       </para>
2927      </listitem>
2928
2929      <listitem>
2930       <para>
2931        Add <literal>WITH [NO] DATA</> clause to <command>CREATE TABLE
2932        AS</>, per the <acronym>SQL</> standard (Peter, Tom)
2933       </para>
2934      </listitem>
2935
2936      <listitem>
2937       <para>
2938        Add support for user-defined I/O conversion casts (Heikki)
2939       </para>
2940      </listitem>
2941
2942      <listitem>
2943       <para>
2944        Allow <command>CREATE AGGREGATE</> to use an <type>internal</>
2945        transition datatype (Tom)
2946       </para>
2947      </listitem>
2948
2949      <listitem>
2950       <para>
2951        Add <literal>LIKE</> clause to <command>CREATE TYPE</> (Tom)
2952       </para>
2953
2954       <para>
2955        This simplifies creation of data types that use the same internal
2956        representation as an existing type.
2957       </para>
2958      </listitem>
2959
2960      <listitem>
2961       <para>
2962        Allow specification of the type category and <quote>preferred</>
2963        status for user-defined base types (Tom)
2964       </para>
2965
2966       <para>
2967        This allows more control over the coercion behavior of user-defined
2968        types.
2969       </para>
2970      </listitem>
2971
2972      <listitem>
2973       <para>
2974        Allow <command>CREATE OR REPLACE VIEW</> to add columns to the
2975        end of a view (Robert Haas)
2976       </para>
2977      </listitem>
2978
2979     </itemizedlist>
2980
2981     <sect4>
2982      <title><command>ALTER</></title>
2983      <itemizedlist>
2984
2985       <listitem>
2986        <para>
2987         Add <command>ALTER TYPE RENAME</> (Petr Jelinek)
2988        </para>
2989       </listitem>
2990
2991       <listitem>
2992        <para>
2993         Add <command>ALTER SEQUENCE ... RESTART</> (with no parameter) to
2994         reset a sequence to its initial value (Zoltan Boszormenyi)
2995        </para>
2996       </listitem>
2997
2998       <listitem>
2999        <para>
3000         Modify the <command>ALTER TABLE</> syntax to allow all reasonable
3001         combinations for tables, indexes, sequences, and views (Tom)
3002        </para>
3003
3004        <para>
3005         This change allows the following new syntaxes:
3006
3007         <itemizedlist>
3008          <listitem>
3009           <para>
3010            <command>ALTER SEQUENCE OWNER TO</>
3011           </para>
3012          </listitem>
3013          <listitem>
3014           <para>
3015            <command>ALTER VIEW ALTER COLUMN SET/DROP DEFAULT</>
3016           </para>
3017          </listitem>
3018          <listitem>
3019           <para>
3020            <command>ALTER VIEW OWNER TO</>
3021           </para>
3022          </listitem>
3023          <listitem>
3024           <para>
3025            <command>ALTER VIEW SET SCHEMA</>
3026           </para>
3027          </listitem>
3028         </itemizedlist>
3029
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.
3033        </para>
3034       </listitem>
3035
3036       <listitem>
3037        <para>
3038         Add support for the syntax <command>ALTER TABLE ... ALTER COLUMN
3039         ... SET DATA TYPE</> (Peter)
3040        </para>
3041
3042        <para>
3043         This is <acronym>SQL</>-standard syntax for functionality that
3044         was already supported.
3045        </para>
3046       </listitem>
3047
3048       <listitem>
3049        <para>
3050         Make <command>ALTER TABLE SET WITHOUT OIDS</> rewrite the table
3051         to physically remove <type>OID</> values (Tom)
3052        </para>
3053
3054        <para>
3055         Also, add <command>ALTER TABLE SET WITH OIDS</> to rewrite the
3056         table to add <type>OID</>s.
3057        </para>
3058       </listitem>
3059
3060      </itemizedlist>
3061
3062     </sect4>
3063
3064     <sect4>
3065      <title>Database Manipulation</title>
3066      <itemizedlist>
3067
3068       <listitem>
3069        <para>
3070         Improve reporting of
3071         <command>CREATE</>/<command>DROP</>/<command>RENAME DATABASE</>
3072         failure when uncommitted prepared transactions are the cause
3073         (Tom)
3074        </para>
3075       </listitem>
3076
3077       <listitem>
3078        <para>
3079         Make <varname>LC_COLLATE</> and <varname>LC_CTYPE</> into
3080         per-database settings (Radek Strnad, Heikki)
3081        </para>
3082
3083        <para>
3084         This makes collation similar to encoding, which was always
3085         configurable per database.
3086        </para>
3087       </listitem>
3088
3089       <listitem>
3090        <para>
3091         Improve checks that the database encoding, collation
3092         (<varname>LC_COLLATE</>), and character classes
3093         (<varname>LC_CTYPE</>) match (Heikki, Tom)
3094        </para>
3095
3096        <para>
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.
3100        </para>
3101       </listitem>
3102
3103       <listitem>
3104        <para>
3105         Add <command>ALTER DATABASE SET TABLESPACE</> to move a database
3106         to a new tablespace (Guillaume Lelarge, Bernd Helmle)
3107        </para>
3108       </listitem>
3109
3110      </itemizedlist>
3111
3112     </sect4>
3113
3114    </sect3>
3115
3116    <sect3>
3117     <title>Utility Operations</title>
3118
3119     <itemizedlist>
3120
3121      <listitem>
3122       <para>
3123        Add a <literal>VERBOSE</> option to the <command>CLUSTER</> command and
3124        <application>clusterdb</> (Jim Cox)
3125       </para>
3126      </listitem>
3127
3128      <listitem>
3129       <para>
3130        Decrease memory requirements for recording pending trigger
3131        events (Tom)
3132       </para>
3133      </listitem>
3134
3135     </itemizedlist>
3136
3137     <sect4>
3138      <title>Indexes</title>
3139      <itemizedlist>
3140
3141       <listitem>
3142        <para>
3143         Dramatically improve the speed of building and accessing hash
3144         indexes (Tom Raney, Shreya Bhargava)
3145        </para>
3146
3147        <para>
3148         This allows hash indexes to be sometimes faster than btree
3149         indexes.  However, hash indexes are still not crash-safe.
3150        </para>
3151       </listitem>
3152
3153       <listitem>
3154        <para>
3155         Make hash indexes store only the hash code, not the full value of
3156         the indexed column (Xiao Meng)
3157        </para>
3158
3159        <para>
3160         This greatly reduces the size of hash indexes for long indexed
3161         values, improving performance.
3162        </para>
3163       </listitem>
3164
3165       <listitem>
3166        <para>
3167         Implement fast update option for GIN indexes (Teodor, Oleg)
3168        </para>
3169
3170        <para>
3171         This option greatly improves update speed at a small penalty in search
3172         speed.
3173        </para>
3174       </listitem>
3175
3176       <listitem>
3177        <para>
3178         <literal>xxx_pattern_ops</> indexes can now be used for simple
3179         equality comparisons, not only for <literal>LIKE</> (Tom)
3180        </para>
3181       </listitem>
3182
3183      </itemizedlist>
3184
3185     </sect4>
3186
3187     <sect4>
3188      <title>Full Text Indexes</title>
3189      <itemizedlist>
3190
3191       <listitem>
3192        <para>
3193         Remove the requirement to use <literal>@@@</> when doing
3194         <acronym>GIN</> weighted lookups on full text indexes (Tom, Teodor)
3195        </para>
3196
3197        <para>
3198         The normal <literal>@@</> text search operator can be used
3199         instead.
3200        </para>
3201       </listitem>
3202
3203       <listitem>
3204        <para>
3205         Add an optimizer selectivity function for <literal>@@</> text
3206         search operations (Jan Urbanski)
3207        </para>
3208       </listitem>
3209
3210       <listitem>
3211        <para>
3212         Allow prefix matching in full text searches (Teodor Sigaev,
3213         Oleg Bartunov)
3214        </para>
3215       </listitem>
3216
3217       <listitem>
3218        <para>
3219         Support multi-column <acronym>GIN</> indexes (Teodor Sigaev)
3220        </para>
3221       </listitem>
3222
3223       <listitem>
3224        <para>
3225         Improve support for Nepali language and Devanagari alphabet (Teodor)
3226        </para>
3227       </listitem>
3228
3229      </itemizedlist>
3230
3231     </sect4>
3232
3233     <sect4>
3234      <title><command>VACUUM</></title>
3235      <itemizedlist>
3236
3237       <listitem>
3238        <para>
3239         Track free space in separate per-relation <quote>fork</> files (Heikki)
3240        </para>
3241
3242        <para>
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.
3248        </para>
3249       </listitem>
3250
3251       <listitem>
3252        <para>
3253         Add a visibility map to track pages that do not require
3254         vacuuming (Heikki)
3255        </para>
3256
3257        <para>
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.
3261        </para>
3262       </listitem>
3263
3264       <listitem>
3265        <para>
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)
3269        </para>
3270       </listitem>
3271
3272       <listitem>
3273        <para>
3274         Track transaction snapshots more carefully (Alvaro)
3275        </para>
3276
3277        <para>
3278         This improves <command>VACUUM</>'s ability to reclaim space
3279         in the presence of long-running transactions.
3280        </para>
3281       </listitem>
3282
3283       <listitem>
3284        <para>
3285         Add ability to specify per-relation autovacuum and <acronym>TOAST</>
3286         parameters in <command>CREATE TABLE</> (Alvaro, Euler Taveira de
3287         Oliveira)
3288        </para>
3289
3290        <para>
3291         Autovacuum options used to be stored in a system table.
3292        </para>
3293       </listitem>
3294
3295       <listitem>
3296        <para>
3297         Add <literal>--freeze</> option to <application>vacuumdb</>
3298         (Bruce)
3299        </para>
3300       </listitem>
3301
3302      </itemizedlist>
3303
3304     </sect4>
3305
3306    </sect3>
3307
3308    <sect3>
3309     <title>Data Types</title>
3310     <itemizedlist>
3311
3312      <listitem>
3313       <para>
3314        Add a <literal>CaseSensitive</> option for text search synonym
3315        dictionaries (Simon)
3316       </para>
3317      </listitem>
3318
3319      <listitem>
3320       <para>
3321        Improve the precision of <type>NUMERIC</> division (Tom)
3322       </para>
3323      </listitem>
3324
3325      <listitem>
3326       <para>
3327        Add basic arithmetic operators for <type>int2</> with <type>int8</>
3328        (Tom)
3329       </para>
3330
3331       <para>
3332        This eliminates the need for explicit casting in some situations.
3333       </para>
3334      </listitem>
3335
3336      <listitem>
3337       <para>
3338        Allow <type>UUID</> input to accept an optional hyphen after
3339        every fourth digit (Robert Haas)
3340       </para>
3341      </listitem>
3342
3343      <listitem>
3344       <para>
3345        Allow <literal>on</>/<literal>off</> as input for the boolean data type
3346        (Itagaki Takahiro)
3347       </para>
3348      </listitem>
3349
3350      <listitem>
3351       <para>
3352        Allow spaces around <literal>NaN</> in the input string for
3353        type <type>numeric</> (Sam Mason)
3354       </para>
3355      </listitem>
3356
3357     </itemizedlist>
3358
3359     <sect4>
3360      <title>Temporal Data Types</title>
3361      <itemizedlist>
3362
3363       <listitem>
3364        <para>
3365         Reject year <literal>0 BC</> and years <literal>000</> and
3366         <literal>0000</> (Tom)
3367        </para>
3368
3369        <para>
3370         Previously these were interpreted as <literal>1 BC</>.
3371         (Note: years <literal>0</> and <literal>00</> are still assumed to be
3372         the year 2000.)
3373        </para>
3374       </listitem>
3375
3376       <listitem>
3377        <para>
3378         Include <literal>SGT</> (Singapore time) in the default list of
3379         known time zone abbreviations (Tom)
3380        </para>
3381       </listitem>
3382
3383       <listitem>
3384        <para>
3385         Support <literal>infinity</> and <literal>-infinity</> as
3386         values of type <type>date</> (Tom)
3387        </para>
3388       </listitem>
3389
3390       <listitem>
3391        <para>
3392         Make parsing of <type>interval</> literals more standard-compliant
3393         (Tom, Ron Mayer)
3394        </para>
3395
3396        <para>
3397         For example, <literal>INTERVAL '1' YEAR</> now does what it's
3398         supposed to.
3399        </para>
3400       </listitem>
3401
3402       <listitem>
3403        <para>
3404         Allow <type>interval</> fractional-seconds precision to be specified
3405         after the <literal>second</> keyword, for <acronym>SQL</> standard
3406         compliance (Tom)
3407        </para>
3408
3409        <para>
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.
3414        </para>
3415       </listitem>
3416
3417       <listitem>
3418        <para>
3419         Support the <acronym>IS0 8601</> <type>interval</> syntax (Ron
3420         Mayer, Kevin Grittner)
3421        </para>
3422
3423        <para>
3424         For example, <literal>INTERVAL 'P1Y2M3DT4H5M6.7S'</> is now
3425         supported.
3426        </para>
3427       </listitem>
3428
3429       <listitem>
3430        <para>
3431         Add <varname>IntervalStyle</> parameter
3432         which controls how <type>interval</> values are output (Ron Mayer)
3433        </para>
3434
3435        <para>
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.
3440        </para>
3441       </listitem>
3442
3443       <listitem>
3444        <para>
3445         Improve consistency of handling of fractional seconds in
3446         <type>timestamp</> and <type>interval</> output (Ron Mayer)
3447        </para>
3448       </listitem>
3449
3450      </itemizedlist>
3451
3452     </sect4>
3453
3454     <sect4>
3455      <title>Arrays</title>
3456      <itemizedlist>
3457
3458       <listitem>
3459        <para>
3460         Improve the handling of casts applied to <literal>ARRAY[]</>
3461         constructs, such as <literal>ARRAY[...]::integer[]</>
3462         (Brendan Jurd)
3463        </para>
3464
3465        <para>
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.
3472        </para>
3473       </listitem>
3474
3475       <listitem>
3476        <para>
3477         Make <acronym>SQL</>-syntax <type>ARRAY</> dimensions optional
3478         to match the <acronym>SQL</> standard (Peter)
3479        </para>
3480       </listitem>
3481
3482       <listitem>
3483        <para>
3484         Add <function>array_ndims()</> to return the number
3485         of dimensions of an array (Robert Haas)
3486        </para>
3487       </listitem>
3488
3489       <listitem>
3490        <para>
3491         Add <function>array_length()</> to return the length
3492         of an array for a specified dimension (Jim Nasby, Robert
3493         Haas, Peter Eisentraut)
3494        </para>
3495       </listitem>
3496
3497       <listitem>
3498        <para>
3499         Add aggregate function <function>array_agg()</>, which
3500         returns all aggregated values as a single array (Robert Haas,
3501         Jeff Davis, Peter)
3502        </para>
3503       </listitem>
3504
3505       <listitem>
3506        <para>
3507         Add <function>unnest()</>, which converts an array to
3508         individual row values (Tom)
3509        </para>
3510
3511        <para>
3512         This is the opposite of <function>array_agg()</>.
3513        </para>
3514       </listitem>
3515
3516       <listitem>
3517        <para>
3518         Add <function>array_fill()</> to create arrays initialized with
3519         a value (Pavel Stehule)
3520        </para>
3521       </listitem>
3522
3523       <listitem>
3524        <para>
3525         Add <function>generate_subscripts()</> to simplify generating
3526         the range of an array's subscripts (Pavel Stehule)
3527        </para>
3528       </listitem>
3529
3530      </itemizedlist>
3531
3532     </sect4>
3533
3534     <sect4>
3535      <title>Wide-Value Storage (<acronym>TOAST</>)</title>
3536      <itemizedlist>
3537
3538       <listitem>
3539        <para>
3540         Consider <acronym>TOAST</> compression on values as short as
3541         32 bytes (previously 256 bytes) (Greg Stark)
3542        </para>
3543       </listitem>
3544
3545       <listitem>
3546        <para>
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)
3550        </para>
3551       </listitem>
3552
3553       <listitem>
3554        <para>
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)
3558        </para>
3559       </listitem>
3560
3561      </itemizedlist>
3562
3563     </sect4>
3564
3565    </sect3>
3566
3567    <sect3>
3568     <title>Functions</title>
3569     <itemizedlist>
3570
3571      <listitem>
3572       <para>
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)
3576       </para>
3577      </listitem>
3578
3579      <listitem>
3580       <para>
3581        Add server-side function <function>lo_import(filename, oid)</>
3582        (Tatsuo)
3583       </para>
3584      </listitem>
3585
3586      <listitem>
3587       <para>
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)
3591       </para>
3592      </listitem>
3593
3594      <listitem>
3595       <para>
3596        Improve full text search <function>headline()</> function to
3597        allow extracting several fragments of text (Sushant Sinha)
3598       </para>
3599      </listitem>
3600
3601      <listitem>
3602       <para>
3603        Add <function>suppress_redundant_updates_trigger()</> trigger
3604        function to avoid overhead for non-data-changing updates (Andrew)
3605       </para>
3606      </listitem>
3607
3608      <listitem>
3609       <para>
3610        Add <function>div(numeric, numeric)</> to perform <type>numeric</>
3611        division without rounding (Tom)
3612       </para>
3613      </listitem>
3614
3615      <listitem>
3616       <para>
3617        Add <type>timestamp</> and <type>timestamptz</> versions of
3618        <function>generate_series()</> (Hitoshi Harada)
3619       </para>
3620      </listitem>
3621
3622     </itemizedlist>
3623
3624     <sect4>
3625      <title>Object Information Functions</title>
3626      <itemizedlist>
3627
3628       <listitem>
3629        <para>
3630         Implement <function>current_query()</> for use by functions
3631         that need to know the currently running query (Tomas Doran)
3632        </para>
3633       </listitem>
3634
3635       <listitem>
3636        <para>
3637         Add <function>pg_get_keywords()</> to return a list of the
3638         parser keywords (Dave Page)
3639        </para>
3640       </listitem>
3641
3642       <listitem>
3643        <para>
3644         Add <function>pg_get_functiondef()</> to see a function's
3645         definition (Abhijit Menon-Sen)
3646        </para>
3647       </listitem>
3648
3649       <listitem>
3650        <para>
3651         Allow the second argument of <function>pg_get_expr()</> to be zero
3652         when deparsing an expression that does not contain variables (Tom)
3653        </para>
3654       </listitem>
3655
3656       <listitem>
3657        <para>
3658         Modify <function>pg_relation_size()</> to use <literal>regclass</>
3659         (Heikki)
3660        </para>
3661
3662        <para>
3663         <function>pg_relation_size(data_type_name)</> no longer works.
3664        </para>
3665       </listitem>
3666
3667       <listitem>
3668        <para>
3669         Add <literal>boot_val</> and <literal>reset_val</> columns to
3670         <literal>pg_settings</> output (Greg Smith)
3671        </para>
3672       </listitem>
3673
3674       <listitem>
3675        <para>
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)
3679        </para>
3680
3681        <para>
3682         For security reasons, these columns are only visible to superusers.
3683        </para>
3684       </listitem>
3685
3686       <listitem>
3687        <para>
3688         Add support for <varname>CURRENT_CATALOG</>,
3689         <varname>CURRENT_SCHEMA</>, <varname>SET CATALOG</>, <varname>SET
3690         SCHEMA</> (Peter)
3691        </para>
3692
3693        <para>
3694         These provide <acronym>SQL</>-standard syntax for existing features.
3695        </para>
3696       </listitem>
3697
3698       <listitem>
3699        <para>
3700         Add <function>pg_typeof()</> which returns the data type
3701         of any value (Brendan Jurd)
3702        </para>
3703       </listitem>
3704
3705       <listitem>
3706        <para>
3707         Make <function>version()</> return information about whether
3708         the server is a 32- or 64-bit binary (Bruce)
3709        </para>
3710       </listitem>
3711
3712       <listitem>
3713        <para>
3714         Fix the behavior of information schema columns
3715         <structfield>is_insertable_into</> and <structfield>is_updatable</> to
3716         be consistent (Peter)
3717        </para>
3718       </listitem>
3719
3720       <listitem>
3721        <para>
3722         Improve the behavior of information schema
3723         <structfield>datetime_precision</> columns (Peter)
3724        </para>
3725
3726        <para>
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
3730         null as formerly.
3731        </para>
3732       </listitem>
3733
3734       <listitem>
3735        <para>
3736         Convert remaining builtin set-returning functions to use
3737         <literal>OUT</> parameters (Jaime Casanova)
3738        </para>
3739
3740        <para>
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()</>
3745        </para>
3746       </listitem>
3747
3748       <listitem>
3749        <para>
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)
3753        </para>
3754       </listitem>
3755
3756       <listitem>
3757        <para>
3758         Extend <function>has_*_privilege()</> functions to allow inquiring
3759         about the OR of multiple privileges in one call (Stephen
3760         Frost, Tom)
3761        </para>
3762       </listitem>
3763
3764       <listitem>
3765        <para>
3766         Add <function>has_column_privilege()</> and
3767         <function>has_any_column_privilege()</> functions (Stephen
3768         Frost, Tom)
3769        </para>
3770       </listitem>
3771
3772      </itemizedlist>
3773
3774     </sect4>
3775
3776     <sect4>
3777      <title>Function Creation</title>
3778      <itemizedlist>
3779
3780       <listitem>
3781        <para>
3782         Support variadic functions (functions with a variable number
3783         of arguments) (Pavel Stehule)
3784        </para>
3785
3786        <para>
3787         Only trailing arguments can be optional, and they all must be
3788         of the same data type.
3789        </para>
3790       </listitem>
3791
3792       <listitem>
3793        <para>
3794         Support default values for function arguments (Pavel Stehule)
3795        </para>
3796       </listitem>
3797
3798       <listitem>
3799        <para>
3800         Add <command>CREATE FUNCTION ... RETURNS TABLE</> clause (Pavel
3801         Stehule)
3802        </para>
3803       </listitem>
3804
3805       <listitem>
3806        <para>
3807         Allow <acronym>SQL</>-language functions to return the output
3808         of an <command>INSERT</>/<command>UPDATE</>/<command>DELETE</>
3809         <literal>RETURNING</> clause (Tom)
3810        </para>
3811       </listitem>
3812
3813      </itemizedlist>
3814
3815     </sect4>
3816
3817     <sect4>
3818      <title>PL/PgSQL Server-Side Language</title>
3819      <itemizedlist>
3820
3821       <listitem>
3822        <para>
3823         Support <literal>EXECUTE USING</> for easier insertion of data
3824         values into a dynamic query string (Pavel Stehule)
3825        </para>
3826       </listitem>
3827
3828       <listitem>
3829        <para>
3830         Allow looping over the results of a cursor using a <literal>FOR</>
3831         loop (Pavel Stehule)
3832        </para>
3833       </listitem>
3834
3835       <listitem>
3836        <para>
3837         Support <literal>RETURN QUERY EXECUTE</> (Pavel
3838         Stehule)
3839        </para>
3840       </listitem>
3841
3842       <listitem>
3843        <para>
3844         Improve the <literal>RAISE</> command (Pavel Stehule)
3845
3846         <itemizedlist>
3847          <listitem>
3848           <para>
3849            Support <literal>DETAIL</> and <literal>HINT</> fields
3850           </para>
3851          </listitem>
3852          <listitem>
3853           <para>
3854            Support specification of the <literal>SQLSTATE</> error code
3855           </para>
3856          </listitem>
3857          <listitem>
3858           <para>
3859            Support an exception name parameter
3860           </para>
3861          </listitem>
3862          <listitem>
3863           <para>
3864            Allow <literal>RAISE</> without parameters in an exception
3865            block to re-throw the current error
3866           </para>
3867          </listitem>
3868         </itemizedlist>
3869        </para>
3870       </listitem>
3871
3872       <listitem>
3873        <para>
3874         Allow specification of <varname>SQLSTATE</> codes
3875         in <literal>EXCEPTION</> lists (Pavel Stehule)
3876        </para>
3877
3878        <para>
3879         This is useful for handling custom <varname>SQLSTATE</> codes.
3880        </para>
3881       </listitem>
3882
3883       <listitem>
3884        <para>
3885         Support the <literal>CASE</> statement (Pavel Stehule)
3886        </para>
3887       </listitem>
3888
3889       <listitem>
3890        <para>
3891         Make <command>RETURN QUERY</> set the special <literal>FOUND</> and
3892         <command>GET DIAGNOSTICS</> <literal>ROW_COUNT</> variables
3893         (Pavel Stehule)
3894        </para>
3895       </listitem>
3896
3897       <listitem>
3898        <para>
3899         Make <command>FETCH</> and <command>MOVE</> set the
3900         <command>GET DIAGNOSTICS</> <literal>ROW_COUNT</> variable
3901         (Andrew Gierth)
3902        </para>
3903       </listitem>
3904
3905       <listitem>
3906        <para>
3907         Make <command>EXIT</> without a label always exit the innermost
3908         loop (Tom)
3909        </para>
3910
3911        <para>
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
3915         documentation.
3916        </para>
3917       </listitem>
3918
3919       <listitem>
3920        <para>
3921         Make processing of string literals and nested block comments
3922         match the main SQL parser's processing (Tom)
3923        </para>
3924
3925        <para>
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.
3931        </para>
3932       </listitem>
3933
3934       <listitem>
3935        <para>
3936         Avoid memory leakage when the same function is called at varying
3937         exception-block nesting depths (Tom)
3938        </para>
3939       </listitem>
3940
3941      </itemizedlist>
3942
3943     </sect4>
3944
3945    </sect3>
3946
3947    <sect3>
3948     <title>Client Applications</title>
3949
3950     <itemizedlist>
3951
3952      <listitem>
3953       <para>
3954        Fix <literal>pg_ctl restart</> to preserve command-line arguments
3955        (Bruce)
3956       </para>
3957      </listitem>
3958
3959      <listitem>
3960       <para>
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)
3964       </para>
3965      </listitem>
3966
3967      <listitem>
3968       <para>
3969        Remove <option>-q</> (quiet) option of <application>createdb</>,
3970        <application>createuser</>, <application>dropdb</>,
3971        <application>dropuser</> (Peter)
3972       </para>
3973
3974       <para>
3975        These options have had no effect since <productname>PostgreSQL</>
3976        8.3.
3977       </para>
3978      </listitem>
3979
3980     </itemizedlist>
3981
3982     <sect4>
3983      <title><application>psql</></title>
3984      <itemizedlist>
3985
3986       <listitem>
3987        <para>
3988         Remove verbose startup banner; now just suggest <literal>help</>
3989         (Joshua Drake)
3990        </para>
3991       </listitem>
3992
3993       <listitem>
3994        <para>
3995         Make <literal>help</> show common backslash commands (Greg
3996         Sabino Mullane)
3997        </para>
3998       </listitem>
3999
4000       <listitem>
4001        <para>
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)
4005        </para>
4006       </listitem>
4007
4008       <listitem>
4009        <para>
4010         Allow all supported spellings of boolean values in <command>\pset</>,
4011         rather than just <literal>on</> and <literal>off</> (Bruce)
4012        </para>
4013
4014        <para>
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</>).
4018        </para>
4019       </listitem>
4020
4021       <listitem>
4022        <para>
4023         Use the pager for wide output (Bruce)
4024        </para>
4025       </listitem>
4026
4027       <listitem>
4028        <para>
4029         Require a space between a one-letter backslash command and its first
4030         argument (Bernd Helmle)
4031        </para>
4032
4033        <para>
4034         This removes a historical source of ambiguity.
4035        </para>
4036       </listitem>
4037
4038       <listitem>
4039        <para>
4040         Improve tab completion support for schema-qualified and
4041         quoted identifiers (Greg Sabino Mullane)
4042        </para>
4043       </listitem>
4044
4045       <listitem>
4046        <para>
4047         Add optional <literal>on</>/<literal>off</> argument for
4048         <command>\timing</> (David Fetter)
4049        </para>
4050       </listitem>
4051
4052       <listitem>
4053        <para>
4054         Display access control rights on multiple lines (Brendan
4055         Jurd, Andreas Scherbaum)
4056        </para>
4057       </listitem>
4058
4059       <listitem>
4060        <para>
4061         Make <command>\l</> show database access privileges (Andrew Gilligan)
4062        </para>
4063       </listitem>
4064
4065       <listitem>
4066        <para>
4067         Make <command>\l+</> show database sizes, if permissions
4068         allow (Andrew Gilligan)
4069        </para>
4070       </listitem>
4071
4072       <listitem>
4073        <para>
4074         Add the <command>\ef</> command to edit function definitions
4075         (Abhijit Menon-Sen)
4076        </para>
4077       </listitem>
4078
4079      </itemizedlist>
4080
4081     </sect4>
4082
4083     <sect4>
4084      <title><application>psql</> \d* commands</title>
4085
4086      <itemizedlist>
4087
4088       <listitem>
4089        <para>
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)
4093        </para>
4094
4095        <para>
4096         The former behavior was inconsistent across different variants
4097         of <command>\d</>, and in most cases it provided no easy way to see
4098         just user objects.
4099        </para>
4100       </listitem>
4101
4102       <listitem>
4103        <para>
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
4107         (Guillaume Lelarge)
4108        </para>
4109       </listitem>
4110
4111       <listitem>
4112        <para>
4113         Make <command>\d</> show foreign-key constraints that reference
4114         the selected table (Kenneth D'Souza)
4115        </para>
4116       </listitem>
4117
4118       <listitem>
4119        <para>
4120         Make <command>\d</> on a sequence show its column values
4121         (Euler Taveira de Oliveira)
4122        </para>
4123       </listitem>
4124
4125       <listitem>
4126        <para>
4127         Add column storage type and other relation options to the
4128         <command>\d+</> display (Gregory Stark, Euler Taveira de
4129         Oliveira)
4130        </para>
4131       </listitem>
4132
4133       <listitem>
4134        <para>
4135         Show relation size in <command>\dt+</> output (Dickson S.
4136         Guedes)
4137        </para>
4138       </listitem>
4139
4140       <listitem>
4141        <para>
4142         Show the possible values of <literal>enum</> types in <command>\dT+</>
4143         (David Fetter)
4144        </para>
4145       </listitem>
4146
4147       <listitem>
4148        <para>
4149         Allow <command>\dC</> to accept a wildcard pattern, which matches
4150         either datatype involved in the cast (Tom)
4151        </para>
4152       </listitem>
4153
4154       <listitem>
4155        <para>
4156         Add a function type column to <command>\df</>'s output, and add
4157         options to list only selected types of functions (David Fetter)
4158        </para>
4159       </listitem>
4160
4161       <listitem>
4162        <para>
4163         Make <command>\df</> not hide functions that take or return
4164         type <type>cstring</> (Tom)
4165        </para>
4166
4167        <para>
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
4171         unnecessary.
4172        </para>
4173       </listitem>
4174
4175      </itemizedlist>
4176
4177     </sect4>
4178
4179     <sect4>
4180      <title><application>pg_dump</></title>
4181      <itemizedlist>
4182
4183       <listitem>
4184        <para>
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)
4189        </para>
4190       </listitem>
4191
4192       <listitem>
4193        <para>
4194         Remove <option>-d</> and <option>-D</> options from
4195         <application>pg_dump</> and <application>pg_dumpall</> (Tom)
4196        </para>
4197
4198        <para>
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</>.
4204        </para>
4205       </listitem>
4206
4207       <listitem>
4208        <para>
4209         Remove <option>-i</>/<option>--ignore-version</> option from
4210         <application>pg_dump</> and <application>pg_dumpall</> (Tom)
4211        </para>
4212
4213        <para>
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.
4217        </para>
4218       </listitem>
4219
4220       <listitem>
4221        <para>
4222         Disable <varname>statement_timeout</> during dump and restore
4223         (Joshua Drake)
4224        </para>
4225       </listitem>
4226
4227       <listitem>
4228        <para>
4229         Add <application>pg_dump</>/<application>pg_dumpall</> option
4230         <option>--lock-wait-timeout</> (David Gould)
4231        </para>
4232
4233        <para>
4234         This allows dumps to fail if unable to acquire a shared lock
4235         within the specified amount of time.
4236        </para>
4237       </listitem>
4238
4239       <listitem>
4240        <para>
4241         Reorder <application>pg_dump</> <literal>--data-only</> output
4242         to dump tables referenced by foreign keys before
4243         the referencing tables (Tom)
4244        </para>
4245
4246        <para>
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.
4250        </para>
4251       </listitem>
4252
4253       <listitem>
4254        <para>
4255         Allow <application>pg_dump</>, <application>pg_dumpall</>, and
4256         <application>pg_restore</> to use a specified role (Benedek
4257         László)
4258        </para>
4259       </listitem>
4260
4261       <listitem>
4262        <para>
4263         Allow <application>pg_restore</> to use multiple concurrent
4264         connections to do the restore (Andrew)
4265        </para>
4266
4267        <para>
4268         The number of concurrent connections is controlled by the option
4269         <literal>--jobs</>.  This is supported only for custom-format archives.
4270        </para>
4271       </listitem>
4272
4273      </itemizedlist>
4274
4275     </sect4>
4276
4277    </sect3>
4278
4279    <sect3>
4280     <title>Programming Tools</title>
4281
4282     <sect4>
4283      <title><application>libpq</></title>
4284      <itemizedlist>
4285
4286       <listitem>
4287        <para>
4288         Allow the <type>OID</> to be specified when importing a large
4289         object, via new function <function>lo_import_with_oid()</> (Tatsuo)
4290        </para>
4291       </listitem>
4292
4293       <listitem>
4294        <para>
4295         Add <quote>events</> support (Andrew Chernow, Merlin Moncure)
4296        </para>
4297
4298        <para>
4299         This adds the ability to register callbacks to manage private
4300         data associated with <structname>PGconn</> and <structname>PGresult</>
4301         objects.
4302        </para>
4303       </listitem>
4304
4305       <listitem>
4306        <para>
4307         Improve error handling to allow the return of multiple
4308         error messages as multi-line error reports (Magnus)
4309        </para>
4310       </listitem>
4311
4312       <listitem>
4313        <para>
4314         Make <function>PQexecParams()</> and related functions return
4315         <varname>PGRES_EMPTY_QUERY</> for an empty query (Tom)
4316        </para>
4317
4318        <para>
4319         They previously returned <varname>PGRES_COMMAND_OK</>.
4320        </para>
4321       </listitem>
4322
4323       <listitem>
4324        <para>
4325         Document how to avoid the overhead of <function>WSACleanup()</>
4326         on Windows (Andrew Chernow)
4327        </para>
4328       </listitem>
4329
4330       <listitem>
4331        <para>
4332         Do not rely on Kerberos tickets to determine the default database
4333         username (Magnus)
4334        </para>
4335
4336        <para>
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.
4344        </para>
4345       </listitem>
4346      </itemizedlist>
4347
4348     </sect4>
4349
4350     <sect4>
4351      <title><application>libpq</> <acronym>SSL</> (Secure Sockets Layer)
4352       support</title>
4353      <itemizedlist>
4354
4355       <listitem>
4356        <para>
4357         Fix certificate validation for <acronym>SSL</> connections
4358         (Magnus)
4359        </para>
4360
4361        <para>
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
4370         client.
4371        </para>
4372       </listitem>
4373
4374       <listitem>
4375        <para>
4376         Support wildcard server certificates (Magnus)
4377        </para>
4378
4379        <para>
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.
4383        </para>
4384       </listitem>
4385
4386       <listitem>
4387        <para>
4388         Allow the file locations for client certificates to be specified
4389         (Mark Woodward, Alvaro, Magnus)
4390        </para>
4391       </listitem>
4392
4393       <listitem>
4394        <para>
4395         Add a <function>PQinitOpenSSL</> function to allow greater control
4396         over OpenSSL/libcrypto initialization (Andrew Chernow)
4397        </para>
4398       </listitem>
4399
4400       <listitem>
4401        <para>
4402         Make <application>libpq</> unregister its <application>OpenSSL</>
4403         callbacks when no database connections remain open
4404         (Bruce, Magnus, Russell Smith)
4405        </para>
4406
4407        <para>
4408         This is required for applications that unload the libpq library,
4409         otherwise invalid <application>OpenSSL</> callbacks will remain.
4410        </para>
4411       </listitem>
4412
4413      </itemizedlist>
4414
4415     </sect4>
4416
4417     <sect4>
4418      <title><application>ecpg</></title>
4419      <itemizedlist>
4420
4421       <listitem>
4422        <para>
4423         Add localization support for messages (Euler Taveira de
4424         Oliveira)
4425        </para>
4426       </listitem>
4427
4428       <listitem>
4429        <para>
4430         ecpg parser is now automatically generated from the server
4431         parser (Michael)
4432        </para>
4433
4434        <para>
4435         Previously the ecpg parser was hand-maintained.
4436        </para>
4437       </listitem>
4438
4439      </itemizedlist>
4440
4441     </sect4>
4442
4443     <sect4>
4444      <title>Server Programming Interface (<acronym>SPI</>)</title>
4445      <itemizedlist>
4446
4447       <listitem>
4448        <para>
4449         Add support for single-use plans with out-of-line
4450         parameters (Tom)
4451        </para>
4452       </listitem>
4453
4454       <listitem>
4455        <para>
4456         Add new <varname>SPI_OK_REWRITTEN</> return code for
4457         <function>SPI_execute()</> (Heikki)
4458        </para>
4459
4460        <para>
4461         This is used when a command is rewritten to another type of
4462         command.
4463        </para>
4464       </listitem>
4465
4466       <listitem>
4467        <para>
4468         Remove unnecessary inclusions from <filename>executor/spi.h</> (Tom)
4469        </para>
4470
4471        <para>
4472         SPI-using modules might need to add some <literal>#include</>
4473         lines if they were depending on <filename>spi.h</> to include
4474         things for them.
4475        </para>
4476       </listitem>
4477
4478      </itemizedlist>
4479
4480     </sect4>
4481
4482    </sect3>
4483
4484    <sect3>
4485     <title>Build Options</title>
4486     <itemizedlist>
4487
4488      <listitem>
4489       <para>
4490        Update build system to use <productname>Autoconf</> 2.61 (Peter)
4491       </para>
4492      </listitem>
4493
4494      <listitem>
4495       <para>
4496        Require <productname>GNU bison</> for source code builds (Peter)
4497       </para>
4498
4499       <para>
4500        This has effectively been required for several years, but now there
4501        is no infrastructure claiming to support other parser tools.
4502       </para>
4503      </listitem>
4504
4505      <listitem>
4506       <para>
4507        Add <application>pg_config</> <literal>--htmldir</> option
4508        (Peter)
4509       </para>
4510      </listitem>
4511
4512      <listitem>
4513       <para>
4514        Pass <type>float4</> by value inside the server (Zoltan
4515        Boszormenyi)
4516       </para>
4517
4518       <para>
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.
4525       </para>
4526      </listitem>
4527
4528      <listitem>
4529       <para>
4530        Pass <type>float8</>, <type>int8</>, and related datatypes
4531        by value inside the server on 64-bit platforms (Zoltan Boszormenyi)
4532       </para>
4533
4534       <para>
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.
4538       </para>
4539      </listitem>
4540
4541      <listitem>
4542       <para>
4543        Add configure options <literal>--with-segsize</>,
4544        <literal>--with-blocksize</>, <literal>--with-wal-blocksize</>,
4545        <literal>--with-wal-segsize</> (Zdenek Kotala, Tom)
4546       </para>
4547
4548       <para>
4549        This simplifies build-time control over several constants that
4550        previously could only be changed by editing
4551        <filename>pg_config_manual.h</>.
4552       </para>
4553      </listitem>
4554
4555      <listitem>
4556       <para>
4557        Allow threaded builds on <productname>Solaris</> 2.5 (Bruce)
4558       </para>
4559      </listitem>
4560
4561      <listitem>
4562       <para>
4563        Use the system's <function>getopt_long()</> on <productname>Solaris</>
4564        (Zdenek Kotala, Tom)
4565       </para>
4566
4567       <para>
4568        This makes option processing more consistent with what Solaris users
4569        expect.
4570       </para>
4571      </listitem>
4572
4573      <listitem>
4574       <para>
4575        Add support for the <productname>Sun Studio</> compiler on
4576        <productname>Linux</> (Julius Stroffek)
4577       </para>
4578      </listitem>
4579
4580      <listitem>
4581       <para>
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)
4585       </para>
4586
4587       <para>
4588        This simplifies parallel installations of multiple versions.
4589       </para>
4590      </listitem>
4591
4592      <listitem>
4593       <para>
4594        Add support for code coverage testing with <application>gcov</>
4595        (Michelle Caisse)
4596       </para>
4597      </listitem>
4598
4599      <listitem>
4600       <para>
4601        Allow out-of-tree builds on <productname>Mingw</> and
4602        <productname>Cygwin</> (Richard Evans)
4603       </para>
4604      </listitem>
4605
4606      <listitem>
4607       <para>
4608        Fix the use of <productname>Mingw</> as a cross-compiling source
4609        platform (Peter)
4610       </para>
4611      </listitem>
4612
4613     </itemizedlist>
4614
4615    </sect3>
4616
4617    <sect3>
4618     <title>Source Code</title>
4619     <itemizedlist>
4620
4621      <listitem>
4622       <para>
4623        Support 64-bit time zone data files (Heikki)
4624       </para>
4625
4626       <para>
4627        This adds support for daylight saving time (<acronym>DST</>)
4628        calculations beyond the year 2038.
4629       </para>
4630      </listitem>
4631
4632      <listitem>
4633       <para>
4634        Deprecate use of platform's <type>time_t</> data type (Tom)
4635       </para>
4636
4637       <para>
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.
4643       </para>
4644      </listitem>
4645
4646      <listitem>
4647       <para>
4648        Fix bug in handling of the time zone database when cross-compiling
4649        (Richard Evans)
4650       </para>
4651      </listitem>
4652
4653      <listitem>
4654       <para>
4655        Link backend object files in one step, rather than in stages
4656        (Peter)
4657       </para>
4658      </listitem>
4659
4660      <listitem>
4661       <para>
4662        Improve <application>gettext</> support to allow better translation
4663        of plurals (Peter)
4664       </para>
4665      </listitem>
4666
4667      <listitem>
4668       <para>
4669        Add message translation support to the PL languages (Alvaro, Peter)
4670       </para>
4671      </listitem>
4672
4673      <listitem>
4674       <para>
4675        Add more <application>DTrace</> probes (Robert Lor)
4676       </para>
4677      </listitem>
4678
4679      <listitem>
4680       <para>
4681        Enable <application>DTrace</> support on <application>Mac OS X
4682        Leopard</> and other non-Solaris platforms (Robert Lor)
4683       </para>
4684      </listitem>
4685
4686      <listitem>
4687       <para>
4688        Simplify and standardize conversions between C strings and
4689        <type>text</> datums, by providing common functions for the purpose
4690        (Brendan Jurd, Tom)
4691       </para>
4692      </listitem>
4693
4694      <listitem>
4695       <para>
4696        Clean up the <filename>include/catalog/</> header files so that
4697        frontend programs can include them without including
4698        <filename>postgres.h</>
4699        (Zdenek Kotala)
4700       </para>
4701      </listitem>
4702
4703      <listitem>
4704       <para>
4705        Make <type>name</> char-aligned, and suppress zero-padding of
4706        <type>name</> entries in indexes (Tom)
4707       </para>
4708      </listitem>
4709
4710      <listitem>
4711       <para>
4712        Recover better if dynamically-loaded code executes <function>exit()</>
4713        (Tom)
4714       </para>
4715      </listitem>
4716
4717      <listitem>
4718       <para>
4719        Add a hook to let plug-ins monitor the executor (Itagaki
4720        Takahiro)
4721       </para>
4722      </listitem>
4723
4724      <listitem>
4725       <para>
4726        Add a hook to allow the planner's statistics lookup behavior to
4727        be overridden (Simon Riggs)
4728       </para>
4729      </listitem>
4730
4731      <listitem>
4732       <para>
4733        Add <function>shmem_startup_hook()</> for custom shared memory
4734        requirements (Tom)
4735       </para>
4736      </listitem>
4737
4738      <listitem>
4739       <para>
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)
4744       </para>
4745
4746       <para>
4747        The API for GIN and GiST opclass <function>consistent</> functions
4748        has been extended as well.
4749       </para>
4750      </listitem>
4751
4752      <listitem>
4753       <para>
4754        Add support for partial-match searches in <acronym>GIN</> indexes
4755        (Teodor Sigaev, Oleg Bartunov)
4756       </para>
4757      </listitem>
4758
4759      <listitem>
4760       <para>
4761        Replace <structname>pg_class</> column <structfield>reltriggers</>
4762        with boolean <structfield>relhastriggers</> (Simon)
4763       </para>
4764
4765       <para>
4766        Also remove unused <structname>pg_class</> columns
4767        <structfield>relukeys</>, <structfield>relfkeys</>, and
4768        <structfield>relrefs</>.
4769       </para>
4770      </listitem>
4771
4772      <listitem>
4773       <para>
4774        Add a <structfield>relistemp</> column to <structname>pg_class</>
4775        to ease identification of temporary tables (Tom)
4776       </para>
4777      </listitem>
4778
4779      <listitem>
4780       <para>
4781        Move platform <acronym>FAQ</>s into the main documentation
4782        (Peter)
4783       </para>
4784      </listitem>
4785
4786      <listitem>
4787       <para>
4788        Prevent parser input files from being built with any conflicts
4789        (Peter)
4790       </para>
4791      </listitem>
4792
4793      <listitem>
4794       <para>
4795        Add support for the <literal>KOI8U</> (Ukrainian) encoding
4796        (Peter)
4797       </para>
4798      </listitem>
4799
4800      <listitem>
4801       <para>
4802        Add Japanese message translations (Japan PostgreSQL Users Group)
4803       </para>
4804
4805       <para>
4806        This used to be maintained as a separate project.
4807       </para>
4808      </listitem>
4809
4810      <listitem>
4811       <para>
4812        Fix problem when setting <varname>LC_MESSAGES</> on
4813        <application>MSVC</>-built systems (Hiroshi Inoue, Hiroshi
4814        Saito, Magnus)
4815       </para>
4816      </listitem>
4817
4818     </itemizedlist>
4819
4820    </sect3>
4821
4822    <sect3>
4823     <title>Contrib</title>
4824
4825     <itemizedlist>
4826
4827      <listitem>
4828       <para>
4829        Add <filename>contrib/auto_explain</> to automatically run
4830        <command>EXPLAIN</> on queries exceeding a specified duration
4831        (Itagaki Takahiro, Tom)
4832       </para>
4833      </listitem>
4834
4835      <listitem>
4836       <para>
4837        Add <filename>contrib/btree_gin</> to allow GIN indexes to
4838        handle more datatypes (Oleg, Teodor)
4839       </para>
4840      </listitem>
4841
4842      <listitem>
4843       <para>
4844        Add <filename>contrib/citext</> to provide a case-insensitive,
4845        multibyte-aware text data type (David Wheeler)
4846       </para>
4847      </listitem>
4848
4849      <listitem>
4850       <para>
4851        Add <filename>contrib/pg_stat_statements</> for server-wide
4852        tracking of statement execution statistics (Itagaki Takahiro)
4853       </para>
4854      </listitem>
4855
4856      <listitem>
4857       <para>
4858        Add duration and query mode options to <filename>contrib/pgbench</>
4859        (Itagaki Takahiro)
4860       </para>
4861      </listitem>
4862
4863      <listitem>
4864       <para>
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)
4870       </para>
4871
4872       <para>
4873        This is to reduce the risk of accidentally destroying real data
4874        by running <application>pgbench</>.
4875       </para>
4876      </listitem>
4877
4878      <listitem>
4879       <para>
4880        Fix <filename>contrib/pgstattuple</> to handle tables and
4881        indexes with over 2 billion pages (Tatsuhito Kasahara)
4882       </para>
4883      </listitem>
4884
4885      <listitem>
4886       <para>
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
4890        (Volkan Yazici)
4891       </para>
4892      </listitem>
4893
4894      <listitem>
4895       <para>
4896        Make <filename>contrib/ltree</> support multibyte encodings
4897        (laser)
4898       </para>
4899      </listitem>
4900
4901      <listitem>
4902       <para>
4903        Enable <filename>contrib/dblink</> to use connection information
4904        stored in the SQL/MED catalogs (Joe Conway)
4905       </para>
4906      </listitem>
4907
4908      <listitem>
4909       <para>
4910        Improve <filename>contrib/dblink</>'s reporting of errors from
4911        the remote server (Joe Conway)
4912       </para>
4913      </listitem>
4914
4915      <listitem>
4916       <para>
4917        Make <filename>contrib/dblink</> set <varname>client_encoding</>
4918        to match the local database's encoding (Joe Conway)
4919       </para>
4920
4921       <para>
4922        This prevents encoding problems when communicating with a remote
4923        database that uses a different encoding.
4924       </para>
4925      </listitem>
4926
4927      <listitem>
4928       <para>
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)
4932       </para>
4933
4934       <para>
4935        This is a minor security enhancement.
4936       </para>
4937      </listitem>
4938
4939      <listitem>
4940       <para>
4941        Add <function>fsm_page_contents()</>
4942        to <filename>contrib/pageinspect</> (Heikki)
4943       </para>
4944      </listitem>
4945
4946      <listitem>
4947       <para>
4948        Modify <function>get_raw_page()</> to support free space map
4949        (<filename>*_fsm</>) files.  Also update
4950        <filename>contrib/pg_freespacemap</>.
4951       </para>
4952      </listitem>
4953
4954      <listitem>
4955       <para>
4956        Add support for multibyte encodings to <filename>contrib/pg_trgm</>
4957        (Teodor)
4958       </para>
4959      </listitem>
4960
4961      <listitem>
4962       <para>
4963        Rewrite <filename>contrib/intagg</> to use new
4964        functions <function>array_agg()</> and <function>unnest()</>
4965        (Tom)
4966       </para>
4967      </listitem>
4968
4969      <listitem>
4970       <para>
4971        Make <filename>contrib/pg_standby</> recover all available WAL before
4972        failover (Fujii Masao, Simon, Heikki)
4973       </para>
4974
4975       <para>
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.
4980       </para>
4981      </listitem>
4982
4983      <listitem>
4984       <para>
4985        <filename>contrib/pg_standby</>'s <option>-l</> option is now a no-op,
4986        because it is unsafe to use a symlink (Simon)
4987       </para>
4988      </listitem>
4989
4990     </itemizedlist>
4991
4992    </sect3>
4993   </sect2>
4994  </sect1>