OSDN Git Service

Use a separate interpreter for each calling SQL userid in plperl and pltcl.
[pg-rex/syncrep.git] / doc / src / sgml / release-8.4.sgml
1 <!-- doc/src/sgml/release-8.4.sgml -->
2 <!-- See header comment in release.sgml about typical markup -->
3
4  <sect1 id="release-8-4-5">
5   <title>Release 8.4.5</title>
6
7   <note>
8   <title>Release date</title>
9   <simpara>2010-10-04</simpara>
10   </note>
11
12   <para>
13    This release contains a variety of fixes from 8.4.4.
14    For information about new features in the 8.4 major release, see
15    <xref linkend="release-8-4">.
16   </para>
17
18   <sect2>
19    <title>Migration to Version 8.4.5</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       Use a separate interpreter for each calling SQL userid in PL/Perl and
37       PL/Tcl (Tom Lane)
38      </para>
39
40      <para>
41       This change prevents security problems that can be caused by subverting
42       Perl or Tcl code that will be executed later in the same session under
43       another SQL user identity (for example, within a <literal>SECURITY
44       DEFINER</> function).  Most scripting languages offer numerous ways that
45       that might be done, such as redefining standard functions or operators
46       called by the target function.  Without this change, any SQL user with
47       Perl or Tcl language usage rights can do essentially anything with the
48       SQL privileges of the target function's owner.
49      </para>
50
51      <para>
52       The cost of this change is that intentional communication among Perl
53       and Tcl functions becomes more difficult.  To provide an escape hatch,
54       PL/PerlU and PL/TclU functions continue to use only one interpreter
55       per session.  This is not considered a security issue since all such
56       functions execute at the trust level of a database superuser already.
57      </para>
58
59      <para>
60       It is likely that third-party procedural languages that claim to offer
61       trusted execution have similar security issues.  We advise contacting
62       the authors of any PL you are depending on for security-critical
63       purposes.
64      </para>
65
66      <para>
67       Our thanks to Tim Bunce for pointing out this issue (CVE-2010-3433).
68      </para>
69     </listitem>
70
71     <listitem>
72      <para>
73       Prevent possible crashes in <function>pg_get_expr()</> by disallowing
74       it from being called with an argument that is not one of the system
75       catalog columns it's intended to be used with
76       (Heikki Linnakangas, Tom Lane)
77      </para>
78     </listitem>
79
80     <listitem>
81      <para>
82       Treat exit code 128 (<literal>ERROR_WAIT_NO_CHILDREN</>) as non-fatal on
83       Windows (Magnus Hagander)
84      </para>
85
86      <para>
87       Under high load, Windows processes will sometimes fail at startup with
88       this error code.  Formerly the postmaster treated this as a panic
89       condition and restarted the whole database, but that seems to be
90       an overreaction.
91      </para>
92     </listitem>
93
94     <listitem>
95      <para>
96       Fix incorrect placement of placeholder evaluation (Tom Lane)
97      </para>
98
99      <para>
100       This bug could result in query outputs being non-null when they
101       should be null, in cases where the inner side of an outer join
102       is a sub-select with non-strict expressions in its output list.
103      </para>
104     </listitem>
105
106     <listitem>
107      <para>
108       Fix possible duplicate scans of <literal>UNION ALL</> member relations
109       (Tom Lane)
110      </para>
111     </listitem>
112
113     <listitem>
114      <para>
115       Fix <quote>cannot handle unplanned sub-select</quote> error (Tom Lane)
116      </para>
117
118      <para>
119       This occurred when a sub-select contains a join alias reference that
120       expands into an expression containing another sub-select.
121      </para>
122     </listitem>
123
124     <listitem>
125      <para>
126       Fix mishandling of whole-row Vars that reference a view or sub-select
127       and appear within a nested sub-select (Tom Lane)
128      </para>
129     </listitem>
130
131     <listitem>
132      <para>
133       Fix mishandling of cross-type <literal>IN</> comparisons (Tom Lane)
134      </para>
135
136      <para>
137       This could result in failures if the planner tried to implement an
138       <literal>IN</> join with a sort-then-unique-then-plain-join plan.
139      </para>
140     </listitem>
141
142     <listitem>
143      <para>
144       Fix computation of <command>ANALYZE</> statistics for <type>tsvector</>
145       columns (Jan Urbanski)
146      </para>
147
148      <para>
149       The original coding could produce incorrect statistics, leading to
150       poor plan choices later.
151      </para>
152     </listitem>
153
154     <listitem>
155      <para>
156       Improve planner's estimate of memory used by <function>array_agg()</>,
157       <function>string_agg()</>, and similar aggregate functions
158       (Hitoshi Harada)
159      </para>
160
161      <para>
162       The previous drastic underestimate could lead to out-of-memory failures
163       due to inappropriate choice of a hash-aggregation plan.
164      </para>
165     </listitem>
166
167     <listitem>
168      <para>
169       Fix failure to mark cached plans as transient (Tom Lane)
170      </para>
171
172      <para>
173       If a plan is prepared while <command>CREATE INDEX CONCURRENTLY</> is
174       in progress for one of the referenced tables, it is supposed to be
175       re-planned once the index is ready for use.  This was not happening
176       reliably.
177      </para>
178     </listitem>
179
180     <listitem>
181      <para>
182       Reduce PANIC to ERROR in some occasionally-reported btree failure cases,
183       and provide additional detail in the resulting error messages
184       (Tom Lane)
185      </para>
186
187      <para>
188       This should improve the system's robustness with corrupted indexes.
189      </para>
190     </listitem>
191
192     <listitem>
193      <para>
194       Fix incorrect search logic for partial-match queries with GIN indexes
195       (Tom Lane)
196      </para>
197
198      <para>
199       Cases involving AND/OR combination of several GIN index conditions
200       didn't always give the right answer, and were sometimes much slower
201       than necessary.
202      </para>
203     </listitem>
204
205     <listitem>
206      <para>
207       Prevent show_session_authorization() from crashing within autovacuum
208       processes (Tom Lane)
209      </para>
210     </listitem>
211
212     <listitem>
213      <para>
214       Defend against functions returning setof record where not all the
215       returned rows are actually of the same rowtype (Tom Lane)
216      </para>
217     </listitem>
218
219     <listitem>
220      <para>
221       Fix possible corruption of pending trigger event lists during
222       subtransaction rollback (Tom Lane)
223      </para>
224
225      <para>
226       This could lead to a crash or incorrect firing of triggers.
227      </para>
228     </listitem>
229
230     <listitem>
231      <para>
232       Fix possible failure when hashing a pass-by-reference function result
233       (Tao Ma, Tom Lane)
234      </para>
235     </listitem>
236
237     <listitem>
238      <para>
239       Improve merge join's handling of NULLs in the join columns (Tom Lane)
240      </para>
241
242      <para>
243       A merge join can now stop entirely upon reaching the first NULL,
244       if the sort order is such that NULLs sort high.
245      </para>
246     </listitem>
247
248     <listitem>
249      <para>
250       Take care to fsync the contents of lockfiles (both
251       <filename>postmaster.pid</> and the socket lockfile) while writing them
252       (Tom Lane)
253      </para>
254
255      <para>
256       This omission could result in corrupted lockfile contents if the
257       machine crashes shortly after postmaster start.  That could in turn
258       prevent subsequent attempts to start the postmaster from succeeding,
259       until the lockfile is manually removed.
260      </para>
261     </listitem>
262
263     <listitem>
264      <para>
265       Avoid recursion while assigning XIDs to heavily-nested
266       subtransactions (Andres Freund, Robert Haas)
267      </para>
268
269      <para>
270       The original coding could result in a crash if there was limited
271       stack space.
272      </para>
273     </listitem>
274
275     <listitem>
276      <para>
277       Avoid holding open old WAL segments in the walwriter process
278       (Magnus Hagander, Heikki Linnakangas)
279      </para>
280
281      <para>
282       The previous coding would prevent removal of no-longer-needed segments.
283      </para>
284     </listitem>
285
286     <listitem>
287      <para>
288       Fix <varname>log_line_prefix</>'s <literal>%i</> escape,
289       which could produce junk early in backend startup (Tom Lane)
290      </para>
291     </listitem>
292
293     <listitem>
294      <para>
295       Prevent misinterpretation of partially-specified relation options
296       for TOAST tables (Itagaki Takahiro)
297      </para>
298
299      <para>
300       In particular, <literal>fillfactor</> would be read as zero if any
301       other reloption had been set for the table, leading to serious bloat.
302      </para>
303     </listitem>
304
305     <listitem>
306      <para>
307       Fix inheritance count tracking in <command>ALTER TABLE ... ADD
308       CONSTRAINT</> (Robert Haas)
309      </para>
310     </listitem>
311
312     <listitem>
313      <para>
314       Fix possible data corruption in <command>ALTER TABLE ... SET
315       TABLESPACE</> when archiving is enabled (Jeff Davis)
316      </para>
317     </listitem>
318
319     <listitem>
320      <para>
321       Allow <command>CREATE DATABASE</> and <command>ALTER DATABASE ... SET
322       TABLESPACE</> to be interrupted by query-cancel (Guillaume Lelarge)
323      </para>
324     </listitem>
325
326     <listitem>
327      <para>
328       Improve <command>CREATE INDEX</>'s checking of whether proposed index
329       expressions are immutable (Tom Lane)
330      </para>
331     </listitem>
332
333     <listitem>
334      <para>
335       Fix <command>REASSIGN OWNED</> to handle operator classes and families
336       (Asko Tiidumaa)
337      </para>
338     </listitem>
339
340     <listitem>
341      <para>
342       Fix possible core dump when comparing two empty <type>tsquery</> values
343       (Tom Lane)
344      </para>
345     </listitem>
346
347     <listitem>
348      <para>
349       Fix <literal>LIKE</>'s handling of patterns containing <literal>%</>
350       followed by <literal>_</> (Tom Lane)
351      </para>
352
353      <para>
354       We've fixed this before, but there were still some incorrectly-handled
355       cases.
356      </para>
357     </listitem>
358
359     <listitem>
360      <para>
361       Re-allow input of Julian dates prior to 0001-01-01 AD (Tom Lane)
362      </para>
363
364      <para>
365       Input such as <literal>'J100000'::date</> worked before 8.4,
366       but was unintentionally broken by added error-checking.
367      </para>
368     </listitem>
369
370     <listitem>
371      <para>
372       Fix PL/pgSQL to throw an error, not crash, if a cursor is closed within
373       a <literal>FOR</> loop that is iterating over that cursor
374       (Heikki Linnakangas)
375      </para>
376     </listitem>
377
378     <listitem>
379      <para>
380       In PL/Python, defend against null pointer results from
381       <function>PyCObject_AsVoidPtr</> and <function>PyCObject_FromVoidPtr</>
382       (Peter Eisentraut)
383      </para>
384     </listitem>
385
386     <listitem>
387      <para>
388       In <application>libpq</>, fix full SSL certificate verification for the
389       case where both <literal>host</> and <literal>hostaddr</> are specified
390       (Tom Lane)
391      </para>
392     </listitem>
393
394     <listitem>
395      <para>
396       Make psql recognize <command>DISCARD ALL</> as a command that should
397       not be encased in a transaction block in autocommit-off mode
398       (Itagaki Takahiro)
399      </para>
400     </listitem>
401
402     <listitem>
403      <para>
404       Fix some issues in <application>pg_dump</>'s handling of SQL/MED objects
405       (Tom Lane)
406      </para>
407
408      <para>
409       Notably, <application>pg_dump</> would always fail if run by a
410       non-superuser, which was not intended.
411      </para>
412     </listitem>
413
414     <listitem>
415      <para>
416       Improve <application>pg_dump</> and <application>pg_restore</>'s
417       handling of non-seekable archive files (Tom Lane, Robert Haas)
418      </para>
419
420      <para>
421       This is important for proper functioning of parallel restore.
422      </para>
423     </listitem>
424
425     <listitem>
426      <para>
427       Improve parallel pg_restore's ability to cope with selective restore
428       (<literal>-L</> option) (Tom Lane)
429      </para>
430
431      <para>
432       The original code tended to fail if the <literal>-L</> file commanded
433       a non-default restore ordering.
434      </para>
435     </listitem>
436
437     <listitem>
438      <para>
439       Fix <application>ecpg</> to process data from <literal>RETURNING</>
440       clauses correctly (Michael Meskes)
441      </para>
442     </listitem>
443
444     <listitem>
445      <para>
446       Fix some memory leaks in <application>ecpg</> (Zoltan Boszormenyi)
447      </para>
448     </listitem>
449
450     <listitem>
451      <para>
452       Improve <filename>contrib/dblink</>'s handling of tables containing
453       dropped columns (Tom Lane)
454      </para>
455     </listitem>
456
457     <listitem>
458      <para>
459       Fix connection leak after <quote>duplicate connection name</quote>
460       errors in <filename>contrib/dblink</> (Itagaki Takahiro)
461      </para>
462     </listitem>
463
464     <listitem>
465      <para>
466       Fix <filename>contrib/dblink</> to handle connection names longer than
467       62 bytes correctly (Itagaki Takahiro)
468      </para>
469     </listitem>
470
471     <listitem>
472      <para>
473       Add <function>hstore(text, text)</>
474       function to <filename>contrib/hstore</> (Robert Haas)
475      </para>
476
477      <para>
478       This function is the recommended substitute for the now-deprecated
479       <literal>=&gt;</> operator.  It was back-patched so that future-proofed
480       code can be used with older server versions.  Note that the patch will
481       be effective only after <filename>contrib/hstore</> is installed or
482       reinstalled in a particular database.  Users might prefer to execute
483       the <command>CREATE FUNCTION</> command by hand, instead.
484      </para>
485     </listitem>
486
487     <listitem>
488      <para>
489       Update build infrastructure and documentation to reflect the source code
490       repository's move from CVS to Git (Magnus Hagander and others)
491      </para>
492     </listitem>
493
494     <listitem>
495      <para>
496       Update time zone data files to <application>tzdata</> release 2010l
497       for DST law changes in Egypt and Palestine; also historical corrections
498       for Finland.
499      </para>
500
501      <para>
502       This change also adds new names for two Micronesian timezones:
503       Pacific/Chuuk is now preferred over Pacific/Truk (and the preferred
504       abbreviation is CHUT not TRUT) and Pacific/Pohnpei is preferred over
505       Pacific/Ponape.
506      </para>
507     </listitem>
508
509     <listitem>
510      <para>
511       Make Windows' <quote>N. Central Asia Standard Time</> timezone map to
512       Asia/Novosibirsk, not Asia/Almaty (Magnus Hagander)
513      </para>
514
515      <para>
516       Microsoft changed the DST behavior of this zone in the timezone update
517       from KB976098. Asia/Novosibirsk is a better match to its new behavior.
518      </para>
519     </listitem>
520
521    </itemizedlist>
522
523   </sect2>
524  </sect1>
525
526  <sect1 id="release-8-4-4">
527   <title>Release 8.4.4</title>
528
529   <note>
530   <title>Release date</title>
531   <simpara>2010-05-17</simpara>
532   </note>
533
534   <para>
535    This release contains a variety of fixes from 8.4.3.
536    For information about new features in the 8.4 major release, see
537    <xref linkend="release-8-4">.
538   </para>
539
540   <sect2>
541    <title>Migration to Version 8.4.4</title>
542
543    <para>
544     A dump/restore is not required for those running 8.4.X.
545     However, if you are upgrading from a version earlier than 8.4.2,
546     see the release notes for 8.4.2.
547    </para>
548
549   </sect2>
550
551   <sect2>
552    <title>Changes</title>
553
554    <itemizedlist>
555
556     <listitem>
557      <para>
558       Enforce restrictions in <literal>plperl</> using an opmask applied to
559       the whole interpreter, instead of using <filename>Safe.pm</>
560       (Tim Bunce, Andrew Dunstan)
561      </para>
562
563      <para>
564       Recent developments have convinced us that <filename>Safe.pm</> is too
565       insecure to rely on for making <literal>plperl</> trustable.  This
566       change removes use of <filename>Safe.pm</> altogether, in favor of using
567       a separate interpreter with an opcode mask that is always applied.
568       Pleasant side effects of the change include that it is now possible to
569       use Perl's <literal>strict</> pragma in a natural way in
570       <literal>plperl</>, and that Perl's <literal>$a</> and <literal>$b</>
571       variables work as expected in sort routines, and that function
572       compilation is significantly faster.  (CVE-2010-1169)
573      </para>
574     </listitem>
575
576     <listitem>
577      <para>
578       Prevent PL/Tcl from executing untrustworthy code from
579       <structname>pltcl_modules</> (Tom)
580      </para>
581
582      <para>
583       PL/Tcl's feature for autoloading Tcl code from a database table
584       could be exploited for trojan-horse attacks, because there was no
585       restriction on who could create or insert into that table.  This change
586       disables the feature unless <structname>pltcl_modules</> is owned by a
587       superuser.  (However, the permissions on the table are not checked, so
588       installations that really need a less-than-secure modules table can
589       still grant suitable privileges to trusted non-superusers.)  Also,
590       prevent loading code into the unrestricted <quote>normal</> Tcl
591       interpreter unless we are really going to execute a <literal>pltclu</>
592       function.  (CVE-2010-1170)
593      </para>
594     </listitem>
595
596     <listitem>
597      <para>
598       Fix data corruption during WAL replay of
599       <literal>ALTER ... SET TABLESPACE</> (Tom)
600      </para>
601
602      <para>
603       When <varname>archive_mode</> is on, <literal>ALTER ... SET TABLESPACE</>
604       generates a WAL record whose replay logic was incorrect.  It could write
605       the data to the wrong place, leading to possibly-unrecoverable data
606       corruption.  Data corruption would be observed on standby slaves, and
607       could occur on the master as well if a database crash and recovery
608       occurred after committing the <literal>ALTER</> and before the next
609       checkpoint.
610      </para>
611     </listitem>
612
613     <listitem>
614      <para>
615       Fix possible crash if a cache reset message is received during
616       rebuild of a relcache entry (Heikki)
617      </para>
618
619      <para>
620       This error was introduced in 8.4.3 while fixing a related failure.
621      </para>
622     </listitem>
623
624     <listitem>
625      <para>
626       Apply per-function GUC settings while running the language validator
627       for the function (Itagaki Takahiro)
628      </para>
629
630      <para>
631       This avoids failures if the function's code is invalid without the
632       setting; an example is that SQL functions may not parse if the
633       <varname>search_path</> is not correct.
634      </para>
635     </listitem>
636
637     <listitem>
638      <para>
639       Do constraint exclusion for inherited <command>UPDATE</> and
640       <command>DELETE</> target tables when
641       <varname>constraint_exclusion</> = <literal>partition</> (Tom)
642      </para>
643
644      <para>
645       Due to an oversight, this setting previously only caused constraint
646       exclusion to be checked in <command>SELECT</> commands.
647      </para>
648     </listitem>
649
650     <listitem>
651      <para>
652       Do not allow an unprivileged user to reset superuser-only parameter
653       settings (Alvaro)
654      </para>
655
656      <para>
657       Previously, if an unprivileged user ran <literal>ALTER USER ... RESET
658       ALL</> for himself, or <literal>ALTER DATABASE ... RESET ALL</> for
659       a database he owns, this would remove all special parameter settings
660       for the user or database, even ones that are only supposed to be
661       changeable by a superuser.  Now, the <command>ALTER</> will only
662       remove the parameters that the user has permission to change.
663      </para>
664     </listitem>
665
666     <listitem>
667      <para>
668       Avoid possible crash during backend shutdown if shutdown occurs
669       when a <literal>CONTEXT</> addition would be made to log entries (Tom)
670      </para>
671
672      <para>
673       In some cases the context-printing function would fail because the
674       current transaction had already been rolled back when it came time
675       to print a log message.
676      </para>
677     </listitem>
678
679     <listitem>
680      <para>
681       Fix erroneous handling of <literal>%r</> parameter in
682       <varname>recovery_end_command</> (Heikki)
683      </para>
684
685      <para>
686       The value always came out zero.
687      </para>
688     </listitem>
689
690     <listitem>
691      <para>
692       Ensure the archiver process responds to changes in
693       <varname>archive_command</> as soon as possible (Tom)
694      </para>
695     </listitem>
696
697     <listitem>
698      <para>
699       Fix pl/pgsql's <literal>CASE</> statement to not fail when the
700       case expression is a query that returns no rows (Tom)
701      </para>
702     </listitem>
703
704     <listitem>
705      <para>
706       Update pl/perl's <filename>ppport.h</> for modern Perl versions
707       (Andrew)
708      </para>
709     </listitem>
710
711     <listitem>
712      <para>
713       Fix assorted memory leaks in pl/python (Andreas Freund, Tom)
714      </para>
715     </listitem>
716
717     <listitem>
718      <para>
719       Handle empty-string connect parameters properly in ecpg (Michael)
720      </para>
721     </listitem>
722
723     <listitem>
724      <para>
725       Prevent infinite recursion in <application>psql</> when expanding
726       a variable that refers to itself (Tom)
727      </para>
728     </listitem>
729
730     <listitem>
731      <para>
732       Fix <application>psql</>'s <literal>\copy</> to not add spaces around
733       a dot within <literal>\copy (select ...)</> (Tom)
734      </para>
735
736      <para>
737       Addition of spaces around the decimal point in a numeric literal would
738       result in a syntax error.
739      </para>
740     </listitem>
741
742     <listitem>
743      <para>
744       Avoid formatting failure in <application>psql</> when running in a
745       locale context that doesn't match the <varname>client_encoding</>
746       (Tom)
747      </para>
748     </listitem>
749
750     <listitem>
751      <para>
752       Fix unnecessary <quote>GIN indexes do not support whole-index scans</>
753       errors for unsatisfiable queries using <filename>contrib/intarray</>
754       operators (Tom)
755      </para>
756     </listitem>
757
758     <listitem>
759      <para>
760       Ensure that <filename>contrib/pgstattuple</> functions respond to cancel
761       interrupts promptly (Tatsuhito Kasahara)
762      </para>
763     </listitem>
764
765     <listitem>
766      <para>
767       Make server startup deal properly with the case that
768       <function>shmget()</> returns <literal>EINVAL</> for an existing
769       shared memory segment (Tom)
770      </para>
771
772      <para>
773       This behavior has been observed on BSD-derived kernels including OS X.
774       It resulted in an entirely-misleading startup failure complaining that
775       the shared memory request size was too large.
776      </para>
777     </listitem>
778
779     <listitem>
780      <para>
781       Avoid possible crashes in syslogger process on Windows (Heikki)
782      </para>
783     </listitem>
784
785     <listitem>
786      <para>
787       Deal more robustly with incomplete time zone information in the
788       Windows registry (Magnus)
789      </para>
790     </listitem>
791
792     <listitem>
793      <para>
794       Update the set of known Windows time zone names (Magnus)
795      </para>
796     </listitem>
797
798     <listitem>
799      <para>
800       Update time zone data files to <application>tzdata</> release 2010j
801       for DST law changes in Argentina, Australian Antarctic, Bangladesh,
802       Mexico, Morocco, Pakistan, Palestine, Russia, Syria, Tunisia;
803       also historical corrections for Taiwan.
804      </para>
805
806      <para>
807       Also, add <literal>PKST</> (Pakistan Summer Time) to the default set of
808       timezone abbreviations.
809      </para>
810     </listitem>
811
812    </itemizedlist>
813
814   </sect2>
815  </sect1>
816
817  <sect1 id="release-8-4-3">
818   <title>Release 8.4.3</title>
819
820   <note>
821   <title>Release date</title>
822   <simpara>2010-03-15</simpara>
823   </note>
824
825   <para>
826    This release contains a variety of fixes from 8.4.2.
827    For information about new features in the 8.4 major release, see
828    <xref linkend="release-8-4">.
829   </para>
830
831   <sect2>
832    <title>Migration to Version 8.4.3</title>
833
834    <para>
835     A dump/restore is not required for those running 8.4.X.
836     However, if you are upgrading from a version earlier than 8.4.2,
837     see the release notes for 8.4.2.
838    </para>
839
840   </sect2>
841
842   <sect2>
843    <title>Changes</title>
844
845    <itemizedlist>
846
847     <listitem>
848      <para>
849       Add new configuration parameter <varname>ssl_renegotiation_limit</> to
850       control how often we do session key renegotiation for an SSL connection
851       (Magnus)
852      </para>
853
854      <para>
855       This can be set to zero to disable renegotiation completely, which may
856       be required if a broken SSL library is used.  In particular, some
857       vendors are shipping stopgap patches for CVE-2009-3555 that cause
858       renegotiation attempts to fail.
859      </para>
860     </listitem>
861
862     <listitem>
863      <para>
864       Fix possible deadlock during backend startup (Tom)
865      </para>
866     </listitem>
867
868     <listitem>
869      <para>
870       Fix possible crashes due to not handling errors during relcache reload
871       cleanly (Tom)
872      </para>
873     </listitem>
874
875     <listitem>
876      <para>
877       Fix possible crash due to use of dangling pointer to a cached plan
878       (Tatsuo)
879      </para>
880     </listitem>
881
882     <listitem>
883      <para>
884       Fix possible crash due to overenthusiastic invalidation of cached
885       plan for <command>ROLLBACK</> (Tom)
886      </para>
887     </listitem>
888
889     <listitem>
890      <para>
891       Fix possible crashes when trying to recover from a failure in
892       subtransaction start (Tom)
893      </para>
894     </listitem>
895
896     <listitem>
897      <para>
898       Fix server memory leak associated with use of savepoints and a client
899       encoding different from server's encoding (Tom)
900      </para>
901     </listitem>
902
903     <listitem>
904      <para>
905       Fix incorrect WAL data emitted during end-of-recovery cleanup of a GIST
906       index page split (Yoichi Hirai)
907      </para>
908
909      <para>
910       This would result in index corruption, or even more likely an error
911       during WAL replay, if we were unlucky enough to crash during
912       end-of-recovery cleanup after having completed an incomplete GIST
913       insertion.
914      </para>
915     </listitem>
916
917     <listitem>
918      <para>
919       Fix bug in WAL redo cleanup method for GIN indexes (Heikki)
920      </para>
921     </listitem>
922
923     <listitem>
924      <para>
925       Fix incorrect comparison of scan key in GIN index search (Teodor)
926      </para>
927     </listitem>
928
929     <listitem>
930      <para>
931       Make <function>substring()</> for <type>bit</> types treat any negative
932       length as meaning <quote>all the rest of the string</> (Tom)
933      </para>
934
935      <para>
936       The previous coding treated only -1 that way, and would produce an
937       invalid result value for other negative values, possibly leading to
938       a crash (CVE-2010-0442).
939      </para>
940     </listitem>
941
942     <listitem>
943      <para>
944       Fix integer-to-bit-string conversions to handle the first fractional
945       byte correctly when the output bit width is wider than the given
946       integer by something other than a multiple of 8 bits (Tom)
947      </para>
948     </listitem>
949
950     <listitem>
951      <para>
952       Fix some cases of pathologically slow regular expression matching (Tom)
953      </para>
954     </listitem>
955
956     <listitem>
957      <para>
958       Fix bug occurring when trying to inline a SQL function that returns
959       a set of a composite type that contains dropped columns (Tom)
960      </para>
961     </listitem>
962
963     <listitem>
964      <para>
965       Fix bug with trying to update a field of an element of a
966       composite-type array column (Tom)
967      </para>
968     </listitem>
969
970     <listitem>
971      <para>
972       Avoid failure when <command>EXPLAIN</> has to print a FieldStore or
973       assignment ArrayRef expression (Tom)
974      </para>
975
976      <para>
977       These cases can arise now that <command>EXPLAIN VERBOSE</> tries to
978       print plan node target lists.
979      </para>
980     </listitem>
981
982     <listitem>
983      <para>
984       Avoid an unnecessary coercion failure in some cases where an undecorated
985       literal string appears in a subquery within
986       <command>UNION</>/<command>INTERSECT</>/<command>EXCEPT</> (Tom)
987      </para>
988
989      <para>
990       This fixes a regression for some cases that worked before 8.4.
991      </para>
992     </listitem>
993
994     <listitem>
995      <para>
996       Avoid undesirable rowtype compatibility check failures in some cases
997       where a whole-row Var has a rowtype that contains dropped columns (Tom)
998      </para>
999     </listitem>
1000
1001     <listitem>
1002      <para>
1003       Fix the <literal>STOP WAL LOCATION</> entry in backup history files to
1004       report the next WAL segment's name when the end location is exactly at a
1005       segment boundary (Itagaki Takahiro)
1006      </para>
1007     </listitem>
1008
1009     <listitem>
1010      <para>
1011       Always pass the catalog ID to an option validator function specified in
1012       <command>CREATE FOREIGN DATA WRAPPER</> (Martin Pihlak)
1013      </para>
1014     </listitem>
1015
1016     <listitem>
1017      <para>
1018       Fix some more cases of temporary-file leakage (Heikki)
1019      </para>
1020
1021      <para>
1022       This corrects a problem introduced in the previous minor release.
1023       One case that failed is when a plpgsql function returning set is
1024       called within another function's exception handler.
1025      </para>
1026     </listitem>
1027
1028     <listitem>
1029      <para>
1030       Add support for doing <literal>FULL JOIN ON FALSE</> (Tom)
1031      </para>
1032
1033      <para>
1034       This prevents a regression from pre-8.4 releases for some queries that
1035       can now be simplified to a constant-false join condition.
1036      </para>
1037     </listitem>
1038
1039     <listitem>
1040      <para>
1041       Improve constraint exclusion processing of boolean-variable cases,
1042       in particular make it possible to exclude a partition that has a
1043       <quote>bool_column = false</> constraint (Tom)
1044      </para>
1045     </listitem>
1046
1047     <listitem>
1048      <para>
1049       Prevent treating an <literal>INOUT</> cast as representing binary
1050       compatibility (Heikki)
1051      </para>
1052     </listitem>
1053
1054     <listitem>
1055      <para>
1056       Include column name in the message when warning about inability to
1057       grant or revoke column-level privileges (Stephen Frost)
1058      </para>
1059
1060      <para>
1061       This is more useful than before and helps to prevent confusion when
1062       a <command>REVOKE</> generates multiple messages, which formerly
1063       appeared to be duplicates.
1064      </para>
1065     </listitem>
1066
1067     <listitem>
1068      <para>
1069       When reading <filename>pg_hba.conf</> and related files, do not treat
1070       <literal>@something</> as a file inclusion request if the <literal>@</>
1071       appears inside quote marks; also, never treat <literal>@</> by itself
1072       as a file inclusion request (Tom)
1073      </para>
1074
1075      <para>
1076       This prevents erratic behavior if a role or database name starts with
1077       <literal>@</>.  If you need to include a file whose path name
1078       contains spaces, you can still do so, but you must write
1079       <literal>@"/path to/file"</> rather than putting the quotes around
1080       the whole construct.
1081      </para>
1082     </listitem>
1083
1084     <listitem>
1085      <para>
1086       Prevent infinite loop on some platforms if a directory is named as
1087       an inclusion target in <filename>pg_hba.conf</> and related files
1088       (Tom)
1089      </para>
1090     </listitem>
1091
1092     <listitem>
1093      <para>
1094       Fix possible infinite loop if <function>SSL_read</> or
1095       <function>SSL_write</> fails without setting <varname>errno</> (Tom)
1096      </para>
1097
1098      <para>
1099       This is reportedly possible with some Windows versions of
1100       <application>openssl</>.
1101      </para>
1102     </listitem>
1103
1104     <listitem>
1105      <para>
1106       Disallow <acronym>GSSAPI</> authentication on local connections,
1107       since it requires a hostname to function correctly (Magnus)
1108      </para>
1109     </listitem>
1110
1111     <listitem>
1112      <para>
1113       Protect <application>ecpg</> against applications freeing strings
1114       unexpectedly (Michael)
1115      </para>
1116     </listitem>
1117
1118     <listitem>
1119      <para>
1120       Make <application>ecpg</> report the proper SQLSTATE if the connection
1121       disappears (Michael)
1122      </para>
1123     </listitem>
1124
1125     <listitem>
1126      <para>
1127       Fix translation of cell contents in <application>psql</> <literal>\d</>
1128       output (Heikki)
1129      </para>
1130     </listitem>
1131
1132     <listitem>
1133      <para>
1134       Fix <application>psql</>'s <literal>numericlocale</> option to not
1135       format strings it shouldn't in latex and troff output formats (Heikki)
1136      </para>
1137     </listitem>
1138
1139     <listitem>
1140      <para>
1141       Fix a small per-query memory leak in <application>psql</> (Tom)
1142      </para>
1143     </listitem>
1144
1145     <listitem>
1146      <para>
1147       Make <application>psql</> return the correct exit status (3) when
1148       <literal>ON_ERROR_STOP</> and <literal>--single-transaction</> are
1149       both specified and an error occurs during the implied <command>COMMIT</>
1150       (Bruce)
1151      </para>
1152     </listitem>
1153
1154     <listitem>
1155      <para>
1156       Fix <application>pg_dump</>'s output of permissions for foreign servers
1157       (Heikki)
1158      </para>
1159     </listitem>
1160
1161     <listitem>
1162      <para>
1163       Fix possible crash in parallel <application>pg_restore</> due to
1164       out-of-range dependency IDs (Tom)
1165      </para>
1166     </listitem>
1167
1168     <listitem>
1169      <para>
1170       Fix plpgsql failure in one case where a composite column is set to NULL
1171       (Tom)
1172      </para>
1173     </listitem>
1174
1175     <listitem>
1176      <para>
1177       Fix possible failure when calling PL/Perl functions from PL/PerlU
1178       or vice versa (Tim Bunce)
1179      </para>
1180     </listitem>
1181
1182     <listitem>
1183      <para>
1184       Add <literal>volatile</> markings in PL/Python to avoid possible
1185       compiler-specific misbehavior (Zdenek Kotala)
1186      </para>
1187     </listitem>
1188
1189     <listitem>
1190      <para>
1191       Ensure PL/Tcl initializes the Tcl interpreter fully (Tom)
1192      </para>
1193
1194      <para>
1195       The only known symptom of this oversight is that the Tcl
1196       <literal>clock</> command misbehaves if using Tcl 8.5 or later.
1197      </para>
1198     </listitem>
1199
1200     <listitem>
1201      <para>
1202       Prevent <function>ExecutorEnd</> from being run on portals created
1203       within a failed transaction or subtransaction (Tom)
1204      </para>
1205
1206      <para>
1207       This is known to cause issues when using
1208       <filename>contrib/auto_explain</>.
1209      </para>
1210     </listitem>
1211
1212     <listitem>
1213      <para>
1214       Prevent crash in <filename>contrib/dblink</> when too many key
1215       columns are specified to a <function>dblink_build_sql_*</> function
1216       (Rushabh Lathia, Joe Conway)
1217      </para>
1218     </listitem>
1219
1220     <listitem>
1221      <para>
1222       Allow zero-dimensional arrays in <filename>contrib/ltree</> operations
1223       (Tom)
1224      </para>
1225
1226      <para>
1227       This case was formerly rejected as an error, but it's more convenient to
1228       treat it the same as a zero-element array.  In particular this avoids
1229       unnecessary failures when an <type>ltree</> operation is applied to the
1230       result of <literal>ARRAY(SELECT ...)</> and the sub-select returns no
1231       rows.
1232      </para>
1233     </listitem>
1234
1235     <listitem>
1236      <para>
1237       Fix assorted crashes in <filename>contrib/xml2</> caused by sloppy
1238       memory management (Tom)
1239      </para>
1240     </listitem>
1241
1242     <listitem>
1243      <para>
1244       Make building of <filename>contrib/xml2</> more robust on Windows
1245       (Andrew)
1246      </para>
1247     </listitem>
1248
1249     <listitem>
1250      <para>
1251       Fix race condition in Windows signal handling (Radu Ilie)
1252      </para>
1253
1254      <para>
1255       One known symptom of this bug is that rows in <structname>pg_listener</>
1256       could be dropped under heavy load.
1257      </para>
1258     </listitem>
1259
1260     <listitem>
1261      <para>
1262       Make the configure script report failure if the C compiler does
1263       not provide a working 64-bit integer datatype (Tom)
1264      </para>
1265
1266      <para>
1267       This case has been broken for some time, and no longer seems worth
1268       supporting, so just reject it at configure time instead.
1269      </para>
1270     </listitem>
1271
1272     <listitem>
1273      <para>
1274       Update time zone data files to <application>tzdata</> release 2010e
1275       for DST law changes in Bangladesh, Chile, Fiji, Mexico, Paraguay, Samoa.
1276      </para>
1277     </listitem>
1278
1279    </itemizedlist>
1280
1281   </sect2>
1282  </sect1>
1283
1284  <sect1 id="release-8-4-2">
1285   <title>Release 8.4.2</title>
1286
1287   <note>
1288   <title>Release date</title>
1289   <simpara>2009-12-14</simpara>
1290   </note>
1291
1292   <para>
1293    This release contains a variety of fixes from 8.4.1.
1294    For information about new features in the 8.4 major release, see
1295    <xref linkend="release-8-4">.
1296   </para>
1297
1298   <sect2>
1299    <title>Migration to Version 8.4.2</title>
1300
1301    <para>
1302     A dump/restore is not required for those running 8.4.X.
1303     However, if you have any hash indexes,
1304     you should <command>REINDEX</> them after updating to 8.4.2,
1305     to repair possible damage.
1306    </para>
1307
1308   </sect2>
1309
1310   <sect2>
1311    <title>Changes</title>
1312
1313    <itemizedlist>
1314
1315     <listitem>
1316      <para>
1317       Protect against indirect security threats caused by index functions
1318       changing session-local state (Gurjeet Singh, Tom)
1319      </para>
1320
1321      <para>
1322       This change prevents allegedly-immutable index functions from possibly
1323       subverting a superuser's session (CVE-2009-4136).
1324      </para>
1325     </listitem>
1326
1327     <listitem>
1328      <para>
1329       Reject SSL certificates containing an embedded null byte in the common
1330       name (CN) field (Magnus)
1331      </para>
1332
1333      <para>
1334       This prevents unintended matching of a certificate to a server or client
1335       name during SSL validation (CVE-2009-4034).
1336      </para>
1337     </listitem>
1338
1339     <listitem>
1340      <para>
1341       Fix hash index corruption (Tom)
1342      </para>
1343
1344      <para>
1345       The 8.4 change that made hash indexes keep entries sorted by hash value
1346       failed to update the bucket splitting and compaction routines to
1347       preserve the ordering.  So application of either of those operations
1348       could lead to permanent corruption of an index, in the sense that
1349       searches might fail to find entries that are present.  To deal with
1350       this, it is recommended to <literal>REINDEX</> any hash indexes you may
1351       have after installing this update.
1352      </para>
1353     </listitem>
1354
1355     <listitem>
1356      <para>
1357       Fix possible crash during backend-startup-time cache initialization (Tom)
1358      </para>
1359     </listitem>
1360
1361     <listitem>
1362      <para>
1363       Avoid crash on empty thesaurus dictionary (Tom)
1364      </para>
1365     </listitem>
1366
1367     <listitem>
1368      <para>
1369       Prevent signals from interrupting <literal>VACUUM</> at unsafe times
1370       (Alvaro)
1371      </para>
1372
1373      <para>
1374       This fix prevents a PANIC if a <literal>VACUUM FULL</> is cancelled
1375       after it's already committed its tuple movements, as well as transient
1376       errors if a plain <literal>VACUUM</> is interrupted after having
1377       truncated the table.
1378      </para>
1379     </listitem>
1380
1381     <listitem>
1382      <para>
1383       Fix possible crash due to integer overflow in hash table size
1384       calculation (Tom)
1385      </para>
1386
1387      <para>
1388       This could occur with extremely large planner estimates for the size of
1389       a hashjoin's result.
1390      </para>
1391     </listitem>
1392
1393     <listitem>
1394      <para>
1395       Fix crash if a <literal>DROP</> is attempted on an internally-dependent
1396       object (Tom)
1397      </para>
1398     </listitem>
1399
1400     <listitem>
1401      <para>
1402       Fix very rare crash in <type>inet</>/<type>cidr</> comparisons (Chris
1403       Mikkelson)
1404      </para>
1405     </listitem>
1406
1407     <listitem>
1408      <para>
1409       Ensure that shared tuple-level locks held by prepared transactions are
1410       not ignored (Heikki)
1411      </para>
1412     </listitem>
1413
1414     <listitem>
1415      <para>
1416       Fix premature drop of temporary files used for a cursor that is accessed
1417       within a subtransaction (Heikki)
1418      </para>
1419     </listitem>
1420
1421     <listitem>
1422      <para>
1423       Fix memory leak in syslogger process when rotating to a new CSV logfile
1424       (Tom)
1425      </para>
1426     </listitem>
1427
1428     <listitem>
1429      <para>
1430       Fix memory leak in postmaster when re-parsing <filename>pg_hba.conf</>
1431       (Tom)
1432      </para>
1433     </listitem>
1434
1435     <listitem>
1436      <para>
1437       Fix Windows permission-downgrade logic (Jesse Morris)
1438      </para>
1439
1440      <para>
1441       This fixes some cases where the database failed to start on Windows,
1442       often with misleading error messages such as <quote>could not locate
1443       matching postgres executable</quote>.
1444      </para>
1445     </listitem>
1446
1447     <listitem>
1448      <para>
1449       Make <literal>FOR UPDATE/SHARE</> in the primary query not propagate
1450       into <literal>WITH</> queries (Tom)
1451      </para>
1452
1453      <para>
1454       For example, in
1455 <programlisting>
1456 WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE
1457 </programlisting>
1458       the <literal>FOR UPDATE</> will now affect <literal>bar</> but not
1459       <literal>foo</>.  This is more useful and consistent than the original
1460       8.4 behavior, which tried to propagate <literal>FOR UPDATE</> into the
1461       <literal>WITH</> query but always failed due to assorted implementation
1462       restrictions.  It also follows the design rule that <literal>WITH</>
1463       queries are executed as if independent of the main query.
1464      </para>
1465     </listitem>
1466
1467     <listitem>
1468      <para>
1469       Fix bug with a <literal>WITH RECURSIVE</> query immediately inside
1470       another one (Tom)
1471      </para>
1472     </listitem>
1473
1474     <listitem>
1475      <para>
1476       Fix concurrency bug in hash indexes (Tom)
1477      </para>
1478
1479      <para>
1480       Concurrent insertions could cause index scans to transiently report
1481       wrong results.
1482      </para>
1483     </listitem>
1484
1485     <listitem>
1486      <para>
1487       Fix incorrect logic for GiST index page splits, when the split depends
1488       on a non-first column of the index (Paul Ramsey)
1489      </para>
1490     </listitem>
1491
1492     <listitem>
1493      <para>
1494       Fix wrong search results for a multi-column GIN index with
1495       <literal>fastupdate</> enabled (Teodor)
1496      </para>
1497     </listitem>
1498
1499     <listitem>
1500      <para>
1501       Fix bugs in WAL entry creation for GIN indexes (Tom)
1502      </para>
1503
1504      <para>
1505       These bugs were masked when <varname>full_page_writes</> was on, but
1506       with it off a WAL replay failure was certain if a crash occurred before
1507       the next checkpoint.
1508      </para>
1509     </listitem>
1510
1511     <listitem>
1512      <para>
1513       Don't error out if recycling or removing an old WAL file fails at the
1514       end of checkpoint (Heikki)
1515      </para>
1516
1517      <para>
1518       It's better to treat the problem as non-fatal and allow the checkpoint
1519       to complete.  Future checkpoints will retry the removal.  Such problems
1520       are not expected in normal operation, but have been seen to be
1521       caused by misdesigned Windows anti-virus and backup software.
1522      </para>
1523     </listitem>
1524
1525     <listitem>
1526      <para>
1527       Ensure WAL files aren't repeatedly archived on Windows (Heikki)
1528      </para>
1529
1530      <para>
1531       This is another symptom that could happen if some other process
1532       interfered with deletion of a no-longer-needed file.
1533      </para>
1534     </listitem>
1535
1536     <listitem>
1537      <para>
1538       Fix PAM password processing to be more robust (Tom)
1539      </para>
1540
1541      <para>
1542       The previous code is known to fail with the combination of the Linux
1543       <literal>pam_krb5</> PAM module with Microsoft Active Directory as the
1544       domain controller.  It might have problems elsewhere too, since it was
1545       making unjustified assumptions about what arguments the PAM stack would
1546       pass to it.
1547      </para>
1548     </listitem>
1549
1550     <listitem>
1551      <para>
1552       Raise the maximum authentication token (Kerberos ticket) size in GSSAPI
1553       and SSPI authentication methods (Ian Turner)
1554      </para>
1555
1556      <para>
1557       While the old 2000-byte limit was more than enough for Unix Kerberos
1558       implementations, tickets issued by Windows Domain Controllers can be
1559       much larger.
1560      </para>
1561     </listitem>
1562
1563     <listitem>
1564      <para>
1565       Ensure that domain constraints are enforced in constructs like
1566       <literal>ARRAY[...]::domain</>, where the domain is over an array type
1567       (Heikki)
1568      </para>
1569     </listitem>
1570
1571     <listitem>
1572      <para>
1573       Fix foreign-key logic for some cases involving composite-type columns
1574       as foreign keys (Tom)
1575      </para>
1576     </listitem>
1577
1578     <listitem>
1579      <para>
1580       Ensure that a cursor's snapshot is not modified after it is created
1581       (Alvaro)
1582      </para>
1583
1584      <para>
1585       This could lead to a cursor delivering wrong results if later operations
1586       in the same transaction modify the data the cursor is supposed to return.
1587      </para>
1588     </listitem>
1589
1590     <listitem>
1591      <para>
1592       Fix <literal>CREATE TABLE</> to properly merge default expressions
1593       coming from different inheritance parent tables (Tom)
1594      </para>
1595
1596      <para>
1597       This used to work but was broken in 8.4.
1598      </para>
1599     </listitem>
1600
1601     <listitem>
1602      <para>
1603       Re-enable collection of access statistics for sequences (Akira Kurosawa)
1604      </para>
1605
1606      <para>
1607       This used to work but was broken in 8.3.
1608      </para>
1609     </listitem>
1610
1611     <listitem>
1612      <para>
1613       Fix processing of ownership dependencies during <literal>CREATE OR
1614       REPLACE FUNCTION</> (Tom)
1615      </para>
1616     </listitem>
1617
1618     <listitem>
1619      <para>
1620       Fix incorrect handling of <literal>WHERE</>
1621       <replaceable>x</>=<replaceable>x</> conditions (Tom)
1622      </para>
1623
1624      <para>
1625       In some cases these could get ignored as redundant, but they aren't
1626       &mdash; they're equivalent to <replaceable>x</> <literal>IS NOT NULL</>.
1627      </para>
1628     </listitem>
1629
1630     <listitem>
1631      <para>
1632       Fix incorrect plan construction when using hash aggregation to implement
1633       <literal>DISTINCT</> for textually identical volatile expressions (Tom)
1634      </para>
1635     </listitem>
1636
1637     <listitem>
1638      <para>
1639       Fix Assert failure for a volatile <literal>SELECT DISTINCT ON</>
1640       expression (Tom)
1641      </para>
1642     </listitem>
1643
1644     <listitem>
1645      <para>
1646       Fix <function>ts_stat()</> to not fail on an empty <type>tsvector</>
1647       value (Tom)
1648      </para>
1649     </listitem>
1650
1651     <listitem>
1652      <para>
1653       Make text search parser accept underscores in XML attributes (Peter)
1654      </para>
1655     </listitem>
1656
1657     <listitem>
1658      <para>
1659       Fix encoding handling in <type>xml</> binary input (Heikki)
1660      </para>
1661
1662      <para>
1663       If the XML header doesn't specify an encoding, we now assume UTF-8 by
1664       default; the previous handling was inconsistent.
1665      </para>
1666     </listitem>
1667
1668     <listitem>
1669      <para>
1670       Fix bug with calling <literal>plperl</> from <literal>plperlu</> or vice
1671       versa (Tom)
1672      </para>
1673
1674      <para>
1675       An error exit from the inner function could result in crashes due to
1676       failure to re-select the correct Perl interpreter for the outer function.
1677      </para>
1678     </listitem>
1679
1680     <listitem>
1681      <para>
1682       Fix session-lifespan memory leak when a PL/Perl function is redefined
1683       (Tom)
1684      </para>
1685     </listitem>
1686
1687     <listitem>
1688      <para>
1689       Ensure that Perl arrays are properly converted to
1690       <productname>PostgreSQL</> arrays when returned by a set-returning
1691       PL/Perl function (Andrew Dunstan, Abhijit Menon-Sen)
1692      </para>
1693
1694      <para>
1695       This worked correctly already for non-set-returning functions.
1696      </para>
1697     </listitem>
1698
1699     <listitem>
1700      <para>
1701       Fix rare crash in exception processing in PL/Python (Peter)
1702      </para>
1703     </listitem>
1704
1705     <listitem>
1706      <para>
1707       Fix <application>ecpg</> problem with comments in <literal>DECLARE
1708       CURSOR</> statements (Michael)
1709      </para>
1710     </listitem>
1711
1712     <listitem>
1713      <para>
1714       Fix <application>ecpg</> to not treat recently-added keywords as
1715       reserved words (Tom)
1716      </para>
1717
1718      <para>
1719       This affected the keywords <literal>CALLED</>, <literal>CATALOG</>,
1720       <literal>DEFINER</>, <literal>ENUM</>, <literal>FOLLOWING</>,
1721       <literal>INVOKER</>, <literal>OPTIONS</>, <literal>PARTITION</>,
1722       <literal>PRECEDING</>, <literal>RANGE</>, <literal>SECURITY</>,
1723       <literal>SERVER</>, <literal>UNBOUNDED</>, and <literal>WRAPPER</>.
1724      </para>
1725     </listitem>
1726
1727     <listitem>
1728      <para>
1729       Re-allow regular expression special characters in <application>psql</>'s
1730       <literal>\df</> function name parameter (Tom)
1731      </para>
1732     </listitem>
1733
1734     <listitem>
1735      <para>
1736       In <filename>contrib/fuzzystrmatch</>, correct the calculation of
1737       <function>levenshtein</> distances with non-default costs (Marcin Mank)
1738      </para>
1739     </listitem>
1740
1741     <listitem>
1742      <para>
1743       In <filename>contrib/pg_standby</>, disable triggering failover with a
1744       signal on Windows (Fujii Masao)
1745      </para>
1746
1747      <para>
1748       This never did anything useful, because Windows doesn't have Unix-style
1749       signals, but recent changes made it actually crash.
1750      </para>
1751     </listitem>
1752
1753     <listitem>
1754      <para>
1755       Put <literal>FREEZE</> and <literal>VERBOSE</> options in the right
1756       order in the <literal>VACUUM</> command that
1757       <filename>contrib/vacuumdb</> produces (Heikki)
1758      </para>
1759     </listitem>
1760
1761     <listitem>
1762      <para>
1763       Fix possible leak of connections when <filename>contrib/dblink</>
1764       encounters an error (Tatsuhito Kasahara)
1765      </para>
1766     </listitem>
1767
1768     <listitem>
1769      <para>
1770       Ensure <application>psql</>'s flex module is compiled with the correct
1771       system header definitions (Tom)
1772      </para>
1773
1774      <para>
1775       This fixes build failures on platforms where
1776       <literal>--enable-largefile</> causes incompatible changes in the
1777       generated code.
1778      </para>
1779     </listitem>
1780
1781     <listitem>
1782      <para>
1783       Make the postmaster ignore any <literal>application_name</> parameter in
1784       connection request packets, to improve compatibility with future libpq
1785       versions (Tom)
1786      </para>
1787     </listitem>
1788
1789     <listitem>
1790      <para>
1791       Update the timezone abbreviation files to match current reality (Joachim
1792       Wieland)
1793      </para>
1794
1795      <para>
1796       This includes adding <literal>IDT</> to the default
1797       timezone abbreviation set.
1798      </para>
1799     </listitem>
1800
1801     <listitem>
1802      <para>
1803       Update time zone data files to <application>tzdata</> release 2009s
1804       for DST law changes in Antarctica, Argentina, Bangladesh, Fiji,
1805       Novokuznetsk, Pakistan, Palestine, Samoa, Syria; also historical
1806       corrections for Hong Kong.
1807      </para>
1808     </listitem>
1809
1810    </itemizedlist>
1811
1812   </sect2>
1813  </sect1>
1814
1815  <sect1 id="release-8-4-1">
1816   <title>Release 8.4.1</title>
1817
1818   <note>
1819   <title>Release date</title>
1820   <simpara>2009-09-09</simpara>
1821   </note>
1822
1823   <para>
1824    This release contains a variety of fixes from 8.4.
1825    For information about new features in the 8.4 major release, see
1826    <xref linkend="release-8-4">.
1827   </para>
1828
1829   <sect2>
1830    <title>Migration to Version 8.4.1</title>
1831
1832    <para>
1833     A dump/restore is not required for those running 8.4.X.
1834    </para>
1835
1836   </sect2>
1837
1838   <sect2>
1839    <title>Changes</title>
1840
1841    <itemizedlist>
1842
1843     <listitem>
1844      <para>
1845       Fix WAL page header initialization at the end of archive recovery
1846       (Heikki)
1847      </para>
1848
1849      <para>
1850       This could lead to failure to process the WAL in a subsequent
1851       archive recovery.
1852      </para>
1853     </listitem>
1854
1855     <listitem>
1856      <para>
1857       Fix <quote>cannot make new WAL entries during recovery</> error (Tom)
1858      </para>
1859     </listitem>
1860
1861     <listitem>
1862      <para>
1863       Fix problem that could make expired rows visible after a crash (Tom)
1864      </para>
1865
1866      <para>
1867       This bug involved a page status bit potentially not being set
1868       correctly after a server crash.
1869      </para>
1870     </listitem>
1871
1872     <listitem>
1873      <para>
1874       Disallow <command>RESET ROLE</> and <command>RESET SESSION
1875       AUTHORIZATION</> inside security-definer functions (Tom, Heikki)
1876      </para>
1877
1878      <para>
1879       This covers a case that was missed in the previous patch that
1880       disallowed <command>SET ROLE</> and <command>SET SESSION
1881       AUTHORIZATION</> inside security-definer functions.
1882       (See CVE-2007-6600)
1883      </para>
1884     </listitem>
1885
1886     <listitem>
1887      <para>
1888       Make <command>LOAD</> of an already-loaded loadable module
1889       into a no-op (Tom)
1890      </para>
1891
1892      <para>
1893       Formerly, <command>LOAD</> would attempt to unload and re-load the
1894       module, but this is unsafe and not all that useful.
1895      </para>
1896     </listitem>
1897
1898     <listitem>
1899      <para>
1900       Make window function <literal>PARTITION BY</> and <literal>ORDER BY</>
1901       items always be interpreted as simple expressions (Tom)
1902      </para>
1903
1904      <para>
1905       In 8.4.0 these lists were parsed following the rules used for
1906       top-level <literal>GROUP BY</> and <literal>ORDER BY</> lists.
1907       But this was not correct per the SQL standard, and it led to possible
1908       circularity.
1909      </para>
1910     </listitem>
1911
1912     <listitem>
1913      <para>
1914       Fix several errors in planning of semi-joins (Tom)
1915      </para>
1916
1917      <para>
1918       These led to wrong query results in some cases where <literal>IN</>
1919       or <literal>EXISTS</> was used together with another join.
1920      </para>
1921     </listitem>
1922
1923     <listitem>
1924      <para>
1925       Fix handling of whole-row references to subqueries that are within
1926       an outer join (Tom)
1927      </para>
1928
1929      <para>
1930       An example is
1931       <literal>SELECT COUNT(ss.*) FROM ... LEFT JOIN (SELECT ...) ss ON ...</>.
1932       Here, <literal>ss.*</> would be treated as <literal>ROW(NULL,NULL,...)</>
1933       for null-extended join rows, which is not the same as a simple NULL.
1934       Now it is treated as a simple NULL.
1935      </para>
1936     </listitem>
1937
1938     <listitem>
1939      <para>
1940       Fix Windows shared-memory allocation code (Tsutomu Yamada, Magnus)
1941      </para>
1942
1943      <para>
1944       This bug led to the often-reported <quote>could not reattach
1945       to shared memory</> error message.
1946      </para>
1947     </listitem>
1948
1949     <listitem>
1950      <para>
1951       Fix locale handling with plperl (Heikki)
1952      </para>
1953
1954      <para>
1955       This bug could cause the server's locale setting to change when a
1956       plperl function is called, leading to data corruption.
1957      </para>
1958     </listitem>
1959
1960     <listitem>
1961      <para>
1962       Fix handling of reloptions to ensure setting one option doesn't
1963       force default values for others (Itagaki Takahiro)
1964      </para>
1965     </listitem>
1966
1967     <listitem>
1968      <para>
1969       Ensure that a <quote>fast shutdown</> request will forcibly terminate
1970       open sessions, even if a <quote>smart shutdown</> was already in progress
1971       (Fujii Masao)
1972      </para>
1973     </listitem>
1974
1975     <listitem>
1976      <para>
1977       Avoid memory leak for <function>array_agg()</> in <literal>GROUP BY</>
1978       queries (Tom)
1979      </para>
1980     </listitem>
1981
1982     <listitem>
1983      <para>
1984       Treat <function>to_char(..., 'TH')</> as an uppercase ordinal
1985       suffix with <literal>'HH'</>/<literal>'HH12'</> (Heikki)
1986      </para>
1987
1988      <para>
1989       It was previously handled as <literal>'th'</> (lowercase).
1990      </para>
1991     </listitem>
1992
1993     <listitem>
1994      <para>
1995       Include the fractional part in the result of
1996       <function>EXTRACT(second)</> and
1997       <function>EXTRACT(milliseconds)</> for
1998       <type>time</> and <type>time with time zone</> inputs (Tom)
1999      </para>
2000
2001      <para>
2002       This has always worked for floating-point datetime configurations,
2003       but was broken in the integer datetime code.
2004      </para>
2005     </listitem>
2006
2007     <listitem>
2008      <para>
2009       Fix overflow for <literal>INTERVAL '<replaceable>x</> ms'</literal>
2010       when <replaceable>x</> is more than 2 million and integer
2011       datetimes are in use (Alex Hunsaker)
2012      </para>
2013     </listitem>
2014
2015     <listitem>
2016      <para>
2017       Improve performance when processing toasted values in index scans (Tom)
2018      </para>
2019
2020      <para>
2021       This is particularly useful for <ulink
2022       url="http://postgis.refractions.net/">PostGIS</ulink>.
2023      </para>
2024     </listitem>
2025
2026     <listitem>
2027      <para>
2028       Fix a typo that disabled <varname>commit_delay</> (Jeff Janes)
2029      </para>
2030     </listitem>
2031
2032     <listitem>
2033      <para>
2034       Output early-startup messages to <filename>postmaster.log</> if the
2035       server is started in silent mode (Tom)
2036      </para>
2037
2038      <para>
2039       Previously such error messages were discarded, leading to
2040       difficulty in debugging.
2041      </para>
2042     </listitem>
2043
2044     <listitem>
2045      <para>
2046       Remove translated FAQs (Peter)
2047      </para>
2048
2049      <para>
2050       They are now on the <ulink
2051       url="http://wiki.postgresql.org/wiki/FAQ">wiki</ulink>.  The
2052       main FAQ was moved to the wiki some time ago.
2053      </para>
2054     </listitem>
2055
2056     <listitem>
2057      <para>
2058       Fix <application>pg_ctl</> to not go into an infinite loop if
2059       <filename>postgresql.conf</> is empty (Jeff Davis)
2060      </para>
2061     </listitem>
2062
2063     <listitem>
2064      <para>
2065       Fix several errors in <application>pg_dump</>'s
2066       <literal>--binary-upgrade</> mode (Bruce, Tom)
2067      </para>
2068
2069      <para>
2070       <literal>pg_dump --binary-upgrade</> is used by pg_migrator.
2071      </para>
2072     </listitem>
2073
2074     <listitem>
2075      <para>
2076       Fix <filename>contrib/xml2</>'s <function>xslt_process()</> to
2077       properly handle the maximum number of parameters (twenty) (Tom)
2078      </para>
2079     </listitem>
2080
2081     <listitem>
2082      <para>
2083       Improve robustness of <application>libpq</>'s code to recover
2084       from errors during <command>COPY FROM STDIN</> (Tom)
2085      </para>
2086     </listitem>
2087
2088     <listitem>
2089      <para>
2090       Avoid including conflicting readline and editline header files
2091       when both libraries are installed (Zdenek Kotala)
2092      </para>
2093     </listitem>
2094
2095     <listitem>
2096      <para>
2097       Work around gcc bug that causes <quote>floating-point exception</>
2098       instead of <quote>division by zero</> on some platforms (Tom)
2099      </para>
2100     </listitem>
2101
2102     <listitem>
2103      <para>
2104       Update time zone data files to <application>tzdata</> release 2009l
2105       for DST law changes in Bangladesh, Egypt, Mauritius.
2106      </para>
2107     </listitem>
2108
2109    </itemizedlist>
2110
2111   </sect2>
2112  </sect1>
2113
2114  <sect1 id="release-8-4">
2115   <title>Release 8.4</title>
2116
2117   <note>
2118    <title>Release date</title>
2119    <simpara>2009-07-01</simpara>
2120   </note>
2121
2122   <sect2>
2123    <title>Overview</title>
2124
2125    <para>
2126     After many years of development, <productname>PostgreSQL</> has
2127     become feature-complete in many areas.   This release shows a
2128     targeted approach to adding features (e.g., authentication,
2129     monitoring, space reuse), and adds capabilities defined in the
2130     later SQL standards.  The major areas of enhancement are:
2131    </para>
2132
2133    <itemizedlist>
2134
2135     <!-- This list duplicates items below, but without authors or details-->
2136
2137     <listitem>
2138      <para>
2139       Windowing Functions
2140      </para>
2141     </listitem>
2142
2143     <listitem>
2144      <para>
2145       Common Table Expressions and Recursive Queries
2146      </para>
2147     </listitem>
2148
2149     <listitem>
2150      <para>
2151       Default and variadic parameters for functions
2152      </para>
2153     </listitem>
2154
2155     <listitem>
2156      <para>
2157       Parallel Restore
2158      </para>
2159     </listitem>
2160
2161     <listitem>
2162      <para>
2163       Column Permissions
2164      </para>
2165     </listitem>
2166
2167     <listitem>
2168      <para>
2169       Per-database locale settings
2170      </para>
2171     </listitem>
2172
2173     <listitem>
2174      <para>
2175       Improved hash indexes
2176      </para>
2177     </listitem>
2178
2179     <listitem>
2180      <para>
2181       Improved join performance for <literal>EXISTS</> and <literal>NOT EXISTS</> queries
2182      </para>
2183     </listitem>
2184
2185     <listitem>
2186      <para>
2187       Easier-to-use Warm Standby
2188      </para>
2189     </listitem>
2190
2191     <listitem>
2192      <para>
2193       Automatic sizing of the Free Space Map
2194      </para>
2195     </listitem>
2196
2197     <listitem>
2198      <para>
2199       Visibility Map (greatly reduces vacuum overhead for slowly-changing tables)
2200      </para>
2201     </listitem>
2202
2203     <listitem>
2204      <para>
2205       Version-aware psql (backslash commands work against older servers)
2206      </para>
2207     </listitem>
2208
2209     <listitem>
2210      <para>
2211       Support SSL certificates for user authentication
2212      </para>
2213     </listitem>
2214
2215     <listitem>
2216      <para>
2217       Per-function runtime statistics
2218      </para>
2219     </listitem>
2220
2221     <listitem>
2222      <para>
2223       Easy editing of functions in psql
2224      </para>
2225     </listitem>
2226
2227     <listitem>
2228      <para>
2229       New contrib modules: pg_stat_statements, auto_explain, citext, btree_gin
2230      </para>
2231     </listitem>
2232
2233    </itemizedlist>
2234
2235    <para>
2236     The above items are explained in more detail in the sections below.
2237    </para>
2238
2239   </sect2>
2240
2241   <sect2>
2242    <title>Migration to Version 8.4</title>
2243
2244    <para>
2245     A dump/restore using <application>pg_dump</application> is
2246     required for those wishing to migrate data from any previous
2247     release.
2248    </para>
2249
2250    <para>
2251     Observe the following incompatibilities:
2252    </para>
2253
2254    <sect3>
2255     <title>General</title>
2256     <itemizedlist>
2257
2258      <listitem>
2259       <para>
2260        Use 64-bit integer datetimes by default (Neil Conway)
2261       </para>
2262
2263       <para>
2264        Previously this was selected by <application>configure</>'s
2265        <option>--enable-integer-datetimes</> option.  To retain
2266        the old behavior, build with <option>--disable-integer-datetimes</>.
2267       </para>
2268      </listitem>
2269
2270      <listitem>
2271       <para>
2272        Remove <application>ipcclean</> utility command (Bruce)
2273       </para>
2274
2275       <para>
2276        The utility only worked on a few platforms.  Users should use
2277        their operating system tools instead.
2278       </para>
2279      </listitem>
2280
2281     </itemizedlist>
2282
2283    </sect3>
2284
2285    <sect3>
2286     <title>Server Settings</title>
2287     <itemizedlist>
2288
2289      <listitem>
2290       <para>
2291        Change default setting for
2292        <literal>log_min_messages</> to <literal>warning</> (previously
2293        it was <literal>notice</>) to reduce log file volume (Tom)
2294       </para>
2295      </listitem>
2296
2297      <listitem>
2298       <para>
2299        Change default setting for <literal>max_prepared_transactions</> to
2300        zero (previously it was 5) (Tom)
2301       </para>
2302      </listitem>
2303
2304      <listitem>
2305       <para>
2306        Make <literal>debug_print_parse</>, <literal>debug_print_rewritten</>,
2307        and <literal>debug_print_plan</>
2308        output appear at <literal>LOG</> message level, not
2309        <literal>DEBUG1</> as formerly (Tom)
2310       </para>
2311      </listitem>
2312
2313      <listitem>
2314       <para>
2315        Make <literal>debug_pretty_print</> default to <literal>on</> (Tom)
2316       </para>
2317      </listitem>
2318
2319      <listitem>
2320       <para>
2321        Remove <varname>explain_pretty_print</> parameter (no longer needed) (Tom)
2322       </para>
2323      </listitem>
2324
2325      <listitem>
2326       <para>
2327        Make <varname>log_temp_files</> settable by superusers only, like other
2328        logging options (Simon Riggs)
2329       </para>
2330      </listitem>
2331
2332      <listitem>
2333       <para>
2334        Remove automatic appending of the epoch timestamp when no <literal>%</>
2335        escapes are present in <literal>log_filename</> (Robert Haas)
2336       </para>
2337
2338       <para>
2339        This change was made because some users wanted a fixed log filename,
2340        for use with an external log rotation tool.
2341       </para>
2342      </listitem>
2343
2344      <listitem>
2345       <para>
2346        Remove <varname>log_restartpoints</> from <filename>recovery.conf</>;
2347        instead use <varname>log_checkpoints</> (Simon)
2348       </para>
2349      </listitem>
2350
2351      <listitem>
2352       <para>
2353        Remove <varname>krb_realm</> and <varname>krb_server_hostname</>;
2354        these are now set in <filename>pg_hba.conf</> instead (Magnus)
2355       </para>
2356      </listitem>
2357
2358      <listitem>
2359       <para>
2360        There are also significant changes in <link
2361        linkend="release-8-4-pg-hba-conf"><filename>pg_hba.conf</></link>,
2362        as described below.
2363       </para>
2364      </listitem>
2365
2366     </itemizedlist>
2367
2368    </sect3>
2369
2370    <sect3>
2371     <title>Queries</title>
2372
2373     <itemizedlist>
2374
2375      <listitem>
2376       <para>
2377        Change <command>TRUNCATE</> and <command>LOCK</> to
2378        apply to child tables of the specified table(s) (Peter)
2379       </para>
2380
2381       <para>
2382        These commands now accept an <literal>ONLY</> option that prevents
2383        processing child tables; this option must be used if the old
2384        behavior is needed.
2385       </para>
2386      </listitem>
2387
2388      <listitem>
2389       <para>
2390        <command>SELECT DISTINCT</> and
2391        <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</>
2392        no longer always produce sorted output (Tom)
2393       </para>
2394
2395       <para>
2396        Previously, these types of queries always removed duplicate rows
2397        by means of Sort/Unique processing (i.e., sort then remove adjacent
2398        duplicates).  Now they can be implemented by hashing, which will not
2399        produce sorted output.  If an application relied on the output being
2400        in sorted order, the recommended fix is to add an <literal>ORDER BY</>
2401        clause.  As a short-term workaround, the previous behavior can be
2402        restored by disabling <literal>enable_hashagg</>, but that is a very
2403        performance-expensive fix.  <literal>SELECT DISTINCT ON</> never uses
2404        hashing, however, so its behavior is unchanged.
2405       </para>
2406      </listitem>
2407
2408      <listitem>
2409       <para>
2410        Force child tables to inherit <literal>CHECK</> constraints from parents
2411        (Alex Hunsaker, Nikhil Sontakke, Tom)
2412       </para>
2413
2414       <para>
2415        Formerly it was possible to drop such a constraint from a child
2416        table, allowing rows that violate the constraint to be visible
2417        when scanning the parent table.  This was deemed inconsistent,
2418        as well as contrary to SQL standard.
2419       </para>
2420      </listitem>
2421
2422      <listitem>
2423       <para>
2424        Disallow negative <literal>LIMIT</> or <literal>OFFSET</>
2425        values, rather than treating them as zero (Simon)
2426       </para>
2427      </listitem>
2428
2429      <listitem>
2430       <para>
2431        Disallow <command>LOCK TABLE</> outside a transaction block
2432        (Tom)
2433       </para>
2434
2435       <para>
2436        Such an operation is useless because the lock would be released
2437        immediately.
2438       </para>
2439      </listitem>
2440
2441      <listitem>
2442       <para>
2443        Sequences now contain an additional <structfield>start_value</> column
2444        (Zoltan Boszormenyi)
2445       </para>
2446
2447       <para>
2448        This supports <command>ALTER SEQUENCE ... RESTART</>.
2449       </para>
2450      </listitem>
2451
2452     </itemizedlist>
2453
2454    </sect3>
2455
2456
2457    <sect3>
2458     <title>Functions and Operators</title>
2459
2460     <itemizedlist>
2461
2462      <listitem>
2463       <para>
2464        Make <type>numeric</> zero raised to a fractional power return
2465        <literal>0</>, rather than throwing an error, and make
2466        <type>numeric</> zero raised to the zero power return <literal>1</>,
2467        rather than error (Bruce)
2468       </para>
2469
2470       <para>
2471        This matches the longstanding <type>float8</> behavior.
2472       </para>
2473      </listitem>
2474
2475      <listitem>
2476       <para>
2477        Allow unary minus of floating-point values to produce minus zero (Tom)
2478       </para>
2479
2480       <para>
2481        The changed behavior is more <acronym>IEEE</>-standard
2482        compliant.
2483       </para>
2484      </listitem>
2485
2486      <listitem>
2487       <para>
2488        Throw an error if an escape character is the last character in
2489        a <literal>LIKE</> pattern (i.e., it has nothing to escape) (Tom)
2490       </para>
2491
2492       <para>
2493        Previously, such an escape character was silently ignored,
2494        thus possibly masking application logic errors.
2495       </para>
2496      </listitem>
2497
2498      <listitem>
2499       <para>
2500        Remove <literal>~=~</> and <literal>~&lt;&gt;~</> operators
2501        formerly used for <literal>LIKE</> index comparisons (Tom)
2502       </para>
2503
2504       <para>
2505        Pattern indexes now use the regular equality operator.
2506       </para>
2507      </listitem>
2508
2509      <listitem>
2510       <para>
2511        <function>xpath()</> now passes its arguments to <application>libxml</>
2512        without any changes (Andrew)
2513       </para>
2514
2515       <para>
2516        This means that the XML argument must be a well-formed XML document.
2517        The previous coding attempted to allow XML fragments, but it did not
2518        work well.
2519       </para>
2520      </listitem>
2521
2522      <listitem>
2523       <para>
2524        Make <function>xmlelement()</> format attribute values just like
2525        content values (Peter)
2526       </para>
2527
2528       <para>
2529        Previously, attribute values were formatted according to the
2530        normal SQL output behavior, which is sometimes at odds with
2531        XML rules.
2532       </para>
2533      </listitem>
2534
2535      <listitem>
2536       <para>
2537        Rewrite memory management for <application>libxml</>-using functions
2538        (Tom)
2539       </para>
2540
2541       <para>
2542        This change should avoid some compatibility problems with use of
2543        <application>libxml</> in PL/Perl and other add-on code.
2544       </para>
2545      </listitem>
2546
2547      <listitem>
2548       <para>
2549        Adopt a faster algorithm for hash functions (Kenneth Marshall,
2550        based on work of Bob Jenkins)
2551       </para>
2552
2553       <para>
2554        Many of the built-in hash functions now deliver different results on
2555        little-endian and big-endian platforms.
2556       </para>
2557      </listitem>
2558
2559     </itemizedlist>
2560
2561     <sect4>
2562      <title>Temporal Functions and Operators</title>
2563
2564      <itemizedlist>
2565
2566       <listitem>
2567        <para>
2568         <varname>DateStyle</> no longer controls <type>interval</> output
2569         formatting; instead there is a new variable <varname>IntervalStyle</>
2570         (Ron Mayer)
2571        </para>
2572       </listitem>
2573
2574       <listitem>
2575        <para>
2576         Improve consistency of handling of fractional seconds in
2577         <type>timestamp</> and <type>interval</> output (Ron Mayer)
2578        </para>
2579
2580        <para>
2581         This may result in displaying a different number of fractional
2582         digits than before, or rounding instead of truncating.
2583        </para>
2584       </listitem>
2585
2586       <listitem>
2587        <para>
2588         Make <function>to_char()</>'s localized month/day names depend
2589         on <varname>LC_TIME</>, not <varname>LC_MESSAGES</> (Euler
2590         Taveira de Oliveira)
2591        </para>
2592       </listitem>
2593
2594       <listitem>
2595        <para>
2596         Cause <function>to_date()</> and <function>to_timestamp()</>
2597         to more consistently report errors for invalid input (Brendan
2598         Jurd)
2599        </para>
2600
2601        <para>
2602         Previous versions would often ignore or silently misread input
2603         that did not match the format string.  Such cases will now
2604         result in an error.
2605        </para>
2606       </listitem>
2607
2608       <listitem>
2609        <para>
2610         Fix <function>to_timestamp()</> to not require upper/lower case
2611         matching for meridian (<literal>AM</>/<literal>PM</>) and era
2612         (<literal>BC</>/<literal>AD</>) format designations  (Brendan
2613         Jurd)
2614        </para>
2615
2616        <para>
2617         For example, input value <literal>ad</> now matches the format
2618         string <literal>AD</>.
2619        </para>
2620       </listitem>
2621
2622      </itemizedlist>
2623
2624     </sect4>
2625
2626    </sect3>
2627
2628   </sect2>
2629
2630   <sect2>
2631    <title>Changes</title>
2632
2633    <para>
2634     Below you will find a detailed account of the changes between
2635     <productname>PostgreSQL</productname> 8.4 and the previous major
2636     release.
2637    </para>
2638
2639    <sect3>
2640     <title>Performance</title>
2641     <itemizedlist>
2642
2643      <listitem>
2644       <para>
2645        Improve optimizer statistics calculations (Jan Urbanski, Tom)
2646       </para>
2647
2648       <para>
2649        In particular, estimates for full-text-search operators are
2650        greatly improved.
2651       </para>
2652      </listitem>
2653
2654      <listitem>
2655       <para>
2656        Allow <command>SELECT DISTINCT</> and
2657        <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</> to
2658        use hashing (Tom)
2659       </para>
2660
2661       <para>
2662        This means that these types of queries no longer automatically
2663        produce sorted output.
2664       </para>
2665      </listitem>
2666
2667      <listitem>
2668       <para>
2669        Create explicit concepts of semi-joins and anti-joins (Tom)
2670       </para>
2671
2672       <para>
2673        This work formalizes our previous ad-hoc treatment of <literal>IN
2674        (SELECT ...)</> clauses, and extends it to <literal>EXISTS</> and
2675        <literal>NOT EXISTS</> clauses.  It should result in significantly
2676        better planning of <literal>EXISTS</> and <literal>NOT EXISTS</>
2677        queries.  In general, logically equivalent <literal>IN</> and
2678        <literal>EXISTS</> clauses should now have similar performance,
2679        whereas previously <literal>IN</> often won.
2680       </para>
2681      </listitem>
2682
2683      <listitem>
2684       <para>
2685        Improve optimization of sub-selects beneath outer joins (Tom)
2686       </para>
2687
2688       <para>
2689        Formerly, a sub-select or view could not be optimized very well if it
2690        appeared within the nullable side of an outer join and contained
2691        non-strict expressions (for instance, constants) in its result list.
2692       </para>
2693      </listitem>
2694
2695      <listitem>
2696       <para>
2697        Improve the performance of <function>text_position()</> and
2698        related functions by using Boyer-Moore-Horspool searching (David
2699        Rowley)
2700       </para>
2701
2702       <para>
2703        This is particularly helpful for long search patterns.
2704       </para>
2705      </listitem>
2706
2707      <listitem>
2708       <para>
2709        Reduce I/O load of writing the statistics collection file
2710        by writing the file only when requested (Martin Pihlak)
2711       </para>
2712      </listitem>
2713
2714      <listitem>
2715       <para>
2716        Improve performance for bulk inserts (Robert Haas, Simon)
2717       </para>
2718      </listitem>
2719
2720      <listitem>
2721       <para>
2722        Increase the default value of <varname>default_statistics_target</>
2723        from <literal>10</> to <literal>100</> (Greg Sabino Mullane,
2724        Tom)
2725       </para>
2726
2727       <para>
2728        The maximum value was also increased from <literal>1000</> to
2729        <literal>10000</>.
2730       </para>
2731      </listitem>
2732
2733      <listitem>
2734       <para>
2735        Perform <varname>constraint_exclusion</> checking by default
2736        in queries involving inheritance or <literal>UNION ALL</> (Tom)
2737       </para>
2738
2739       <para>
2740        A new <varname>constraint_exclusion</> setting,
2741        <literal>partition</>, was added to specify this behavior.
2742       </para>
2743      </listitem>
2744
2745      <listitem>
2746       <para>
2747        Allow I/O read-ahead for bitmap index scans (Greg Stark)
2748       </para>
2749
2750       <para>
2751        The amount of read-ahead is controlled by
2752        <varname>effective_io_concurrency</>.  This feature is available only
2753        if the kernel has <function>posix_fadvise()</> support.
2754       </para>
2755      </listitem>
2756
2757      <listitem>
2758       <para>
2759        Inline simple set-returning <acronym>SQL</> functions in
2760        <literal>FROM</> clauses (Richard Rowell)
2761       </para>
2762      </listitem>
2763
2764      <listitem>
2765       <para>
2766        Improve performance of multi-batch hash joins by providing a special
2767        case for join key values that are especially common in the outer
2768        relation (Bryce Cutt, Ramon Lawrence)
2769       </para>
2770      </listitem>
2771
2772      <listitem>
2773       <para>
2774        Reduce volume of temporary data in multi-batch hash joins
2775        by suppressing <quote>physical tlist</> optimization (Michael
2776        Henderson, Ramon Lawrence)
2777       </para>
2778      </listitem>
2779
2780      <listitem>
2781       <para>
2782        Avoid waiting for idle-in-transaction sessions during
2783        <command>CREATE INDEX CONCURRENTLY</> (Simon)
2784       </para>
2785      </listitem>
2786
2787      <listitem>
2788       <para>
2789        Improve performance of shared cache invalidation (Tom)
2790       </para>
2791      </listitem>
2792
2793     </itemizedlist>
2794
2795    </sect3>
2796
2797    <sect3>
2798     <title>Server</title>
2799
2800     <sect4>
2801      <title>Settings</title>
2802
2803      <itemizedlist>
2804
2805       <listitem>
2806        <para>
2807         Convert many <filename>postgresql.conf</> settings to enumerated
2808         values so that <literal>pg_settings</> can display the valid
2809         values (Magnus)
2810        </para>
2811       </listitem>
2812
2813       <listitem>
2814        <para>
2815         Add <varname>cursor_tuple_fraction</> parameter to control the
2816         fraction of a cursor's rows that the planner assumes will be
2817         fetched (Robert Hell)
2818        </para>
2819       </listitem>
2820
2821       <listitem>
2822        <para>
2823         Allow underscores in the names of custom variable
2824         classes in <filename>postgresql.conf</> (Tom)
2825        </para>
2826       </listitem>
2827
2828      </itemizedlist>
2829
2830     </sect4>
2831
2832     <sect4>
2833      <title>Authentication and security</title>
2834      <itemizedlist>
2835
2836       <listitem>
2837        <para>
2838         Remove support for the (insecure) <literal>crypt</> authentication method
2839         (Magnus)
2840        </para>
2841
2842        <para>
2843         This effectively obsoletes pre-<productname>PostgreSQL</> 7.2 client
2844         libraries, as there is no longer any non-plaintext password method that
2845         they can use.
2846        </para>
2847       </listitem>
2848
2849       <listitem>
2850        <para>
2851         Support regular expressions in <filename>pg_ident.conf</>
2852         (Magnus)
2853        </para>
2854       </listitem>
2855
2856       <listitem>
2857        <para>
2858         Allow <productname>Kerberos</>/<acronym>GSSAPI</> parameters
2859         to be changed without restarting the postmaster (Magnus)
2860        </para>
2861       </listitem>
2862
2863       <listitem>
2864        <para>
2865         Support <acronym>SSL</> certificate chains in server certificate
2866         file (Andrew Gierth)
2867        </para>
2868
2869        <para>
2870         Including the full certificate chain makes the client able
2871         to verify the certificate without having all intermediate CA
2872         certificates present in the local store, which is often the case for
2873         commercial CAs.
2874        </para>
2875       </listitem>
2876
2877       <listitem>
2878        <para>
2879         Report appropriate error message for combination of <literal>MD5</>
2880         authentication and <varname>db_user_namespace</> enabled (Bruce)
2881        </para>
2882       </listitem>
2883      </itemizedlist>
2884
2885     </sect4>
2886
2887     <sect4 id="release-8-4-pg-hba-conf">
2888      <title><filename>pg_hba.conf</></title>
2889      <itemizedlist>
2890
2891       <listitem>
2892        <para>
2893         Change all authentication options to use <literal>name=value</>
2894         syntax (Magnus)
2895        </para>
2896
2897        <para>
2898         This makes incompatible changes to the <literal>ldap</>,
2899         <literal>pam</> and <literal>ident</> authentication methods. All
2900         <filename>pg_hba.conf</> entries with these methods need to be
2901         rewritten using the new format.
2902        </para>
2903       </listitem>
2904
2905       <listitem>
2906        <para>
2907         Remove the <literal>ident sameuser</> option, instead making that
2908         behavior the default if no usermap is specified (Magnus)
2909        </para>
2910       </listitem>
2911
2912       <listitem>
2913        <para>
2914         Allow a usermap parameter for all external authentication methods
2915         (Magnus)
2916        </para>
2917
2918        <para>
2919         Previously a usermap was only supported for <literal>ident</>
2920         authentication.
2921        </para>
2922       </listitem>
2923
2924       <listitem>
2925        <para>
2926         Add <literal>clientcert</> option to control requesting of a
2927         client certificate (Magnus)
2928        </para>
2929
2930        <para>
2931         Previously this was controlled by the presence of a root
2932         certificate file in the server's data directory.
2933        </para>
2934       </listitem>
2935
2936       <listitem>
2937        <para>
2938         Add <literal>cert</> authentication method to allow
2939         <emphasis>user</> authentication via <acronym>SSL</> certificates
2940         (Magnus)
2941        </para>
2942
2943        <para>
2944         Previously <acronym>SSL</> certificates could only verify that
2945         the client had access to a certificate, not authenticate a
2946         user.
2947        </para>
2948       </listitem>
2949
2950       <listitem>
2951        <para>
2952         Allow <literal>krb5</>, <literal>gssapi</> and <literal>sspi</>
2953         realm and <literal>krb5</> host settings to be specified in
2954         <filename>pg_hba.conf</> (Magnus)
2955        </para>
2956
2957        <para>
2958         These override the settings in <filename>postgresql.conf</>.
2959        </para>
2960       </listitem>
2961
2962       <listitem>
2963        <para>
2964         Add <varname>include_realm</> parameter for <literal>krb5</>,
2965         <literal>gssapi</>, and <literal>sspi</> methods (Magnus)
2966        </para>
2967
2968        <para>
2969         This allows identical usernames from different realms to be
2970         authenticated as different database users using usermaps.
2971        </para>
2972       </listitem>
2973
2974       <listitem>
2975        <para>
2976         Parse <filename>pg_hba.conf</> fully when it is loaded,
2977         so that errors are reported immediately (Magnus)
2978        </para>
2979
2980        <para>
2981         Previously, most errors in the file wouldn't be detected until clients
2982         tried to connect, so an erroneous file could render the system
2983         unusable.  With the new behavior, if an error is detected during
2984         reload then the bad file is rejected and the postmaster continues
2985         to use its old copy.
2986        </para>
2987       </listitem>
2988
2989       <listitem>
2990        <para>
2991         Show all parsing errors in <filename>pg_hba.conf</> instead of
2992         aborting after the first one (Selena Deckelmann)
2993        </para>
2994       </listitem>
2995
2996       <listitem>
2997        <para>
2998         Support <literal>ident</> authentication over Unix-domain sockets
2999         on <productname>Solaris</> (Garick Hamlin)
3000        </para>
3001       </listitem>
3002
3003      </itemizedlist>
3004
3005     </sect4>
3006
3007     <sect4>
3008      <title>Continuous Archiving</title>
3009      <itemizedlist>
3010
3011       <listitem>
3012        <para>
3013         Provide an option to <function>pg_start_backup()</> to force its
3014         implied checkpoint to finish as quickly as possible (Tom)
3015        </para>
3016
3017        <para>
3018         The default behavior avoids excess I/O consumption, but that is
3019         pointless if no concurrent query activity is going on.
3020        </para>
3021       </listitem>
3022
3023       <listitem>
3024        <para>
3025         Make <function>pg_stop_backup()</> wait for modified <acronym>WAL</>
3026         files to be archived (Simon)
3027        </para>
3028
3029        <para>
3030         This guarantees that the backup is valid at the time
3031         <function>pg_stop_backup()</> completes.
3032        </para>
3033       </listitem>
3034
3035       <listitem>
3036        <para>
3037         When archiving is enabled, rotate the last WAL segment at shutdown
3038         so that all transactions can be archived immediately
3039         (Guillaume Smet, Heikki)
3040        </para>
3041       </listitem>
3042
3043       <listitem>
3044        <para>
3045         Delay <quote>smart</> shutdown while a continuous archiving base backup
3046         is in progress (Laurenz Albe)
3047        </para>
3048       </listitem>
3049
3050       <listitem>
3051        <para>
3052         Cancel a continuous archiving base backup if <quote>fast</> shutdown
3053         is requested (Laurenz Albe)
3054        </para>
3055       </listitem>
3056
3057       <listitem>
3058        <para>
3059         Allow <filename>recovery.conf</> boolean variables to take the
3060         same range of string values as <filename>postgresql.conf</>
3061         boolean variables
3062         (Bruce)
3063        </para>
3064       </listitem>
3065
3066      </itemizedlist>
3067
3068     </sect4>
3069
3070     <sect4>
3071      <title>Monitoring</title>
3072      <itemizedlist>
3073
3074       <listitem>
3075        <para>
3076         Add <function>pg_conf_load_time()</> to report when
3077         the <productname>PostgreSQL</> configuration files were last loaded
3078         (George Gensure)
3079        </para>
3080       </listitem>
3081
3082       <listitem>
3083        <para>
3084         Add <function>pg_terminate_backend()</> to safely terminate a
3085         backend (the <literal>SIGTERM</> signal works also) (Tom, Bruce)
3086        </para>
3087
3088        <para>
3089         While it's always been possible to <literal>SIGTERM</> a single
3090         backend, this was previously considered unsupported; and testing
3091         of the case found some bugs that are now fixed.
3092        </para>
3093       </listitem>
3094
3095       <listitem>
3096        <para>
3097         Add ability to track user-defined functions' call counts and
3098         runtimes (Martin Pihlak)
3099        </para>
3100
3101        <para>
3102         Function statistics appear in a new system view,
3103         <literal>pg_stat_user_functions</>.  Tracking is controlled
3104         by the new parameter <varname>track_functions</>.
3105        </para>
3106       </listitem>
3107
3108       <listitem>
3109        <para>
3110         Allow specification of the maximum query string size in
3111         <literal>pg_stat_activity</> via new
3112         <varname>track_activity_query_size</> parameter (Thomas Lee)
3113        </para>
3114       </listitem>
3115
3116       <listitem>
3117        <para>
3118         Increase the maximum line length sent to <application>syslog</>, in
3119         hopes of improving performance (Tom)
3120        </para>
3121       </listitem>
3122
3123       <listitem>
3124        <para>
3125         Add read-only configuration variables <varname>segment_size</>,
3126         <varname>wal_block_size</>, and <varname>wal_segment_size</>
3127         (Bernd Helmle)
3128        </para>
3129       </listitem>
3130
3131       <listitem>
3132        <para>
3133         When reporting a deadlock, report the text of all queries involved
3134         in the deadlock to the server log  (Itagaki Takahiro)
3135        </para>
3136       </listitem>
3137
3138       <listitem>
3139        <para>
3140         Add <function>pg_stat_get_activity(pid)</> function to return
3141         information about a specific process id (Magnus)
3142        </para>
3143       </listitem>
3144
3145       <listitem>
3146        <para>
3147         Allow the location of the server's statistics file to be specified
3148         via <varname>stats_temp_directory</> (Magnus)
3149        </para>
3150
3151        <para>
3152         This allows the statistics file to be placed in a
3153         <acronym>RAM</>-resident directory to reduce I/O requirements.
3154         On startup/shutdown, the file is copied to its traditional location
3155         (<literal>$PGDATA/global/</>) so it is preserved across restarts.
3156        </para>
3157       </listitem>
3158
3159      </itemizedlist>
3160
3161     </sect4>
3162
3163    </sect3>
3164
3165    <sect3>
3166     <title>Queries</title>
3167     <itemizedlist>
3168
3169      <listitem>
3170       <para>
3171        Add support for <literal>WINDOW</> functions (Hitoshi Harada)
3172       </para>
3173      </listitem>
3174
3175      <listitem>
3176       <para>
3177        Add support for <literal>WITH</> clauses (CTEs), including <literal>WITH
3178        RECURSIVE</> (Yoshiyuki Asaba, Tatsuo Ishii, Tom)
3179       </para>
3180      </listitem>
3181
3182      <listitem>
3183       <para>
3184        Add <command>TABLE</> command (Peter)
3185       </para>
3186
3187       <para>
3188        <literal>TABLE tablename</> is a SQL standard short-hand for
3189        <literal>SELECT * FROM tablename</>.
3190       </para>
3191      </listitem>
3192
3193      <listitem>
3194       <para>
3195        Allow <literal>AS</> to be optional when specifying a
3196        <command>SELECT</> (or <literal>RETURNING</>) column output
3197        label (Hiroshi Saito)
3198       </para>
3199
3200       <para>
3201        This works so long as the column label is not any
3202        <productname>PostgreSQL</> keyword; otherwise <literal>AS</> is still
3203        needed.
3204       </para>
3205      </listitem>
3206
3207      <listitem>
3208       <para>
3209        Support set-returning functions in <command>SELECT</> result lists
3210        even for functions that return their result via a tuplestore (Tom)
3211       </para>
3212
3213       <para>
3214        In particular, this means that functions written in PL/pgSQL
3215        and other PL languages can now be called this way.
3216       </para>
3217      </listitem>
3218
3219      <listitem>
3220       <para>
3221        Support set-returning functions in the output of aggregation
3222        and grouping queries (Tom)
3223       </para>
3224      </listitem>
3225
3226      <listitem>
3227       <para>
3228        Allow <command>SELECT FOR UPDATE</>/<literal>SHARE</> to work
3229        on inheritance trees (Tom)
3230       </para>
3231      </listitem>
3232
3233      <listitem>
3234       <para>
3235        Add infrastructure for <acronym>SQL/MED</> (Martin Pihlak,
3236        Peter)
3237       </para>
3238
3239       <para>
3240        There are no remote or external <acronym>SQL/MED</> capabilities
3241        yet, but this change provides a standardized and future-proof
3242        system for managing connection information for modules like
3243        <filename>dblink</> and <filename>plproxy</>.
3244       </para>
3245      </listitem>
3246
3247      <listitem>
3248       <para>
3249        Invalidate cached plans when referenced schemas, functions, operators,
3250        or operator classes are modified (Martin Pihlak, Tom)
3251       </para>
3252
3253       <para>
3254        This improves the system's ability to respond to on-the-fly
3255        DDL changes.
3256       </para>
3257      </listitem>
3258      <listitem>
3259       <para>
3260        Allow comparison of composite types and allow arrays of
3261        anonymous composite types (Tom)
3262       </para>
3263
3264       <para>
3265        This allows constructs such as
3266        <literal>row(1, 1.1) = any (array[row(7, 7.7), row(1, 1.0)])</>.
3267        This is particularly useful in recursive queries.
3268       </para>
3269      </listitem>
3270
3271      <listitem>
3272       <para>
3273        Add support for Unicode string literal and identifier specifications
3274        using code points, e.g. <literal>U&amp;'d\0061t\+000061'</>
3275        (Peter)
3276       </para>
3277      </listitem>
3278
3279      <listitem>
3280       <para>
3281        Reject <literal>\000</> in string literals and <command>COPY</> data
3282        (Tom)
3283       </para>
3284
3285       <para>
3286        Previously, this was accepted but had the effect of terminating
3287        the string contents.
3288       </para>
3289      </listitem>
3290
3291      <listitem>
3292       <para>
3293        Improve the parser's ability to report error locations (Tom)
3294       </para>
3295
3296       <para>
3297        An error location is now reported for many semantic errors,
3298        such as mismatched datatypes, that previously could not be localized.
3299       </para>
3300      </listitem>
3301
3302     </itemizedlist>
3303
3304     <sect4>
3305      <title><command>TRUNCATE</></title>
3306      <itemizedlist>
3307
3308       <listitem>
3309        <para>
3310         Support statement-level <literal>ON TRUNCATE</> triggers (Simon)
3311        </para>
3312       </listitem>
3313
3314       <listitem>
3315        <para>
3316         Add <literal>RESTART</>/<literal>CONTINUE IDENTITY</> options
3317         for <command>TRUNCATE TABLE</>
3318         (Zoltan Boszormenyi)
3319        </para>
3320
3321        <para>
3322         The start value of a sequence can be changed by <command>ALTER
3323         SEQUENCE START WITH</>.
3324        </para>
3325       </listitem>
3326
3327       <listitem>
3328        <para>
3329         Allow <command>TRUNCATE tab1, tab1</> to succeed (Bruce)
3330        </para>
3331       </listitem>
3332
3333       <listitem>
3334        <para>
3335         Add a separate <command>TRUNCATE</> permission (Robert Haas)
3336        </para>
3337       </listitem>
3338
3339      </itemizedlist>
3340
3341     </sect4>
3342
3343     <sect4>
3344      <title><command>EXPLAIN</></title>
3345      <itemizedlist>
3346
3347       <listitem>
3348        <para>
3349         Make <command>EXPLAIN VERBOSE</> show the output columns of each
3350         plan node (Tom)
3351        </para>
3352
3353        <para>
3354         Previously <command>EXPLAIN VERBOSE</> output an internal
3355         representation of the query plan.  (That behavior is now
3356         available via <varname>debug_print_plan</>.)
3357        </para>
3358       </listitem>
3359
3360       <listitem>
3361        <para>
3362         Make <command>EXPLAIN</> identify subplans and initplans with
3363         individual labels (Tom)
3364        </para>
3365       </listitem>
3366
3367       <listitem>
3368        <para>
3369         Make <command>EXPLAIN</> honor <varname>debug_print_plan</> (Tom)
3370        </para>
3371       </listitem>
3372
3373       <listitem>
3374        <para>
3375         Allow <command>EXPLAIN</> on <command>CREATE TABLE AS</> (Peter)
3376        </para>
3377       </listitem>
3378
3379      </itemizedlist>
3380
3381     </sect4>
3382
3383     <sect4>
3384      <title><literal>LIMIT</>/<literal>OFFSET</></title>
3385      <itemizedlist>
3386
3387       <listitem>
3388        <para>
3389         Allow sub-selects in <literal>LIMIT</> and <literal>OFFSET</> (Tom)
3390        </para>
3391       </listitem>
3392
3393       <listitem>
3394        <para>
3395         Add <acronym>SQL</>-standard syntax for
3396         <literal>LIMIT</>/<literal>OFFSET</> capabilities (Peter)
3397        </para>
3398
3399        <para>
3400         To wit,
3401         <literal>OFFSET num {ROW|ROWS} FETCH {FIRST|NEXT} [num] {ROW|ROWS}
3402         ONLY</>.
3403        </para>
3404       </listitem>
3405
3406      </itemizedlist>
3407
3408     </sect4>
3409
3410    </sect3>
3411
3412    <sect3>
3413     <title>Object Manipulation</title>
3414     <itemizedlist>
3415
3416      <listitem>
3417       <para>
3418        Add support for column-level privileges (Stephen Frost, KaiGai
3419        Kohei)
3420       </para>
3421      </listitem>
3422
3423      <listitem>
3424       <para>
3425        Refactor multi-object <command>DROP</> operations to reduce the
3426        need for <literal>CASCADE</> (Alex Hunsaker)
3427       </para>
3428
3429       <para>
3430        For example, if table <literal>B</> has a dependency on table
3431        <literal>A</>, the command <literal>DROP TABLE A, B</> no longer
3432        requires the <literal>CASCADE</> option.
3433       </para>
3434      </listitem>
3435
3436      <listitem>
3437       <para>
3438        Fix various problems with concurrent <command>DROP</> commands
3439        by ensuring that locks are taken before we begin to drop dependencies
3440        of an object (Tom)
3441       </para>
3442      </listitem>
3443
3444      <listitem>
3445       <para>
3446        Improve reporting of dependencies during <command>DROP</>
3447        commands (Tom)
3448       </para>
3449      </listitem>
3450
3451      <listitem>
3452       <para>
3453        Add <literal>WITH [NO] DATA</> clause to <command>CREATE TABLE
3454        AS</>, per the <acronym>SQL</> standard (Peter, Tom)
3455       </para>
3456      </listitem>
3457
3458      <listitem>
3459       <para>
3460        Add support for user-defined I/O conversion casts (Heikki)
3461       </para>
3462      </listitem>
3463
3464      <listitem>
3465       <para>
3466        Allow <command>CREATE AGGREGATE</> to use an <type>internal</>
3467        transition datatype (Tom)
3468       </para>
3469      </listitem>
3470
3471      <listitem>
3472       <para>
3473        Add <literal>LIKE</> clause to <command>CREATE TYPE</> (Tom)
3474       </para>
3475
3476       <para>
3477        This simplifies creation of data types that use the same internal
3478        representation as an existing type.
3479       </para>
3480      </listitem>
3481
3482      <listitem>
3483       <para>
3484        Allow specification of the type category and <quote>preferred</>
3485        status for user-defined base types (Tom)
3486       </para>
3487
3488       <para>
3489        This allows more control over the coercion behavior of user-defined
3490        types.
3491       </para>
3492      </listitem>
3493
3494      <listitem>
3495       <para>
3496        Allow <command>CREATE OR REPLACE VIEW</> to add columns to the
3497        end of a view (Robert Haas)
3498       </para>
3499      </listitem>
3500
3501     </itemizedlist>
3502
3503     <sect4>
3504      <title><command>ALTER</></title>
3505      <itemizedlist>
3506
3507       <listitem>
3508        <para>
3509         Add <command>ALTER TYPE RENAME</> (Petr Jelinek)
3510        </para>
3511       </listitem>
3512
3513       <listitem>
3514        <para>
3515         Add <command>ALTER SEQUENCE ... RESTART</> (with no parameter) to
3516         reset a sequence to its initial value (Zoltan Boszormenyi)
3517        </para>
3518       </listitem>
3519
3520       <listitem>
3521        <para>
3522         Modify the <command>ALTER TABLE</> syntax to allow all reasonable
3523         combinations for tables, indexes, sequences, and views (Tom)
3524        </para>
3525
3526        <para>
3527         This change allows the following new syntaxes:
3528
3529         <itemizedlist>
3530          <listitem>
3531           <para>
3532            <command>ALTER SEQUENCE OWNER TO</>
3533           </para>
3534          </listitem>
3535          <listitem>
3536           <para>
3537            <command>ALTER VIEW ALTER COLUMN SET/DROP DEFAULT</>
3538           </para>
3539          </listitem>
3540          <listitem>
3541           <para>
3542            <command>ALTER VIEW OWNER TO</>
3543           </para>
3544          </listitem>
3545          <listitem>
3546           <para>
3547            <command>ALTER VIEW SET SCHEMA</>
3548           </para>
3549          </listitem>
3550         </itemizedlist>
3551
3552         There is no actual new functionality here, but formerly
3553         you had to say <command>ALTER TABLE</> to do these things,
3554         which was confusing.
3555        </para>
3556       </listitem>
3557
3558       <listitem>
3559        <para>
3560         Add support for the syntax <command>ALTER TABLE ... ALTER COLUMN
3561         ... SET DATA TYPE</> (Peter)
3562        </para>
3563
3564        <para>
3565         This is <acronym>SQL</>-standard syntax for functionality that
3566         was already supported.
3567        </para>
3568       </listitem>
3569
3570       <listitem>
3571        <para>
3572         Make <command>ALTER TABLE SET WITHOUT OIDS</> rewrite the table
3573         to physically remove <type>OID</> values (Tom)
3574        </para>
3575
3576        <para>
3577         Also, add <command>ALTER TABLE SET WITH OIDS</> to rewrite the
3578         table to add <type>OID</>s.
3579        </para>
3580       </listitem>
3581
3582      </itemizedlist>
3583
3584     </sect4>
3585
3586     <sect4>
3587      <title>Database Manipulation</title>
3588      <itemizedlist>
3589
3590       <listitem>
3591        <para>
3592         Improve reporting of
3593         <command>CREATE</>/<command>DROP</>/<command>RENAME DATABASE</>
3594         failure when uncommitted prepared transactions are the cause
3595         (Tom)
3596        </para>
3597       </listitem>
3598
3599       <listitem>
3600        <para>
3601         Make <varname>LC_COLLATE</> and <varname>LC_CTYPE</> into
3602         per-database settings (Radek Strnad, Heikki)
3603        </para>
3604
3605        <para>
3606         This makes collation similar to encoding, which was always
3607         configurable per database.
3608        </para>
3609       </listitem>
3610
3611       <listitem>
3612        <para>
3613         Improve checks that the database encoding, collation
3614         (<varname>LC_COLLATE</>), and character classes
3615         (<varname>LC_CTYPE</>) match (Heikki, Tom)
3616        </para>
3617
3618        <para>
3619         Note in particular that a new database's encoding and locale
3620         settings can be changed only when copying from <literal>template0</>.
3621         This prevents possibly copying data that doesn't match the settings.
3622        </para>
3623       </listitem>
3624
3625       <listitem>
3626        <para>
3627         Add <command>ALTER DATABASE SET TABLESPACE</> to move a database
3628         to a new tablespace (Guillaume Lelarge, Bernd Helmle)
3629        </para>
3630       </listitem>
3631
3632      </itemizedlist>
3633
3634     </sect4>
3635
3636    </sect3>
3637
3638    <sect3>
3639     <title>Utility Operations</title>
3640
3641     <itemizedlist>
3642
3643      <listitem>
3644       <para>
3645        Add a <literal>VERBOSE</> option to the <command>CLUSTER</> command and
3646        <application>clusterdb</> (Jim Cox)
3647       </para>
3648      </listitem>
3649
3650      <listitem>
3651       <para>
3652        Decrease memory requirements for recording pending trigger
3653        events (Tom)
3654       </para>
3655      </listitem>
3656
3657     </itemizedlist>
3658
3659     <sect4>
3660      <title>Indexes</title>
3661      <itemizedlist>
3662
3663       <listitem>
3664        <para>
3665         Dramatically improve the speed of building and accessing hash
3666         indexes (Tom Raney, Shreya Bhargava)
3667        </para>
3668
3669        <para>
3670         This allows hash indexes to be sometimes faster than btree
3671         indexes.  However, hash indexes are still not crash-safe.
3672        </para>
3673       </listitem>
3674
3675       <listitem>
3676        <para>
3677         Make hash indexes store only the hash code, not the full value of
3678         the indexed column (Xiao Meng)
3679        </para>
3680
3681        <para>
3682         This greatly reduces the size of hash indexes for long indexed
3683         values, improving performance.
3684        </para>
3685       </listitem>
3686
3687       <listitem>
3688        <para>
3689         Implement fast update option for GIN indexes (Teodor, Oleg)
3690        </para>
3691
3692        <para>
3693         This option greatly improves update speed at a small penalty in search
3694         speed.
3695        </para>
3696       </listitem>
3697
3698       <listitem>
3699        <para>
3700         <literal>xxx_pattern_ops</> indexes can now be used for simple
3701         equality comparisons, not only for <literal>LIKE</> (Tom)
3702        </para>
3703       </listitem>
3704
3705      </itemizedlist>
3706
3707     </sect4>
3708
3709     <sect4>
3710      <title>Full Text Indexes</title>
3711      <itemizedlist>
3712
3713       <listitem>
3714        <para>
3715         Remove the requirement to use <literal>@@@</> when doing
3716         <acronym>GIN</> weighted lookups on full text indexes (Tom, Teodor)
3717        </para>
3718
3719        <para>
3720         The normal <literal>@@</> text search operator can be used
3721         instead.
3722        </para>
3723       </listitem>
3724
3725       <listitem>
3726        <para>
3727         Add an optimizer selectivity function for <literal>@@</> text
3728         search operations (Jan Urbanski)
3729        </para>
3730       </listitem>
3731
3732       <listitem>
3733        <para>
3734         Allow prefix matching in full text searches (Teodor Sigaev,
3735         Oleg Bartunov)
3736        </para>
3737       </listitem>
3738
3739       <listitem>
3740        <para>
3741         Support multi-column <acronym>GIN</> indexes (Teodor Sigaev)
3742        </para>
3743       </listitem>
3744
3745       <listitem>
3746        <para>
3747         Improve support for Nepali language and Devanagari alphabet (Teodor)
3748        </para>
3749       </listitem>
3750
3751      </itemizedlist>
3752
3753     </sect4>
3754
3755     <sect4>
3756      <title><command>VACUUM</></title>
3757      <itemizedlist>
3758
3759       <listitem>
3760        <para>
3761         Track free space in separate per-relation <quote>fork</> files (Heikki)
3762        </para>
3763
3764        <para>
3765         Free space discovered by <command>VACUUM</> is now recorded in
3766         <filename>*_fsm</> files, rather than in a fixed-sized shared memory
3767         area.  The <varname>max_fsm_pages</> and <varname>max_fsm_relations</>
3768         settings have been removed, greatly simplifying administration of
3769         free space management.
3770        </para>
3771       </listitem>
3772
3773       <listitem>
3774        <para>
3775         Add a visibility map to track pages that do not require
3776         vacuuming (Heikki)
3777        </para>
3778
3779        <para>
3780         This allows <command>VACUUM</> to avoid scanning all of
3781         a table when only a portion of the table needs vacuuming.
3782         The visibility map is stored in per-relation <quote>fork</> files.
3783        </para>
3784       </listitem>
3785
3786       <listitem>
3787        <para>
3788         Add <varname>vacuum_freeze_table_age</> parameter to control
3789         when <command>VACUUM</> should ignore the visibility map and
3790         do a full table scan to freeze tuples (Heikki)
3791        </para>
3792       </listitem>
3793
3794       <listitem>
3795        <para>
3796         Track transaction snapshots more carefully (Alvaro)
3797        </para>
3798
3799        <para>
3800         This improves <command>VACUUM</>'s ability to reclaim space
3801         in the presence of long-running transactions.
3802        </para>
3803       </listitem>
3804
3805       <listitem>
3806        <para>
3807         Add ability to specify per-relation autovacuum and <acronym>TOAST</>
3808         parameters in <command>CREATE TABLE</> (Alvaro, Euler Taveira de
3809         Oliveira)
3810        </para>
3811
3812        <para>
3813         Autovacuum options used to be stored in a system table.
3814        </para>
3815       </listitem>
3816
3817       <listitem>
3818        <para>
3819         Add <literal>--freeze</> option to <application>vacuumdb</>
3820         (Bruce)
3821        </para>
3822       </listitem>
3823
3824      </itemizedlist>
3825
3826     </sect4>
3827
3828    </sect3>
3829
3830    <sect3>
3831     <title>Data Types</title>
3832     <itemizedlist>
3833
3834      <listitem>
3835       <para>
3836        Add a <literal>CaseSensitive</> option for text search synonym
3837        dictionaries (Simon)
3838       </para>
3839      </listitem>
3840
3841      <listitem>
3842       <para>
3843        Improve the precision of <type>NUMERIC</> division (Tom)
3844       </para>
3845      </listitem>
3846
3847      <listitem>
3848       <para>
3849        Add basic arithmetic operators for <type>int2</> with <type>int8</>
3850        (Tom)
3851       </para>
3852
3853       <para>
3854        This eliminates the need for explicit casting in some situations.
3855       </para>
3856      </listitem>
3857
3858      <listitem>
3859       <para>
3860        Allow <type>UUID</> input to accept an optional hyphen after
3861        every fourth digit (Robert Haas)
3862       </para>
3863      </listitem>
3864
3865      <listitem>
3866       <para>
3867        Allow <literal>on</>/<literal>off</> as input for the boolean data type
3868        (Itagaki Takahiro)
3869       </para>
3870      </listitem>
3871
3872      <listitem>
3873       <para>
3874        Allow spaces around <literal>NaN</> in the input string for
3875        type <type>numeric</> (Sam Mason)
3876       </para>
3877      </listitem>
3878
3879     </itemizedlist>
3880
3881     <sect4>
3882      <title>Temporal Data Types</title>
3883      <itemizedlist>
3884
3885       <listitem>
3886        <para>
3887         Reject year <literal>0 BC</> and years <literal>000</> and
3888         <literal>0000</> (Tom)
3889        </para>
3890
3891        <para>
3892         Previously these were interpreted as <literal>1 BC</>.
3893         (Note: years <literal>0</> and <literal>00</> are still assumed to be
3894         the year 2000.)
3895        </para>
3896       </listitem>
3897
3898       <listitem>
3899        <para>
3900         Include <literal>SGT</> (Singapore time) in the default list of
3901         known time zone abbreviations (Tom)
3902        </para>
3903       </listitem>
3904
3905       <listitem>
3906        <para>
3907         Support <literal>infinity</> and <literal>-infinity</> as
3908         values of type <type>date</> (Tom)
3909        </para>
3910       </listitem>
3911
3912       <listitem>
3913        <para>
3914         Make parsing of <type>interval</> literals more standard-compliant
3915         (Tom, Ron Mayer)
3916        </para>
3917
3918        <para>
3919         For example, <literal>INTERVAL '1' YEAR</> now does what it's
3920         supposed to.
3921        </para>
3922       </listitem>
3923
3924       <listitem>
3925        <para>
3926         Allow <type>interval</> fractional-seconds precision to be specified
3927         after the <literal>second</> keyword, for <acronym>SQL</> standard
3928         compliance (Tom)
3929        </para>
3930
3931        <para>
3932         Formerly the precision had to be specified after the keyword
3933         <type>interval</>.  (For backwards compatibility, this syntax is still
3934         supported, though deprecated.)  Data type definitions will now be
3935         output using the standard format.
3936        </para>
3937       </listitem>
3938
3939       <listitem>
3940        <para>
3941         Support the <acronym>IS0 8601</> <type>interval</> syntax (Ron
3942         Mayer, Kevin Grittner)
3943        </para>
3944
3945        <para>
3946         For example, <literal>INTERVAL 'P1Y2M3DT4H5M6.7S'</> is now
3947         supported.
3948        </para>
3949       </listitem>
3950
3951       <listitem>
3952        <para>
3953         Add <varname>IntervalStyle</> parameter
3954         which controls how <type>interval</> values are output (Ron Mayer)
3955        </para>
3956
3957        <para>
3958         Valid values are:  <literal>postgres</>, <literal>postgres_verbose</>,
3959         <literal>sql_standard</>, <literal>iso_8601</>.  This setting also
3960         controls the handling of negative <type>interval</> input when only
3961         some fields have positive/negative designations.
3962        </para>
3963       </listitem>
3964
3965       <listitem>
3966        <para>
3967         Improve consistency of handling of fractional seconds in
3968         <type>timestamp</> and <type>interval</> output (Ron Mayer)
3969        </para>
3970       </listitem>
3971
3972      </itemizedlist>
3973
3974     </sect4>
3975
3976     <sect4>
3977      <title>Arrays</title>
3978      <itemizedlist>
3979
3980       <listitem>
3981        <para>
3982         Improve the handling of casts applied to <literal>ARRAY[]</>
3983         constructs, such as <literal>ARRAY[...]::integer[]</>
3984         (Brendan Jurd)
3985        </para>
3986
3987        <para>
3988         Formerly <productname>PostgreSQL</> attempted to determine a data type
3989         for the <literal>ARRAY[]</> construct without reference to the ensuing
3990         cast.  This could fail unnecessarily in many cases, in particular when
3991         the <literal>ARRAY[]</> construct was empty or contained only
3992         ambiguous entries such as <literal>NULL</>.  Now the cast is consulted
3993         to determine the type that the array elements must be.
3994        </para>
3995       </listitem>
3996
3997       <listitem>
3998        <para>
3999         Make <acronym>SQL</>-syntax <type>ARRAY</> dimensions optional
4000         to match the <acronym>SQL</> standard (Peter)
4001        </para>
4002       </listitem>
4003
4004       <listitem>
4005        <para>
4006         Add <function>array_ndims()</> to return the number
4007         of dimensions of an array (Robert Haas)
4008        </para>
4009       </listitem>
4010
4011       <listitem>
4012        <para>
4013         Add <function>array_length()</> to return the length
4014         of an array for a specified dimension (Jim Nasby, Robert
4015         Haas, Peter Eisentraut)
4016        </para>
4017       </listitem>
4018
4019       <listitem>
4020        <para>
4021         Add aggregate function <function>array_agg()</>, which
4022         returns all aggregated values as a single array (Robert Haas,
4023         Jeff Davis, Peter)
4024        </para>
4025       </listitem>
4026
4027       <listitem>
4028        <para>
4029         Add <function>unnest()</>, which converts an array to
4030         individual row values (Tom)
4031        </para>
4032
4033        <para>
4034         This is the opposite of <function>array_agg()</>.
4035        </para>
4036       </listitem>
4037
4038       <listitem>
4039        <para>
4040         Add <function>array_fill()</> to create arrays initialized with
4041         a value (Pavel Stehule)
4042        </para>
4043       </listitem>
4044
4045       <listitem>
4046        <para>
4047         Add <function>generate_subscripts()</> to simplify generating
4048         the range of an array's subscripts (Pavel Stehule)
4049        </para>
4050       </listitem>
4051
4052      </itemizedlist>
4053
4054     </sect4>
4055
4056     <sect4>
4057      <title>Wide-Value Storage (<acronym>TOAST</>)</title>
4058      <itemizedlist>
4059
4060       <listitem>
4061        <para>
4062         Consider <acronym>TOAST</> compression on values as short as
4063         32 bytes (previously 256 bytes) (Greg Stark)
4064        </para>
4065       </listitem>
4066
4067       <listitem>
4068        <para>
4069         Require 25% minimum space savings before using <acronym>TOAST</>
4070         compression (previously 20% for small values and any-savings-at-all
4071         for large values) (Greg)
4072        </para>
4073       </listitem>
4074
4075       <listitem>
4076        <para>
4077         Improve <acronym>TOAST</> heuristics for rows that have a mix of large
4078         and small toastable fields, so that we prefer to push large values out
4079         of line and don't compress small values unnecessarily (Greg, Tom)
4080        </para>
4081       </listitem>
4082
4083      </itemizedlist>
4084
4085     </sect4>
4086
4087    </sect3>
4088
4089    <sect3>
4090     <title>Functions</title>
4091     <itemizedlist>
4092
4093      <listitem>
4094       <para>
4095        Document that <function>setseed()</> allows values from
4096        <literal>-1</> to <literal>1</> (not just <literal>0</> to
4097        <literal>1</>), and enforce the valid range (Kris Jurka)
4098       </para>
4099      </listitem>
4100
4101      <listitem>
4102       <para>
4103        Add server-side function <function>lo_import(filename, oid)</>
4104        (Tatsuo)
4105       </para>
4106      </listitem>
4107
4108      <listitem>
4109       <para>
4110        Add <function>quote_nullable()</>, which behaves like
4111        <function>quote_literal()</> but returns the string <literal>NULL</> for
4112        a null argument (Brendan Jurd)
4113       </para>
4114      </listitem>
4115
4116      <listitem>
4117       <para>
4118        Improve full text search <function>headline()</> function to
4119        allow extracting several fragments of text (Sushant Sinha)
4120       </para>
4121      </listitem>
4122
4123      <listitem>
4124       <para>
4125        Add <function>suppress_redundant_updates_trigger()</> trigger
4126        function to avoid overhead for non-data-changing updates (Andrew)
4127       </para>
4128      </listitem>
4129
4130      <listitem>
4131       <para>
4132        Add <function>div(numeric, numeric)</> to perform <type>numeric</>
4133        division without rounding (Tom)
4134       </para>
4135      </listitem>
4136
4137      <listitem>
4138       <para>
4139        Add <type>timestamp</> and <type>timestamptz</> versions of
4140        <function>generate_series()</> (Hitoshi Harada)
4141       </para>
4142      </listitem>
4143
4144     </itemizedlist>
4145
4146     <sect4>
4147      <title>Object Information Functions</title>
4148      <itemizedlist>
4149
4150       <listitem>
4151        <para>
4152         Implement <function>current_query()</> for use by functions
4153         that need to know the currently running query (Tomas Doran)
4154        </para>
4155       </listitem>
4156
4157       <listitem>
4158        <para>
4159         Add <function>pg_get_keywords()</> to return a list of the
4160         parser keywords (Dave Page)
4161        </para>
4162       </listitem>
4163
4164       <listitem>
4165        <para>
4166         Add <function>pg_get_functiondef()</> to see a function's
4167         definition (Abhijit Menon-Sen)
4168        </para>
4169       </listitem>
4170
4171       <listitem>
4172        <para>
4173         Allow the second argument of <function>pg_get_expr()</> to be zero
4174         when deparsing an expression that does not contain variables (Tom)
4175        </para>
4176       </listitem>
4177
4178       <listitem>
4179        <para>
4180         Modify <function>pg_relation_size()</> to use <literal>regclass</>
4181         (Heikki)
4182        </para>
4183
4184        <para>
4185         <function>pg_relation_size(data_type_name)</> no longer works.
4186        </para>
4187       </listitem>
4188
4189       <listitem>
4190        <para>
4191         Add <literal>boot_val</> and <literal>reset_val</> columns to
4192         <literal>pg_settings</> output (Greg Smith)
4193        </para>
4194       </listitem>
4195
4196       <listitem>
4197        <para>
4198         Add source file name and line number columns to
4199         <literal>pg_settings</> output for variables set in a configuration
4200         file (Magnus, Alvaro)
4201        </para>
4202
4203        <para>
4204         For security reasons, these columns are only visible to superusers.
4205        </para>
4206       </listitem>
4207
4208       <listitem>
4209        <para>
4210         Add support for <varname>CURRENT_CATALOG</>,
4211         <varname>CURRENT_SCHEMA</>, <varname>SET CATALOG</>, <varname>SET
4212         SCHEMA</> (Peter)
4213        </para>
4214
4215        <para>
4216         These provide <acronym>SQL</>-standard syntax for existing features.
4217        </para>
4218       </listitem>
4219
4220       <listitem>
4221        <para>
4222         Add <function>pg_typeof()</> which returns the data type
4223         of any value (Brendan Jurd)
4224        </para>
4225       </listitem>
4226
4227       <listitem>
4228        <para>
4229         Make <function>version()</> return information about whether
4230         the server is a 32- or 64-bit binary (Bruce)
4231        </para>
4232       </listitem>
4233
4234       <listitem>
4235        <para>
4236         Fix the behavior of information schema columns
4237         <structfield>is_insertable_into</> and <structfield>is_updatable</> to
4238         be consistent (Peter)
4239        </para>
4240       </listitem>
4241
4242       <listitem>
4243        <para>
4244         Improve the behavior of information schema
4245         <structfield>datetime_precision</> columns (Peter)
4246        </para>
4247
4248        <para>
4249         These columns now show zero for <type>date</> columns, and 6
4250         (the default precision) for <type>time</>, <type>timestamp</>, and
4251         <type>interval</> without a declared precision, rather than showing
4252         null as formerly.
4253        </para>
4254       </listitem>
4255
4256       <listitem>
4257        <para>
4258         Convert remaining builtin set-returning functions to use
4259         <literal>OUT</> parameters (Jaime Casanova)
4260        </para>
4261
4262        <para>
4263         This makes it possible to call these functions without specifying
4264         a column list:  <function>pg_show_all_settings()</>,
4265         <function>pg_lock_status()</>, <function>pg_prepared_xact()</>,
4266         <function>pg_prepared_statement()</>, <function>pg_cursor()</>
4267        </para>
4268       </listitem>
4269
4270       <listitem>
4271        <para>
4272         Make <function>pg_*_is_visible()</> and
4273         <function>has_*_privilege()</> functions return <literal>NULL</>
4274         for invalid OIDs, rather than reporting an error (Tom)
4275        </para>
4276       </listitem>
4277
4278       <listitem>
4279        <para>
4280         Extend <function>has_*_privilege()</> functions to allow inquiring
4281         about the OR of multiple privileges in one call (Stephen
4282         Frost, Tom)
4283        </para>
4284       </listitem>
4285
4286       <listitem>
4287        <para>
4288         Add <function>has_column_privilege()</> and
4289         <function>has_any_column_privilege()</> functions (Stephen
4290         Frost, Tom)
4291        </para>
4292       </listitem>
4293
4294      </itemizedlist>
4295
4296     </sect4>
4297
4298     <sect4>
4299      <title>Function Creation</title>
4300      <itemizedlist>
4301
4302       <listitem>
4303        <para>
4304         Support variadic functions (functions with a variable number
4305         of arguments) (Pavel Stehule)
4306        </para>
4307
4308        <para>
4309         Only trailing arguments can be optional, and they all must be
4310         of the same data type.
4311        </para>
4312       </listitem>
4313
4314       <listitem>
4315        <para>
4316         Support default values for function arguments (Pavel Stehule)
4317        </para>
4318       </listitem>
4319
4320       <listitem>
4321        <para>
4322         Add <command>CREATE FUNCTION ... RETURNS TABLE</> clause (Pavel
4323         Stehule)
4324        </para>
4325       </listitem>
4326
4327       <listitem>
4328        <para>
4329         Allow <acronym>SQL</>-language functions to return the output
4330         of an <command>INSERT</>/<command>UPDATE</>/<command>DELETE</>
4331         <literal>RETURNING</> clause (Tom)
4332        </para>
4333       </listitem>
4334
4335      </itemizedlist>
4336
4337     </sect4>
4338
4339     <sect4>
4340      <title>PL/pgSQL Server-Side Language</title>
4341      <itemizedlist>
4342
4343       <listitem>
4344        <para>
4345         Support <literal>EXECUTE USING</> for easier insertion of data
4346         values into a dynamic query string (Pavel Stehule)
4347        </para>
4348       </listitem>
4349
4350       <listitem>
4351        <para>
4352         Allow looping over the results of a cursor using a <literal>FOR</>
4353         loop (Pavel Stehule)
4354        </para>
4355       </listitem>
4356
4357       <listitem>
4358        <para>
4359         Support <literal>RETURN QUERY EXECUTE</> (Pavel
4360         Stehule)
4361        </para>
4362       </listitem>
4363
4364       <listitem>
4365        <para>
4366         Improve the <literal>RAISE</> command (Pavel Stehule)
4367
4368         <itemizedlist>
4369          <listitem>
4370           <para>
4371            Support <literal>DETAIL</> and <literal>HINT</> fields
4372           </para>
4373          </listitem>
4374          <listitem>
4375           <para>
4376            Support specification of the <literal>SQLSTATE</> error code
4377           </para>
4378          </listitem>
4379          <listitem>
4380           <para>
4381            Support an exception name parameter
4382           </para>
4383          </listitem>
4384          <listitem>
4385           <para>
4386            Allow <literal>RAISE</> without parameters in an exception
4387            block to re-throw the current error
4388           </para>
4389          </listitem>
4390         </itemizedlist>
4391        </para>
4392       </listitem>
4393
4394       <listitem>
4395        <para>
4396         Allow specification of <varname>SQLSTATE</> codes
4397         in <literal>EXCEPTION</> lists (Pavel Stehule)
4398        </para>
4399
4400        <para>
4401         This is useful for handling custom <varname>SQLSTATE</> codes.
4402        </para>
4403       </listitem>
4404
4405       <listitem>
4406        <para>
4407         Support the <literal>CASE</> statement (Pavel Stehule)
4408        </para>
4409       </listitem>
4410
4411       <listitem>
4412        <para>
4413         Make <command>RETURN QUERY</> set the special <literal>FOUND</> and
4414         <command>GET DIAGNOSTICS</> <literal>ROW_COUNT</> variables
4415         (Pavel Stehule)
4416        </para>
4417       </listitem>
4418
4419       <listitem>
4420        <para>
4421         Make <command>FETCH</> and <command>MOVE</> set the
4422         <command>GET DIAGNOSTICS</> <literal>ROW_COUNT</> variable
4423         (Andrew Gierth)
4424        </para>
4425       </listitem>
4426
4427       <listitem>
4428        <para>
4429         Make <command>EXIT</> without a label always exit the innermost
4430         loop (Tom)
4431        </para>
4432
4433        <para>
4434         Formerly, if there were a <literal>BEGIN</> block more closely nested
4435         than any loop, it would exit that block instead.  The new behavior
4436         matches Oracle(TM) and is also what was previously stated by our own
4437         documentation.
4438        </para>
4439       </listitem>
4440
4441       <listitem>
4442        <para>
4443         Make processing of string literals and nested block comments
4444         match the main SQL parser's processing (Tom)
4445        </para>
4446
4447        <para>
4448         In particular, the format string in <command>RAISE</> now works
4449         the same as any other string literal, including being subject
4450         to <varname>standard_conforming_strings</>.  This change also
4451         fixes other cases in which valid commands would fail when
4452         <varname>standard_conforming_strings</> is on.
4453        </para>
4454       </listitem>
4455
4456       <listitem>
4457        <para>
4458         Avoid memory leakage when the same function is called at varying
4459         exception-block nesting depths (Tom)
4460        </para>
4461       </listitem>
4462
4463      </itemizedlist>
4464
4465     </sect4>
4466
4467    </sect3>
4468
4469    <sect3>
4470     <title>Client Applications</title>
4471
4472     <itemizedlist>
4473
4474      <listitem>
4475       <para>
4476        Fix <literal>pg_ctl restart</> to preserve command-line arguments
4477        (Bruce)
4478       </para>
4479      </listitem>
4480
4481      <listitem>
4482       <para>
4483        Add <literal>-w</>/<literal>--no-password</> option that
4484        prevents password prompting in all utilities that have a
4485        <literal>-W</>/<literal>--password</> option (Peter)
4486       </para>
4487      </listitem>
4488
4489      <listitem>
4490       <para>
4491        Remove <option>-q</> (quiet) option of <application>createdb</>,
4492        <application>createuser</>, <application>dropdb</>,
4493        <application>dropuser</> (Peter)
4494       </para>
4495
4496       <para>
4497        These options have had no effect since <productname>PostgreSQL</>
4498        8.3.
4499       </para>
4500      </listitem>
4501
4502     </itemizedlist>
4503
4504     <sect4>
4505      <title><application>psql</></title>
4506      <itemizedlist>
4507
4508       <listitem>
4509        <para>
4510         Remove verbose startup banner; now just suggest <literal>help</>
4511         (Joshua Drake)
4512        </para>
4513       </listitem>
4514
4515       <listitem>
4516        <para>
4517         Make <literal>help</> show common backslash commands (Greg
4518         Sabino Mullane)
4519        </para>
4520       </listitem>
4521
4522       <listitem>
4523        <para>
4524         Add <literal>\pset format wrapped</> mode to wrap output to the
4525         screen width, or file/pipe output too if <literal>\pset columns</>
4526         is set (Bryce Nesbitt)
4527        </para>
4528       </listitem>
4529
4530       <listitem>
4531        <para>
4532         Allow all supported spellings of boolean values in <command>\pset</>,
4533         rather than just <literal>on</> and <literal>off</> (Bruce)
4534        </para>
4535
4536        <para>
4537         Formerly, any string other than <quote>off</> was silently taken
4538         to mean <literal>true</>.  <application>psql</> will now complain
4539         about unrecognized spellings (but still take them as <literal>true</>).
4540        </para>
4541       </listitem>
4542
4543       <listitem>
4544        <para>
4545         Use the pager for wide output (Bruce)
4546        </para>
4547       </listitem>
4548
4549       <listitem>
4550        <para>
4551         Require a space between a one-letter backslash command and its first
4552         argument (Bernd Helmle)
4553        </para>
4554
4555        <para>
4556         This removes a historical source of ambiguity.
4557        </para>
4558       </listitem>
4559
4560       <listitem>
4561        <para>
4562         Improve tab completion support for schema-qualified and
4563         quoted identifiers (Greg Sabino Mullane)
4564        </para>
4565       </listitem>
4566
4567       <listitem>
4568        <para>
4569         Add optional <literal>on</>/<literal>off</> argument for
4570         <command>\timing</> (David Fetter)
4571        </para>
4572       </listitem>
4573
4574       <listitem>
4575        <para>
4576         Display access control rights on multiple lines (Brendan
4577         Jurd, Andreas Scherbaum)
4578        </para>
4579       </listitem>
4580
4581       <listitem>
4582        <para>
4583         Make <command>\l</> show database access privileges (Andrew Gilligan)
4584        </para>
4585       </listitem>
4586
4587       <listitem>
4588        <para>
4589         Make <command>\l+</> show database sizes, if permissions
4590         allow (Andrew Gilligan)
4591        </para>
4592       </listitem>
4593
4594       <listitem>
4595        <para>
4596         Add the <command>\ef</> command to edit function definitions
4597         (Abhijit Menon-Sen)
4598        </para>
4599       </listitem>
4600
4601      </itemizedlist>
4602
4603     </sect4>
4604
4605     <sect4>
4606      <title><application>psql</> \d* commands</title>
4607
4608      <itemizedlist>
4609
4610       <listitem>
4611        <para>
4612         Make <command>\d*</> commands that do not have a pattern argument
4613         show system objects only if the <literal>S</> modifier is specified
4614         (Greg Sabino Mullane, Bruce)
4615        </para>
4616
4617        <para>
4618         The former behavior was inconsistent across different variants
4619         of <command>\d</>, and in most cases it provided no easy way to see
4620         just user objects.
4621        </para>
4622       </listitem>
4623
4624       <listitem>
4625        <para>
4626         Improve <command>\d*</> commands to work with older
4627         <productname>PostgreSQL</> server versions (back to 7.4),
4628         not only the current server version
4629         (Guillaume Lelarge)
4630        </para>
4631       </listitem>
4632
4633       <listitem>
4634        <para>
4635         Make <command>\d</> show foreign-key constraints that reference
4636         the selected table (Kenneth D'Souza)
4637        </para>
4638       </listitem>
4639
4640       <listitem>
4641        <para>
4642         Make <command>\d</> on a sequence show its column values
4643         (Euler Taveira de Oliveira)
4644        </para>
4645       </listitem>
4646
4647       <listitem>
4648        <para>
4649         Add column storage type and other relation options to the
4650         <command>\d+</> display (Gregory Stark, Euler Taveira de
4651         Oliveira)
4652        </para>
4653       </listitem>
4654
4655       <listitem>
4656        <para>
4657         Show relation size in <command>\dt+</> output (Dickson S.
4658         Guedes)
4659        </para>
4660       </listitem>
4661
4662       <listitem>
4663        <para>
4664         Show the possible values of <literal>enum</> types in <command>\dT+</>
4665         (David Fetter)
4666        </para>
4667       </listitem>
4668
4669       <listitem>
4670        <para>
4671         Allow <command>\dC</> to accept a wildcard pattern, which matches
4672         either datatype involved in the cast (Tom)
4673        </para>
4674       </listitem>
4675
4676       <listitem>
4677        <para>
4678         Add a function type column to <command>\df</>'s output, and add
4679         options to list only selected types of functions (David Fetter)
4680        </para>
4681       </listitem>
4682
4683       <listitem>
4684        <para>
4685         Make <command>\df</> not hide functions that take or return
4686         type <type>cstring</> (Tom)
4687        </para>
4688
4689        <para>
4690         Previously, such functions were hidden because most of them are
4691         datatype I/O functions, which were deemed uninteresting.  The new
4692         policy about hiding system functions by default makes this wart
4693         unnecessary.
4694        </para>
4695       </listitem>
4696
4697      </itemizedlist>
4698
4699     </sect4>
4700
4701     <sect4>
4702      <title><application>pg_dump</></title>
4703      <itemizedlist>
4704
4705       <listitem>
4706        <para>
4707         Add a <literal>--no-tablespaces</> option to
4708         <application>pg_dump</>/<application>pg_dumpall</>/<application>pg_restore</>
4709         so that dumps can be restored to clusters that have non-matching
4710         tablespace layouts (Gavin Roy)
4711        </para>
4712       </listitem>
4713
4714       <listitem>
4715        <para>
4716         Remove <option>-d</> and <option>-D</> options from
4717         <application>pg_dump</> and <application>pg_dumpall</> (Tom)
4718        </para>
4719
4720        <para>
4721         These options were too frequently confused with the option to
4722         select a database name in other <productname>PostgreSQL</>
4723         client applications.  The functionality is still available,
4724         but you must now spell out the long option name
4725         <option>--inserts</> or <option>--column-inserts</>.
4726        </para>
4727       </listitem>
4728
4729       <listitem>
4730        <para>
4731         Remove <option>-i</>/<option>--ignore-version</> option from
4732         <application>pg_dump</> and <application>pg_dumpall</> (Tom)
4733        </para>
4734
4735        <para>
4736         Use of this option does not throw an error, but it has no
4737         effect.  This option was removed because the version checks
4738         are necessary for safety.
4739        </para>
4740       </listitem>
4741
4742       <listitem>
4743        <para>
4744         Disable <varname>statement_timeout</> during dump and restore
4745         (Joshua Drake)
4746        </para>
4747       </listitem>
4748
4749       <listitem>
4750        <para>
4751         Add <application>pg_dump</>/<application>pg_dumpall</> option
4752         <option>--lock-wait-timeout</> (David Gould)
4753        </para>
4754
4755        <para>
4756         This allows dumps to fail if unable to acquire a shared lock
4757         within the specified amount of time.
4758        </para>
4759       </listitem>
4760
4761       <listitem>
4762        <para>
4763         Reorder <application>pg_dump</> <literal>--data-only</> output
4764         to dump tables referenced by foreign keys before
4765         the referencing tables (Tom)
4766        </para>
4767
4768        <para>
4769         This allows data loads when foreign keys are already present.
4770         If circular references make a safe ordering impossible, a
4771         <literal>NOTICE</> is issued.
4772        </para>
4773       </listitem>
4774
4775       <listitem>
4776        <para>
4777         Allow <application>pg_dump</>, <application>pg_dumpall</>, and
4778         <application>pg_restore</> to use a specified role (Benedek
4779         László)
4780        </para>
4781       </listitem>
4782
4783       <listitem>
4784        <para>
4785         Allow <application>pg_restore</> to use multiple concurrent
4786         connections to do the restore (Andrew)
4787        </para>
4788
4789        <para>
4790         The number of concurrent connections is controlled by the option
4791         <literal>--jobs</>.  This is supported only for custom-format archives.
4792        </para>
4793       </listitem>
4794
4795      </itemizedlist>
4796
4797     </sect4>
4798
4799    </sect3>
4800
4801    <sect3>
4802     <title>Programming Tools</title>
4803
4804     <sect4>
4805      <title><application>libpq</></title>
4806      <itemizedlist>
4807
4808       <listitem>
4809        <para>
4810         Allow the <type>OID</> to be specified when importing a large
4811         object, via new function <function>lo_import_with_oid()</> (Tatsuo)
4812        </para>
4813       </listitem>
4814
4815       <listitem>
4816        <para>
4817         Add <quote>events</> support (Andrew Chernow, Merlin Moncure)
4818        </para>
4819
4820        <para>
4821         This adds the ability to register callbacks to manage private
4822         data associated with <structname>PGconn</> and <structname>PGresult</>
4823         objects.
4824        </para>
4825       </listitem>
4826
4827       <listitem>
4828        <para>
4829         Improve error handling to allow the return of multiple
4830         error messages as multi-line error reports (Magnus)
4831        </para>
4832       </listitem>
4833
4834       <listitem>
4835        <para>
4836         Make <function>PQexecParams()</> and related functions return
4837         <varname>PGRES_EMPTY_QUERY</> for an empty query (Tom)
4838        </para>
4839
4840        <para>
4841         They previously returned <varname>PGRES_COMMAND_OK</>.
4842        </para>
4843       </listitem>
4844
4845       <listitem>
4846        <para>
4847         Document how to avoid the overhead of <function>WSACleanup()</>
4848         on Windows (Andrew Chernow)
4849        </para>
4850       </listitem>
4851
4852       <listitem>
4853        <para>
4854         Do not rely on Kerberos tickets to determine the default database
4855         username (Magnus)
4856        </para>
4857
4858        <para>
4859         Previously, a Kerberos-capable build of libpq would use the
4860         principal name from any available Kerberos ticket as default
4861         database username, even if the connection wasn't using Kerberos
4862         authentication.  This was deemed inconsistent and confusing.
4863         The default username is now determined the same way with or
4864         without Kerberos.  Note however that the database username must still
4865         match the ticket when Kerberos authentication is used.
4866        </para>
4867       </listitem>
4868      </itemizedlist>
4869
4870     </sect4>
4871
4872     <sect4>
4873      <title><application>libpq</> <acronym>SSL</> (Secure Sockets Layer)
4874       support</title>
4875      <itemizedlist>
4876
4877       <listitem>
4878        <para>
4879         Fix certificate validation for <acronym>SSL</> connections
4880         (Magnus)
4881        </para>
4882
4883        <para>
4884         <application>libpq</> now supports verifying both the certificate
4885         and the name of the server when making <acronym>SSL</>
4886         connections. If a root certificate is not available to use for
4887         verification, <acronym>SSL</> connections will fail. The
4888         <literal>sslmode</> parameter is used to enable certificate
4889         verification and set the level of checking.
4890         The default is still not to do any verification, allowing connections
4891         to SSL-enabled servers without requiring a root certificate on the
4892         client.
4893        </para>
4894       </listitem>
4895
4896       <listitem>
4897        <para>
4898         Support wildcard server certificates (Magnus)
4899        </para>
4900
4901        <para>
4902         If a certificate <acronym>CN</> starts with <literal>*</>, it will
4903         be treated as a wildcard when matching the hostname, allowing the
4904         use of the same certificate for multiple servers.
4905        </para>
4906       </listitem>
4907
4908       <listitem>
4909        <para>
4910         Allow the file locations for client certificates to be specified
4911         (Mark Woodward, Alvaro, Magnus)
4912        </para>
4913       </listitem>
4914
4915       <listitem>
4916        <para>
4917         Add a <function>PQinitOpenSSL</> function to allow greater control
4918         over OpenSSL/libcrypto initialization (Andrew Chernow)
4919        </para>
4920       </listitem>
4921
4922       <listitem>
4923        <para>
4924         Make <application>libpq</> unregister its <application>OpenSSL</>
4925         callbacks when no database connections remain open
4926         (Bruce, Magnus, Russell Smith)
4927        </para>
4928
4929        <para>
4930         This is required for applications that unload the libpq library,
4931         otherwise invalid <application>OpenSSL</> callbacks will remain.
4932        </para>
4933       </listitem>
4934
4935      </itemizedlist>
4936
4937     </sect4>
4938
4939     <sect4>
4940      <title><application>ecpg</></title>
4941      <itemizedlist>
4942
4943       <listitem>
4944        <para>
4945         Add localization support for messages (Euler Taveira de
4946         Oliveira)
4947        </para>
4948       </listitem>
4949
4950       <listitem>
4951        <para>
4952         ecpg parser is now automatically generated from the server
4953         parser (Michael)
4954        </para>
4955
4956        <para>
4957         Previously the ecpg parser was hand-maintained.
4958        </para>
4959       </listitem>
4960
4961      </itemizedlist>
4962
4963     </sect4>
4964
4965     <sect4>
4966      <title>Server Programming Interface (<acronym>SPI</>)</title>
4967      <itemizedlist>
4968
4969       <listitem>
4970        <para>
4971         Add support for single-use plans with out-of-line
4972         parameters (Tom)
4973        </para>
4974       </listitem>
4975
4976       <listitem>
4977        <para>
4978         Add new <varname>SPI_OK_REWRITTEN</> return code for
4979         <function>SPI_execute()</> (Heikki)
4980        </para>
4981
4982        <para>
4983         This is used when a command is rewritten to another type of
4984         command.
4985        </para>
4986       </listitem>
4987
4988       <listitem>
4989        <para>
4990         Remove unnecessary inclusions from <filename>executor/spi.h</> (Tom)
4991        </para>
4992
4993        <para>
4994         SPI-using modules might need to add some <literal>#include</>
4995         lines if they were depending on <filename>spi.h</> to include
4996         things for them.
4997        </para>
4998       </listitem>
4999
5000      </itemizedlist>
5001
5002     </sect4>
5003
5004    </sect3>
5005
5006    <sect3>
5007     <title>Build Options</title>
5008     <itemizedlist>
5009
5010      <listitem>
5011       <para>
5012        Update build system to use <productname>Autoconf</> 2.61 (Peter)
5013       </para>
5014      </listitem>
5015
5016      <listitem>
5017       <para>
5018        Require <productname>GNU bison</> for source code builds (Peter)
5019       </para>
5020
5021       <para>
5022        This has effectively been required for several years, but now there
5023        is no infrastructure claiming to support other parser tools.
5024       </para>
5025      </listitem>
5026
5027      <listitem>
5028       <para>
5029        Add <application>pg_config</> <literal>--htmldir</> option
5030        (Peter)
5031       </para>
5032      </listitem>
5033
5034      <listitem>
5035       <para>
5036        Pass <type>float4</> by value inside the server (Zoltan
5037        Boszormenyi)
5038       </para>
5039
5040       <para>
5041        Add <application>configure</> option
5042        <literal>--disable-float4-byval</> to use the old behavior.
5043        External C functions that use old-style (version 0) call convention
5044        and pass or return <type>float4</> values will be broken by this
5045        change, so you may need the <application>configure</> option if you
5046        have such functions and don't want to update them.
5047       </para>
5048      </listitem>
5049
5050      <listitem>
5051       <para>
5052        Pass <type>float8</>, <type>int8</>, and related datatypes
5053        by value inside the server on 64-bit platforms (Zoltan Boszormenyi)
5054       </para>
5055
5056       <para>
5057        Add <application>configure</> option
5058        <literal>--disable-float8-byval</> to use the old behavior.
5059        As above, this change might break old-style external C functions.
5060       </para>
5061      </listitem>
5062
5063      <listitem>
5064       <para>
5065        Add configure options <literal>--with-segsize</>,
5066        <literal>--with-blocksize</>, <literal>--with-wal-blocksize</>,
5067        <literal>--with-wal-segsize</> (Zdenek Kotala, Tom)
5068       </para>
5069
5070       <para>
5071        This simplifies build-time control over several constants that
5072        previously could only be changed by editing
5073        <filename>pg_config_manual.h</>.
5074       </para>
5075      </listitem>
5076
5077      <listitem>
5078       <para>
5079        Allow threaded builds on <productname>Solaris</> 2.5 (Bruce)
5080       </para>
5081      </listitem>
5082
5083      <listitem>
5084       <para>
5085        Use the system's <function>getopt_long()</> on <productname>Solaris</>
5086        (Zdenek Kotala, Tom)
5087       </para>
5088
5089       <para>
5090        This makes option processing more consistent with what Solaris users
5091        expect.
5092       </para>
5093      </listitem>
5094
5095      <listitem>
5096       <para>
5097        Add support for the <productname>Sun Studio</> compiler on
5098        <productname>Linux</> (Julius Stroffek)
5099       </para>
5100      </listitem>
5101
5102      <listitem>
5103       <para>
5104        Append the major version number to the backend <application>gettext</>
5105        domain, and the <literal>soname</> major version number to
5106        libraries' <application>gettext</> domain (Peter)
5107       </para>
5108
5109       <para>
5110        This simplifies parallel installations of multiple versions.
5111       </para>
5112      </listitem>
5113
5114      <listitem>
5115       <para>
5116        Add support for code coverage testing with <application>gcov</>
5117        (Michelle Caisse)
5118       </para>
5119      </listitem>
5120
5121      <listitem>
5122       <para>
5123        Allow out-of-tree builds on <productname>Mingw</> and
5124        <productname>Cygwin</> (Richard Evans)
5125       </para>
5126      </listitem>
5127
5128      <listitem>
5129       <para>
5130        Fix the use of <productname>Mingw</> as a cross-compiling source
5131        platform (Peter)
5132       </para>
5133      </listitem>
5134
5135     </itemizedlist>
5136
5137    </sect3>
5138
5139    <sect3>
5140     <title>Source Code</title>
5141     <itemizedlist>
5142
5143      <listitem>
5144       <para>
5145        Support 64-bit time zone data files (Heikki)
5146       </para>
5147
5148       <para>
5149        This adds support for daylight saving time (<acronym>DST</>)
5150        calculations beyond the year 2038.
5151       </para>
5152      </listitem>
5153
5154      <listitem>
5155       <para>
5156        Deprecate use of platform's <type>time_t</> data type (Tom)
5157       </para>
5158
5159       <para>
5160        Some platforms have migrated to 64-bit <type>time_t</>, some have
5161        not, and Windows can't make up its mind what it's doing.  Define
5162        <type>pg_time_t</> to have the same meaning as <type>time_t</>,
5163        but always be 64 bits (unless the platform has no 64-bit integer type),
5164        and use that type in all module APIs and on-disk data formats.
5165       </para>
5166      </listitem>
5167
5168      <listitem>
5169       <para>
5170        Fix bug in handling of the time zone database when cross-compiling
5171        (Richard Evans)
5172       </para>
5173      </listitem>
5174
5175      <listitem>
5176       <para>
5177        Link backend object files in one step, rather than in stages
5178        (Peter)
5179       </para>
5180      </listitem>
5181
5182      <listitem>
5183       <para>
5184        Improve <application>gettext</> support to allow better translation
5185        of plurals (Peter)
5186       </para>
5187      </listitem>
5188
5189      <listitem>
5190       <para>
5191        Add message translation support to the PL languages (Alvaro, Peter)
5192       </para>
5193      </listitem>
5194
5195      <listitem>
5196       <para>
5197        Add more <application>DTrace</> probes (Robert Lor)
5198       </para>
5199      </listitem>
5200
5201      <listitem>
5202       <para>
5203        Enable <application>DTrace</> support on <application>Mac OS X
5204        Leopard</> and other non-Solaris platforms (Robert Lor)
5205       </para>
5206      </listitem>
5207
5208      <listitem>
5209       <para>
5210        Simplify and standardize conversions between C strings and
5211        <type>text</> datums, by providing common functions for the purpose
5212        (Brendan Jurd, Tom)
5213       </para>
5214      </listitem>
5215
5216      <listitem>
5217       <para>
5218        Clean up the <filename>include/catalog/</> header files so that
5219        frontend programs can include them without including
5220        <filename>postgres.h</>
5221        (Zdenek Kotala)
5222       </para>
5223      </listitem>
5224
5225      <listitem>
5226       <para>
5227        Make <type>name</> char-aligned, and suppress zero-padding of
5228        <type>name</> entries in indexes (Tom)
5229       </para>
5230      </listitem>
5231
5232      <listitem>
5233       <para>
5234        Recover better if dynamically-loaded code executes <function>exit()</>
5235        (Tom)
5236       </para>
5237      </listitem>
5238
5239      <listitem>
5240       <para>
5241        Add a hook to let plug-ins monitor the executor (Itagaki
5242        Takahiro)
5243       </para>
5244      </listitem>
5245
5246      <listitem>
5247       <para>
5248        Add a hook to allow the planner's statistics lookup behavior to
5249        be overridden (Simon Riggs)
5250       </para>
5251      </listitem>
5252
5253      <listitem>
5254       <para>
5255        Add <function>shmem_startup_hook()</> for custom shared memory
5256        requirements (Tom)
5257       </para>
5258      </listitem>
5259
5260      <listitem>
5261       <para>
5262        Replace the index access method <function>amgetmulti</> entry point
5263        with <function>amgetbitmap</>, and extend the API for
5264        <function>amgettuple</> to support run-time determination of
5265        operator lossiness (Heikki, Tom, Teodor)
5266       </para>
5267
5268       <para>
5269        The API for GIN and GiST opclass <function>consistent</> functions
5270        has been extended as well.
5271       </para>
5272      </listitem>
5273
5274      <listitem>
5275       <para>
5276        Add support for partial-match searches in <acronym>GIN</> indexes
5277        (Teodor Sigaev, Oleg Bartunov)
5278       </para>
5279      </listitem>
5280
5281      <listitem>
5282       <para>
5283        Replace <structname>pg_class</> column <structfield>reltriggers</>
5284        with boolean <structfield>relhastriggers</> (Simon)
5285       </para>
5286
5287       <para>
5288        Also remove unused <structname>pg_class</> columns
5289        <structfield>relukeys</>, <structfield>relfkeys</>, and
5290        <structfield>relrefs</>.
5291       </para>
5292      </listitem>
5293
5294      <listitem>
5295       <para>
5296        Add a <structfield>relistemp</> column to <structname>pg_class</>
5297        to ease identification of temporary tables (Tom)
5298       </para>
5299      </listitem>
5300
5301      <listitem>
5302       <para>
5303        Move platform <acronym>FAQ</>s into the main documentation
5304        (Peter)
5305       </para>
5306      </listitem>
5307
5308      <listitem>
5309       <para>
5310        Prevent parser input files from being built with any conflicts
5311        (Peter)
5312       </para>
5313      </listitem>
5314
5315      <listitem>
5316       <para>
5317        Add support for the <literal>KOI8U</> (Ukrainian) encoding
5318        (Peter)
5319       </para>
5320      </listitem>
5321
5322      <listitem>
5323       <para>
5324        Add Japanese message translations (Japan PostgreSQL Users Group)
5325       </para>
5326
5327       <para>
5328        This used to be maintained as a separate project.
5329       </para>
5330      </listitem>
5331
5332      <listitem>
5333       <para>
5334        Fix problem when setting <varname>LC_MESSAGES</> on
5335        <application>MSVC</>-built systems (Hiroshi Inoue, Hiroshi
5336        Saito, Magnus)
5337       </para>
5338      </listitem>
5339
5340     </itemizedlist>
5341
5342    </sect3>
5343
5344    <sect3>
5345     <title>Contrib</title>
5346
5347     <itemizedlist>
5348
5349      <listitem>
5350       <para>
5351        Add <filename>contrib/auto_explain</> to automatically run
5352        <command>EXPLAIN</> on queries exceeding a specified duration
5353        (Itagaki Takahiro, Tom)
5354       </para>
5355      </listitem>
5356
5357      <listitem>
5358       <para>
5359        Add <filename>contrib/btree_gin</> to allow GIN indexes to
5360        handle more datatypes (Oleg, Teodor)
5361       </para>
5362      </listitem>
5363
5364      <listitem>
5365       <para>
5366        Add <filename>contrib/citext</> to provide a case-insensitive,
5367        multibyte-aware text data type (David Wheeler)
5368       </para>
5369      </listitem>
5370
5371      <listitem>
5372       <para>
5373        Add <filename>contrib/pg_stat_statements</> for server-wide
5374        tracking of statement execution statistics (Itagaki Takahiro)
5375       </para>
5376      </listitem>
5377
5378      <listitem>
5379       <para>
5380        Add duration and query mode options to <filename>contrib/pgbench</>
5381        (Itagaki Takahiro)
5382       </para>
5383      </listitem>
5384
5385      <listitem>
5386       <para>
5387        Make <filename>contrib/pgbench</> use table names
5388        <structname>pgbench_accounts</>, <structname>pgbench_branches</>,
5389        <structname>pgbench_history</>, and <structname>pgbench_tellers</>,
5390        rather than just <structname>accounts</>, <structname>branches</>,
5391        <structname>history</>, and <structname>tellers</> (Tom)
5392       </para>
5393
5394       <para>
5395        This is to reduce the risk of accidentally destroying real data
5396        by running <application>pgbench</>.
5397       </para>
5398      </listitem>
5399
5400      <listitem>
5401       <para>
5402        Fix <filename>contrib/pgstattuple</> to handle tables and
5403        indexes with over 2 billion pages (Tatsuhito Kasahara)
5404       </para>
5405      </listitem>
5406
5407      <listitem>
5408       <para>
5409        In <filename>contrib/fuzzystrmatch</>, add a version of the
5410        Levenshtein string-distance function that allows the user to
5411        specify the costs of insertion, deletion, and substitution
5412        (Volkan Yazici)
5413       </para>
5414      </listitem>
5415
5416      <listitem>
5417       <para>
5418        Make <filename>contrib/ltree</> support multibyte encodings
5419        (laser)
5420       </para>
5421      </listitem>
5422
5423      <listitem>
5424       <para>
5425        Enable <filename>contrib/dblink</> to use connection information
5426        stored in the SQL/MED catalogs (Joe Conway)
5427       </para>
5428      </listitem>
5429
5430      <listitem>
5431       <para>
5432        Improve <filename>contrib/dblink</>'s reporting of errors from
5433        the remote server (Joe Conway)
5434       </para>
5435      </listitem>
5436
5437      <listitem>
5438       <para>
5439        Make <filename>contrib/dblink</> set <varname>client_encoding</>
5440        to match the local database's encoding (Joe Conway)
5441       </para>
5442
5443       <para>
5444        This prevents encoding problems when communicating with a remote
5445        database that uses a different encoding.
5446       </para>
5447      </listitem>
5448
5449      <listitem>
5450       <para>
5451        Make sure <filename>contrib/dblink</> uses a password supplied
5452        by the user, and not accidentally taken from the server's
5453        <filename>.pgpass</> file (Joe Conway)
5454       </para>
5455
5456       <para>
5457        This is a minor security enhancement.
5458       </para>
5459      </listitem>
5460
5461      <listitem>
5462       <para>
5463        Add <function>fsm_page_contents()</>
5464        to <filename>contrib/pageinspect</> (Heikki)
5465       </para>
5466      </listitem>
5467
5468      <listitem>
5469       <para>
5470        Modify <function>get_raw_page()</> to support free space map
5471        (<filename>*_fsm</>) files.  Also update
5472        <filename>contrib/pg_freespacemap</>.
5473       </para>
5474      </listitem>
5475
5476      <listitem>
5477       <para>
5478        Add support for multibyte encodings to <filename>contrib/pg_trgm</>
5479        (Teodor)
5480       </para>
5481      </listitem>
5482
5483      <listitem>
5484       <para>
5485        Rewrite <filename>contrib/intagg</> to use new
5486        functions <function>array_agg()</> and <function>unnest()</>
5487        (Tom)
5488       </para>
5489      </listitem>
5490
5491      <listitem>
5492       <para>
5493        Make <filename>contrib/pg_standby</> recover all available WAL before
5494        failover (Fujii Masao, Simon, Heikki)
5495       </para>
5496
5497       <para>
5498        To make this work safely, you now need to set the new
5499        <literal>recovery_end_command</> option in <filename>recovery.conf</>
5500        to clean up the trigger file after failover. <application>pg_standby</>
5501        will no longer remove the trigger file itself.
5502       </para>
5503      </listitem>
5504
5505      <listitem>
5506       <para>
5507        <filename>contrib/pg_standby</>'s <option>-l</> option is now a no-op,
5508        because it is unsafe to use a symlink (Simon)
5509       </para>
5510      </listitem>
5511
5512     </itemizedlist>
5513
5514    </sect3>
5515   </sect2>
5516  </sect1>