]> granicus.if.org Git - postgresql/blob - doc/src/sgml/release.sgml
37e77957d320506b0b2315fbbf09fe556c0b007d
[postgresql] / doc / src / sgml / release.sgml
1 <!-- $PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.593 2009/03/26 01:31:15 momjian Exp $ -->
2 <!--
3
4 Typical markup:
5
6 &<>                             use & escapes
7 [A-Z][A-Z ]+[A-Z]               <command>
8 [A-Za-z_][A-Za-z0-9_]+()        <function>
9 [A-Za-z_]/[A-Za-z_]+            <filename>
10 PostgreSQL                      <productname>
11 pg_[A-Za-z0-9_]                 <application>
12 [A-Z][A-Z]                      <type>, <envar>, <literal>
13
14 non-ASCII characters            convert to HTML4 entity (&) escapes
15
16         official:      http://www.w3.org/TR/html4/sgml/entities.html
17         one page:      http://www.zipcon.net/~swhite/docs/computers/browsers/entities_page.html
18         other lists:   http://www.zipcon.net/~swhite/docs/computers/browsers/entities.html
19                        http://www.zipcon.net/~swhite/docs/computers/browsers/entities_page.html
20                        http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
21
22         we cannot use UTF8 because SGML Docbook
23         does not support it
24           http://www.pemberley.com/janeinfo/latin1.html#latexta
25
26 wrap long lines
27
28 For new features, add links to the documentation sections.  Use </link>
29 so that Perl can remove it so HISTORY.html can be created with no
30 links to the main documentation.  This was added only in 8.2, so don't
31 do it for earlier branch release files.
32
33 -->
34
35 <appendix id="release">
36  <title>Release Notes</title>
37
38   <para>
39    The release notes contain the significant changes in each
40    <productname>PostgreSQL</> release, with major features and migration
41    issues listed at the top.  The release notes do not contain changes
42    that affect only a few users or changes that are internal and therefore not
43    user-visible.  For example, the optimizer is improved in almost every
44    release, but the improvements are usually observed by users as simply
45    faster queries.
46   </para>
47
48   <para>
49    A complete list of changes for each release can be obtained by
50    viewing the <link linkend="cvs">CVS</link> logs for each release.
51    The <ulink
52    url="http://archives.postgresql.org/pgsql-committers/">pgsql-committers
53    email list</ulink> records all source code changes as well.  There is also
54    a <ulink url="http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/">web
55    interface</ulink> that shows changes to specific files.
56    <!-- we need a file containing the CVS logs for each release, and something
57    like the SVN web interface that groups commits but has branches -->
58   </para>
59
60   <para>
61    The name appearing next to each item represents the major developer for
62    that item.  Of course all changes involve community discussion and patch
63    review, so each item is truly a community effort.
64   </para>
65
66  <sect1 id="release-8-4">
67   <title>Release 8.4</title>
68
69   <note>
70    <title>Release date</title>
71    <simpara>2009-XX-XX</simpara>
72    ITEMS CURRENT AS OF 2009-03-16
73   </note>
74
75   <sect2>
76    <title>Overview</title>
77
78    <para>
79     This major PostgreSQL release brings SQL features people have been
80     waiting for for years, as well as performance enhancements
81     and changes to make space reuse more efficient and
82     more automatic.  This release adds the following major features:
83    </para>
84
85    <itemizedlist>
86
87     <listitem>
88      <para>
89       *MAJOR ITEM LIST GOES HERE*
90      </para>
91     </listitem>
92
93    </itemizedlist>
94
95    <para>
96     The above items are explained in more detail in the sections below.
97    </para>
98
99   </sect2>
100
101   <sect2>
102    <title>Migration to Version 8.4</title>
103
104    <para>
105     A dump/restore using <application>pg_dump</application> is
106     required for those wishing to migrate data from any previous
107     release.
108    </para>
109
110    <para>
111     Observe the following incompatibilities:
112    </para>
113
114    <sect3>
115     <title>General</title>
116     <itemizedlist>
117
118      <listitem>
119       <para>
120        Use 64-bit integer datetimes by default (Neil Conway)
121       </para>
122
123       <para>
124        This was available previously via a configure --enable-integer-datetimes
125        (Neil Conway)
126       </para>
127      </listitem>
128
129      <listitem>
130       <para>
131        Change postgresql.conf default for log_min_messages to 'warning'
132        (previously 'notice') to reduce log file volume (Tom)
133       </para>
134      </listitem>
135
136      <listitem>
137       <para>
138        Have debug_print_parse, debug_print_rewritten, and debug_print_plan
139        output appear as LOG message level, not DEBUG1 (Tom) bjm: inconsistency
140        because of var names?
141       </para>
142      </listitem>
143
144      <listitem>
145       <para>
146        Have debug_pretty_print default to on (Tom)
147       </para>
148      </listitem>
149
150      <listitem>
151       <para>
152        Make "log_temp_files" super-user set only, like other logging options
153        (Simon)
154       </para>
155      </listitem>
156
157      <listitem>
158       <para>
159        Disable appending of the epoch date/time when '%' escapes are missing in
160        log_filename (Robert Haas)
161       </para>
162
163       <para>
164        This change was made because some users wanted a consistent log
165        filename.
166       </para>
167      </listitem>
168
169      <listitem>
170       <para>
171        Remove explain_pretty_print postgresql.conf setting (no longer needed)
172        (Tom)
173       </para>
174      </listitem>
175
176      <listitem>
177       <para>
178        Remove log_restartpoints from recovery.conf;  instead use
179        log_checkpoints (Simon Riggs)
180       </para>
181      </listitem>
182
183      <listitem>
184       <para>
185        Remove support for the (insecure) crypt authentication method (Magnus)
186       </para>
187
188       <para>
189        This breaks compatibility with pre-7.2 versions.
190       </para>
191      </listitem>
192
193      <listitem>
194       <para>
195        Remove krb_realm and krb_server_hostname, now pg_hba.conf-only settings
196        (Magnus)
197       </para>
198      </listitem>
199
200      <listitem>
201       <para>
202        Remove ipcclean utility command (Bruce)
203       </para>
204
205       <para>
206        The utility only worked on a few platforms;  users should use their
207        operating system tools instead.
208       </para>
209      </listitem>
210
211      <listitem>
212       <para>
213        pg_hba.conf also has extensive changes related to migration. bjm: add markup
214       </para>
215      </listitem>
216
217     </itemizedlist>
218
219     </sect3>
220
221     <sect3>
222      <title>Queries</title>
223
224     <itemizedlist>
225
226      <listitem>
227       <para>
228        Have children inherit CHECK constraints from parents (Alex Hunsaker,
229        Nikhil Sontakke, Tom Lane)
230       </para>
231      </listitem>
232
233      <listitem>
234       <para>
235        Force child tables to have the same CHECK constraints as parents (Alex
236        Hunsaker, Nikhil Sontakke, Tom Lane) bjm: verify
237       </para>
238      </listitem>
239
240      <listitem>
241       <para>
242        Change TRUNCATE and LOCK behavior to apply to all child tables (Peter)
243       </para>
244
245       <para>
246        There is a new ONLY clause which disables this behavior.
247       </para>
248      </listitem>
249
250      <listitem>
251       <para>
252        Disallow negative LIMIT or OFFSET values, rather than treating them as
253        zero (Simon)
254       </para>
255      </listitem>
256
257      <listitem>
258       <para>
259        Disallow LOCK TABLE outside a transaction block (Tom)
260       </para>
261
262       <para>
263        Such an operation is useless because the lock would be immediately
264        released.
265       </para>
266      </listitem>
267
268      <listitem>
269       <para>
270        Make DISCARD ALL also discard advisory locks (Marko Kreen)
271       </para>
272      </listitem>
273
274     </itemizedlist>
275
276     </sect3>
277
278
279     <sect3>
280      <title>Functions and Operators</title>
281
282     <itemizedlist>
283
284      <listitem>
285       <para>
286        Have NUMERIC 0 ^ 4.3 return 1, rather than an error, and have 0 ^ 0.0
287        return 1, rather than error (Bruce)
288       </para>
289
290       <para>
291        This was already the float8 behavior.
292       </para>
293      </listitem>
294
295      <listitem>
296       <para>
297        Remove code that prevented unary minus of floating-point values from
298        producing '-0' (Tom)
299       </para>
300
301       <para>
302         The changed behavior is more IEEE-standards compliant.
303       </para>
304      </listitem>
305
306      <listitem>
307       <para>
308        Throw an error of an escape character is the last character in a LIKE
309        pattern (nothing to escape) (Tom)
310       </para>
311      </listitem>
312
313      <listitem>
314       <para>
315        Have to_char()'s localized month/day names depend on LC_TIME, not
316        LC_MESSAGES (Euler Taveira de Oliveira)
317       </para>
318      </listitem>
319
320      <listitem>
321       <para>
322        Cause to_date() and to_timestamp() to more consistently report errors on
323        invalid input (Brendan Jurd)
324       </para>
325      </listitem>
326
327      <listitem>
328       <para>
329        Provide consistent rounding for fractional seconds (Ron Mayer) bjm:
330        combine with another item?
331       </para>
332      </listitem>
333
334      <listitem>
335       <para>
336        Fix to_timestamp() to not require upper/lower case matching for meridian
337        (AM/PM) and era (BC/AD) format designations  (Brendan Jurd)
338       </para>
339      </listitem>
340
341      <listitem>
342       <para>
343        Require the existence of periods in to_timestamp() meridian
344        (AM/PM) and era (BC/AD) format designations to match (Brendan Jurd)
345       </para>
346
347       <para>
348        For example, input value 'AD' does not match format string 'A.D.'.
349       </para>
350      </listitem>
351
352      <listitem>
353       <para>
354        Remove ~=~ and ~<>~ operators used for LIKE index comparisons (Tom) bjm:
355        needed?  
356       </para>
357
358       <para>
359        A not-immediately-obvious incompatibility is that the sort order within
360        bpchar_pattern_ops indexes changes --- it had been identical to plain
361        strcmp, but is now trailing-blank-insensitive.  This will impact
362        in-place upgrades, if those ever happen.
363       </para>
364      </listitem>
365
366     </itemizedlist>
367
368    </sect3>
369
370   </sect2>
371
372   <sect2>
373    <title>Changes</title>
374
375    <para>
376     Below you will find a detailed account of the
377     changes between <productname>PostgreSQL</productname> 8.4 and
378     the previous major release.
379    </para>
380
381    <sect3>
382     <title>Performance</title>
383     <itemizedlist>
384
385      <listitem>
386       <para>
387        Improve optimizer statistics calculations (Tom, Jan
388        Urbanski)
389       </para>
390
391       <para>
392        This includes improved statistics for full text columns.
393       </para>
394      </listitem>
395
396      <listitem>
397       <para>
398        Allow SELECT DISTINCT and UNION/INTERSECT/EXCEPT to use hashing (Tom)
399       </para>
400
401       <para>
402        This causes SELECT DISTINCT no longer always produces sorted output;
403        add an ORDER BY clause. The old SELECT DISTINCT behavior can be
404        restored by disabling enable_hashagg. SELECT DISTINCT ON does not use
405        hashing. bjm: enable_hashagg accurate?
406       </para>
407      </listitem>
408
409      <listitem>
410       <para>
411        New semi- and ansi-joins (Tom)
412       </para>
413
414       <para>
415        While semi-joins merely replace existing IN joins, anti-joins
416        are a new capability for NOT IN and NOT EXIST clauses (Tom)
417        This improves optimization possibilities.
418       </para>
419      </listitem>
420
421      <listitem>
422       <para>
423        Improve IN/ANY/EXISTS processing (Tom)
424       </para>
425
426       <para>
427        IN and EXISTs now provide similar performance for equivalent clauses.
428       </para>
429      </listitem>
430
431      <listitem>
432       <para>
433        Improve the performance of text_position() and related functions by
434        using Boyer-Moore-Horspool searching (David Rowley)
435       </para>
436
437       <para>
438        This is particularly useful for long search patterns.
439       </para>
440      </listitem>
441
442      <listitem>
443       <para>
444        Improve handling of subqueries by the optimizer (Tom)
445       </para>
446      </listitem>
447
448      <listitem>
449       <para>
450        Reduce I/O frequency of writing the  backend statistics file by writing
451        the file only when requested (Martin Pihlak)
452       </para>
453      </listitem>
454
455      <listitem>
456       <para>
457        Improve performance for bulk inserts (Robert Haas, Simon)
458       </para>
459      </listitem>
460
461      <listitem>
462       <para>
463        Increase the default value of default_statistics_target from 10 to 100
464        (Tom)
465       </para>
466
467       <para>
468        The maximum value was also increased from 1000 to 10000.
469       </para>
470      </listitem>
471
472      <listitem>
473       <para>
474        Modify 'constraint_exclusion' to check for partitioned tables by default
475        when inheritance or UNION ALL is used (Tom)
476       </para>
477
478       <para>
479        A new constraint_exclusion setting, "partition", which matches this
480        behavior.
481       </para>
482      </listitem>
483
484      <listitem>
485       <para>
486        Allow I/O read-ahead for bitmap index scans (Greg Stark)
487       </para>
488
489       <para>
490        The amount of read-ahead is controlled by effective_io_concurrency.
491        This requires posix_fadvise() support in the kernel.
492       </para>
493      </listitem>
494
495      <listitem>
496       <para>
497        Inline simple set-returning SQL functions in FROM clauses (Richard Rowell)
498       </para>
499      </listitem>
500
501     </itemizedlist>
502
503    </sect3>
504
505    <sect3>
506     <title>TOAST</title>
507     <itemizedlist>
508
509      <listitem>
510       <para>
511        Consider TOAST compression on values as short as 32 bytes (previously
512        256 bytes) (Tom)
513       </para>
514      </listitem>
515
516      <listitem>
517       <para>
518        Require 25% of space savings before using TOAST compression (previously
519        20%) (Tom)
520       </para>
521      </listitem>
522
523      <listitem>
524       <para>
525        Be more aggressive in storing EXTERNAL and EXTENDED column values in
526        TOAST (Tom)
527       </para>
528      </listitem>
529
530     </itemizedlist>
531
532    </sect3>
533
534    <sect3>
535     <title>Server Settings</title>
536     <itemizedlist>
537
538      <listitem>
539       <para>
540        Convert many postgresql.conf settings to enumerated values so
541        pg_settings can easily display valid values (Magnus)
542       </para>
543      </listitem>
544
545      <listitem>
546       <para>
547        Add postgresql.conf setting cursor_tuple_fraction to control the 
548        fraction of a cursor's rows expected to be requested by the user (Robert
549        Hell)
550       </para>
551      </listitem>
552
553      <listitem>
554       <para>
555        Allow underscores in postgresql.conf custom variable classes (Tom)
556       </para>
557      </listitem>
558
559     </itemizedlist>
560
561    </sect3>
562
563    <sect3>
564     <title>Monitoring</title>
565     <itemizedlist>
566
567      <listitem>
568       <para>
569        Add pg_conf_load_time() function to report when the Postgres configuration
570        files were last loaded (George Gensure)
571       </para>
572      </listitem>
573
574      <listitem>
575       <para>
576        Add pg_terminate_backend() to safely terminate a backend (the SIGTERM
577        signal also works) (Tom, Bruce)
578       </para>
579      </listitem>
580
581      <listitem>
582       <para>
583        Add ability to track user-defined functions call counts and runtimes via
584        postgresql.conf variable 'track_functions' (Martin Pihlak)
585       </para>
586
587       <para>
588        Function statistics appear in a new system table, pg_stat_user_functions.
589        However, inlined SQL functions are not tracked.
590       </para>
591      </listitem>
592
593      <listitem>
594       <para>
595        Allow specification of the maximum pg_stat_activity query string size
596        via postgresql.conf variable track_activity_query_size (Thomas Lee)
597       </para>
598      </listitem>
599
600      <listitem>
601       <para>
602        Improve syslog performance by increasing the maximum line length
603        (Tom)
604       </para>
605      </listitem>
606
607      <listitem>
608       <para>
609        Add read-only postgresql.conf variables segment_size, wal_block_size,
610        and wal_segment_size (Bernd Helmle)
611       </para>
612      </listitem>
613
614      <listitem>
615       <para>
616        When reporting a deadlock, report all session queries involved in the
617        deadlock to the server log  (Itagaki Takahiro)
618       </para>
619      </listitem>
620
621      <listitem>
622       <para>
623        New pg_stat_get_activity(pid) function to return information about a
624        specific process id (Magnus)
625       </para>
626      </listitem>
627
628      <listitem>
629       <para>
630        Move that server statistics file into the subdirectory pg_stat_tmp
631        (Magnus)
632       </para>
633
634       <para>
635        This allows the statistics file to be placed in a RAM-resident
636        directory to reduce I/O requirements.  On startup/shutdown, the
637        file is copied to the top-level $PGDATA directory so it is preserved
638        between restarts.
639       </para>
640      </listitem>
641
642      <listitem>
643       <para>
644        Allow the location of the new pg_stat_tmp to be configured via
645        the stats_temp_directory setting (Magnus)
646
647       </para>
648      </listitem>
649
650     </itemizedlist>
651
652    </sect3>
653
654    <sect3>
655     <title>pg_hba.conf</title>
656     <itemizedlist>
657
658      <listitem>
659       <para>
660        Parse pg_hba.conf in the postmaster so errors are reported on reload
661        (Magnus)
662       </para>
663      </listitem>
664
665      <listitem>
666       <para>
667        Make pg_hba.conf "sameuser" an optional argument for ident
668        authentication (Magnus)
669       </para>
670      </listitem>
671
672      <listitem>
673       <para>
674        Change all pg_hba.conf authentication options to be 'name=value'
675        settings (Magnus)
676       </para>
677      </listitem>
678
679      <listitem>
680       <para>
681        Allow 'ident' authentication over Unix-domain sockets on Solaris (Garick
682        Hamlin)
683       </para>
684      </listitem>
685
686      <listitem>
687       <para>
688        Add pg_hba.conf option "clientcert" to control requesting of a client
689        certificate (Magnus)
690       </para>
691
692       <para>
693        Previously this was controlled by the presence of a root certificate
694        file in the server's data directory.
695       </para>
696      </listitem>
697
698      <listitem>
699       <para>
700        Add pg_hba.conf "cert" authentication method to allow user
701        authentication via SSL certificates (Magnus)
702       </para>
703
704       <para>
705        Previously SSL certificates could only authenticate hosts, not users.
706       </para>
707      </listitem>
708
709      <listitem>
710       <para>
711        Allow krb5, gssapi and sspi realm and krb5 host settings to be specified
712        in pg_hba.conf (Magnus)
713       </para>
714
715       <para>
716        These override the settings in postgresql.conf.
717       </para>
718      </listitem>
719
720      <listitem>
721       <para>
722        Addkrb5, gssapi and sspi 'include_realm' parameter to pg_hba.conf
723        (Magnus)
724       </para>
725
726       <para>
727        This allows identical usernames from different realms to be
728        authenticated as different database users. bjm: correct?
729       </para>
730      </listitem>
731
732      <listitem>
733       <para>
734        Issue a warning rather than shut down when pg_hba.conf can't be loaded
735        (Selena Deckelmann)
736       </para>
737      </listitem>
738
739     </itemizedlist>
740
741    </sect3>
742
743    <sect3>
744     <title>Authentication</title>
745     <itemizedlist>
746
747      <listitem>
748       <para>
749        Report appropriate error message for combination of MD5 authentication
750        and db_user_namespace enabled (Bruce)
751       </para>
752      </listitem>
753
754      <listitem>
755       <para>
756        Support regular expressions in pg_ident.conf (Magnus)
757       </para>
758      </listitem>
759
760      <listitem>
761       <para>
762        Allow Kerberos/GSSAPI parameters to be changed without restarting the
763        postmaster (Magnus)
764       </para>
765      </listitem>
766
767     </itemizedlist>
768
769    </sect3>
770
771    <sect3>
772     <title>Continuous Archiving</title>
773     <itemizedlist>
774
775      <listitem>
776       <para>
777        Have pg_stop_backup() wait for modified WAL files to be archived (Simon)
778       </para>
779
780       <para>
781        This guarantees that the backup is valid at the time pg_stop_backup()
782        completes.
783       </para>
784      </listitem>
785
786      <listitem>
787       <para>
788        Prevent normal shutdown if a continuous archiving base backup is in
789        progress (Laurenz Albe)
790       </para>
791      </listitem>
792
793      <listitem>
794       <para>
795        Cancel a continuous archiving base backup if a fast shutdown is requested
796        (Laurenz Albe)
797       </para>
798      </listitem>
799
800      <listitem>
801       <para>
802        Allow recovery.conf boolean variables to take the same range of string
803        alues as postgresql.conf (Bruce)
804       </para>
805      </listitem>
806
807     </itemizedlist>
808
809    </sect3>
810
811    <sect3>
812     <title>Queries</title>
813     <itemizedlist>
814
815      <listitem>
816       <para>
817        Add support for WINDOW functions (Hitoshi Harada)
818       </para>
819      </listitem>
820
821      <listitem>
822       <para>
823        Add WITH clauses support, including WITH RECURSIVE (Yoshiyuki Asaba,
824        Tatsuo Ishii, Tom)
825       </para>
826      </listitem>
827
828      <listitem>
829       <para>
830        New TABLE command (Peter)
831       </para>
832
833       <para>
834        "TABLE tablename" is a short-hand for "SELECT * FROM tablename".
835       </para>
836      </listitem>
837
838      <listitem>
839       <para>
840        Allow AS to be optional when specifying a SELECT (or RETURNING) column
841        output label (assuming the label is not an SQL keyword) (Hiroshi Saito)
842       </para>
843      </listitem>
844
845      <listitem>
846       <para>
847        Support set-returning functions in the target lists of Agg and Group plan
848        nodes.  This is a pretty ugly feature but since we don't yet have a
849        plausible substitute, we'd better support it everywhere (Tom) bjm:
850        details?
851       </para>
852      </listitem>
853
854      <listitem>
855       <para>
856        Allow SELECT FOR UPDATE/SHARE to work on inheritance trees (Tom)
857       </para>
858      </listitem>
859
860      <listitem>
861       <para>
862        Add infrastructure for SQL/MED (Martin Pihlak, Peter)
863       </para>
864
865       <para>
866        There are no remote or external SQL/MED capabilities yet. bjm:
867        accurate?
868       </para>
869      </listitem>
870
871      <listitem>
872       <para>
873        Invalidate cached plans when schemas, operators, or operator classes are
874        modified (Tom) bjm: effect?
875       </para>
876      </listitem>
877
878      <listitem>
879       <para>
880        Improve the plan cache invalidation mechanism to make it invalidate plans
881        when user-defined functions used in a plan are modified (Tom, Martin
882        Pihlak) bjm: explain
883       </para>
884      </listitem>
885
886      <listitem>
887       <para>
888        Allow comparison of composite types and allow arrays of
889        possibly-anonymous composite types (Tom)  bjm: clear?
890       </para>
891
892       <para>
893        Specifically this allows 'array[ row(1,2), row(3,4)]' and 'row(1,1.1)
894        = any (array[ row(7,7.7), row(1,1.0)'.  This is particularly useful
895        for recursive queries.
896       </para>
897      </listitem>
898
899      <listitem>
900       <para>
901        Add support for Unicode sting and identifier specifications using code
902        points, e.g. U&'d\0061t\+000061' (Peter)
903       </para>
904      </listitem>
905
906      <listitem>
907       <para>
908        Improve the parser's ability to report the error location of a query
909        (Tom)
910       </para>
911      </listitem>
912
913     </itemizedlist>
914
915    </sect3>
916
917    <sect3>
918     <title>LIMIT/OFFSET</title>
919     <itemizedlist>
920
921      <listitem>
922       <para>
923        Allow LIMIT and OFFSET to use subselects as arguments (Tom)
924       </para>
925      </listitem>
926
927      <listitem>
928       <para>
929        Document that LIMIT NULL and OFFSET NULL have no effect (Tom)
930       </para>
931      </listitem>
932
933      <listitem>
934       <para>
935        Add SQL-standards syntax for LIMIT/OFFSET capabilities (Peter)
936       </para>
937      </listitem>
938
939      <listitem>
940       <para>
941         OFFSET num {ROW|ROWS} FETCH {FIRST|NEXT} [num] {ROW|ROWS} ONLY.
942       </para>
943      </listitem>
944
945     </itemizedlist>
946
947    </sect3>
948
949    <sect3>
950     <title>ALTER TABLE</title>
951     <itemizedlist>
952
953      <listitem>
954       <para>
955        Add ALTER TYPE RENAME (Petr Jelinek)
956       </para>
957      </listitem>
958
959      <listitem>
960       <para>
961        Add ALTER SEQUENCE ... RESTART (no parameter) to reset a sequence to its
962        initial value (Zoltan Boszormenyi)  bjm: compatibility problem?
963       </para>
964      </listitem>
965
966      <listitem>
967       <para>
968        Modify the ALTER TABLE syntax to allow all reasonable combinations for
969        tables, indexes, sequences, and views (Tom)
970       </para>
971      </listitem>
972
973      <listitem>
974       <para>
975         New syntax supported (these formerly required "ALTER TABLE")
976       </para>
977      </listitem>
978
979      <listitem>
980       <para>
981        <itemizedlist>
982         <listitem>
983          <para>
984           ALTER SEQUENCE OWNER TO
985          </para>
986         </listitem>
987         <listitem>
988          <para>
989           ALTER VIEW ALTER COLUMN SET/DROP DEFAULT
990          </para>
991         </listitem>
992         <listitem>
993          <para>
994           ALTER VIEW OWNER TO
995          </para>
996         </listitem>
997         <listitem>
998          <para>
999           ALTER VIEW SET SCHEMA
1000          </para>
1001         </listitem>
1002        </itemizedlist>
1003       </para>
1004      </listitem>
1005
1006      <listitem>
1007       <para>
1008        Add support for the syntax ALTER TABLE ... ALTER COLUMN ... SET DATA
1009        TYPE (Peter)
1010       </para>
1011
1012       <para>
1013        This is SQL-standard syntax for functionality that was already
1014        supported.
1015       </para>
1016      </listitem>
1017
1018      <listitem>
1019       <para>
1020        Have ALTER TABLE SET WITHOUT OIDS rewrite the table to remove oid values
1021        (Tom)
1022       </para>
1023
1024       <para>
1025        Also, add ALTER TABLE SET WITH OIDS to rewrite the table to add oids.
1026       </para>
1027      </listitem>
1028
1029      <listitem>
1030       <para>
1031        Add ALTER DATABASE SET TABLESPACE to move a database to a new tablespace
1032        (Guillaume Lelarge, Bernd Helmle)
1033       </para>
1034      </listitem>
1035
1036     </itemizedlist>
1037
1038    </sect3>
1039
1040    <sect3>
1041     <title>TRUNCATE</title>
1042     <itemizedlist>
1043
1044      <listitem>
1045       <para>
1046        Support statement-level ON TRUNCATE triggers (Simon)
1047       </para>
1048      </listitem>
1049
1050      <listitem>
1051       <para>
1052        Add TRUNCATE TABLE ... RESTART/CONTINUE IDENTITY clauses (Zoltan
1053        Boszormenyi)
1054       </para>
1055
1056       <para>
1057        The start value of a sequence can be changed by ALTER SEQUENCE START
1058        WITH.
1059       </para>
1060      </listitem>
1061
1062      <listitem>
1063       <para>
1064        Allow TRUNCATE foo, foo to succeed (Bruce)
1065       </para>
1066      </listitem>
1067
1068      <listitem>
1069       <para>
1070        Add a separate TRUNCATE permission (Robert Haas)
1071       </para>
1072      </listitem>
1073
1074     </itemizedlist>
1075
1076    </sect3>
1077
1078    <sect3>
1079     <title>Database Operations</title>
1080     <itemizedlist>
1081
1082      <listitem>
1083       <para>
1084        Improve reporting of CREATE/DROP/RENAME DATABASE failure when
1085        uncommitted prepared transactions are the cause (Tom)
1086       </para>
1087      </listitem>
1088
1089      <listitem>
1090       <para>
1091        Make LC_COLLATE and LC_CTYPE database-level settings (Radek Strnad, Heikki)
1092       </para>
1093
1094       <para>
1095        This makes collation similar to encoding, which was always configurable
1096        per database.
1097       </para>
1098      </listitem>
1099
1100      <listitem>
1101       <para>
1102        Improve checks that the database encoding, collation (LC_COLLATE), and
1103        character classes (LC_CTYPE) match (Heikki)
1104       </para>
1105      </listitem>
1106
1107     </itemizedlist>
1108
1109    </sect3>
1110
1111    <sect3>
1112     <title>Object Manipulation</title>
1113     <itemizedlist>
1114
1115      <listitem>
1116       <para>
1117        Add support for column-level privileges (Stephen Frost, KaiGai Kohei)
1118       </para>
1119      </listitem>
1120
1121      <listitem>
1122       <para>
1123        Improve reporting of dependencies during DROP commands (Alex Hunsaker)
1124       </para>
1125      </listitem>
1126
1127      <listitem>
1128       <para>
1129        Refactor multi-object DROP operations so conflicting dependencies don't
1130        generate an error (Alex Hunsaker)
1131       </para>
1132      </listitem>
1133
1134      <listitem>
1135       <para>
1136        Add WITH [NO] DATA clause to CREATE TABLE AS, per the SQL standard (Tom, Peter)
1137       </para>
1138      </listitem>
1139
1140      <listitem>
1141       <para>
1142        Add support for user-defined I/O conversion casts (Heikki)
1143       </para>
1144      </listitem>
1145
1146      <listitem>
1147       <para>
1148        Allow CREATE AGGREGATE to user an "internal" transition datatype (for
1149        super-users only)  (Tom)
1150       </para>
1151      </listitem>
1152
1153      <listitem>
1154       <para>
1155        Add LIKE clause to CREATE TYPE (Tom)
1156       </para>
1157
1158       <para>
1159        This simplifies creation of data types like existing types.
1160       </para>
1161      </listitem>
1162
1163      <listitem>
1164       <para>
1165        Allow CREATE OR REPLACE VIEW to add columns to the _end_ of the view
1166        (Robert Haas)
1167       </para>
1168      </listitem>
1169
1170     </itemizedlist>
1171
1172    </sect3>
1173
1174    <sect3>
1175     <title>Vacuum</title>
1176     <itemizedlist>
1177
1178      <listitem>
1179       <para>
1180        Allow relation forks to track free space (Heikki)
1181       </para>
1182
1183       <para>
1184        This allows the recording of all free space discovered by vacuum in
1185        *.fsm files, rather than having to limit recording to a fixed-sized
1186        shared memory area;  max_fsm_pages and max_fsm_relations settings
1187        have been removed.
1188       </para>
1189      </listitem>
1190
1191      <listitem>
1192       <para>
1193        New visibility map file to track pages that do not require vacuum
1194        (Heikki)
1195       </para>
1196
1197       <para>
1198        This allows VACUUM to avoid sequentially scanning a table when only a
1199        portion of the table needs vacuuming.
1200       </para>
1201      </listitem>
1202
1203      <listitem>
1204       <para>
1205        Track explicit transaction snapshots (Alvaro)
1206       </para>
1207
1208       <para>
1209        This improves space reuse by vacuum in the presence of long-running
1210        transactions.
1211       </para>
1212      </listitem>
1213
1214      <listitem>
1215       <para>
1216        Add vacuum_freeze_table_age to postgresql.conf to control when VACUUM should
1217        ignore the visibility map and do a full table scan to set frozen xids
1218        (Heikki)
1219       </para>
1220      </listitem>
1221
1222      <listitem>
1223       <para>
1224        Add ability to specify autovacuum and TOAST parameters in
1225        CREATE TABLE (Alvaro, Euler Taveira de Oliveira)
1226       </para>
1227
1228       <para>
1229        Autovacuum options uses to be stored in a system table.
1230       </para>
1231      </listitem>
1232
1233      <listitem>
1234       <para>
1235        Add --freeze option to vacuumdb (Bruce)
1236       </para>
1237      </listitem>
1238
1239     </itemizedlist>
1240
1241    </sect3>
1242
1243    <sect3>
1244     <title>EXPLAIN</title>
1245     <itemizedlist>
1246
1247      <listitem>
1248       <para>
1249        Have EXPLAIN VERBOSE show the output columns of a query (Tom)
1250       </para>
1251
1252       <para>
1253        Previously EXPLAIN VERBOSE output an internal representation of the
1254        output columns.
1255       </para>
1256      </listitem>
1257
1258      <listitem>
1259       <para>
1260        Have EXPLAIN honor debug_print_plan (Tom)  bjm: verify behavior, this
1261        replaces EXPLAIN VERBOSE?
1262       </para>
1263      </listitem>
1264
1265      <listitem>
1266       <para>
1267        Allow EXPLAIN on CREATE TABLE AS (Peter)
1268       </para>
1269      </listitem>
1270
1271     </itemizedlist>
1272
1273    </sect3>
1274
1275    <sect3>
1276     <title>Other Utility Operations</title>
1277     <itemizedlist>
1278
1279      <listitem>
1280       <para>
1281        Add verbose option to the CLUSTER command and clusterdb (Jim Cox)
1282       </para>
1283      </listitem>
1284
1285      <listitem>
1286       <para>
1287        Decrease memory requirements for recording pending trigger events (Tom)
1288       </para>
1289      </listitem>
1290
1291     </itemizedlist>
1292
1293    </sect3>
1294
1295    <sect3>
1296     <title>General Data Types</title>
1297     <itemizedlist>
1298
1299      <listitem>
1300       <para>
1301        Add a CaseSensitive option for text search synonym dictionaries (Simon)
1302       </para>
1303      </listitem>
1304
1305      <listitem>
1306       <para>
1307        Improve the precision of NUMERIC division (Tom)
1308       </para>
1309      </listitem>
1310
1311      <listitem>
1312       <para>
1313        Add int2 with int8 basic arithmetic operators (Tom)
1314       </para>
1315
1316       <para>
1317        This simplifies casting requirements.
1318       </para>
1319      </listitem>
1320
1321      <listitem>
1322       <para>
1323        Allow UUID input to accept optional hyphens after every four digits
1324        (Robert Haas)
1325       </para>
1326      </listitem>
1327
1328      <listitem>
1329       <para>
1330        Accept 'on'/'off' as boolean data type values (ITAGAKI Takahiro)
1331       </para>
1332      </listitem>
1333
1334     </itemizedlist>
1335
1336    </sect3>
1337
1338    <sect3>
1339     <title>Temporal Data Types</title>
1340     <itemizedlist>
1341
1342      <listitem>
1343       <para>
1344        Reject year '0 BC' and years '000' and '0000' (Tom)
1345       </para>
1346
1347       <para>
1348        Previously these were interpreted as 1 BC.  (Years '0' and '00' are
1349        assumed to be the year 2000.)
1350       </para>
1351      </listitem>
1352
1353      <listitem>
1354       <para>
1355        Include SGT (Singapore time) as a valid timezone abbreviation (Tom)
1356       </para>
1357      </listitem>
1358
1359      <listitem>
1360       <para>
1361        Support the IS0 8601 time interval syntax (Tom) bjm: sufficient?
1362       </para>
1363
1364       <para>
1365        For example, INTERVAL 'P1Y2M3DT4H5M6.7S' is now supported.
1366       </para>
1367      </listitem>
1368
1369      <listitem>
1370       <para>
1371        Allow the interval precision to be specified after the last field, for
1372        SQL-standards compliance (Tom)
1373       </para>
1374
1375       <para>
1376        Formerly the precision had to be specified after the keyword INTERVAL
1377        (the old syntax is still supported).  Data type definitions will now
1378        be output using the new format.
1379       </para>
1380      </listitem>
1381
1382      <listitem>
1383       <para>
1384        Support 'infinite' dates (Tom)
1385       </para>
1386      </listitem>
1387
1388      <listitem>
1389       <para>
1390        Add postgresql.conf variable IntervalStyle which controls how interval
1391        values are output (Ron Mayer)
1392       </para>
1393
1394       <para>
1395        Valid value are:  postgres, postgres_verbose, sql_standard, iso_8601.
1396        This also controls handling of negative interval input when only some
1397        fields have positive/negative designations.
1398       </para>
1399      </listitem>
1400
1401      <listitem>
1402       <para>
1403        Increase the number of fractional seconds digits displayed by intervals (Ron
1404        Mayer)
1405       </para>
1406      </listitem>
1407
1408      <listitem>
1409       <para>
1410        Increase variability in the number of fractional seconds digits
1411        displayed (Ron Mayer)
1412       </para>
1413      </listitem>
1414
1415     </itemizedlist>
1416
1417    </sect3>
1418
1419    <sect3>
1420     <title>General Functions</title>
1421     <itemizedlist>
1422
1423      <listitem>
1424       <para>
1425        Document that setseed() allows values from -1 to 1 (not 0 to 1), and
1426        enforce the valid range (Kris Jurka)
1427       </para>
1428      </listitem>
1429
1430      <listitem>
1431       <para>
1432        Add server side lo_import(filename, oid) function (Tatsuo)
1433       </para>
1434      </listitem>
1435
1436      <listitem>
1437       <para>
1438        Add quote_nullable(), which behaves like quote_literal() but returns
1439        'NULL' for a null argument (Brendan Jurd)
1440       </para>
1441      </listitem>
1442
1443      <listitem>
1444       <para>
1445        Improve full text search headline() generation to allow several
1446        fragments (Sushant Sinha)
1447       </para>
1448      </listitem>
1449
1450      <listitem>
1451       <para>
1452        Add suppress_redundant_updates_trigger() trigger function to avoid
1453        non-data-changing updates (Andrew)
1454       </para>
1455      </listitem>
1456
1457      <listitem>
1458       <para>
1459        Add div(NUMERIC, NUMERIC) for NUMERIC division, without rounding (Tom)
1460       </para>
1461      </listitem>
1462
1463      <listitem>
1464       <para>
1465        Add timestamp and timestamptz versions of generate_series() (Hitoshi
1466        Harada)
1467       </para>
1468      </listitem>
1469
1470     </itemizedlist>
1471
1472    </sect3>
1473
1474    <sect3>
1475     <title>Database Informational Functions</title>
1476     <itemizedlist>
1477
1478      <listitem>
1479       <para>
1480        Implement current_query() for use by functions that need to know the
1481        currently running query (Tomas Doran)
1482       </para>
1483      </listitem>
1484
1485      <listitem>
1486       <para>
1487        Add pg_get_keywords() function to return predefined parser keywords
1488        (Dave Page)
1489       </para>
1490      </listitem>
1491
1492      <listitem>
1493       <para>
1494        Add function pg_get_functiondef() to see a functions definition (Abhijit
1495        Menon-Sen)
1496       </para>
1497      </listitem>
1498
1499      <listitem>
1500       <para>
1501        Modify pg_relation_size() to handle free space map (*.fsm) files
1502        (Heikki)
1503       </para>
1504      </listitem>
1505
1506      <listitem>
1507       <para>
1508        Modify pg_relation_size() to use 'regclass' (Heikki)
1509       </para>
1510
1511       <para>
1512        pg_relation_size(data_type_name) no longer works.
1513       </para>
1514      </listitem>
1515
1516      <listitem>
1517       <para>
1518        Add boot_val and reset_val columns to pg_settings output (Greg Smith)
1519       </para>
1520      </listitem>
1521
1522      <listitem>
1523       <para>
1524        Add support for CURRENT_CATALOG, CURRENT_SCHEMA, SET CATALOG, SET SCHEMA
1525        (Peter)
1526       </para>
1527
1528       <para>
1529        These are SQL-standard capabilities.
1530       </para>
1531      </listitem>
1532
1533      <listitem>
1534       <para>
1535        Add pg_typeof() function to return the data type of any value (Brendan
1536        Jurd)
1537       </para>
1538      </listitem>
1539
1540      <listitem>
1541       <para>
1542        Have version() return information about whether the server is a 32
1543        or 64-bit binary (Bruce)
1544       </para>
1545      </listitem>
1546
1547      <listitem>
1548       <para>
1549        Fix the behavior of information schema columns is_insertable_into and
1550        is_updatable to be consistent (Peter)
1551       </para>
1552      </listitem>
1553
1554      <listitem>
1555       <para>
1556        Convert remaining builtin set-returning functions to use OUT parameters
1557        (Jaime Casanova)
1558       </para>
1559
1560       <para>
1561        This makes it possible to call these functions without specifying
1562        a column list:  pg_show_all_settings(), pg_lock_status(),
1563        pg_prepared_xact(), pg_prepared_statement(), pg_cursor()
1564       </para>
1565      </listitem>
1566
1567      <listitem>
1568       <para>
1569        Have pg_*_is_visible and has_*_privilege functions return NULL for
1570        invalid oids, rather than generate an error (Tom)
1571       </para>
1572      </listitem>
1573
1574      <listitem>
1575       <para>
1576        Add has_column_privilege() and has_any_column_privilege() functions
1577        (Stephen Frost, Tom)
1578       </para>
1579      </listitem>
1580
1581     </itemizedlist>
1582
1583    </sect3>
1584
1585    <sect3>
1586     <title>Function Creation</title>
1587     <itemizedlist>
1588
1589      <listitem>
1590       <para>
1591        Support variadic functions (functions with a variable number of
1592        arguments) (Pavel Stehule)
1593       </para>
1594
1595       <para>
1596        Only trailing arguments can be of variable length, and they all must
1597        be of the same data type.
1598       </para>
1599      </listitem>
1600
1601      <listitem>
1602       <para>
1603        Allow DEFAULT values for function arguments (Pavel Stehule)
1604       </para>
1605      </listitem>
1606
1607      <listitem>
1608       <para>
1609        Add CREATE FUNCTION ... RETURNS TABLE clause (Pavel Stehule)
1610       </para>
1611      </listitem>
1612
1613      <listitem>
1614       <para>
1615        Allow SQL-language functions to return the output of an INSERT/UPDATE/DELETE
1616        RETURNING clause (Tom)
1617       </para>
1618
1619       <para>
1620        Formerly only SELECT was supported.
1621       </para>
1622      </listitem>
1623
1624     </itemizedlist>
1625
1626    </sect3>
1627
1628    <sect3>
1629     <title>Arrays</title>
1630     <itemizedlist>
1631
1632      <listitem>
1633       <para>
1634        Have cast on ARRAY[] apply to all elements, not just the array result
1635        (Brendan Jurd)
1636       </para>
1637
1638       <para>
1639        This allows NULL ARRAY[] entries as long as it is properly cast
1640       </para>
1641      </listitem>
1642
1643      <listitem>
1644       <para>
1645        Make the SQL ARRAY dimensions optional to match the SQL standard
1646        (Peter)
1647       </para>
1648      </listitem>
1649
1650      <listitem>
1651       <para>
1652        Add array_ndims() function to return the number of dimensions of an array (Robert
1653        Haas)
1654       </para>
1655      </listitem>
1656
1657      <listitem>
1658       <para>
1659        Add array_length() function to return the length of an array for the
1660        specified dimensions (Jim Nasby, Robert Haas, Peter Eisentraut)
1661       </para>
1662
1663       <para>
1664        Also add identically-functioning SQL-standard function cardinality().
1665       </para>
1666      </listitem>
1667
1668      <listitem>
1669       <para>
1670        Add new aggregate function array_agg(), which returns all aggregated
1671        values as a single array (Robert Haas, Jeff Davis, Peter)
1672       </para>
1673      </listitem>
1674
1675      <listitem>
1676       <para>
1677        Add function unnest(), which converts an array to individual row values
1678        (Tom)
1679       </para>
1680
1681       <para>
1682        This is the opposite of array_agg().
1683       </para>
1684      </listitem>
1685
1686      <listitem>
1687       <para>
1688        Add array_fill() to create arrays initialized with a value (Pavel Stehule)
1689       </para>
1690      </listitem>
1691
1692      <listitem>
1693       <para>
1694        Add generate_subscripts() to generate array subscripts (Pavel Stehule)
1695       </para>
1696      </listitem>
1697
1698      <listitem>
1699       <para>
1700        Generate proper error if a SERIAL array is specified (Tom)
1701       </para>
1702      </listitem>
1703
1704     </itemizedlist>
1705
1706    </sect3>
1707
1708    <sect3>
1709     <title>Indexes</title>
1710     <itemizedlist>
1711
1712      <listitem>
1713       <para>
1714        Dramatically improve the speed of building and accessing hash indexes
1715        (Tom Raney, Shreya Bhargava, Kenneth Marshall, Tom) 
1716       </para>
1717
1718       <para>
1719        This allows hash indexes to be often faster than btree indexes.
1720        However, hash indexes are still not crash-safe.
1721       </para>
1722      </listitem>
1723
1724      <listitem>
1725       <para>
1726        Have hash indexes store only the hashed value, not the full indexed
1727        columns (Xiao Meng)
1728       </para>
1729
1730       <para>
1731        This greatly reduces the size of hash indexes for long indexed
1732        values, and improves performance.
1733       </para>
1734      </listitem>
1735
1736      <listitem>
1737       <para>
1738        Remove requirement to use "@@@" when doing GIN weighted lookups on full
1739        text indexes (Tom)
1740       </para>
1741      </listitem>
1742
1743      <listitem>
1744       <para>
1745        Add optimizer selectivity function for '@@' text search operations (Jan
1746        Urbanski)
1747       </para>
1748      </listitem>
1749
1750      <listitem>
1751       <para>
1752        Add partial match support for GIN indexes (Teodor Sigaev, Oleg Bartunov)
1753       </para>
1754      </listitem>
1755
1756      <listitem>
1757       <para>
1758        Allow prefix matching in full text searches (Teodor Sigaev, Oleg
1759        Bartunov)
1760       </para>
1761      </listitem>
1762
1763      <listitem>
1764       <para>
1765        Support multi-column GIN indexes (Teodor Sigaev)
1766       </para>
1767      </listitem>
1768
1769      <listitem>
1770       <para>
1771        Special xxx_pattern_ops LIKE indexes can now be used for simple equality
1772        comparisons (Tom)
1773       </para>
1774      </listitem>
1775
1776     </itemizedlist>
1777
1778    </sect3>
1779
1780    <sect3>
1781     <title>PL/PgSQL Server-Side Language</title>
1782     <itemizedlist>
1783
1784      <listitem>
1785       <para>
1786        Support EXECUTE USING in PL/pgSQL (Pavel Stehule)
1787       </para>
1788      </listitem>
1789
1790      <listitem>
1791       <para>
1792        Allow PL/pgSQL to loop over an open cursor using a FOR loop (Pavel
1793        Stehule)
1794       </para>
1795      </listitem>
1796
1797      <listitem>
1798       <para>
1799        Support RETURN QUERY EXECUTE in PL/pgSQL (Pavel Stehule)
1800       </para>
1801      </listitem>
1802
1803      <listitem>
1804       <para>
1805        Improve the PL/pgSQL RAISE command (Pavel Stehule)
1806       </para>
1807      </listitem>
1808
1809      <listitem>
1810       <para>
1811        <itemizedlist>
1812         <listitem>
1813          <para>
1814           Support DETAIL and HINT fields
1815          </para>
1816         </listitem>
1817         <listitem>
1818          <para>
1819           Support SQLSTATE error codes
1820          </para>
1821         </listitem>
1822         <listitem>
1823          <para>
1824           Support an exception name parameter
1825          </para>
1826         </listitem>
1827         <listitem>
1828          <para>
1829           Allow RAISE without parameters in an exception
1830           block to rethrow the current error
1831          </para>
1832         </listitem>
1833        </itemizedlist>
1834       </para>
1835      </listitem>
1836
1837      <listitem>
1838       <para>
1839        Allow the specification of SQLSTATE numeric codes in EXCEPTION lists
1840        (Pavel Stehule)
1841       </para>
1842
1843       <para>
1844        This is useful for handling custom SQLSTATE codes.
1845       </para>
1846      </listitem>
1847
1848      <listitem>
1849       <para>
1850        Support CASE statement in PL/pgSQL (Pavel Stehule)
1851       </para>
1852      </listitem>
1853
1854      <listitem>
1855       <para>
1856        Add PL/PgSQL FOUND and GET DIAGNOSTICS support for the RETURN QUERY
1857         statement (Pavel Stehule)
1858       </para>
1859      </listitem>
1860
1861      <listitem>
1862       <para>
1863        Add PL/pgSQL translation (Alvaro)
1864       </para>
1865      </listitem>
1866
1867     </itemizedlist>
1868
1869    </sect3>
1870
1871    <sect3>
1872     <title>General <link linkend="APP-PSQL"><application>psql</></link></title>
1873     <itemizedlist>
1874
1875      <listitem>
1876       <para>
1877        Remove psql startup banner;  now just suggest 'help' (Joshua Drake)
1878       </para>
1879      </listitem>
1880
1881      <listitem>
1882       <para>
1883        Have psql 'help' show common backslash commands (Greg Sabino Mullane)
1884       </para>
1885      </listitem>
1886
1887      <listitem>
1888       <para>
1889        Add psql '\pset format wrapped' mode to wrap output to screen width, or
1890         file/pipe output too if \pset columns' is set (Bryce Nesbitt)
1891       </para>
1892      </listitem>
1893
1894      <listitem>
1895       <para>
1896        Use the psql pager for wide output (Bruce)
1897       </para>
1898      </listitem>
1899
1900      <listitem>
1901       <para>
1902        Require a space between a psql backslash command and the first argument (Bernd
1903        Helmle)
1904       </para>
1905      </listitem>
1906
1907      <listitem>
1908       <para>
1909        Display access control rights on multiple lines in psql (Brendan Jurd,
1910        Andreas Scherbaum)
1911       </para>
1912      </listitem>
1913
1914      <listitem>
1915       <para>
1916        Improve psql tab completion support for schema qualified and quoted
1917        identifiers (Greg Sabino Mullane)
1918       </para>
1919      </listitem>
1920
1921      <listitem>
1922       <para>
1923        Allow the normal range of boolean values in \pset, rather than just
1924        'on' and 'off' (Bruce)
1925       </para>
1926      </listitem>
1927
1928      <listitem>
1929       <para>
1930        Add optional on/off argument to psql \timing (David Fetter)
1931       </para>
1932      </listitem>
1933
1934      <listitem>
1935       <para>
1936        Have psql \l show access privileges (Andrew Gilligan)
1937       </para>
1938      </listitem>
1939
1940      <listitem>
1941       <para>
1942        Have psql \l+ show database sizes, if permissions allow (Andrew Gilligan)
1943       </para>
1944      </listitem>
1945
1946      <listitem>
1947       <para>
1948        Add psql \ef command to edit function definitions (Abhijit Menon-Sen)
1949       </para>
1950
1951       <para>
1952        \ef without a function names creates an empty function template for
1953        editing.
1954       </para>
1955      </listitem>
1956
1957     </itemizedlist>
1958
1959    </sect3>
1960
1961    <sect3>
1962     <title><link linkend="APP-PSQL"><application>psql</></link> \d*</title>
1963     <itemizedlist>
1964
1965      <listitem>
1966       <para>
1967        Have psql \d display references to this table as a foreign-key constraint
1968        (Kenneth D'Souza)
1969       </para>
1970      </listitem>
1971
1972      <listitem>
1973       <para>
1974        Have psql \d show the value of sequence columns (Euler Taveira de
1975        Oliveira)
1976       </para>
1977      </listitem>
1978
1979      <listitem>
1980       <para>
1981        Add column storage type and other relation options to psql \d+ display
1982        (Gregory Stark, Euler Taveira de Oliveira)
1983       </para>
1984      </listitem>
1985
1986      <listitem>
1987       <para>
1988        Show relation size in psql \d+ output (Dickson S. Guedes)
1989       </para>
1990      </listitem>
1991
1992      <listitem>
1993       <para>
1994        Have all psql \d* commands show system objects only if 'S' is specified
1995        (Greg Sabino Mullane)
1996       </para>
1997
1998       <para>
1999        psql \dt already behaved this way.
2000       </para>
2001      </listitem>
2002
2003      <listitem>
2004       <para>
2005        Make psql \d and \dt consistent in their display of system tables
2006        (Bruce)
2007       </para>
2008
2009       <para>
2010        Previously, '\d pg_class' would show pg_class while '\dt pg_class'
2011        would not.
2012       </para>
2013      </listitem>
2014
2015      <listitem>
2016       <para>
2017        Show enumerated values in psql's \dT+ (David Fetter)
2018       </para>
2019      </listitem>
2020
2021      <listitem>
2022       <para>
2023        Allow psql \dC to accept wildcard patterns (Tom)
2024       </para>
2025      </listitem>
2026
2027      <listitem>
2028       <para>
2029        Allow psql \d* commands to work with versions of Postgres back to 7.4
2030        (Guillaume Lelarge)
2031       </para>
2032      </listitem>
2033
2034     </itemizedlist>
2035
2036    </sect3>
2037
2038    <sect3>
2039     <title><link linkend="APP-PGDUMP"><application>pg_dump</></link></title>
2040     <itemizedlist>
2041
2042      <listitem>
2043       <para>
2044        Add --no-tablespaces option to pg_dump/pg_dumpall/pg_restore so dumps
2045        can be restored to clusters that have non-matching tablespace layouts
2046        (Gavin Roy)
2047       </para>
2048      </listitem>
2049
2050      <listitem>
2051       <para>
2052        Remove -i/--ignore-version option from pg_dump and pg_dumpall (Tom)
2053       </para>
2054
2055       <para>
2056        Use of the options does not throw an error, but it has no effect.
2057        This option was removed because the version checks are considered
2058        necessary.
2059       </para>
2060      </listitem>
2061
2062      <listitem>
2063       <para>
2064        Disable statement_timeout during dump and restore (Joshua Drake)
2065       </para>
2066      </listitem>
2067
2068      <listitem>
2069       <para>
2070        Add pg_dump/pg_dumpall option --lock-wait-timeout (David Gould)
2071       </para>
2072
2073       <para>
2074        Allows dumps to fail if unable to acquire shared table within the
2075        specified amount of time.
2076       </para>
2077      </listitem>
2078
2079      <listitem>
2080       <para>
2081        Reorder pg_dump --data-only output to dump primary-key tables referenced
2082        by foreign keys are dumped before the foreign-key referencing tables
2083        (Tom)
2084       </para>
2085
2086       <para>
2087        This allows data loads when foreign keys are already present.  If
2088        circular references make this impossible, issue a NOTICE.
2089       </para>
2090      </listitem>
2091
2092      <listitem>
2093       <para>
2094        Allow pg_dump, pg_dumpall, and pg_restore to use a specified role (Benedek
2095        László)
2096       </para>
2097      </listitem>
2098
2099      <listitem>
2100       <para>
2101        Allow pg_restore of a custom format archive to use multiple concurrent
2102        connections to do the restore (Andrew)
2103       </para>
2104
2105       <para>
2106        The number of concurrent connections is controlled by the option
2107        --jobs.
2108       </para>
2109      </listitem>
2110
2111      <listitem>
2112       <para>
2113        Add new pg_dump --binary-upgrade flag to be used by binary upgrade
2114        utilities (Bruce)
2115       </para>
2116      </listitem>
2117
2118     </itemizedlist>
2119
2120    </sect3>
2121
2122    <sect3>
2123     <title>Other Client Applications</title>
2124     <itemizedlist>
2125
2126      <listitem>
2127       <para>
2128        Fix 'pg_ctl restart' to preserve command-line arguments (Bruce)
2129       </para>
2130      </listitem>
2131
2132      <listitem>
2133       <para>
2134        Add -w/--no-password option that suppresses password prompts to all
2135        utilities that have a -W/--password option (Peter)
2136       </para>
2137      </listitem>
2138
2139      <listitem>
2140       <para>
2141        Remove -q (quiet) option for create* and drop* utility commands (Peter)
2142       </para>
2143
2144       <para>
2145        These options have had no effect since 8.3.
2146       </para>
2147      </listitem>
2148
2149     </itemizedlist>
2150
2151    </sect3>
2152
2153    <sect3>
2154     <title>General <link linkend="libpq"><application>libpq</></link></title>
2155     <itemizedlist>
2156
2157      <listitem>
2158       <para>
2159        Allow the OID to be specified when importing large objects using
2160        libpq lo_import_with_oid() (Tatsuo)
2161       </para>
2162      </listitem>
2163
2164      <listitem>
2165       <para>
2166        Add events support to libpq (Andrew Chernow, Merlin Moncure)
2167       </para>
2168
2169       <para>
2170        This adds the ability to register callbacks to handle private data
2171        for connection and result creation and destruction.
2172       </para>
2173      </listitem>
2174
2175      <listitem>
2176       <para>
2177        Improve libpq error handling to allow the return of multiple error
2178        messages as multi-line error reports (Magnus)
2179       </para>
2180      </listitem>
2181
2182      <listitem>
2183       <para>
2184        Have libpq PQexecParams() return PGRES_EMPTY_QUERY for an empty query
2185        (Tom)
2186       </para>
2187
2188       <para>
2189         It previously returned PGRES_COMMAND_OK.
2190       </para>
2191      </listitem>
2192
2193      <listitem>
2194       <para>
2195        Document how to avoid the libpq overhead of WSACleanup() overhead on
2196        Windows (Andrew Chernow)
2197       </para>
2198      </listitem>
2199
2200     </itemizedlist>
2201
2202    </sect3>
2203
2204    <sect3>
2205     <title><link linkend="libpq"><application>libpq</></link> SSL</title>
2206     <itemizedlist>
2207
2208      <listitem>
2209       <para>
2210        Fix libpq certificate validation for SSL connections (Magnus) bjm:
2211        details?
2212       </para>
2213      </listitem>
2214
2215      <listitem>
2216       <para>
2217        Allow the file locations for libpq SSL certificates to be specified
2218        (Mark Woodward, Alvaro, Magnus)
2219       </para>
2220      </listitem>
2221
2222      <listitem>
2223       <para>
2224        Add libpq connection parameter "sslverify" to control the verification
2225        of the server's SSL certificate (Magnus)
2226       </para>
2227
2228       <para>
2229        The default is full verification.
2230       </para>
2231      </listitem>
2232
2233      <listitem>
2234       <para>
2235        Properly unregister OpenSSL callbacks when libpq is done with
2236        all connection (Bruce, Magnus, Russell Smith)
2237       </para>
2238
2239       <para>
2240        This is required for applications that unload the libpq library so
2241        no invalid OpenSSL callbacks remain.
2242       </para>
2243      </listitem>
2244
2245     </itemizedlist>
2246
2247    </sect3>
2248
2249    <sect3>
2250     <title><link linkend="ecpg"><application>ecpg</></link></title>
2251     <itemizedlist>
2252
2253      <listitem>
2254       <para>
2255        Add localization support for ecpg messages (Euler Taveira de Oliveira)
2256       </para>
2257      </listitem>
2258
2259      <listitem>
2260       <para>
2261        ecpg parser is now automatically generated from the server parser
2262        (Michael)
2263       </para>
2264
2265       <para>
2266        Previously a separate ecpg parser was maintained.
2267
2268       </para>
2269      </listitem>
2270
2271     </itemizedlist>
2272
2273    </sect3>
2274
2275    <sect3>
2276     <title>Server Programming Interface (<acronym>SPI</>)</title>
2277     <itemizedlist>
2278
2279      <listitem>
2280       <para>
2281        Add SPI support for single-use plans with out-of-line parameters (Tom)
2282       </para>
2283      </listitem>
2284
2285      <listitem>
2286       <para>
2287        Add new SPI_OK_REWRITTEN return code to SPI_execute() (Heikki)
2288       </para>
2289
2290       <para>
2291        This is used when a command is rewritten to another type of command.
2292       </para>
2293      </listitem>
2294
2295     </itemizedlist>
2296
2297    </sect3>
2298
2299    <sect3>
2300     <title>Build Options</title>
2301     <itemizedlist>
2302
2303      <listitem>
2304       <para>
2305        Support 64-bit timezone data files (Heikki)
2306       </para>
2307
2308       <para>
2309        This adds support for daylight saving time (DST) calculations beyond 2038.
2310       </para>
2311      </listitem>
2312
2313      <listitem>
2314       <para>
2315        Fix bug in handling of the timezone database when cross-compiling
2316        (Richard Evans)
2317       </para>
2318      </listitem>
2319
2320      <listitem>
2321       <para>
2322        Update build system to use Autoconf 2.61 (Peter)
2323       </para>
2324      </listitem>
2325
2326      <listitem>
2327       <para>
2328        Require GNU bison for source code builds (Peter)
2329       </para>
2330
2331       <para>
2332        This has been a requirement for several years but this removes the
2333        infrastructure for supporting other parser tools.
2334       </para>
2335      </listitem>
2336
2337      <listitem>
2338       <para>
2339        Add pg_config --htmldir option (Peter)
2340       </para>
2341      </listitem>
2342
2343      <listitem>
2344       <para>
2345        Pass float4 by value inside the server (Zoltan Boszormenyi)
2346       </para>
2347
2348       <para>
2349        Add configure option --disable-float4-byval to use the old behavior.
2350                                                                                 tgl
2351        Pass float8 and int8 by value in the server where possible (Zoltan
2352        Boszormenyi)
2353       </para>
2354
2355       <para>
2356        Add configure option --disable-float8-byval to use the old behavior.
2357       </para>
2358      </listitem>
2359
2360      <listitem>
2361       <para>
2362        Add configure options -with-segsize, --with-blocksize,
2363        --with-wal-blocksize, --with-wal-segsize (Zdenek Kotala, Tom)
2364       </para>
2365
2366       <para>
2367        This allows compile-time control over several compile-time constants
2368        that control how large tables and WAL are segmented into separate files and
2369        their internal block sizes
2370       </para>
2371      </listitem>
2372
2373      <listitem>
2374       <para>
2375        Allow threaded builds on Solaris 2.5 (Bruce)
2376       </para>
2377      </listitem>
2378
2379      <listitem>
2380       <para>
2381        Add support for Sun Studio compiler on Linux (Julius Stroffek)
2382       </para>
2383      </listitem>
2384
2385      <listitem>
2386       <para>
2387        Append major version number to the gettext domain name, and for
2388        libraries the soname major version number (Peter)
2389       </para>
2390
2391       <para>
2392        This simplifies parallel installations.
2393       </para>
2394      </listitem>
2395
2396      <listitem>
2397       <para>
2398        Allow out-of-tree builds on Mingw and Cygwin (Richard Evans)
2399       </para>
2400      </listitem>
2401
2402      <listitem>
2403       <para>
2404        Fix the use of Mingw32 as a cross-compiling source platform (Peter)
2405       </para>
2406      </listitem>
2407
2408      <listitem>
2409       <para>
2410        Fix problem when setting LC_MESSAGES on MSVC-built systems (Hiroshi
2411        Inoue, Hiroshi Saito, Magnus)  bjm: details?
2412       </para>
2413      </listitem>
2414
2415     </itemizedlist>
2416
2417    </sect3>
2418
2419    <sect3>
2420     <title>Source Code</title>
2421     <itemizedlist>
2422
2423      <listitem>
2424       <para>
2425        Link backend object files in one step, rather than in stages (Peter)
2426       </para>
2427      </listitem>
2428
2429      <listitem>
2430       <para>
2431        Additional DTrace probes (Robert Lor)
2432       </para>
2433      </listitem>
2434
2435      <listitem>
2436       <para>
2437        Add DTrace support on Mac OS X Leopard (Robert Lor)
2438       </para>
2439      </listitem>
2440
2441      <listitem>
2442       <para>
2443        Add new cstring to text conversion functions (Brendan Jurd, Tom)
2444       </para>
2445      </listitem>
2446
2447      <listitem>
2448       <para>
2449        Improve logic for shared cache invalidation (Tom)
2450       </para>
2451      </listitem>
2452
2453      <listitem>
2454       <para>
2455        Make "name" char-aligned (Tom) bjm: pg_upgrade?
2456       </para>
2457      </listitem>
2458
2459      <listitem>
2460       <para>
2461        Add function hook to let plug-ins control the executor (ITAGAKI
2462        Takahiro)
2463       </para>
2464      </listitem>
2465
2466      <listitem>
2467       <para>
2468        Add a hook to allow planner statistics lookup behavior to be overridden
2469        (Simon Riggs)
2470       </para>
2471      </listitem>
2472
2473      <listitem>
2474       <para>
2475        Add "shmem_startup_hook" for custom shared memory requirements (Tom)
2476       </para>
2477      </listitem>
2478
2479      <listitem>
2480       <para>
2481        Replace pg_class column reltriggers with boolean relhastriggers (Simon)
2482       </para>
2483
2484       <para>
2485        Also remove unused pg_class columns relukeys, relfkeys, and relrefs.
2486       </para>
2487      </listitem>
2488
2489      <listitem>
2490       <para>
2491        Move SQL-command manual pages from the 'manl' (man-el) section to 'man7'
2492        (Peter)
2493       </para>
2494      </listitem>
2495
2496      <listitem>
2497       <para>
2498        Move platform FAQs into the main documentation (Peter)
2499       </para>
2500      </listitem>
2501
2502      <listitem>
2503       <para>
2504        Add %expect 0 to all parser input files to prevent builds with parser
2505        conflicts (Peter)
2506       </para>
2507      </listitem>
2508
2509      <listitem>
2510       <para>
2511        Add support for the KOI8U (Ukrainian) encoding (Peter)
2512       </para>
2513      </listitem>
2514
2515     </itemizedlist>
2516
2517    </sect3>
2518
2519    <sect3>
2520     <title>Contrib</title>
2521     <itemizedlist>
2522
2523      <listitem>
2524       <para>
2525        Add -M (query mode) to /contrib/pgbench (ITAGAKI Takahiro)
2526       </para>
2527      </listitem>
2528
2529      <listitem>
2530       <para>
2531        Add duration option to /contrib/pgbench (Takahiro Itagaki)
2532       </para>
2533      </listitem>
2534
2535      <listitem>
2536       <para>
2537        Fix /contrib/pgstattuple to handle tables and indexes with over 2
2538        billion pages (Tatsuhito Kasahara)
2539       </para>
2540      </listitem>
2541
2542      <listitem>
2543       <para>
2544        Add Levenshtein string-distance function to /contrib/fuzzystrmatch
2545        that allows the user to specify the cost of insertion, deletion,
2546        and substitution (Volkan Yazici)
2547       </para>
2548      </listitem>
2549
2550      <listitem>
2551       <para>
2552        Remove dblink_current_query() from /contrib/dblink;  it should now use
2553        current_query() (Tomas Doran)
2554       </para>
2555      </listitem>
2556
2557      <listitem>
2558       <para>
2559        Have /contrib/ltree support multibyte encodings (laser)
2560       </para>
2561      </listitem>
2562
2563      <listitem>
2564       <para>
2565        Add /contrib/citext as a case-insensitive text data type (David Wheeler)
2566       </para>
2567      </listitem>
2568
2569      <listitem>
2570       <para>
2571        Make sure /contrib/dblink uses a password supplied by the user, and not
2572        accidentally from the server .pgpass file (Joe Conway)
2573       </para>
2574
2575       <para>
2576        This is a security enhancement.
2577       </para>
2578      </listitem>
2579
2580      <listitem>
2581       <para>
2582        Add fsm_page_contents() to contrib/pageinspect (Heikki)
2583       </para>
2584
2585       <para>
2586        Modify get_raw_page() to support free space map (*.fsm) files.
2587        Also update /contrib/pg_freespacemap.
2588       </para>
2589      </listitem>
2590
2591      <listitem>
2592       <para>
2593        Add support for multibyte encodings to /contrib/pg_trgm (Teodor)
2594       </para>
2595      </listitem>
2596
2597      <listitem>
2598       <para>
2599        Rewrite contrib/intagg to user new server-side functions array_agg() and
2600        unnest() (Tom)
2601       </para>
2602      </listitem>
2603
2604      <listitem>
2605       <para>
2606        Add /contrib/auto_explain to automatically run EXPLAIN on queries
2607        exceeding a specified duration (Takahiro Itagaki, Tom)
2608       </para>
2609      </listitem>
2610
2611      <listitem>
2612       <para>
2613        Add contrib/pg_stat_statements for server-wide tracking of statement execution
2614        statistics (Takahiro Itagaki)
2615       </para>
2616      </listitem>
2617
2618     </itemizedlist>
2619
2620    </sect3>
2621   </sect2>
2622  </sect1>
2623
2624  <sect1 id="release-8-3-6">
2625   <title>Release 8.3.6</title>
2626
2627   <note>
2628   <title>Release date</title>
2629   <simpara>2009-02-02</simpara>
2630   </note>
2631
2632   <para>
2633    This release contains a variety of fixes from 8.3.5.
2634    For information about new features in the 8.3 major release, see
2635    <xref linkend="release-8-3">.
2636   </para>
2637
2638   <sect2>
2639    <title>Migration to Version 8.3.6</title>
2640
2641    <para>
2642     A dump/restore is not required for those running 8.3.X.
2643     However, if you are upgrading from a version earlier than 8.3.5,
2644     see the release notes for 8.3.5.
2645    </para>
2646
2647   </sect2>
2648
2649   <sect2>
2650    <title>Changes</title>
2651
2652    <itemizedlist>
2653
2654     <listitem>
2655      <para>
2656       Make <command>DISCARD ALL</> release advisory locks, in addition
2657       to everything it already did (Tom)
2658      </para>
2659
2660      <para>
2661       This was decided to be the most appropriate behavior.  This could
2662       affect existing applications, however.
2663      </para>
2664     </listitem>
2665
2666     <listitem>
2667      <para>
2668       Fix whole-index GiST scans to work correctly (Teodor)
2669      </para>
2670
2671      <para>
2672       This error could cause rows to be lost if a table is clustered
2673       on a GiST index.
2674      </para>
2675     </listitem>
2676
2677     <listitem>
2678      <para>
2679       Fix crash of <literal>xmlconcat(NULL)</> (Peter)
2680      </para>
2681     </listitem>
2682
2683     <listitem>
2684      <para>
2685       Fix possible crash in <literal>ispell</> dictionary if high-bit-set
2686       characters are used as flags (Teodor)
2687      </para>
2688
2689      <para>
2690       This is known to be done by one widely available Norwegian dictionary,
2691       and the same condition may exist in others.
2692      </para>
2693     </listitem>
2694
2695     <listitem>
2696      <para>
2697       Fix misordering of <application>pg_dump</> output for composite types
2698       (Tom)
2699      </para>
2700
2701      <para>
2702       The most likely problem was for user-defined operator classes to
2703       be dumped after indexes or views that needed them.
2704      </para>
2705     </listitem>
2706
2707     <listitem>
2708      <para>
2709       Improve handling of URLs in <function>headline()</> function (Teodor)
2710      </para>
2711     </listitem>
2712
2713     <listitem>
2714      <para>
2715       Improve handling of overlength headlines in <function>headline()</>
2716       function (Teodor)
2717      </para>
2718     </listitem>
2719
2720     <listitem>
2721      <para>
2722       Prevent possible Assert failure or misconversion if an encoding
2723       conversion is created with the wrong conversion function for the
2724       specified pair of encodings (Tom, Heikki)
2725      </para>
2726     </listitem>
2727
2728     <listitem>
2729      <para>
2730       Fix possible Assert failure if a statement executed in PL/pgSQL is
2731       rewritten into another kind of statement, for example if an
2732       <command>INSERT</> is rewritten into an <command>UPDATE</> (Heikki)
2733      </para>
2734     </listitem>
2735
2736     <listitem>
2737      <para>
2738       Ensure that a snapshot is available to datatype input functions (Tom)
2739      </para>
2740
2741      <para>
2742       This primarily affects domains that are declared with <literal>CHECK</>
2743       constraints involving user-defined stable or immutable functions.  Such
2744       functions typically fail if no snapshot has been set.
2745      </para>
2746     </listitem>
2747
2748     <listitem>
2749      <para>
2750       Make it safer for SPI-using functions to be used within datatype I/O;
2751       in particular, to be used in domain check constraints (Tom)
2752      </para>
2753     </listitem>
2754
2755     <listitem>
2756      <para>
2757       Avoid unnecessary locking of small tables in <command>VACUUM</>
2758       (Heikki)
2759      </para>
2760     </listitem>
2761
2762     <listitem>
2763      <para>
2764       Fix a problem that sometimes kept <command>ALTER TABLE ENABLE/DISABLE
2765       RULE</> from being recognized by active sessions (Tom)
2766      </para>
2767     </listitem>
2768
2769     <listitem>
2770      <para>
2771       Fix a problem that made <literal>UPDATE RETURNING tableoid</>
2772       return zero instead of the correct OID (Tom)
2773      </para>
2774     </listitem>
2775
2776     <listitem>
2777      <para>
2778       Allow functions declared as taking <type>ANYARRAY</> to work on
2779       the <structname>pg_statistic</> columns of that type (Tom)
2780      </para>
2781
2782      <para>
2783       This used to work, but was unintentionally broken in 8.3.
2784      </para>
2785     </listitem>
2786
2787     <listitem>
2788      <para>
2789       Fix planner misestimation of selectivity when transitive equality
2790       is applied to an outer-join clause (Tom)
2791      </para>
2792
2793      <para>
2794       This could result in bad plans for queries like
2795       <literal>... from a left join b on a.a1 = b.b1 where a.a1 = 42 ...</>
2796      </para>
2797     </listitem>
2798
2799     <listitem>
2800      <para>
2801       Improve optimizer's handling of long <literal>IN</> lists (Tom)
2802      </para>
2803
2804      <para>
2805       This change avoids wasting large amounts of time on such lists
2806       when constraint exclusion is enabled.
2807      </para>
2808     </listitem>
2809
2810     <listitem>
2811      <para>
2812       Prevent synchronous scan during GIN index build (Tom)
2813      </para>
2814
2815      <para>
2816       Because GIN is optimized for inserting tuples in increasing TID order,
2817       choosing to use a synchronous scan could slow the build by a factor of
2818       three or more.
2819      </para>
2820     </listitem>
2821
2822     <listitem>
2823      <para>
2824       Ensure that the contents of a holdable cursor don't depend on the
2825       contents of TOAST tables (Tom)
2826      </para>
2827
2828      <para>
2829       Previously, large field values in a cursor result might be represented
2830       as TOAST pointers, which would fail if the referenced table got dropped
2831       before the cursor is read, or if the large value is deleted and then
2832       vacuumed away.  This cannot happen with an ordinary cursor,
2833       but it could with a cursor that is held past its creating transaction.
2834      </para>
2835     </listitem>
2836
2837     <listitem>
2838      <para>
2839       Fix memory leak when a set-returning function is terminated without
2840       reading its whole result (Tom)
2841      </para>
2842     </listitem>
2843
2844     <listitem>
2845      <para>
2846       Fix encoding conversion problems in XML functions when the database
2847       encoding isn't UTF-8 (Tom)
2848      </para>
2849     </listitem>
2850
2851     <listitem>
2852      <para>
2853       Fix <filename>contrib/dblink</>'s
2854       <function>dblink_get_result(text,bool)</> function (Joe)
2855      </para>
2856     </listitem>
2857
2858     <listitem>
2859      <para>
2860       Fix possible garbage output from <filename>contrib/sslinfo</> functions
2861       (Tom)
2862      </para>
2863     </listitem>
2864
2865     <listitem>
2866      <para>
2867       Fix incorrect behavior of <filename>contrib/tsearch2</> compatibility
2868       trigger when it's fired more than once in a command (Teodor)
2869      </para>
2870     </listitem>
2871
2872     <listitem>
2873      <para>
2874       Fix possible mis-signaling in autovacuum (Heikki)
2875      </para>
2876     </listitem>
2877
2878     <listitem>
2879      <para>
2880       Support running as a service on Windows 7 beta (Dave and Magnus)
2881      </para>
2882     </listitem>
2883
2884     <listitem>
2885      <para>
2886       Fix <application>ecpg</>'s handling of varchar structs (Michael)
2887      </para>
2888     </listitem>
2889
2890     <listitem>
2891      <para>
2892       Fix <application>configure</> script to properly report failure when
2893       unable to obtain linkage information for PL/Perl (Andrew)
2894      </para>
2895     </listitem>
2896
2897     <listitem>
2898      <para>
2899       Make all documentation reference <literal>pgsql-bugs</> and/or
2900       <literal>pgsql-hackers</> as appropriate, instead of the
2901       now-decommissioned <literal>pgsql-ports</> and <literal>pgsql-patches</>
2902       mailing lists (Tom)
2903      </para>
2904     </listitem>
2905
2906     <listitem>
2907      <para>
2908       Update time zone data files to <application>tzdata</> release 2009a (for
2909       Kathmandu and historical DST corrections in Switzerland, Cuba)
2910      </para>
2911     </listitem>
2912
2913    </itemizedlist>
2914
2915   </sect2>
2916  </sect1>
2917
2918  <sect1 id="release-8-3-5">
2919   <title>Release 8.3.5</title>
2920
2921   <note>
2922   <title>Release date</title>
2923   <simpara>2008-11-03</simpara>
2924   </note>
2925
2926   <para>
2927    This release contains a variety of fixes from 8.3.4.
2928    For information about new features in the 8.3 major release, see
2929    <xref linkend="release-8-3">.
2930   </para>
2931
2932   <sect2>
2933    <title>Migration to Version 8.3.5</title>
2934
2935    <para>
2936     A dump/restore is not required for those running 8.3.X.
2937     However, if you are upgrading from a version earlier than 8.3.1,
2938     see the release notes for 8.3.1.  Also, if you were running a previous
2939     8.3.X release, it is recommended to <command>REINDEX</> all GiST
2940     indexes after the upgrade.
2941    </para>
2942
2943   </sect2>
2944
2945   <sect2>
2946    <title>Changes</title>
2947
2948    <itemizedlist>
2949
2950     <listitem>
2951      <para>
2952       Fix GiST index corruption due to marking the wrong index entry
2953       <quote>dead</> after a deletion (Teodor)
2954      </para>
2955
2956      <para>
2957       This would result in index searches failing to find rows they
2958       should have found.  Corrupted indexes can be fixed with
2959       <command>REINDEX</>.
2960      </para>
2961     </listitem>
2962
2963     <listitem>
2964      <para>
2965       Fix backend crash when the client encoding cannot represent a localized
2966       error message (Tom)
2967      </para>
2968
2969      <para>
2970       We have addressed similar issues before, but it would still fail if
2971       the <quote>character has no equivalent</> message itself couldn't
2972       be converted.  The fix is to disable localization and send the plain
2973       ASCII error message when we detect such a situation.
2974      </para>
2975     </listitem>
2976
2977     <listitem>
2978      <para>
2979       Fix possible crash in <type>bytea</>-to-XML mapping (Michael McMaster)
2980      </para>
2981     </listitem>
2982
2983     <listitem>
2984      <para>
2985       Fix possible crash when deeply nested functions are invoked from
2986       a trigger (Tom)
2987      </para>
2988     </listitem>
2989
2990     <listitem>
2991      <para>
2992       Improve optimization of <replaceable>expression</> <literal>IN</>
2993       (<replaceable>expression-list</>) queries (Tom, per an idea from Robert
2994       Haas)
2995      </para>
2996
2997      <para>
2998       Cases in which there are query variables on the right-hand side had been
2999       handled less efficiently in 8.2.x and 8.3.x than in prior versions.
3000       The fix restores 8.1 behavior for such cases.
3001      </para>
3002     </listitem>
3003
3004     <listitem>
3005      <para>
3006       Fix mis-expansion of rule queries when a sub-<literal>SELECT</> appears
3007       in a function call in <literal>FROM</>,  a multi-row <literal>VALUES</>
3008       list, or a <literal>RETURNING</> list (Tom)
3009      </para>
3010
3011      <para>
3012       The usual symptom of this problem is an <quote>unrecognized node type</>
3013       error.
3014      </para>
3015     </listitem>
3016
3017     <listitem>
3018      <para>
3019       Fix Assert failure during rescan of an <literal>IS NULL</>
3020       search of a GiST index (Teodor)
3021      </para>
3022     </listitem>
3023
3024     <listitem>
3025      <para>
3026       Fix memory leak during rescan of a hashed aggregation plan (Neil)
3027      </para>
3028     </listitem>
3029
3030     <listitem>
3031      <para>
3032       Ensure an error is reported when a newly-defined PL/pgSQL trigger
3033       function is invoked as a normal function (Tom)
3034      </para>
3035     </listitem>
3036
3037     <listitem>
3038      <para>
3039       Force a checkpoint before <command>CREATE DATABASE</> starts to copy
3040       files (Heikki)
3041      </para>
3042
3043      <para>
3044       This prevents a possible failure if files had recently been deleted
3045       in the source database.
3046      </para>
3047     </listitem>
3048
3049     <listitem>
3050      <para>
3051       Prevent possible collision of <structfield>relfilenode</> numbers
3052       when moving a table to another tablespace with <command>ALTER SET
3053       TABLESPACE</> (Heikki)
3054      </para>
3055
3056      <para>
3057       The command tried to re-use the existing filename, instead of
3058       picking one that is known unused in the destination directory.
3059      </para>
3060     </listitem>
3061
3062     <listitem>
3063      <para>
3064       Fix incorrect text search headline generation when single query
3065       item matches first word of text (Sushant Sinha)
3066      </para>
3067     </listitem>
3068
3069     <listitem>
3070      <para>
3071       Fix improper display of fractional seconds in interval values when
3072       using a non-ISO datestyle in an <option>--enable-integer-datetimes</>
3073       build (Ron Mayer)
3074      </para>
3075     </listitem>
3076
3077     <listitem>
3078      <para>
3079       Make <literal>ILIKE</> compare characters case-insensitively
3080       even when they're escaped (Andrew)
3081      </para>
3082     </listitem>
3083
3084     <listitem>
3085      <para>
3086       Ensure <command>DISCARD</> is handled properly by statement logging (Tom)
3087      </para>
3088     </listitem>
3089
3090     <listitem>
3091      <para>
3092       Fix incorrect logging of last-completed-transaction time during
3093       PITR recovery (Tom)
3094      </para>
3095     </listitem>
3096
3097     <listitem>
3098      <para>
3099       Ensure <function>SPI_getvalue</> and <function>SPI_getbinval</>
3100       behave correctly when the passed tuple and tuple descriptor have
3101       different numbers of columns (Tom)
3102      </para>
3103
3104      <para>
3105       This situation is normal when a table has had columns added or removed,
3106       but these two functions didn't handle it properly.
3107       The only likely consequence is an incorrect error indication.
3108      </para>
3109     </listitem>
3110
3111     <listitem>
3112      <para>
3113       Mark <varname>SessionReplicationRole</> as <literal>PGDLLIMPORT</>
3114       so it can be used by <application>Slony</> on Windows (Magnus)
3115      </para>
3116     </listitem>
3117
3118     <listitem>
3119      <para>
3120       Fix small memory leak when using <application>libpq</>'s
3121       <literal>gsslib</> parameter (Magnus)
3122      </para>
3123
3124      <para>
3125       The space used by the parameter string was not freed at connection
3126       close.
3127      </para>
3128     </listitem>
3129
3130     <listitem>
3131      <para>
3132       Ensure <application>libgssapi</> is linked into <application>libpq</>
3133       if needed (Markus Schaaf)
3134      </para>
3135     </listitem>
3136
3137     <listitem>
3138      <para>
3139       Fix <application>ecpg</>'s parsing of <command>CREATE ROLE</> (Michael)
3140      </para>
3141     </listitem>
3142
3143     <listitem>
3144      <para>
3145       Fix recent breakage of <literal>pg_ctl restart</> (Tom)
3146      </para>
3147     </listitem>
3148
3149     <listitem>
3150      <para>
3151       Ensure <filename>pg_control</> is opened in binary mode
3152       (Itagaki Takahiro)
3153      </para>
3154
3155      <para>
3156       <application>pg_controldata</> and <application>pg_resetxlog</>
3157       did this incorrectly, and so could fail on Windows.
3158      </para>
3159     </listitem>
3160
3161     <listitem>
3162      <para>
3163       Update time zone data files to <application>tzdata</> release 2008i (for
3164       DST law changes in Argentina, Brazil, Mauritius, Syria)
3165      </para>
3166     </listitem>
3167
3168    </itemizedlist>
3169
3170   </sect2>
3171  </sect1>
3172
3173  <sect1 id="release-8-3-4">
3174   <title>Release 8.3.4</title>
3175
3176   <note>
3177   <title>Release date</title>
3178   <simpara>2008-09-22</simpara>
3179   </note>
3180
3181   <para>
3182    This release contains a variety of fixes from 8.3.3.
3183    For information about new features in the 8.3 major release, see
3184    <xref linkend="release-8-3">.
3185   </para>
3186
3187   <sect2>
3188    <title>Migration to Version 8.3.4</title>
3189
3190    <para>
3191     A dump/restore is not required for those running 8.3.X.
3192     However, if you are upgrading from a version earlier than 8.3.1,
3193     see the release notes for 8.3.1.
3194    </para>
3195
3196   </sect2>
3197
3198   <sect2>
3199    <title>Changes</title>
3200
3201    <itemizedlist>
3202
3203     <listitem>
3204      <para>
3205       Fix bug in btree WAL recovery code (Heikki)
3206      </para>
3207
3208      <para>
3209       Recovery failed if the WAL ended partway through a page split operation.
3210      </para>
3211     </listitem>
3212
3213     <listitem>
3214      <para>
3215       Fix potential use of wrong cutoff XID for HOT page pruning (Alvaro)
3216      </para>
3217
3218      <para>
3219       This error created a risk of corruption in system
3220       catalogs that are consulted by <command>VACUUM</>: dead tuple versions
3221       might be removed too soon.  The impact of this on actual database
3222       operations would be minimal, since the system doesn't follow MVCC
3223       rules while examining catalogs, but it might result in transiently
3224       wrong output from <application>pg_dump</> or other client programs.
3225      </para>
3226     </listitem>
3227
3228     <listitem>
3229      <para>
3230       Fix potential miscalculation of <structfield>datfrozenxid</> (Alvaro)
3231      </para>
3232
3233      <para>
3234       This error may explain some recent reports of failure to remove old
3235       <structname>pg_clog</> data.
3236      </para>
3237     </listitem>
3238
3239     <listitem>
3240      <para>
3241       Fix incorrect HOT updates after <structname>pg_class</> is reindexed
3242       (Tom)
3243      </para>
3244
3245      <para>
3246       Corruption of <structname>pg_class</> could occur if <literal>REINDEX
3247       TABLE pg_class</> was followed in the same session by an <literal>ALTER
3248       TABLE RENAME</> or <literal>ALTER TABLE SET SCHEMA</> command.
3249      </para>
3250     </listitem>
3251
3252     <listitem>
3253      <para>
3254       Fix missed <quote>combo cid</> case (Karl Schnaitter)
3255      </para>
3256
3257      <para>
3258       This error made rows incorrectly invisible to a transaction in which they
3259       had been deleted by multiple subtransactions that all aborted.
3260      </para>
3261     </listitem>
3262
3263     <listitem>
3264      <para>
3265       Prevent autovacuum from crashing if the table it's currently
3266       checking is deleted at just the wrong time (Alvaro)
3267      </para>
3268     </listitem>
3269
3270     <listitem>
3271      <para>
3272       Widen local lock counters from 32 to 64 bits (Tom)
3273      </para>
3274
3275      <para>
3276       This responds to reports that the counters could overflow in
3277       sufficiently long transactions, leading to unexpected <quote>lock is
3278       already held</> errors.
3279      </para>
3280     </listitem>
3281
3282     <listitem>
3283      <para>
3284       Fix possible duplicate output of tuples during a GiST index scan (Teodor)
3285      </para>
3286     </listitem>
3287
3288     <listitem>
3289      <para>
3290       Regenerate foreign key checking queries from scratch when either
3291       table is modified (Tom)
3292      </para>
3293
3294      <para>
3295       Previously, 8.3 would attempt to replan the query, but would work from
3296       previously generated query text.  This led to failures if a
3297       table or column was renamed.
3298      </para>
3299     </listitem>
3300
3301     <listitem>
3302      <para>
3303       Fix missed permissions checks when a view contains a simple
3304       <literal>UNION ALL</> construct (Heikki)
3305      </para>
3306
3307      <para>
3308       Permissions for the referenced tables were checked properly, but not
3309       permissions for the view itself.
3310      </para>
3311     </listitem>
3312
3313     <listitem>
3314      <para>
3315       Add checks in executor startup to ensure that the tuples produced by an
3316       <command>INSERT</> or <command>UPDATE</> will match the target table's
3317       current rowtype (Tom)
3318      </para>
3319
3320      <para>
3321       This situation is believed to be impossible in 8.3, but it can happen in
3322       prior releases, so a check seems prudent.
3323      </para>
3324     </listitem>
3325
3326     <listitem>
3327      <para>
3328       Fix possible repeated drops during <command>DROP OWNED</> (Tom)
3329      </para>
3330
3331      <para>
3332       This would typically result in strange errors such as <quote>cache
3333       lookup failed for relation NNN</>.
3334      </para>
3335     </listitem>
3336
3337     <listitem>
3338      <para>
3339       Fix several memory leaks in XML operations (Kris Jurka, Tom)
3340      </para>
3341     </listitem>
3342
3343     <listitem>
3344      <para>
3345       Fix <function>xmlserialize()</> to raise error properly for
3346       unacceptable target data type (Tom)
3347      </para>
3348     </listitem>
3349
3350     <listitem>
3351      <para>
3352       Fix a couple of places that mis-handled multibyte characters in text
3353       search configuration file parsing (Tom)
3354      </para>
3355
3356      <para>
3357       Certain characters occurring in configuration files would always cause
3358       <quote>invalid byte sequence for encoding</> failures.
3359      </para>
3360     </listitem>
3361
3362     <listitem>
3363      <para>
3364       Provide file name and line number location for all errors reported
3365       in text search configuration files (Tom)
3366      </para>
3367     </listitem>
3368
3369     <listitem>
3370      <para>
3371       Fix <literal>AT TIME ZONE</> to first try to interpret its timezone
3372       argument as a timezone abbreviation, and only try it as a full timezone
3373       name if that fails, rather than the other way around as formerly (Tom)
3374      </para>
3375
3376      <para>
3377       The timestamp input functions have always resolved ambiguous zone names
3378       in this order.  Making <literal>AT TIME ZONE</> do so as well improves
3379       consistency, and fixes a compatibility bug introduced in 8.1:
3380       in ambiguous cases we now behave the same as 8.0 and before did,
3381       since in the older versions <literal>AT TIME ZONE</> accepted
3382       <emphasis>only</> abbreviations.
3383      </para>
3384     </listitem>
3385
3386     <listitem>
3387      <para>
3388       Fix datetime input functions to correctly detect integer overflow when
3389       running on a 64-bit platform (Tom)
3390      </para>
3391     </listitem>
3392
3393     <listitem>
3394      <para>
3395       Prevent integer overflows during units conversion when displaying a
3396       configuration parameter that has units (Tom)
3397      </para>
3398     </listitem>
3399
3400     <listitem>
3401      <para>
3402       Improve performance of writing very long log messages to syslog (Tom)
3403      </para>
3404     </listitem>
3405
3406     <listitem>
3407      <para>
3408       Allow spaces in the suffix part of an LDAP URL in
3409       <filename>pg_hba.conf</> (Tom)
3410      </para>
3411     </listitem>
3412
3413     <listitem>
3414      <para>
3415       Fix bug in backwards scanning of a cursor on a <literal>SELECT DISTINCT
3416       ON</> query (Tom)
3417      </para>
3418     </listitem>
3419
3420     <listitem>
3421      <para>
3422       Fix planner bug that could improperly push down <literal>IS NULL</>
3423       tests below an outer join (Tom)
3424      </para>
3425
3426      <para>
3427       This was triggered by occurrence of <literal>IS NULL</> tests for
3428       the same relation in all arms of an upper <literal>OR</> clause.
3429      </para>
3430     </listitem>
3431
3432     <listitem>
3433      <para>
3434       Fix planner bug with nested sub-select expressions (Tom)
3435      </para>
3436
3437      <para>
3438       If the outer sub-select has no direct dependency on the parent query,
3439       but the inner one does, the outer value might not get recalculated
3440       for new parent query rows.
3441      </para>
3442     </listitem>
3443
3444     <listitem>
3445      <para>
3446       Fix planner to estimate that <literal>GROUP BY</> expressions yielding
3447       boolean results always result in two groups, regardless of the
3448       expressions' contents (Tom)
3449      </para>
3450
3451      <para>
3452       This is very substantially more accurate than the regular <literal>GROUP
3453       BY</> estimate for certain boolean tests like <replaceable>col</>
3454       <literal>IS NULL</>.
3455      </para>
3456     </listitem>
3457
3458     <listitem>
3459      <para>
3460       Fix PL/PgSQL to not fail when a <literal>FOR</> loop's target variable
3461       is a record containing composite-type fields (Tom)
3462      </para>
3463     </listitem>
3464
3465     <listitem>
3466      <para>
3467       Fix PL/Tcl to behave correctly with Tcl 8.5, and to be more careful
3468       about the encoding of data sent to or from Tcl (Tom)
3469      </para>
3470     </listitem>
3471
3472     <listitem>
3473      <para>
3474       Improve performance of <function>PQescapeBytea()</> (Rudolf Leitgeb)
3475      </para>
3476     </listitem>
3477
3478     <listitem>
3479      <para>
3480       On Windows, work around a Microsoft bug by preventing
3481       <application>libpq</> from trying to send more than 64kB per system call
3482       (Magnus)
3483      </para>
3484     </listitem>
3485
3486     <listitem>
3487      <para>
3488       Fix <application>ecpg</> to handle variables properly in <command>SET</>
3489       commands (Michael)
3490      </para>
3491     </listitem>
3492
3493     <listitem>
3494      <para>
3495       Improve <application>pg_dump</> and <application>pg_restore</>'s
3496       error reporting after failure to send a SQL command (Tom)
3497      </para>
3498     </listitem>
3499
3500     <listitem>
3501      <para>
3502       Fix <application>pg_ctl</> to properly preserve postmaster
3503       command-line arguments across a <literal>restart</> (Bruce)
3504      </para>
3505     </listitem>
3506
3507     <listitem>
3508      <para>
3509       Fix erroneous WAL file cutoff point calculation in
3510       <application>pg_standby</> (Simon)
3511      </para>
3512     </listitem>
3513
3514     <listitem>
3515      <para>
3516       Update time zone data files to <application>tzdata</> release 2008f (for
3517       DST law changes in Argentina, Bahamas, Brazil, Mauritius, Morocco,
3518       Pakistan, Palestine, and Paraguay)
3519      </para>
3520     </listitem>
3521
3522    </itemizedlist>
3523
3524   </sect2>
3525  </sect1>
3526
3527  <sect1 id="release-8-3-3">
3528   <title>Release 8.3.3</title>
3529
3530   <note>
3531   <title>Release date</title>
3532   <simpara>2008-06-12</simpara>
3533   </note>
3534
3535   <para>
3536    This release contains one serious and one minor bug fix over 8.3.2.
3537    For information about new features in the 8.3 major release, see
3538    <xref linkend="release-8-3">.
3539   </para>
3540
3541   <sect2>
3542    <title>Migration to Version 8.3.3</title>
3543
3544    <para>
3545     A dump/restore is not required for those running 8.3.X.
3546     However, if you are upgrading from a version earlier than 8.3.1,
3547     see the release notes for 8.3.1.
3548    </para>
3549
3550   </sect2>
3551
3552   <sect2>
3553    <title>Changes</title>
3554
3555    <itemizedlist>
3556
3557     <listitem>
3558      <para>
3559       Make <function>pg_get_ruledef()</> parenthesize negative constants (Tom)
3560      </para>
3561
3562      <para>
3563       Before this fix, a negative constant in a view or rule might be dumped
3564       as, say, <literal>-42::integer</>, which is subtly incorrect: it should
3565       be <literal>(-42)::integer</> due to operator precedence rules.
3566       Usually this would make little difference, but it could interact with
3567       another recent patch to cause
3568       <productname>PostgreSQL</> to reject what had been a valid
3569       <command>SELECT DISTINCT</> view query.  Since this could result in
3570       <application>pg_dump</> output failing to reload, it is being treated
3571       as a high-priority fix.  The only released versions in which dump
3572       output is actually incorrect are 8.3.1 and 8.2.7.
3573      </para>
3574     </listitem>
3575
3576     <listitem>
3577      <para>
3578       Make <command>ALTER AGGREGATE ... OWNER TO</> update
3579       <structname>pg_shdepend</> (Tom)
3580      </para>
3581
3582      <para>
3583       This oversight could lead to problems if the aggregate was later
3584       involved in a <command>DROP OWNED</> or <command>REASSIGN OWNED</>
3585       operation.
3586      </para>
3587     </listitem>
3588
3589    </itemizedlist>
3590
3591   </sect2>
3592  </sect1>
3593
3594  <sect1 id="release-8-3-2">
3595   <title>Release 8.3.2</title>
3596
3597   <note>
3598   <title>Release date</title>
3599   <simpara>never released</simpara>
3600   </note>
3601
3602   <para>
3603    This release contains a variety of fixes from 8.3.1.
3604    For information about new features in the 8.3 major release, see
3605    <xref linkend="release-8-3">.
3606   </para>
3607
3608   <sect2>
3609    <title>Migration to Version 8.3.2</title>
3610
3611    <para>
3612     A dump/restore is not required for those running 8.3.X.
3613     However, if you are upgrading from a version earlier than 8.3.1,
3614     see the release notes for 8.3.1.
3615    </para>
3616
3617   </sect2>
3618
3619   <sect2>
3620    <title>Changes</title>
3621
3622    <itemizedlist>
3623
3624     <listitem>
3625      <para>
3626       Fix <literal>ERRORDATA_STACK_SIZE exceeded</literal> crash that
3627       occurred on Windows when using UTF-8 database encoding and a different
3628       client encoding (Tom)
3629      </para>
3630     </listitem>
3631
3632     <listitem>
3633      <para>
3634       Fix incorrect archive truncation point calculation for the
3635       <literal>%r</> macro in <varname>recovery_command</> parameters
3636       (Simon)
3637      </para>
3638
3639      <para>
3640       This could lead to data loss if a warm-standby script relied on
3641       <literal>%r</> to decide when to throw away WAL segment files.
3642      </para>
3643     </listitem>
3644
3645     <listitem>
3646      <para>
3647       Fix <command>ALTER TABLE ADD COLUMN ... PRIMARY KEY</> so that the new
3648       column is correctly checked to see if it's been initialized to all
3649       non-nulls (Brendan Jurd)
3650      </para>
3651
3652      <para>
3653       Previous versions neglected to check this requirement at all.
3654      </para>
3655     </listitem>
3656
3657     <listitem>
3658      <para>
3659       Fix <command>REASSIGN OWNED</> so that it works on procedural
3660       languages too (Alvaro)
3661      </para>
3662     </listitem>
3663
3664     <listitem>
3665      <para>
3666       Fix problems with <command>SELECT FOR UPDATE/SHARE</> occurring as a
3667       subquery in a query with a non-<command>SELECT</> top-level operation
3668       (Tom)
3669      </para>
3670     </listitem>
3671
3672     <listitem>
3673      <para>
3674       Fix possible <command>CREATE TABLE</> failure when inheriting the
3675       <quote>same</> constraint from multiple parent relations that
3676       inherited that constraint from a common ancestor (Tom)
3677      </para>
3678     </listitem>
3679
3680     <listitem>
3681      <para>
3682       Fix <function>pg_get_ruledef()</> to show the alias, if any, attached
3683       to the target table of an <command>UPDATE</> or <command>DELETE</>
3684       (Tom)
3685      </para>
3686     </listitem>
3687
3688     <listitem>
3689      <para>
3690       Restore the pre-8.3 behavior that an out-of-range block number in a
3691       TID being used in a TidScan plan results in silently not matching any
3692       rows (Tom)
3693      </para>
3694
3695      <para>
3696       8.3.0 and 8.3.1 threw an error instead.
3697      </para>
3698     </listitem>
3699
3700     <listitem>
3701      <para>
3702       Fix GIN bug that could result in a <literal>too many LWLocks
3703       taken</literal> failure (Teodor)
3704      </para>
3705     </listitem>
3706
3707     <listitem>
3708      <para>
3709       Fix broken GiST comparison function for <type>tsquery</> (Teodor)
3710      </para>
3711     </listitem>
3712
3713     <listitem>
3714      <para>
3715       Fix <function>tsvector_update_trigger()</> and <function>ts_stat()</>
3716       to accept domains over the types they expect to work with (Tom)
3717      </para>
3718     </listitem>
3719
3720     <listitem>
3721      <para>
3722       Fix failure to support enum data types as foreign keys (Tom)
3723      </para>
3724     </listitem>
3725
3726     <listitem>
3727      <para>
3728       Avoid possible crash when decompressing corrupted data
3729       (Zdenek Kotala)
3730      </para>
3731     </listitem>
3732
3733     <listitem>
3734      <para>
3735       Fix race conditions between delayed unlinks and <command>DROP
3736       DATABASE</> (Heikki)
3737      </para>
3738
3739      <para>
3740       In the worst case this could result in deleting a newly created table
3741       in a new database that happened to get the same OID as the
3742       recently-dropped one; but of course that is an extremely
3743       low-probability scenario.
3744      </para>
3745     </listitem>
3746
3747     <listitem>
3748      <para>
3749       Repair two places where SIGTERM exit of a backend could leave corrupted
3750       state in shared memory (Tom)
3751      </para>
3752
3753      <para>
3754       Neither case is very important if SIGTERM is used to shut down the
3755       whole database cluster together, but there was a problem if someone
3756       tried to SIGTERM individual backends.
3757      </para>
3758     </listitem>
3759
3760     <listitem>
3761      <para>
3762       Fix possible crash due to incorrect plan generated for an
3763       <literal><replaceable>x</> IN (SELECT <replaceable>y</>
3764       FROM ...)</literal> clause when <replaceable>x</> and <replaceable>y</>
3765       have different data types; and make sure the behavior is semantically
3766       correct when the conversion from <replaceable>y</>'s type to
3767       <replaceable>x</>'s type is lossy (Tom)
3768      </para>
3769     </listitem>
3770
3771     <listitem>
3772      <para>
3773       Fix oversight that prevented the planner from substituting known Param
3774       values as if they were constants (Tom)
3775      </para>
3776
3777      <para>
3778       This mistake partially disabled optimization of unnamed
3779       extended-Query statements in 8.3.0 and 8.3.1: in particular the
3780       LIKE-to-indexscan optimization would never be applied if the LIKE
3781       pattern was passed as a parameter, and constraint exclusion
3782       depending on a parameter value didn't work either.
3783      </para>
3784     </listitem>
3785
3786     <listitem>
3787      <para>
3788       Fix planner failure when an indexable <function>MIN</> or
3789       <function>MAX</> aggregate is used with <literal>DISTINCT</> or
3790       <literal>ORDER BY</> (Tom)
3791      </para>
3792     </listitem>
3793
3794     <listitem>
3795      <para>
3796       Fix planner to ensure it never uses a <quote>physical tlist</> for a
3797       plan node that is feeding a Sort node (Tom)
3798      </para>
3799
3800      <para>
3801       This led to the sort having to push around more data than it really
3802       needed to, since unused column values were included in the sorted
3803       data.
3804      </para>
3805     </listitem>
3806
3807     <listitem>
3808      <para>
3809       Avoid unnecessary copying of query strings (Tom)
3810      </para>
3811
3812      <para>
3813       This fixes a performance problem introduced in 8.3.0 when a very large
3814       number of commands are submitted as a single query string.
3815      </para>
3816     </listitem>
3817
3818     <listitem>
3819      <para>
3820       Make <function>TransactionIdIsCurrentTransactionId()</> use binary
3821       search instead of linear search when checking child-transaction XIDs
3822       (Heikki)
3823      </para>
3824
3825      <para>
3826       This fixes some cases in which 8.3.0 was significantly
3827       slower than earlier releases.
3828      </para>
3829     </listitem>
3830
3831     <listitem>
3832      <para>
3833       Fix conversions between ISO-8859-5 and other encodings to handle
3834       Cyrillic <quote>Yo</> characters (<literal>e</> and <literal>E</> with
3835       two dots) (Sergey Burladyan)
3836      </para>
3837     </listitem>
3838
3839     <listitem>
3840      <para>
3841       Fix several datatype input functions, notably <function>array_in()</>,
3842       that were allowing unused bytes in their results to contain
3843       uninitialized, unpredictable values (Tom)
3844      </para>
3845
3846      <para>
3847       This could lead to failures in which two apparently identical literal
3848       values were not seen as equal, resulting in the parser complaining
3849       about unmatched <literal>ORDER BY</> and <literal>DISTINCT</>
3850       expressions.
3851      </para>
3852     </listitem>
3853
3854     <listitem>
3855      <para>
3856       Fix a corner case in regular-expression substring matching
3857       (<literal>substring(<replaceable>string</> from
3858       <replaceable>pattern</>)</literal>) (Tom)
3859      </para>
3860
3861      <para>
3862       The problem occurs when there is a match to the pattern overall but
3863       the user has specified a parenthesized subexpression and that
3864       subexpression hasn't got a match.  An example is
3865       <literal>substring('foo' from 'foo(bar)?')</>.
3866       This should return NULL, since <literal>(bar)</> isn't matched, but
3867       it was mistakenly returning the whole-pattern match instead (ie,
3868       <literal>foo</>).
3869      </para>
3870     </listitem>
3871
3872     <listitem>
3873      <para>
3874       Prevent cancellation of an auto-vacuum that was launched to prevent
3875       XID wraparound (Alvaro)
3876      </para>
3877     </listitem>
3878
3879     <listitem>
3880      <para>
3881       Improve <command>ANALYZE</>'s handling of in-doubt tuples (those
3882       inserted or deleted by a not-yet-committed transaction) so that the
3883       counts it reports to the stats collector are more likely to be correct
3884       (Pavan Deolasee)
3885      </para>
3886     </listitem>
3887
3888     <listitem>
3889      <para>
3890       Fix <application>initdb</> to reject a relative path for its
3891       <literal>--xlogdir</> (<literal>-X</>) option (Tom)
3892      </para>
3893     </listitem>
3894
3895     <listitem>
3896      <para>
3897       Make <application>psql</> print tab characters as an appropriate
3898       number of spaces, rather than <literal>\x09</literal> as was done in
3899       8.3.0 and 8.3.1 (Bruce)
3900      </para>
3901     </listitem>
3902
3903     <listitem>
3904      <para>
3905       Update time zone data files to <application>tzdata</> release 2008c (for
3906       DST law changes in Morocco, Iraq, Choibalsan, Pakistan, Syria, Cuba, and
3907       Argentina/San_Luis)
3908      </para>
3909     </listitem>
3910
3911     <listitem>
3912      <para>
3913       Add <function>ECPGget_PGconn()</> function to
3914       <application>ecpglib</> (Michael)
3915      </para>
3916     </listitem>
3917
3918     <listitem>
3919      <para>
3920       Fix incorrect result from <application>ecpg</>'s
3921       <function>PGTYPEStimestamp_sub()</> function (Michael)
3922      </para>
3923     </listitem>
3924
3925     <listitem>
3926      <para>
3927       Fix handling of continuation line markers in <application>ecpg</>
3928       (Michael)
3929      </para>
3930     </listitem>
3931
3932     <listitem>
3933      <para>
3934       Fix possible crashes in <filename>contrib/cube</> functions (Tom)
3935      </para>
3936     </listitem>
3937
3938     <listitem>
3939      <para>
3940       Fix core dump in <filename>contrib/xml2</>'s
3941       <function>xpath_table()</> function when the input query returns a
3942       NULL value (Tom)
3943      </para>
3944     </listitem>
3945
3946     <listitem>
3947      <para>
3948       Fix <filename>contrib/xml2</>'s makefile to not override
3949       <literal>CFLAGS</>, and make it auto-configure properly for
3950       <application>libxslt</> present or not (Tom)
3951      </para>
3952     </listitem>
3953
3954    </itemizedlist>
3955
3956   </sect2>
3957  </sect1>
3958
3959  <sect1 id="release-8-3-1">
3960   <title>Release 8.3.1</title>
3961
3962   <note>
3963   <title>Release date</title>
3964   <simpara>2008-03-17</simpara>
3965   </note>
3966
3967   <para>
3968    This release contains a variety of fixes from 8.3.0.
3969    For information about new features in the 8.3 major release, see
3970    <xref linkend="release-8-3">.
3971   </para>
3972
3973   <sect2>
3974    <title>Migration to Version 8.3.1</title>
3975
3976    <para>
3977     A dump/restore is not required for those running 8.3.X.
3978     However, you might need to <command>REINDEX</> indexes on textual
3979     columns after updating, if you are affected by the Windows locale
3980     issue described below.
3981    </para>
3982
3983   </sect2>
3984
3985   <sect2>
3986    <title>Changes</title>
3987
3988    <itemizedlist>
3989
3990     <listitem>
3991      <para>
3992       Fix character string comparison for Windows locales that consider
3993       different character combinations as equal (Tom)
3994      </para>
3995
3996      <para>
3997       This fix applies only on Windows and only when using UTF-8
3998       database encoding.  The same fix was made for all other cases
3999       over two years ago, but Windows with UTF-8 uses a separate code
4000       path that was not updated.  If you are using a locale that
4001       considers some non-identical strings as equal, you may need to
4002       <command>REINDEX</> to fix existing indexes on textual columns.
4003      </para>
4004     </listitem>
4005
4006     <listitem>
4007      <para>
4008       Repair corner-case bugs in <command>VACUUM FULL</> (Tom)
4009      </para>
4010
4011      <para>
4012       A potential deadlock between concurrent <command>VACUUM FULL</>
4013       operations on different system catalogs was introduced in 8.2.
4014       This has now been corrected.  8.3 made this worse because the
4015       deadlock could occur within a critical code section, making it
4016       a PANIC rather than just ERROR condition.
4017      </para>
4018
4019      <para>
4020       Also, a <command>VACUUM FULL</> that failed partway through
4021       vacuuming a system catalog could result in cache corruption in
4022       concurrent database sessions.
4023      </para>
4024
4025      <para>
4026       Another <command>VACUUM FULL</> bug introduced in 8.3 could
4027       result in a crash or out-of-memory report when dealing with
4028       pages containing no live tuples.
4029      </para>
4030     </listitem>
4031
4032     <listitem>
4033      <para>
4034       Fix misbehavior of foreign key checks involving <type>character</>
4035       or <type>bit</> columns (Tom)
4036      </para>
4037
4038      <para>
4039       If the referencing column were of a different but compatible type
4040       (for instance <type>varchar</>), the constraint was enforced incorrectly.
4041      </para>
4042     </listitem>
4043
4044     <listitem>
4045      <para>
4046       Avoid needless deadlock failures in no-op foreign-key checks (Stephan
4047       Szabo, Tom)
4048      </para>
4049     </listitem>
4050
4051     <listitem>
4052      <para>
4053       Fix possible core dump when re-planning a prepared query (Tom)
4054      </para>
4055
4056      <para>
4057       This bug affected only protocol-level prepare operations, not
4058       SQL <command>PREPARE</>, and so tended to be seen only with
4059       JDBC, DBI, and other client-side drivers that use prepared
4060       statements heavily.
4061      </para>
4062     </listitem>
4063
4064     <listitem>
4065      <para>
4066       Fix possible failure when re-planning a query that calls an SPI-using
4067       function (Tom)
4068      </para>
4069     </listitem>
4070
4071     <listitem>
4072      <para>
4073       Fix failure in row-wise comparisons involving columns of different
4074       datatypes (Tom)
4075      </para>
4076     </listitem>
4077
4078     <listitem>
4079      <para>
4080       Fix longstanding <command>LISTEN</>/<command>NOTIFY</>
4081       race condition (Tom)
4082      </para>
4083
4084      <para>
4085       In rare cases a session that had just executed a
4086       <command>LISTEN</> might not get a notification, even though
4087       one would be expected because the concurrent transaction executing
4088       <command>NOTIFY</> was observed to commit later.
4089      </para>
4090
4091      <para>
4092       A side effect of the fix is that a transaction that has executed
4093       a not-yet-committed <command>LISTEN</> command will not see any
4094       row in <structname>pg_listener</> for the <command>LISTEN</>,
4095       should it choose to look; formerly it would have.  This behavior
4096       was never documented one way or the other, but it is possible that
4097       some applications depend on the old behavior.
4098      </para>
4099     </listitem>
4100
4101     <listitem>
4102      <para>
4103       Disallow <command>LISTEN</> and <command>UNLISTEN</> within a
4104       prepared transaction (Tom)
4105      </para>
4106
4107      <para>
4108       This was formerly allowed but trying to do it had various unpleasant
4109       consequences, notably that the originating backend could not exit
4110       as long as an <command>UNLISTEN</> remained uncommitted.
4111      </para>
4112     </listitem>
4113
4114     <listitem>
4115      <para>
4116       Disallow dropping a temporary table within a
4117       prepared transaction (Heikki)
4118      </para>
4119
4120      <para>
4121       This was correctly disallowed by 8.1, but the check was inadvertently
4122       broken in 8.2 and 8.3.
4123      </para>
4124     </listitem>
4125
4126     <listitem>
4127      <para>
4128       Fix rare crash when an error occurs during a query using a hash index
4129       (Heikki)
4130      </para>
4131     </listitem>
4132
4133     <listitem>
4134      <para>
4135       Fix incorrect comparison of <type>tsquery</> values (Teodor)
4136      </para>
4137     </listitem>
4138
4139     <listitem>
4140      <para>
4141       Fix incorrect behavior of <literal>LIKE</> with non-ASCII characters
4142       in single-byte encodings (Rolf Jentsch)
4143      </para>
4144     </listitem>
4145
4146     <listitem>
4147      <para>
4148       Disable <function>xmlvalidate</> (Tom)
4149      </para>
4150
4151      <para>
4152       This function should have been removed before 8.3 release, but
4153       was inadvertently left in the source code.  It poses a small
4154       security risk since unprivileged users could use it to read the
4155       first few characters of any file accessible to the server.
4156      </para>
4157     </listitem>
4158
4159     <listitem>
4160      <para>
4161       Fix memory leaks in certain usages of set-returning functions (Neil)
4162      </para>
4163     </listitem>
4164
4165     <listitem>
4166      <para>
4167       Make <function>encode(<replaceable>bytea</>, 'escape')</> convert all
4168       high-bit-set byte values into <literal>\</><replaceable>nnn</> octal
4169       escape sequences (Tom)
4170      </para>
4171
4172      <para>
4173       This is necessary to avoid encoding problems when the database
4174       encoding is multi-byte.  This change could pose compatibility issues
4175       for applications that are expecting specific results from
4176       <function>encode</>.
4177      </para>
4178     </listitem>
4179
4180     <listitem>
4181      <para>
4182       Fix input of datetime values for February 29 in years BC (Tom)
4183      </para>
4184
4185      <para>
4186       The former coding was mistaken about which years were leap years.
4187      </para>
4188     </listitem>
4189
4190     <listitem>
4191      <para>
4192       Fix <quote>unrecognized node type</> error in some variants of
4193       <command>ALTER OWNER</> (Tom)
4194      </para>
4195     </listitem>
4196
4197     <listitem>
4198      <para>
4199       Avoid tablespace permissions errors in <command>CREATE TABLE LIKE
4200       INCLUDING INDEXES</> (Tom)
4201      </para>
4202     </listitem>
4203
4204     <listitem>
4205      <para>
4206       Ensure <structname>pg_stat_activity</>.<structfield>waiting</> flag
4207       is cleared when a lock wait is aborted (Tom)
4208      </para>
4209     </listitem>
4210
4211     <listitem>
4212      <para>
4213       Fix handling of process permissions on Windows Vista (Dave, Magnus)
4214      </para>
4215
4216      <para>
4217       In particular, this fix allows starting the server as the Administrator
4218       user.
4219      </para>
4220     </listitem>
4221
4222     <listitem>
4223      <para>
4224       Update time zone data files to <application>tzdata</> release 2008a
4225       (in particular, recent Chile changes); adjust timezone abbreviation
4226       <literal>VET</> (Venezuela) to mean UTC-4:30, not UTC-4:00 (Tom)
4227      </para>
4228     </listitem>
4229
4230     <listitem>
4231      <para>
4232       Fix <application>ecpg</> problems with arrays (Michael)
4233      </para>
4234     </listitem>
4235
4236     <listitem>
4237      <para>
4238       Fix <application>pg_ctl</> to correctly extract the postmaster's port
4239       number from command-line options (Itagaki Takahiro, Tom)
4240      </para>
4241
4242      <para>
4243       Previously, <literal>pg_ctl start -w</> could try to contact the
4244       postmaster on the wrong port, leading to bogus reports of startup
4245       failure.
4246      </para>
4247     </listitem>
4248
4249     <listitem>
4250      <para>
4251       Use <option>-fwrapv</> to defend against possible misoptimization
4252       in recent <application>gcc</> versions (Tom)
4253      </para>
4254
4255      <para>
4256       This is known to be necessary when building <productname>PostgreSQL</>
4257       with <application>gcc</> 4.3 or later.
4258      </para>
4259     </listitem>
4260
4261     <listitem>
4262      <para>
4263       Enable building <filename>contrib/uuid-ossp</> with MSVC (Hiroshi Saito)
4264      </para>
4265     </listitem>
4266
4267    </itemizedlist>
4268
4269   </sect2>
4270  </sect1>
4271
4272  <sect1 id="release-8-3">
4273   <title>Release 8.3</title>
4274
4275   <note>
4276    <title>Release date</title>
4277    <simpara>2008-02-04</simpara>
4278   </note>
4279
4280   <sect2>
4281    <title>Overview</title>
4282
4283    <para>
4284     With significant new functionality and performance enhancements,
4285     this release represents a major leap forward for
4286     <productname>PostgreSQL</>. This was made possible by a growing
4287     community that has dramatically accelerated the pace of
4288     development. This release adds the following major features:
4289    </para>
4290
4291    <itemizedlist>
4292
4293     <listitem>
4294      <para>
4295       Full text search is integrated into the core database system
4296      </para>
4297     </listitem>
4298
4299     <listitem>
4300      <para>
4301       Support for the SQL/XML standard, including new operators and an
4302       <type>XML</type> data type
4303      </para>
4304     </listitem>
4305
4306     <listitem>
4307      <para>
4308       Enumerated data types (<type>ENUM</type>)
4309      </para>
4310     </listitem>
4311
4312     <listitem>
4313      <para>
4314       Arrays of composite types
4315      </para>
4316     </listitem>
4317
4318     <listitem>
4319      <para>
4320       Universally Unique Identifier (<type>UUID</>) data type
4321      </para>
4322     </listitem>
4323
4324     <listitem>
4325      <para>
4326       Add control over whether <literal>NULL</>s sort first or last
4327      </para>
4328     </listitem>
4329
4330     <listitem>
4331      <para>
4332       Updatable cursors
4333      </para>
4334     </listitem>
4335
4336     <listitem>
4337      <para>
4338       Server configuration parameters can now be set on a per-function
4339       basis
4340      </para>
4341     </listitem>
4342
4343     <listitem>
4344      <para>
4345       User-defined types can now have type modifiers
4346      </para>
4347     </listitem>
4348
4349     <listitem>
4350      <para>
4351       Automatically re-plan cached queries when table
4352       definitions change or statistics are updated
4353      </para>
4354     </listitem>
4355
4356     <listitem>
4357      <para>
4358       Numerous improvements in logging and statistics collection
4359      </para>
4360     </listitem>
4361
4362     <listitem>
4363      <para>
4364       Support Security Service Provider Interface (<acronym>SSPI</>) for
4365       authentication on Windows
4366      </para>
4367     </listitem>
4368
4369     <listitem>
4370      <para>
4371       Support multiple concurrent autovacuum processes, and other
4372       autovacuum improvements
4373      </para>
4374     </listitem>
4375
4376     <listitem>
4377      <para>
4378       Allow the whole <productname>PostgreSQL</> distribution to be compiled
4379       with <productname>Microsoft Visual C++</>
4380      </para>
4381     </listitem>
4382
4383    </itemizedlist>
4384
4385    <para>
4386     Major performance improvements are listed below.  Most of
4387     these enhancements are automatic and do not require user changes or
4388     tuning:
4389    </para>
4390
4391   <itemizedlist>
4392
4393     <listitem>
4394      <para>
4395       Asynchronous commit delays writes to WAL during transaction commit
4396      </para>
4397     </listitem>
4398
4399     <listitem>
4400      <para>
4401       Checkpoint writes can be spread over a longer time period to smooth
4402       the I/O spike during each checkpoint
4403      </para>
4404     </listitem>
4405
4406     <listitem>
4407      <para>
4408       Heap-Only Tuples (<acronym>HOT</>) accelerate space reuse for
4409       most <command>UPDATE</>s and <command>DELETE</>s
4410      </para>
4411     </listitem>
4412
4413     <listitem>
4414      <para>
4415       Just-in-time background writer strategy improves disk write
4416       efficiency
4417      </para>
4418     </listitem>
4419
4420     <listitem>
4421      <para>
4422       Using non-persistent transaction IDs for read-only transactions
4423       reduces overhead and <command>VACUUM</> requirements
4424      </para>
4425     </listitem>
4426
4427     <listitem>
4428      <para>
4429       Per-field and per-row storage overhead has been reduced
4430      </para>
4431     </listitem>
4432
4433     <listitem>
4434      <para>
4435       Large sequential scans no longer force out frequently used
4436       cached pages
4437      </para>
4438     </listitem>
4439
4440     <listitem>
4441      <para>
4442       Concurrent large sequential scans can now share disk reads
4443      </para>
4444     </listitem>
4445
4446     <listitem>
4447      <para>
4448       <literal>ORDER BY ... LIMIT</> can be done without sorting
4449      </para>
4450     </listitem>
4451
4452    </itemizedlist>
4453
4454    <para>
4455     The above items are explained in more detail in the sections below.
4456    </para>
4457
4458   </sect2>
4459
4460   <sect2>
4461    <title>Migration to Version 8.3</title>
4462
4463    <para>
4464     A dump/restore using <application>pg_dump</application> is
4465     required for those wishing to migrate data from any previous
4466     release.
4467    </para>
4468
4469    <para>
4470     Observe the following incompatibilities:
4471    </para>
4472
4473    <sect3>
4474     <title>General</title>
4475     <itemizedlist>
4476
4477      <listitem>
4478       <para>
4479        Non-character data types are no longer automatically cast to
4480        <type>TEXT</> (Peter, Tom)
4481       </para>
4482
4483       <para>
4484        Previously, if a non-character value was supplied to an operator or
4485        function that requires <type>text</> input, it was automatically
4486        cast to <type>text</>, for most (though not all) built-in data types.
4487        This no longer happens: an explicit cast to <type>text</> is now
4488        required for all non-character-string types.  For example, these
4489        expressions formerly worked:
4490
4491 <programlisting>
4492 substr(current_date, 1, 4)
4493 23 LIKE '2%'
4494 </programlisting>
4495
4496        but will now draw <quote>function does not exist</> and <quote>operator
4497        does not exist</> errors respectively.  Use an explicit cast instead:
4498
4499 <programlisting>
4500 substr(current_date::text, 1, 4)
4501 23::text LIKE '2%'
4502 </programlisting>
4503
4504        (Of course, you can use the more verbose <literal>CAST()</> syntax too.)
4505        The reason for the change is that these automatic casts too often caused
4506        surprising behavior.  An example is that in previous releases, this
4507        expression was accepted but did not do what was expected:
4508
4509 <programlisting>
4510 current_date &lt; 2017-11-17
4511 </programlisting>
4512
4513        This is actually comparing a date to an integer, which should be
4514        (and now is) rejected &mdash; but in the presence of automatic
4515        casts both sides were cast to <type>text</> and a textual comparison
4516        was done, because the <literal>text &lt; text</> operator was able
4517        to match the expression when no other <literal>&lt;</> operator could.
4518       </para>
4519
4520       <para>
4521        Types <type>char(<replaceable>n</>)</type> and
4522        <type>varchar(<replaceable>n</>)</type> still cast to <type>text</>
4523        automatically.  Also, automatic casting to <type>text</> still works for
4524        inputs to the concatenation (<literal>||</>) operator, so long as least
4525        one input is a character-string type.
4526       </para>
4527      </listitem>
4528
4529      <listitem>
4530       <para>
4531         Full text search features from <filename>contrib/tsearch2</> have
4532         been moved into the core server, with some minor syntax changes
4533       </para>
4534
4535       <para>
4536        <filename>contrib/tsearch2</> now contains a compatibility
4537        interface.
4538       </para>
4539      </listitem>
4540
4541      <listitem>
4542       <para>
4543        <literal>ARRAY(SELECT ...)</literal>, where the <command>SELECT</>
4544        returns no rows, now returns an empty array, rather than NULL
4545        (Tom)
4546       </para>
4547      </listitem>
4548
4549      <listitem>
4550       <para>
4551        The array type name for a base data type is no longer always the base
4552        type's name with an underscore prefix
4553       </para>
4554
4555       <para>
4556        The old naming convention is still honored when possible, but
4557        application code should no longer depend on it. Instead
4558        use the new <literal>pg_type.typarray</literal> column to
4559        identify the array data type associated with a given type.
4560       </para>
4561      </listitem>
4562
4563      <listitem>
4564       <para>
4565        <literal>ORDER BY ... USING</> <replaceable>operator</> must now
4566        use a less-than or greater-than <replaceable>operator</> that is
4567        defined in a btree operator class
4568       </para>
4569
4570       <para>
4571        This restriction was added to prevent inconsistent results.
4572       </para>
4573      </listitem>
4574
4575      <listitem>
4576       <para>
4577        <command>SET LOCAL</command> changes now persist until
4578        the end of the outermost transaction, unless rolled back (Tom)
4579       </para>
4580
4581       <para>
4582        Previously <command>SET LOCAL</command>'s effects were lost
4583        after subtransaction commit (<command>RELEASE SAVEPOINT</>
4584        or exit from a PL/pgSQL exception block).
4585       </para>
4586      </listitem>
4587
4588      <listitem>
4589       <para>
4590        Commands rejected in transaction blocks are now also rejected in
4591        multiple-statement query strings (Tom)
4592       </para>
4593
4594       <para>
4595        For example, <literal>"BEGIN; DROP DATABASE; COMMIT"</> will now be
4596        rejected even if submitted as a single query message.
4597       </para>
4598      </listitem>
4599
4600      <listitem>
4601       <para>
4602        <command>ROLLBACK</> outside a transaction block now
4603        issues <literal>NOTICE</> instead of <literal>WARNING</> (Bruce)
4604       </para>
4605      </listitem>
4606
4607      <listitem>
4608       <para>
4609        Prevent <command>NOTIFY</command>/<command>LISTEN</command>/<command>UNLISTEN</command>
4610        from accepting schema-qualified names (Bruce)
4611       </para>
4612
4613       <para>
4614        Formerly, these commands accepted <literal>schema.relation</> but
4615        ignored the schema part, which was confusing.
4616       </para>
4617      </listitem>
4618
4619      <listitem>
4620       <para>
4621        <command>ALTER SEQUENCE</> no longer affects the sequence's
4622        <function>currval()</> state (Tom)
4623       </para>
4624      </listitem>
4625
4626      <listitem>
4627       <para>
4628        Foreign keys now must match indexable conditions for
4629        cross-data-type references (Tom)
4630       </para>
4631
4632       <para>
4633        This improves semantic consistency and helps avoid
4634        performance problems.
4635       </para>
4636      </listitem>
4637
4638      <listitem>
4639       <para>
4640        Restrict object size functions to users who have reasonable
4641        permissions to view such information (Tom)
4642       </para>
4643
4644       <para>
4645        For example, <function>pg_database_size()</function> now requires
4646        <literal>CONNECT</> permission, which is granted to everyone by
4647        default. <function>pg_tablespace_size()</function> requires
4648        <literal>CREATE</> permission in the tablespace, or is allowed if
4649        the tablespace is the default tablespace for the database.
4650       </para>
4651      </listitem>
4652
4653      <listitem>
4654       <para>
4655        Remove the undocumented <literal>!!=</> (not in) operator (Tom)
4656       </para>
4657
4658       <para>
4659        <literal>NOT IN (SELECT ...)</literal> is the proper way to
4660        perform this operation.
4661       </para>
4662      </listitem>
4663
4664      <listitem>
4665       <para>
4666        Internal hashing functions are now more uniformly-distributed (Tom)
4667       </para>
4668
4669       <para>
4670        If application code was computing and storing hash values using
4671        internal <productname>PostgreSQL</> hashing functions, the hash
4672        values must be regenerated.
4673       </para>
4674      </listitem>
4675
4676      <listitem>
4677       <para>
4678        C-code conventions for handling variable-length data values
4679        have changed (Greg Stark, Tom)
4680       </para>
4681
4682       <para>
4683        The new <function>SET_VARSIZE()</> macro <emphasis>must</> be used
4684        to set the length of generated <type>varlena</> values. Also, it
4685        might be necessary to expand (<quote>de-TOAST</quote>) input values
4686        in more cases.
4687       </para>
4688      </listitem>
4689
4690      <listitem>
4691       <para>
4692        Continuous archiving no longer reports each successful archive
4693        operation to the server logs unless <literal>DEBUG</> level is used
4694        (Simon)
4695       </para>
4696      </listitem>
4697
4698     </itemizedlist>
4699
4700     </sect3>
4701
4702     <sect3>
4703      <title>Configuration Parameters</title>
4704
4705     <itemizedlist>
4706
4707      <listitem>
4708       <para>
4709        Numerous changes in administrative server parameters
4710       </para>
4711
4712       <para>
4713        <varname>bgwriter_lru_percent</>,
4714        <varname>bgwriter_all_percent</>,
4715        <varname>bgwriter_all_maxpages</>,
4716        <varname>stats_start_collector</>, and
4717        <varname>stats_reset_on_server_start</> are removed.
4718        <varname>redirect_stderr</> is renamed to
4719        <varname>logging_collector</>.
4720        <varname>stats_command_string</> is renamed to
4721        <varname>track_activities</>.
4722        <varname>stats_block_level</> and <varname>stats_row_level</>
4723        are merged into <varname>track_counts</>.
4724        A new boolean configuration parameter, <varname>archive_mode</>,
4725        controls archiving. Autovacuum's default settings have changed.
4726       </para>
4727      </listitem>
4728
4729      <listitem>
4730       <para>
4731        Remove <varname>stats_start_collector</varname> parameter (Tom)
4732       </para>
4733
4734       <para>
4735        We now always start the collector process, unless <acronym>UDP</>
4736        socket creation fails.
4737       </para>
4738      </listitem>
4739
4740      <listitem>
4741       <para>
4742        Remove <varname>stats_reset_on_server_start</varname> parameter (Tom)
4743       </para>
4744
4745       <para>
4746        This was removed because <function>pg_stat_reset()</function>
4747        can be used for this purpose.
4748       </para>
4749      </listitem>
4750
4751      <listitem>
4752       <para>
4753        Commenting out a parameter in <filename>postgresql.conf</> now
4754        causes it to revert to its default value (Joachim Wieland)
4755       </para>
4756
4757       <para>
4758        Previously, commenting out an entry left the parameter's value unchanged
4759        until the next server restart.
4760       </para>
4761      </listitem>
4762
4763     </itemizedlist>
4764
4765     </sect3>
4766
4767
4768     <sect3>
4769      <title>Character Encodings</title>
4770
4771     <itemizedlist>
4772
4773      <listitem>
4774       <para>
4775        Add more checks for invalidly-encoded data (Andrew)
4776       </para>
4777
4778       <para>
4779        This change plugs some holes that existed in literal backslash
4780        escape string processing and <command>COPY</command> escape
4781        processing. Now the de-escaped string is rechecked to see if the
4782        result created an invalid multi-byte character.
4783       </para>
4784      </listitem>
4785
4786      <listitem>
4787       <para>
4788        Disallow database encodings that are inconsistent with the server's
4789        locale setting (Tom)
4790       </para>
4791
4792       <para>
4793        On most platforms, <literal>C</> locale is the only locale that
4794        will work with any database encoding.  Other locale settings imply
4795        a specific encoding and will misbehave if the database encoding
4796        is something different.  (Typical symptoms include bogus textual
4797        sort order and wrong results from <function>upper()</> or
4798        <function>lower()</>.)  The server now rejects attempts to create
4799        databases that have an incompatible encoding.
4800       </para>
4801      </listitem>
4802
4803      <listitem>
4804       <para>
4805        Ensure that <function>chr()</function> cannot create
4806        invalidly-encoded values (Andrew)
4807       </para>
4808
4809       <para>
4810        In UTF8-encoded databases the argument of <function>chr()</function> is
4811        now treated as a Unicode code point. In other multi-byte encodings
4812        <function>chr()</function>'s argument must designate a 7-bit ASCII
4813        character.  Zero is no longer accepted.
4814        <function>ascii()</function> has been adjusted to match.
4815       </para>
4816      </listitem>
4817
4818      <listitem>
4819       <para>
4820        Adjust <function>convert()</function> behavior to ensure encoding
4821        validity (Andrew)
4822       </para>
4823
4824       <para>
4825        The two argument form of <function>convert()</function> has been
4826        removed. The three argument form now takes a <type>bytea</type>
4827        first argument and returns a <type>bytea</type>. To cover the
4828        loss of functionality, three new functions have been added:
4829       </para>
4830
4831       <itemizedlist>
4832        <listitem>
4833         <para>
4834          <function>convert_from(bytea, name)</function> returns
4835          <type>text</> &mdash; converts the first argument from the named
4836          encoding to the database encoding
4837         </para>
4838        </listitem>
4839
4840        <listitem>
4841         <para>
4842          <function>convert_to(text, name)</function> returns
4843          <type>bytea</> &mdash; converts the first argument from the
4844          database encoding to the named encoding
4845         </para>
4846        </listitem>
4847
4848        <listitem>
4849         <para>
4850          <function>length(bytea, name)</function> returns
4851          <type>integer</> &mdash; gives the length of the first
4852          argument in characters in the named encoding
4853         </para>
4854        </listitem>
4855       </itemizedlist>
4856      </listitem>
4857
4858      <listitem>
4859       <para>
4860        Remove <literal>convert(argument USING conversion_name)</literal>
4861        (Andrew)
4862       </para>
4863
4864       <para>
4865        Its behavior did not match the SQL standard.
4866       </para>
4867      </listitem>
4868
4869      <listitem>
4870       <para>
4871        Make JOHAB encoding client-only (Tatsuo)
4872       </para>
4873
4874       <para>
4875        JOHAB is not safe as a server-side encoding.
4876       </para>
4877      </listitem>
4878
4879     </itemizedlist>
4880
4881    </sect3>
4882
4883   </sect2>
4884
4885   <sect2>
4886    <title>Changes</title>
4887
4888    <para>
4889     Below you will find a detailed account of the
4890     changes between <productname>PostgreSQL</productname> 8.3 and
4891     the previous major release.
4892    </para>
4893
4894    <sect3>
4895     <title>Performance</title>
4896     <itemizedlist>
4897
4898      <listitem>
4899       <para>
4900        Asynchronous commit delays writes to WAL during transaction commit
4901        (Simon)
4902       </para>
4903
4904       <para>
4905        This feature dramatically increases performance for short data-modifying
4906        transactions.  The disadvantage is that because disk writes are delayed,
4907        if the database or operating system crashes before data is written to
4908        the disk, committed data will be lost.  This feature is useful for
4909        applications that can accept some data loss.  Unlike turning off
4910        <varname>fsync</varname>, using asynchronous commit does not put
4911        database consistency at risk; the worst case is that after a crash the
4912        last few reportedly-committed transactions might not be committed after
4913        all.
4914        This feature is enabled by turning off <varname>synchronous_commit</>
4915        (which can be done per-session or per-transaction, if some transactions
4916        are critical and others are not).
4917        <varname>wal_writer_delay</> can be adjusted to control the maximum
4918        delay before transactions actually reach disk.
4919       </para>
4920      </listitem>
4921
4922      <listitem>
4923       <para>
4924        Checkpoint writes can be spread over a longer time period to smooth
4925        the I/O spike during each checkpoint (Itagaki Takahiro and Heikki
4926        Linnakangas)
4927       </para>
4928
4929       <para>
4930        Previously all modified buffers were forced to disk as quickly as
4931        possible during a
4932        checkpoint, causing an I/O spike that decreased server performance.
4933        This new approach spreads out disk writes during checkpoints,
4934        reducing peak I/O usage. (User-requested and shutdown checkpoints
4935        are still written as quickly as possible.)
4936       </para>
4937      </listitem>
4938
4939      <listitem>
4940       <para>
4941        Heap-Only Tuples (<acronym>HOT</>) accelerate space reuse for most
4942        <command>UPDATE</>s and <command>DELETE</>s (Pavan Deolasee, with
4943        ideas from many others)
4944       </para>
4945
4946       <para>
4947        <command>UPDATE</>s and <command>DELETE</>s leave dead tuples
4948        behind, as do failed <command>INSERT</>s.  Previously only
4949        <command>VACUUM</> could reclaim space taken by dead tuples. With
4950        <acronym>HOT</> dead tuple space can be automatically reclaimed at
4951        the time of <command>INSERT</> or <command>UPDATE</> if no changes
4952        are made to indexed columns.  This allows for more consistent
4953        performance.  Also, <acronym>HOT</> avoids adding duplicate index
4954        entries.
4955       </para>
4956      </listitem>
4957
4958      <listitem>
4959       <para>
4960        Just-in-time background writer strategy improves disk write
4961        efficiency (Greg Smith, Itagaki Takahiro)
4962       </para>
4963
4964       <para>
4965        This greatly reduces the need for manual tuning of the background
4966        writer.
4967       </para>
4968      </listitem>
4969
4970      <listitem>
4971       <para>
4972        Per-field and per-row storage overhead have been reduced
4973        (Greg Stark, Heikki Linnakangas)
4974       </para>
4975
4976       <para>
4977        Variable-length data types with data values less than 128 bytes long
4978        will see a storage decrease of 3 to 6 bytes. For example, two adjacent
4979        <type>char(1)</type> fields now use 4 bytes instead of 16. Row headers
4980        are also 4 bytes shorter than before.
4981       </para>
4982      </listitem>
4983
4984      <listitem>
4985       <para>
4986        Using non-persistent transaction IDs for read-only transactions
4987        reduces overhead and <command>VACUUM</> requirements (Florian Pflug)
4988       </para>
4989
4990       <para>
4991        Non-persistent transaction IDs do not increment the global
4992        transaction counter. Therefore, they reduce the load on
4993        <structname>pg_clog</> and increase the time between forced
4994        vacuums to prevent transaction ID wraparound.
4995        Other performance
4996        improvements were also made that should improve concurrency.
4997       </para>
4998      </listitem>
4999
5000      <listitem>
5001       <para>
5002        Avoid incrementing the command counter after a read-only command (Tom)
5003       </para>
5004
5005       <para>
5006        There was formerly a hard limit of 2<superscript>32</>
5007        (4 billion) commands per transaction.  Now only commands that
5008        actually changed the database count, so while this limit still
5009        exists, it should be significantly less annoying.
5010       </para>
5011      </listitem>
5012
5013      <listitem>
5014       <para>
5015        Create a dedicated <acronym>WAL</> writer process to off-load
5016        work from backends (Simon)
5017       </para>
5018      </listitem>
5019
5020      <listitem>
5021       <para>
5022        Skip unnecessary WAL writes for <command>CLUSTER</command> and
5023        <command>COPY</command> (Simon)
5024       </para>
5025
5026       <para>
5027        Unless WAL archiving is enabled, the system now avoids WAL writes
5028        for <command>CLUSTER</command> and just <function>fsync()</>s the
5029        table at the end of the command.  It also does the same for
5030        <command>COPY</command> if the table was created in the same
5031        transaction.
5032       </para>
5033      </listitem>
5034
5035      <listitem>
5036       <para>
5037        Large sequential scans no longer force out frequently used
5038        cached pages (Simon, Heikki, Tom)
5039       </para>
5040      </listitem>
5041
5042      <listitem>
5043       <para>
5044        Concurrent large sequential scans can now share disk reads (Jeff Davis)
5045       </para>
5046
5047       <para>
5048        This is accomplished by starting the new sequential scan in the
5049        middle of the table (where another sequential scan is already
5050        in-progress) and wrapping around to the beginning to finish.  This
5051        can affect the order of returned rows in a query that does not
5052        specify <literal>ORDER BY</>.  The <varname>synchronize_seqscans</>
5053        configuration parameter can be used to disable this if necessary.
5054       </para>
5055      </listitem>
5056
5057      <listitem>
5058       <para>
5059        <literal>ORDER BY ... LIMIT</> can be done without sorting
5060        (Greg Stark)
5061       </para>
5062
5063       <para>
5064        This is done by sequentially scanning the table and tracking just
5065        the <quote>top N</> candidate rows, rather than performing a
5066        full sort of the entire table.  This is useful when there is no
5067        matching index and the <literal>LIMIT</> is not large.
5068       </para>
5069      </listitem>
5070
5071      <listitem>
5072       <para>
5073        Put a rate limit on messages sent to the statistics
5074        collector by backends
5075        (Tom)
5076       </para>
5077
5078       <para>
5079        This reduces overhead for short transactions, but might sometimes
5080        increase the delay before statistics are tallied.
5081       </para>
5082      </listitem>
5083
5084      <listitem>
5085       <para>
5086        Improve hash join performance for cases with many NULLs (Tom)
5087       </para>
5088      </listitem>
5089
5090      <listitem>
5091       <para>
5092        Speed up operator lookup for cases with non-exact datatype matches (Tom)
5093       </para>
5094      </listitem>
5095
5096     </itemizedlist>
5097
5098    </sect3>
5099
5100    <sect3>
5101     <title>Server</title>
5102     <itemizedlist>
5103
5104      <listitem>
5105       <para>
5106        Autovacuum is now enabled by default (Alvaro)
5107       </para>
5108
5109       <para>
5110        Several changes were made to eliminate disadvantages of having
5111        autovacuum enabled, thereby justifying the change in default.
5112        Several other autovacuum parameter defaults were also modified.
5113       </para>
5114      </listitem>
5115
5116      <listitem>
5117       <para>
5118        Support multiple concurrent autovacuum processes (Alvaro, Itagaki
5119        Takahiro)
5120       </para>
5121
5122       <para>
5123        This allows multiple vacuums to run concurrently.  This prevents
5124        vacuuming of a large table from delaying vacuuming of smaller tables.
5125       </para>
5126      </listitem>
5127
5128      <listitem>
5129       <para>
5130        Automatically re-plan cached queries when table
5131        definitions change or statistics are updated (Tom)
5132       </para>
5133
5134       <para>
5135        Previously PL/PgSQL functions that referenced temporary tables
5136        would fail if the temporary table was dropped and recreated
5137        between function invocations, unless <literal>EXECUTE</> was
5138        used.  This improvement fixes that problem and many related issues.
5139       </para>
5140      </listitem>
5141
5142      <listitem>
5143       <para>
5144        Add a <varname>temp_tablespaces</varname> parameter to control
5145        the tablespaces for temporary tables and files (Jaime Casanova,
5146        Albert Cervera, Bernd Helmle)
5147       </para>
5148
5149       <para>
5150        This parameter defines a list of tablespaces to be used.  This
5151        enables spreading the I/O load across multiple tablespaces. A random
5152        tablespace is chosen each time a temporary object is created.
5153        Temporary files are no longer stored in per-database
5154        <filename>pgsql_tmp/</filename> directories but in per-tablespace
5155        directories.
5156       </para>
5157      </listitem>
5158
5159      <listitem>
5160       <para>
5161        Place temporary tables' TOAST tables in special schemas named
5162        <literal>pg_toast_temp_<replaceable>nnn</></literal> (Tom)
5163       </para>
5164
5165       <para>
5166        This allows low-level code to recognize these tables as temporary,
5167        which enables various optimizations such as not WAL-logging changes
5168        and using local rather than shared buffers for access. This also
5169        fixes a bug wherein backends unexpectedly held open file references
5170        to temporary TOAST tables.
5171       </para>
5172      </listitem>
5173
5174      <listitem>
5175       <para>
5176        Fix problem that a constant flow of new connection requests could
5177        indefinitely delay the postmaster from completing a shutdown or
5178        a crash restart (Tom)
5179       </para>
5180      </listitem>
5181
5182      <listitem>
5183       <para>
5184        Guard against a very-low-probability data loss scenario by preventing
5185        re-use of a deleted table's relfilenode until after the next
5186        checkpoint (Heikki)
5187       </para>
5188      </listitem>
5189
5190      <listitem>
5191       <para>
5192        Fix <command>CREATE CONSTRAINT TRIGGER</>
5193        to convert old-style foreign key trigger definitions into regular
5194        foreign key constraints (Tom)
5195       </para>
5196
5197       <para>
5198        This will ease porting of foreign key constraints carried forward from
5199        pre-7.3 databases, if they were never converted using
5200        <filename>contrib/adddepend</>.
5201       </para>
5202      </listitem>
5203
5204      <listitem>
5205       <para>
5206        Fix <literal>DEFAULT NULL</> to override inherited defaults (Tom)
5207       </para>
5208
5209       <para>
5210        <literal>DEFAULT NULL</> was formerly considered a noise phrase, but it
5211        should (and now does) override non-null defaults that would otherwise
5212        be inherited from a parent table or domain.
5213       </para>
5214      </listitem>
5215
5216      <listitem>
5217       <para>
5218        Add new encodings EUC_JIS_2004 and SHIFT_JIS_2004 (Tatsuo)
5219       </para>
5220
5221       <para>
5222        These new encodings can be converted to and from UTF-8.
5223       </para>
5224      </listitem>
5225
5226      <listitem>
5227       <para>
5228        Change server startup log message from <quote>database system is
5229        ready</quote> to <quote>database system is ready to accept
5230        connections</quote>, and adjust its timing
5231       </para>
5232
5233       <para>
5234        The message now appears only when the postmaster is really ready
5235        to accept connections.
5236       </para>
5237      </listitem>
5238
5239     </itemizedlist>
5240
5241    </sect3>
5242
5243    <sect3>
5244     <title>Monitoring</title>
5245     <itemizedlist>
5246
5247      <listitem>
5248       <para>
5249        Add <varname>log_autovacuum_min_duration</varname> parameter to
5250        support configurable logging of autovacuum activity (Simon, Alvaro)
5251       </para>
5252      </listitem>
5253
5254      <listitem>
5255       <para>
5256        Add <varname>log_lock_waits</varname> parameter to log lock waiting
5257        (Simon)
5258       </para>
5259      </listitem>
5260
5261      <listitem>
5262       <para>
5263        Add <varname>log_temp_files</varname> parameter to log temporary
5264        file usage (Bill Moran)
5265       </para>
5266      </listitem>
5267
5268      <listitem>
5269       <para>
5270        Add <varname>log_checkpoints</varname> parameter to improve logging
5271        of checkpoints (Greg Smith, Heikki)
5272       </para>
5273      </listitem>
5274
5275      <listitem>
5276       <para>
5277        <varname>log_line_prefix</varname> now supports
5278        <literal>%s</literal> and <literal>%c</literal> escapes in all
5279        processes (Andrew)
5280       </para>
5281
5282       <para>
5283        Previously these escapes worked only for user sessions, not for
5284        background database processes.
5285       </para>
5286      </listitem>
5287
5288      <listitem>
5289       <para>
5290        Add <varname>log_restartpoints</varname> to control logging of
5291        point-in-time recovery restart points (Simon)
5292       </para>
5293      </listitem>
5294
5295      <listitem>
5296       <para>
5297        Last transaction end time is now logged at end of recovery and at
5298        each logged restart point (Simon)
5299       </para>
5300      </listitem>
5301
5302      <listitem>
5303       <para>
5304        Autovacuum now reports its activity start time in
5305        <literal>pg_stat_activity</literal> (Tom)
5306       </para>
5307      </listitem>
5308
5309      <listitem>
5310       <para>
5311        Allow server log output in comma-separated value (CSV) format (Arul
5312        Shaji, Greg Smith, Andrew Dunstan)
5313       </para>
5314
5315       <para>
5316        CSV-format log files can easily be loaded into a database table for
5317        subsequent analysis.
5318       </para>
5319      </listitem>
5320
5321      <listitem>
5322       <para>
5323        Use PostgreSQL-supplied timezone support for formatting timestamps
5324        displayed in the server log (Tom)
5325       </para>
5326
5327       <para>
5328        This avoids Windows-specific problems with localized time zone
5329        names that are in the wrong encoding. There is a new
5330        <varname>log_timezone</> parameter that controls the timezone
5331        used in log messages, independently of the client-visible
5332        <varname>timezone</> parameter.
5333       </para>
5334      </listitem>
5335
5336      <listitem>
5337       <para>
5338        New system view <literal>pg_stat_bgwriter</literal> displays
5339        statistics about background writer activity (Magnus)
5340       </para>
5341      </listitem>
5342
5343      <listitem>
5344       <para>
5345        Add new columns for database-wide tuple statistics to
5346        <literal>pg_stat_database</literal> (Magnus)
5347       </para>
5348      </listitem>
5349
5350      <listitem>
5351       <para>
5352        Add an <literal>xact_start</literal> (transaction start time) column to
5353        <literal>pg_stat_activity</literal> (Neil)
5354       </para>
5355
5356       <para>
5357        This makes it easier to identify long-running transactions.
5358       </para>
5359      </listitem>
5360
5361      <listitem>
5362       <para>
5363        Add <literal>n_live_tuples</> and <literal>n_dead_tuples</> columns
5364        to <literal>pg_stat_all_tables</literal> and related views (Glen
5365        Parker)
5366       </para>
5367      </listitem>
5368
5369      <listitem>
5370       <para>
5371        Merge <varname>stats_block_level</> and <varname>stats_row_level</>
5372        parameters into a single parameter <varname>track_counts</>, which
5373        controls all messages sent to the statistics collector process
5374        (Tom)
5375       </para>
5376      </listitem>
5377
5378      <listitem>
5379       <para>
5380        Rename <varname>stats_command_string</varname> parameter to
5381        <varname>track_activities</varname> (Tom)
5382       </para>
5383      </listitem>
5384
5385      <listitem>
5386       <para>
5387        Fix statistical counting of live and dead tuples to recognize that
5388        committed and aborted transactions have different effects (Tom)
5389       </para>
5390      </listitem>
5391
5392     </itemizedlist>
5393
5394    </sect3>
5395
5396    <sect3>
5397     <title>Authentication</title>
5398     <itemizedlist>
5399
5400      <listitem>
5401       <para>
5402        Support Security Service Provider Interface (<acronym>SSPI</>) for
5403        authentication on Windows (Magnus)
5404       </para>
5405      </listitem>
5406
5407      <listitem>
5408       <para>
5409        Support GSSAPI authentication (Henry Hotz, Magnus)
5410       </para>
5411
5412       <para>
5413        This should be preferred to native Kerberos authentication because
5414        GSSAPI is an industry standard.
5415       </para>
5416      </listitem>
5417
5418      <listitem>
5419       <para>
5420        Support a global SSL configuration file (Victor Wagner)
5421       </para>
5422      </listitem>
5423
5424      <listitem>
5425       <para>
5426        Add <varname>ssl_ciphers</> parameter to control accepted SSL ciphers
5427        (Victor Wagner)
5428       </para>
5429      </listitem>
5430
5431      <listitem>
5432       <para>
5433        Add a Kerberos realm parameter, <varname>krb_realm</> (Magnus)
5434       </para>
5435      </listitem>
5436
5437     </itemizedlist>
5438
5439    </sect3>
5440
5441    <sect3>
5442     <title>Write-Ahead Log (<acronym>WAL</>) and Continuous Archiving</title>
5443     <itemizedlist>
5444
5445      <listitem>
5446       <para>
5447        Change the timestamps recorded in transaction WAL records from
5448        time_t to TimestampTz representation (Tom)
5449       </para>
5450
5451       <para>
5452        This provides sub-second resolution in WAL, which can be useful for
5453        point-in-time recovery.
5454       </para>
5455      </listitem>
5456
5457      <listitem>
5458       <para>
5459        Reduce WAL disk space needed by warm standby servers (Simon)
5460       </para>
5461
5462       <para>
5463        This change allows a warm standby server to pass the name of the earliest
5464        still-needed WAL file to the recovery script, allowing automatic removal
5465        of no-longer-needed WAL files.  This is done using <literal>%r</> in
5466        the <varname>restore_command</varname> parameter of
5467        <filename>recovery.conf</filename>.
5468       </para>
5469      </listitem>
5470
5471      <listitem>
5472       <para>
5473        New boolean configuration parameter, <varname>archive_mode</>,
5474        controls archiving (Simon)
5475       </para>
5476
5477       <para>
5478        Previously setting <varname>archive_command</> to an empty string
5479        turned off archiving. Now <varname>archive_mode</> turns archiving
5480        on and off, independently of <varname>archive_command</>. This is
5481        useful for stopping archiving temporarily.
5482       </para>
5483      </listitem>
5484
5485     </itemizedlist>
5486
5487    </sect3>
5488
5489    <sect3>
5490     <title>Queries</title>
5491     <itemizedlist>
5492
5493      <listitem>
5494       <para>
5495        Full text search is integrated into the core database
5496        system (Teodor, Oleg)
5497       </para>
5498
5499       <para>
5500        Text search has been improved, moved into the core code, and is now
5501        installed by default.  <filename>contrib/tsearch2</> now contains
5502        a compatibility interface.
5503       </para>
5504      </listitem>
5505
5506      <listitem>
5507       <para>
5508        Add control over whether <literal>NULL</>s sort first or last (Teodor, Tom)
5509       </para>
5510
5511       <para>
5512        The syntax is <literal>ORDER BY ... NULLS FIRST/LAST</>.
5513       </para>
5514      </listitem>
5515
5516      <listitem>
5517       <para>
5518        Allow per-column ascending/descending (<literal>ASC</>/<literal>DESC</>)
5519        ordering options for indexes (Teodor, Tom)
5520       </para>
5521
5522       <para>
5523        Previously a query using <literal>ORDER BY</> with mixed
5524        <literal>ASC</>/<literal>DESC</> specifiers could not fully use
5525        an index. Now an index can be fully used in such cases if the
5526        index was created with matching
5527        <literal>ASC</>/<literal>DESC</> specifications.
5528        <literal>NULL</> sort order within an index can be controlled, too.
5529       </para>
5530      </listitem>
5531
5532      <listitem>
5533       <para>
5534        Allow <literal>col IS NULL</> to use an index (Teodor)
5535       </para>
5536      </listitem>
5537
5538      <listitem>
5539       <para>
5540        Updatable cursors (Arul Shaji, Tom)
5541       </para>
5542
5543       <para>
5544        This eliminates the need to reference a primary key to
5545        <command>UPDATE</> or <command>DELETE</> rows returned by a cursor.
5546        The syntax is <literal>UPDATE/DELETE WHERE CURRENT OF</>.
5547       </para>
5548      </listitem>
5549
5550      <listitem>
5551       <para>
5552        Allow <literal>FOR UPDATE</literal> in cursors (Arul Shaji, Tom)
5553       </para>
5554      </listitem>
5555
5556      <listitem>
5557       <para>
5558        Create a general mechanism that supports casts to and from the
5559        standard string types (<type>TEXT</type>, <type>VARCHAR</type>,
5560        <type>CHAR</type>) for <emphasis>every</emphasis> datatype, by
5561        invoking the datatype's I/O functions (Tom)
5562       </para>
5563
5564       <para>
5565        Previously, such casts were available only for types that had
5566        specialized function(s) for the purpose.
5567        These new casts are assignment-only in the to-string direction,
5568        explicit-only in the other direction, and therefore should create no
5569        surprising behavior.
5570       </para>
5571      </listitem>
5572
5573      <listitem>
5574       <para>
5575        Allow <literal>UNION</> and related constructs to return a domain
5576        type, when all inputs are of that domain type (Tom)
5577       </para>
5578
5579       <para>
5580        Formerly, the output would be considered to be of the domain's base
5581        type.
5582       </para>
5583      </listitem>
5584
5585      <listitem>
5586       <para>
5587        Allow limited hashing when using two different data types (Tom)
5588       </para>
5589
5590       <para>
5591        This allows hash joins, hash indexes, hashed subplans, and hash
5592        aggregation to be used in situations involving cross-data-type
5593        comparisons, if the data types have compatible hash functions.
5594        Currently, cross-data-type hashing support exists for
5595        <type>smallint</type>/<type>integer</type>/<type>bigint</type>,
5596        and for <type>float4</type>/<type>float8</type>.
5597       </para>
5598      </listitem>
5599
5600      <listitem>
5601       <para>
5602        Improve optimizer logic for detecting when variables are equal
5603        in a <literal>WHERE</> clause (Tom)
5604       </para>
5605
5606       <para>
5607        This allows mergejoins to work with descending sort orders, and
5608        improves recognition of redundant sort columns.
5609       </para>
5610      </listitem>
5611
5612      <listitem>
5613       <para>
5614        Improve performance when planning large inheritance trees in
5615        cases where most tables are excluded by constraints (Tom)
5616       </para>
5617      </listitem>
5618
5619     </itemizedlist>
5620
5621    </sect3>
5622
5623    <sect3>
5624     <title>Object Manipulation</title>
5625     <itemizedlist>
5626
5627      <listitem>
5628
5629       <para>
5630        Arrays of composite types (David Fetter, Andrew, Tom)
5631       </para>
5632
5633       <para>
5634        In addition to arrays of explicitly-declared composite types,
5635        arrays of the rowtypes of regular tables and views are now
5636        supported, except for rowtypes of system catalogs, sequences, and TOAST
5637        tables.
5638       </para>
5639
5640      </listitem>
5641
5642      <listitem>
5643       <para>
5644        Server configuration parameters can now be set on a per-function
5645        basis (Tom)
5646       </para>
5647
5648       <para>
5649        For example, functions can now set their own
5650        <varname>search_path</> to prevent unexpected behavior if a
5651        different <varname>search_path</> exists at run-time.  Security
5652        definer functions should set <varname>search_path</varname> to
5653        avoid security loopholes.
5654       </para>
5655      </listitem>
5656
5657      <listitem>
5658       <para>
5659        <command>CREATE/ALTER FUNCTION</command> now supports
5660        <literal>COST</literal> and <literal>ROWS</literal> options (Tom)
5661       </para>
5662
5663       <para>
5664        <literal>COST</literal> allows specification of the cost of a
5665        function call.  <literal>ROWS</literal> allows specification of
5666        the average number or rows returned by a set-returning function.
5667        These values are used by the optimizer in choosing the best plan.
5668       </para>
5669      </listitem>
5670
5671      <listitem>
5672       <para>
5673        Implement <command>CREATE TABLE LIKE ...  INCLUDING
5674        INDEXES</command> (Trevor Hardcastle, Nikhil Sontakke, Neil)
5675       </para>
5676      </listitem>
5677
5678      <listitem>
5679       <para>
5680        Allow <command>CREATE INDEX CONCURRENTLY</command> to ignore
5681        transactions in other databases (Simon)
5682       </para>
5683      </listitem>
5684
5685      <listitem>
5686       <para>
5687        Add <command>ALTER VIEW ... RENAME TO</command> and <command>ALTER
5688        SEQUENCE ... RENAME TO</command> (David Fetter, Neil)
5689       </para>
5690
5691       <para>
5692        Previously this could only be done via <command>ALTER TABLE ...
5693        RENAME TO</command>.
5694       </para>
5695      </listitem>
5696
5697      <listitem>
5698       <para>
5699        Make <command>CREATE/DROP/RENAME DATABASE</> wait briefly for
5700        conflicting backends to exit before failing (Tom)
5701       </para>
5702
5703       <para>
5704        This increases the likelihood that these commands will succeed.
5705       </para>
5706      </listitem>
5707
5708      <listitem>
5709       <para>
5710        Allow triggers and rules to be deactivated in groups using a
5711        configuration parameter, for replication purposes (Jan)
5712       </para>
5713
5714       <para>
5715        This allows replication systems to disable triggers and rewrite
5716        rules as a group without modifying the system catalogs directly.
5717        The behavior is controlled by <command>ALTER TABLE</> and a new
5718        parameter <varname>session_replication_role</varname>.
5719       </para>
5720      </listitem>
5721
5722      <listitem>
5723       <para>
5724        User-defined types can now have type modifiers (Teodor, Tom)
5725       </para>
5726
5727       <para>
5728        This allows a user-defined type to take a modifier, like
5729        <type>ssnum(7)</>.  Previously only built-in
5730        data types could have modifiers.
5731       </para>
5732      </listitem>
5733
5734     </itemizedlist>
5735
5736    </sect3>
5737
5738    <sect3>
5739     <title>Utility Commands</title>
5740     <itemizedlist>
5741
5742      <listitem>
5743       <para>
5744        Non-superuser database owners now are able to add trusted procedural
5745        languages to their databases by default (Jeremy Drake)
5746       </para>
5747
5748       <para>
5749        While this is reasonably safe, some administrators might wish to
5750        revoke the privilege. It is controlled by
5751        <structname>pg_pltemplate</>.<structfield>tmpldbacreate</>.
5752       </para>
5753      </listitem>
5754
5755      <listitem>
5756       <para>
5757        Allow a session's current parameter setting to be used as the
5758        default for future sessions (Tom)
5759       </para>
5760
5761       <para>
5762        This is done with <literal>SET ... FROM CURRENT</literal> in
5763        <command>CREATE/ALTER FUNCTION</command>, <command>ALTER
5764        DATABASE</command>, or <command>ALTER ROLE</command>.
5765       </para>
5766      </listitem>
5767
5768      <listitem>
5769       <para>
5770        Implement new commands <command>DISCARD ALL</command>,
5771        <command>DISCARD PLANS</command>, <command>DISCARD
5772        TEMPORARY</command>, <command>CLOSE ALL</command>, and
5773        <command>DEALLOCATE ALL</command> (Marko Kreen, Neil)
5774       </para>
5775
5776       <para>
5777        These commands simplify resetting a database session to its initial
5778        state, and are particularly useful for connection-pooling software.
5779       </para>
5780      </listitem>
5781
5782      <listitem>
5783       <para>
5784        Make <command>CLUSTER</command> MVCC-safe (Heikki Linnakangas)
5785       </para>
5786
5787       <para>
5788        Formerly, <command>CLUSTER</command> would discard all tuples
5789        that were committed dead, even if there were still transactions
5790        that should be able to see them under MVCC visibility rules.
5791       </para>
5792      </listitem>
5793
5794      <listitem>
5795       <para>
5796        Add new <command>CLUSTER</command> syntax: <literal>CLUSTER
5797        <replaceable>table</> USING <replaceable>index</></literal>
5798        (Holger Schurig)
5799      </para>
5800
5801       <para>
5802        The old <command>CLUSTER</command> syntax is still supported, but
5803        the new form is considered more logical.
5804       </para>
5805      </listitem>
5806
5807      <listitem>
5808       <para>
5809        Fix <command>EXPLAIN</command> so it can show complex plans
5810        more accurately (Tom)
5811       </para>
5812
5813       <para>
5814        References to subplan outputs are now always shown correctly,
5815        instead of using <literal>?column<replaceable>N</>?</literal>
5816        for complicated cases.
5817       </para>
5818      </listitem>
5819
5820      <listitem>
5821       <para>
5822        Limit the amount of information reported when a user is dropped
5823        (Alvaro)
5824       </para>
5825
5826       <para>
5827        Previously, dropping (or attempting to drop) a user who owned many
5828        objects could result in large <literal>NOTICE</literal> or
5829        <literal>ERROR</literal> messages listing all these objects; this
5830        caused problems for some client applications.  The length of the
5831        message is now limited, although a full list is still sent to the
5832        server log.
5833       </para>
5834      </listitem>
5835
5836     </itemizedlist>
5837
5838    </sect3>
5839
5840    <sect3>
5841     <title>Data Types</title>
5842     <itemizedlist>
5843
5844      <listitem>
5845       <para>
5846        Support for the SQL/XML standard, including new operators and an
5847        <type>XML</type> data type (Nikolay Samokhvalov, Pavel Stehule, Peter)
5848       </para>
5849      </listitem>
5850
5851      <listitem>
5852       <para>
5853        Enumerated data types (<type>ENUM</type>) (Tom Dunstan)
5854       </para>
5855
5856       <para>
5857        This feature provides convenient support for fields that have a
5858        small, fixed set of allowed values.  An example of creating an
5859        <literal>ENUM</> type is
5860        <literal>CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy')</>.
5861       </para>
5862      </listitem>
5863
5864      <listitem>
5865       <para>
5866        Universally Unique Identifier (<type>UUID</>) data type (Gevik
5867        Babakhani, Neil)
5868       </para>
5869
5870       <para>
5871        This closely matches <acronym>RFC</> 4122.
5872       </para>
5873      </listitem>
5874
5875      <listitem>
5876       <para>
5877        Widen the <type>MONEY</type> data type to 64 bits (D'Arcy Cain)
5878       </para>
5879
5880       <para>
5881        This greatly increases the range of supported <type>MONEY</>
5882        values.
5883       </para>
5884      </listitem>
5885
5886      <listitem>
5887       <para>
5888        Fix <type>float4</type>/<type>float8</type> to handle
5889        <literal>Infinity</> and <literal>NAN</> (Not A Number)
5890        consistently (Bruce)
5891       </para>
5892
5893       <para>
5894        The code formerly was not consistent about distinguishing
5895        <literal>Infinity</> from overflow conditions.
5896       </para>
5897      </listitem>
5898
5899      <listitem>
5900       <para>
5901        Allow leading and trailing whitespace during input of
5902        <type>boolean</type> values (Neil)
5903       </para>
5904      </listitem>
5905
5906      <listitem>
5907       <para>
5908        Prevent <command>COPY</> from using digits and lowercase letters as
5909        delimiters (Tom)
5910       </para>
5911      </listitem>
5912
5913     </itemizedlist>
5914
5915    </sect3>
5916
5917    <sect3>
5918     <title>Functions</title>
5919     <itemizedlist>
5920
5921      <listitem>
5922       <para>
5923        Add new regular expression functions
5924        <function>regexp_matches()</function>,
5925        <function>regexp_split_to_array()</function>, and
5926        <function>regexp_split_to_table()</function> (Jeremy Drake, Neil)
5927       </para>
5928
5929       <para>
5930        These functions provide extraction of regular expression
5931        subexpressions and allow splitting a string using a POSIX regular
5932        expression.
5933       </para>
5934      </listitem>
5935
5936      <listitem>
5937       <para>
5938        Add <function>lo_truncate()</function> for large object truncation
5939        (Kris Jurka)
5940       </para>
5941      </listitem>
5942
5943      <listitem>
5944       <para>
5945        Implement <function>width_bucket()</function> for the <type>float8</>
5946        data type (Neil)
5947       </para>
5948      </listitem>
5949
5950      <listitem>
5951       <para>
5952        Add <function>pg_stat_clear_snapshot()</function> to discard
5953        statistics snapshots collected during the current transaction
5954        (Tom)
5955       </para>
5956
5957       <para>
5958        The first request for statistics in a transaction takes a statistics
5959        snapshot that does not change during the transaction.  This function
5960        allows the snapshot to be discarded and a new snapshot loaded during
5961        the next statistics query. This is particularly useful for PL/PgSQL
5962        functions, which are confined to a single transaction.
5963       </para>
5964      </listitem>
5965
5966      <listitem>
5967       <para>
5968        Add <literal>isodow</> option to <function>EXTRACT()</> and
5969        <function>date_part()</> (Bruce)
5970       </para>
5971
5972       <para>
5973        This returns the day of the week, with Sunday as seven.
5974        (<literal>dow</> returns Sunday as zero.)
5975       </para>
5976      </listitem>
5977
5978      <listitem>
5979       <para>
5980        Add <literal>ID</> (ISO day of week) and <literal>IDDD</> (ISO
5981        day of year) format codes for <function>to_char()</>,
5982        <function>to_date()</>, and <function>to_timestamp()</> (Brendan
5983        Jurd)
5984       </para>
5985      </listitem>
5986
5987      <listitem>
5988       <para>
5989        Make <function>to_timestamp()</> and <function>to_date()</>
5990        assume <literal>TM</literal> (trim) option for potentially
5991        variable-width fields (Bruce)
5992       </para>
5993
5994       <para>
5995        This matches <productname>Oracle</>'s behavior.
5996       </para>
5997      </listitem>
5998
5999      <listitem>
6000       <para>
6001        Fix off-by-one conversion error in
6002        <function>to_date()</function>/<function>to_timestamp()</function>
6003        <literal>D</> (non-ISO day of week) fields (Bruce)
6004       </para>
6005      </listitem>
6006
6007      <listitem>
6008       <para>
6009        Make <function>setseed()</function> return void, rather than a
6010        useless integer value (Neil)
6011       </para>
6012      </listitem>
6013
6014      <listitem>
6015       <para>
6016        Add a hash function for <type>NUMERIC</type> (Neil)
6017       </para>
6018
6019       <para>
6020        This allows hash indexes and hash-based plans to be used with
6021        <type>NUMERIC</type> columns.
6022       </para>
6023      </listitem>
6024
6025      <listitem>
6026       <para>
6027        Improve efficiency of
6028        <literal>LIKE</literal>/<literal>ILIKE</literal>, especially for
6029        multi-byte character sets like UTF-8 (Andrew, Itagaki Takahiro)
6030       </para>
6031      </listitem>
6032
6033      <listitem>
6034       <para>
6035        Make <function>currtid()</function> functions require
6036        <literal>SELECT</literal> privileges on the target table (Tom)
6037       </para>
6038      </listitem>
6039
6040      <listitem>
6041       <para>
6042        Add several <function>txid_*()</function> functions to query
6043        active transaction IDs (Jan)
6044       </para>
6045
6046       <para>
6047        This is useful for various replication solutions.
6048       </para>
6049      </listitem>
6050
6051     </itemizedlist>
6052
6053    </sect3>
6054
6055    <sect3>
6056     <title>PL/PgSQL Server-Side Language</title>
6057     <itemizedlist>
6058
6059      <listitem>
6060       <para>
6061        Add scrollable cursor support, including directional control in
6062        <command>FETCH</command> (Pavel Stehule)
6063       </para>
6064      </listitem>
6065
6066      <listitem>
6067       <para>
6068        Allow <literal>IN</literal> as an alternative to
6069        <literal>FROM</literal> in PL/PgSQL's <command>FETCH</command>
6070        statement, for consistency with the backend's
6071        <command>FETCH</command> command (Pavel Stehule)
6072       </para>
6073      </listitem>
6074
6075      <listitem>
6076       <para>
6077        Add <command>MOVE</command> to PL/PgSQL (Magnus, Pavel Stehule,
6078        Neil)
6079       </para>
6080      </listitem>
6081
6082      <listitem>
6083       <para>
6084        Implement <command>RETURN QUERY</command> (Pavel Stehule, Neil)
6085       </para>
6086
6087       <para>
6088        This adds convenient syntax for PL/PgSQL set-returning functions
6089        that want to return the result of a query.  <command>RETURN QUERY</>
6090        is easier and more efficient than a loop
6091        around <command>RETURN NEXT</command>.
6092       </para>
6093      </listitem>
6094
6095      <listitem>
6096       <para>
6097        Allow function parameter names to be qualified with the
6098        function's name (Tom)
6099       </para>
6100
6101       <para>
6102        For example, <literal>myfunc.myvar</>. This is particularly
6103        useful for specifying variables in a query where the variable
6104        name might match a column name.
6105       </para>
6106      </listitem>
6107
6108      <listitem>
6109       <para>
6110        Make qualification of variables with block labels work properly (Tom)
6111       </para>
6112
6113       <para>
6114        Formerly, outer-level block labels could unexpectedly interfere with
6115        recognition of inner-level record or row references.
6116       </para>
6117      </listitem>
6118
6119      <listitem>
6120       <para>
6121        Tighten requirements for <literal>FOR</literal> loop
6122        <literal>STEP</> values (Tom)
6123       </para>
6124
6125       <para>
6126        Prevent non-positive <literal>STEP</> values, and handle
6127        loop overflows.
6128       </para>
6129      </listitem>
6130
6131      <listitem>
6132       <para>
6133        Improve accuracy when reporting syntax error locations (Tom)
6134       </para>
6135      </listitem>
6136
6137     </itemizedlist>
6138
6139    </sect3>
6140
6141    <sect3>
6142     <title>Other Server-Side Languages</title>
6143     <itemizedlist>
6144
6145      <listitem>
6146       <para>
6147        Allow type-name arguments to PL/Perl
6148        <function>spi_prepare()</function> to be data type aliases in
6149        addition to names found in <literal>pg_type</literal> (Andrew)
6150       </para>
6151      </listitem>
6152
6153      <listitem>
6154       <para>
6155        Allow type-name arguments to PL/Python
6156        <function>plpy.prepare()</function> to be data type aliases in
6157        addition to names found in <literal>pg_type</literal> (Andrew)
6158       </para>
6159      </listitem>
6160
6161      <listitem>
6162       <para>
6163        Allow type-name arguments to PL/Tcl <function>spi_prepare</> to
6164        be data type aliases in addition to names found in
6165        <literal>pg_type</literal> (Andrew)
6166       </para>
6167      </listitem>
6168
6169      <listitem>
6170       <para>
6171        Enable PL/PythonU to compile on Python 2.5 (Marko Kreen)
6172       </para>
6173      </listitem>
6174
6175      <listitem>
6176       <para>
6177        Support a true PL/Python boolean type in compatible Python versions
6178        (Python 2.3 and later) (Marko Kreen)
6179       </para>
6180      </listitem>
6181
6182      <listitem>
6183       <para>
6184        Fix PL/Tcl problems with thread-enabled <filename>libtcl</> spawning
6185        multiple threads within the backend (Steve Marshall, Paul Bayer,
6186        Doug Knight)
6187       </para>
6188
6189       <para>
6190        This caused all sorts of unpleasantness.
6191       </para>
6192      </listitem>
6193
6194     </itemizedlist>
6195
6196    </sect3>
6197
6198    <sect3>
6199     <title><link linkend="APP-PSQL"><application>psql</></link></title>
6200     <itemizedlist>
6201
6202      <listitem>
6203       <para>
6204        List disabled triggers separately in <literal>\d</literal> output
6205        (Brendan Jurd)
6206       </para>
6207      </listitem>
6208
6209      <listitem>
6210       <para>
6211        In <literal>\d</literal> patterns, always match <literal>$</literal>
6212        literally (Tom)
6213       </para>
6214      </listitem>
6215
6216      <listitem>
6217       <para>
6218        Show aggregate return types in <literal>\da</literal> output
6219        (Greg Sabino Mullane)
6220       </para>
6221      </listitem>
6222
6223      <listitem>
6224       <para>
6225        Add the function's volatility status to the output of
6226        <literal>\df+</literal> (Neil)
6227       </para>
6228      </listitem>
6229
6230      <listitem>
6231       <para>
6232        Add <literal>\prompt</literal> capability (Chad Wagner)
6233       </para>
6234      </listitem>
6235
6236      <listitem>
6237       <para>
6238        Allow <literal>\pset</literal>, <literal>\t</literal>, and
6239        <literal>\x</literal> to specify <literal>on</> or <literal>off</>,
6240        rather than just toggling (Chad Wagner)
6241       </para>
6242      </listitem>
6243
6244      <listitem>
6245       <para>
6246        Add <literal>\sleep</> capability (Jan)
6247       </para>
6248      </listitem>
6249
6250      <listitem>
6251       <para>
6252        Enable <literal>\timing</> output for <literal>\copy</> (Andrew)
6253       </para>
6254      </listitem>
6255
6256      <listitem>
6257       <para>
6258        Improve <literal>\timing</literal> resolution on Windows
6259        (Itagaki Takahiro)
6260       </para>
6261      </listitem>
6262
6263      <listitem>
6264       <para>
6265        Flush <literal>\o</> output after each backslash command (Tom)
6266       </para>
6267      </listitem>
6268
6269      <listitem>
6270       <para>
6271        Correctly detect and report errors while reading a <literal>-f</>
6272        input file (Peter)
6273       </para>
6274      </listitem>
6275
6276      <listitem>
6277       <para>
6278        Remove <literal>-u</> option (this option has long been deprecated)
6279        (Tom)
6280       </para>
6281      </listitem>
6282
6283     </itemizedlist>
6284
6285    </sect3>
6286
6287    <sect3>
6288     <title><link linkend="APP-PGDUMP"><application>pg_dump</></link></title>
6289     <itemizedlist>
6290
6291      <listitem>
6292       <para>
6293        Add <literal>--tablespaces-only</> and <literal>--roles-only</>
6294        options to <application>pg_dumpall</application> (Dave Page)
6295       </para>
6296      </listitem>
6297
6298      <listitem>
6299       <para>
6300        Add an output file option to
6301        <application>pg_dumpall</application> (Dave Page)
6302       </para>
6303
6304       <para>
6305        This is primarily useful on Windows, where output redirection of
6306        child <application>pg_dump</application> processes does not work.
6307       </para>
6308      </listitem>
6309
6310      <listitem>
6311       <para>
6312        Allow <application>pg_dumpall</> to accept an initial-connection
6313        database name rather than the default
6314        <literal>template1</literal> (Dave Page)
6315       </para>
6316      </listitem>
6317
6318      <listitem>
6319       <para>
6320        In <literal>-n</> and <literal>-t</> switches, always match
6321        <literal>$</literal> literally (Tom)
6322       </para>
6323      </listitem>
6324
6325      <listitem>
6326       <para>
6327        Improve performance when a database has thousands of objects (Tom)
6328       </para>
6329      </listitem>
6330
6331      <listitem>
6332       <para>
6333        Remove <literal>-u</> option (this option has long been deprecated)
6334        (Tom)
6335       </para>
6336      </listitem>
6337
6338     </itemizedlist>
6339
6340    </sect3>
6341
6342    <sect3>
6343     <title>Other Client Applications</title>
6344     <itemizedlist>
6345
6346      <listitem>
6347       <para>
6348        In <application>initdb</>, allow the location of the
6349        <filename>pg_xlog</filename> directory to be specified
6350        (Euler Taveira de Oliveira)
6351       </para>
6352      </listitem>
6353
6354      <listitem>
6355       <para>
6356        Enable server core dump generation in <application>pg_regress</>
6357        on supported operating systems (Andrew)
6358       </para>
6359      </listitem>
6360
6361      <listitem>
6362       <para>
6363        Add a <literal>-t</> (timeout) parameter to <application>pg_ctl</>
6364        (Bruce)
6365       </para>
6366
6367       <para>
6368        This controls how long <application>pg_ctl</> will wait when waiting
6369        for server startup or shutdown.  Formerly the timeout was hard-wired
6370        as 60 seconds.
6371       </para>
6372      </listitem>
6373
6374      <listitem>
6375       <para>
6376        Add a <application>pg_ctl</> option to control generation
6377        of server core dumps (Andrew)
6378       </para>
6379      </listitem>
6380
6381      <listitem>
6382       <para>
6383        Allow Control-C to cancel <application>clusterdb</>,
6384        <application>reindexdb</>, and <application>vacuumdb</> (Itagaki
6385        Takahiro, Magnus)
6386       </para>
6387      </listitem>
6388
6389      <listitem>
6390       <para>
6391        Suppress command tag output for <application>createdb</>,
6392        <application>createuser</>, <application>dropdb</>, and
6393        <application>dropuser</> (Peter)
6394       </para>
6395
6396       <para>
6397        The <literal>--quiet</> option is ignored and will be removed in 8.4.
6398        Progress messages when acting on all databases now go to stdout
6399        instead of stderr because they are not actually errors.
6400       </para>
6401      </listitem>
6402
6403     </itemizedlist>
6404
6405    </sect3>
6406
6407    <sect3>
6408     <title><link linkend="libpq"><application>libpq</></link></title>
6409     <itemizedlist>
6410
6411      <listitem>
6412       <para>
6413        Interpret the <literal>dbName</> parameter of
6414        <function>PQsetdbLogin()</> as a <literal>conninfo</> string if
6415        it contains an equals sign (Andrew)
6416       </para>
6417
6418       <para>
6419        This allows use of <literal>conninfo</> strings in client
6420        programs that still use <literal>PQsetdbLogin()</>.
6421       </para>
6422      </listitem>
6423
6424      <listitem>
6425       <para>
6426        Support a global <acronym>SSL</> configuration file (Victor
6427        Wagner)
6428       </para>
6429      </listitem>
6430
6431      <listitem>
6432       <para>
6433        Add environment variable <varname>PGSSLKEY</> to control
6434        <acronym>SSL</> hardware keys (Victor Wagner)
6435       </para>
6436      </listitem>
6437
6438      <listitem>
6439       <para>
6440        Add <function>lo_truncate()</function> for large object
6441        truncation (Kris Jurka)
6442       </para>
6443      </listitem>
6444
6445      <listitem>
6446       <para>
6447        Add <function>PQconnectionNeedsPassword()</function> that returns
6448        true if the server required a password but none was supplied
6449        (Joe Conway, Tom)
6450       </para>
6451
6452       <para>
6453        If this returns true after a failed connection attempt, a client
6454        application should prompt the user for a password.  In the past
6455        applications have had to check for a specific error message string to
6456        decide whether a password is needed; that approach is now
6457        deprecated.
6458       </para>
6459      </listitem>
6460
6461      <listitem>
6462       <para>
6463        Add <function>PQconnectionUsedPassword()</function> that returns
6464        true if the supplied password was actually used
6465        (Joe Conway, Tom)
6466       </para>
6467
6468       <para>
6469        This is useful in some security contexts where it is important
6470        to know whether a user-supplied password is actually valid.
6471       </para>
6472      </listitem>
6473
6474     </itemizedlist>
6475
6476    </sect3>
6477
6478    <sect3>
6479     <title><link linkend="ecpg"><application>ecpg</></link></title>
6480     <itemizedlist>
6481
6482      <listitem>
6483       <para>
6484        Use V3 frontend/backend protocol (Michael)
6485       </para>
6486
6487       <para>
6488        This adds support for server-side prepared statements.
6489       </para>
6490      </listitem>
6491
6492      <listitem>
6493       <para>
6494        Use native threads, instead of pthreads, on Windows (Magnus)
6495       </para>
6496      </listitem>
6497
6498      <listitem>
6499       <para>
6500        Improve thread-safety of ecpglib (Itagaki Takahiro)
6501       </para>
6502      </listitem>
6503
6504      <listitem>
6505       <para>
6506        Make the ecpg libraries export only necessary API symbols (Michael)
6507       </para>
6508      </listitem>
6509
6510     </itemizedlist>
6511
6512    </sect3>
6513
6514    <sect3>
6515     <title><application>Windows</> Port</title>
6516     <itemizedlist>
6517
6518      <listitem>
6519       <para>
6520        Allow the whole <productname>PostgreSQL</> distribution to be compiled
6521        with <productname>Microsoft Visual C++</> (Magnus and others)
6522       </para>
6523
6524       <para>
6525        This allows Windows-based developers to use familiar development
6526        and debugging tools.
6527        Windows executables made with Visual C++ might also have better
6528        stability and performance than those made with other tool sets.
6529        The client-only Visual C++ build scripts have been removed.
6530       </para>
6531      </listitem>
6532
6533      <listitem>
6534       <para>
6535        Drastically reduce postmaster's memory usage when it has many child
6536        processes (Magnus)
6537       </para>
6538      </listitem>
6539
6540      <listitem>
6541       <para>
6542        Allow regression tests to be started by an administrative
6543        user (Magnus)
6544       </para>
6545      </listitem>
6546
6547      <listitem>
6548       <para>
6549        Add native shared memory implementation (Magnus)
6550       </para>
6551      </listitem>
6552
6553     </itemizedlist>
6554
6555    </sect3>
6556
6557    <sect3>
6558     <title>Server Programming Interface (<acronym>SPI</>)</title>
6559     <itemizedlist>
6560
6561      <listitem>
6562       <para>
6563        Add cursor-related functionality in SPI (Pavel Stehule)
6564       </para>
6565
6566       <para>
6567        Allow access to the cursor-related planning options, and add
6568        <command>FETCH</>/<command>MOVE</> routines.
6569       </para>
6570      </listitem>
6571
6572      <listitem>
6573       <para>
6574        Allow execution of cursor commands through
6575        <function>SPI_execute</function> (Tom)
6576       </para>
6577
6578       <para>
6579        The macro <literal>SPI_ERROR_CURSOR</> still exists but will
6580        never be returned.
6581       </para>
6582      </listitem>
6583
6584      <listitem>
6585       <para>
6586        SPI plan pointers are now declared as <literal>SPIPlanPtr</> instead of
6587        <literal>void *</> (Tom)
6588       </para>
6589
6590       <para>
6591        This does not break application code, but switching is
6592        recommended to help catch simple programming mistakes.
6593       </para>
6594      </listitem>
6595
6596     </itemizedlist>
6597
6598    </sect3>
6599
6600    <sect3>
6601     <title>Build Options</title>
6602     <itemizedlist>
6603
6604      <listitem>
6605       <para>
6606        Add <application>configure</> option <literal>--enable-profiling</>
6607        to enable code profiling (works only with <application>gcc</>)
6608        (Korry Douglas and Nikhil Sontakke)
6609       </para>
6610      </listitem>
6611
6612      <listitem>
6613       <para>
6614        Add <application>configure</> option <literal>--with-system-tzdata</>
6615        to use the operating system's time zone database (Peter)
6616       </para>
6617      </listitem>
6618
6619      <listitem>
6620       <para>
6621        Fix <acronym>PGXS</> so extensions can be built against PostgreSQL
6622        installations whose <application>pg_config</> program does not
6623        appear first in the <varname>PATH</> (Tom)
6624       </para>
6625      </listitem>
6626
6627      <listitem>
6628       <para>
6629        Support <command>gmake draft</command> when building the
6630        <acronym>SGML</> documentation (Bruce)
6631       </para>
6632
6633       <para>
6634        Unless <literal>draft</> is used, the documentation build will
6635        now be repeated if necessary to ensure the index is up-to-date.
6636       </para>
6637      </listitem>
6638
6639     </itemizedlist>
6640
6641    </sect3>
6642
6643    <sect3>
6644     <title>Source Code</title>
6645     <itemizedlist>
6646
6647      <listitem>
6648       <para>
6649        Rename macro <literal>DLLIMPORT</> to <literal>PGDLLIMPORT</> to
6650        avoid conflicting with third party includes (like Tcl) that
6651        define <literal>DLLIMPORT</> (Magnus)
6652       </para>
6653      </listitem>
6654
6655      <listitem>
6656       <para>
6657        Create <quote>operator families</quote> to improve planning of
6658        queries involving cross-data-type comparisons (Tom)
6659       </para>
6660      </listitem>
6661
6662      <listitem>
6663       <para>
6664        Update GIN <function>extractQuery()</> API to allow signalling
6665        that nothing can satisfy the query (Teodor)
6666       </para>
6667      </listitem>
6668
6669      <listitem>
6670       <para>
6671        Move <literal>NAMEDATALEN</> definition from
6672        <filename>postgres_ext.h</> to <filename>pg_config_manual.h</>
6673        (Peter)
6674       </para>
6675      </listitem>
6676
6677      <listitem>
6678       <para>
6679        Provide <function>strlcpy()</function> and
6680        <function>strlcat()</function> on all platforms, and replace
6681        error-prone uses of <function>strncpy()</function>,
6682        <function>strncat()</function>, etc (Peter)
6683       </para>
6684      </listitem>
6685
6686      <listitem>
6687       <para>
6688        Create hooks to let an external plugin monitor (or even replace) the
6689        planner and create plans for hypothetical situations (Gurjeet
6690        Singh, Tom)
6691       </para>
6692      </listitem>
6693
6694      <listitem>
6695       <para>
6696        Create a function variable <literal>join_search_hook</> to let plugins
6697        override the join search order portion of the planner (Julius
6698        Stroffek)
6699       </para>
6700      </listitem>
6701
6702      <listitem>
6703       <para>
6704        Add <function>tas()</> support for Renesas' M32R processor
6705        (Kazuhiro Inaoka)
6706       </para>
6707      </listitem>
6708
6709      <listitem>
6710       <para>
6711        <function>quote_identifier()</function> and
6712        <application>pg_dump</application> no longer quote keywords that are
6713        unreserved according to the grammar (Tom)
6714       </para>
6715      </listitem>
6716
6717      <listitem>
6718       <para>
6719        Change the on-disk representation of the <type>NUMERIC</type>
6720        data type so that the <structfield>sign_dscale</> word comes
6721        before the weight (Tom)
6722       </para>
6723      </listitem>
6724
6725      <listitem>
6726       <para>
6727        Use <acronym>SYSV</> semaphores rather than POSIX on Darwin
6728        &gt;= 6.0, i.e., OS X 10.2 and up (Chris Marcellino)
6729       </para>
6730      </listitem>
6731
6732      <listitem>
6733       <para>
6734        Add <link linkend="acronyms">acronym</link> and <link
6735        linkend="creating-cluster-nfs">NFS</link> documentation
6736        sections (Bruce)
6737       </para>
6738      </listitem>
6739
6740      <listitem>
6741       <para>
6742        "Postgres" is now documented as an accepted alias for
6743        "PostgreSQL" (Peter)
6744       </para>
6745      </listitem>
6746
6747      <listitem>
6748       <para>
6749        Add documentation about preventing database server spoofing when
6750        the server is down (Bruce)
6751       </para>
6752      </listitem>
6753
6754     </itemizedlist>
6755
6756    </sect3>
6757
6758    <sect3>
6759     <title>Contrib</title>
6760     <itemizedlist>
6761
6762      <listitem>
6763       <para>
6764        Move <filename>contrib</> <filename>README</> content into the
6765        main <productname>PostgreSQL</> documentation (Albert Cervera i
6766        Areny)
6767       </para>
6768      </listitem>
6769
6770      <listitem>
6771       <para>
6772        Add <filename>contrib/pageinspect</filename> module for low-level
6773        page inspection (Simon, Heikki)
6774       </para>
6775      </listitem>
6776
6777      <listitem>
6778       <para>
6779        Add <filename>contrib/pg_standby</filename> module for controlling
6780        warm standby operation (Simon)
6781       </para>
6782      </listitem>
6783
6784      <listitem>
6785       <para>
6786        Add <filename>contrib/uuid-ossp</filename> module for generating
6787        <type>UUID</> values using the OSSP UUID library (Peter)
6788       </para>
6789
6790       <para>
6791        Use <application>configure</>
6792        <literal>--with-ossp-uuid</literal> to activate. This takes
6793        advantage of the new <type>UUID</type> builtin type.
6794       </para>
6795      </listitem>
6796
6797      <listitem>
6798       <para>
6799        Add <filename>contrib/dict_int</filename>,
6800        <filename>contrib/dict_xsyn</filename>, and
6801        <filename>contrib/test_parser</filename> modules to provide
6802        sample add-on text search dictionary templates and parsers
6803        (Sergey Karpov)
6804       </para>
6805      </listitem>
6806
6807      <listitem>
6808       <para>
6809        Allow <application>contrib/pgbench</> to set the fillfactor (Pavan
6810        Deolasee)
6811       </para>
6812      </listitem>
6813
6814      <listitem>
6815       <para>
6816        Add timestamps to <application>contrib/pgbench</> <literal>-l</>
6817        (Greg Smith)
6818       </para>
6819      </listitem>
6820
6821      <listitem>
6822       <para>
6823        Add usage count statistics to
6824        <filename>contrib/pgbuffercache</filename> (Greg Smith)
6825       </para>
6826      </listitem>
6827
6828      <listitem>
6829       <para>
6830        Add GIN support for <filename>contrib/hstore</> (Teodor)
6831       </para>
6832      </listitem>
6833
6834      <listitem>
6835       <para>
6836        Add GIN support for <filename>contrib/pg_trgm</> (Guillaume Smet, Teodor)
6837       </para>
6838      </listitem>
6839
6840      <listitem>
6841       <para>
6842        Update OS/X startup scripts in
6843        <filename>contrib/start-scripts</filename> (Mark Cotner, David
6844        Fetter)
6845       </para>
6846      </listitem>
6847
6848      <listitem>
6849       <para>
6850        Restrict <function>pgrowlocks()</function> and
6851        <function>dblink_get_pkey()</function> to users who have
6852        <literal>SELECT</literal> privilege on the target table (Tom)
6853       </para>
6854      </listitem>
6855
6856      <listitem>
6857       <para>
6858        Restrict <filename>contrib/pgstattuple</filename> functions to
6859        superusers (Tom)
6860       </para>
6861      </listitem>
6862
6863      <listitem>
6864       <para>
6865        <filename>contrib/xml2</filename> is deprecated and planned for
6866        removal in 8.4 (Peter)
6867       </para>
6868
6869       <para>
6870        The new XML support in core PostgreSQL supersedes this module.
6871       </para>
6872      </listitem>
6873
6874     </itemizedlist>
6875
6876    </sect3>
6877   </sect2>
6878  </sect1>
6879
6880  <sect1 id="release-8-2-13">
6881   <title>Release 8.2.13</title>
6882
6883   <note>
6884   <title>Release date</title>
6885   <simpara>2009-03-16</simpara>
6886   </note>
6887
6888   <para>
6889    This release contains a variety of fixes from 8.2.12.
6890    For information about new features in the 8.2 major release, see
6891    <xref linkend="release-8-2">.
6892   </para>
6893
6894   <sect2>
6895    <title>Migration to Version 8.2.13</title>
6896
6897    <para>
6898     A dump/restore is not required for those running 8.2.X.
6899     However, if you are upgrading from a version earlier than 8.2.11,
6900     see the release notes for 8.2.11.
6901    </para>
6902
6903   </sect2>
6904
6905   <sect2>
6906    <title>Changes</title>
6907
6908    <itemizedlist>
6909
6910     <listitem>
6911      <para>
6912       Prevent error recursion crashes when encoding conversion fails (Tom)
6913      </para>
6914
6915      <para>
6916       This change extends fixes made in the last two minor releases for
6917       related failure scenarios.  The previous fixes were narrowly tailored
6918       for the original problem reports, but we have now recognized that
6919       <emphasis>any</> error thrown by an encoding conversion function could
6920       potentially lead to infinite recursion while trying to report the
6921       error.  The solution therefore is to disable translation and encoding
6922       conversion and report the plain-ASCII form of any error message,
6923       if we find we have gotten into a recursive error reporting situation.
6924       (CVE-2009-0922)
6925      </para>
6926     </listitem>
6927
6928     <listitem>
6929      <para>
6930       Disallow <command>CREATE CONVERSION</> with the wrong encodings
6931       for the specified conversion function (Heikki)
6932      </para>
6933
6934      <para>
6935       This prevents one possible scenario for encoding conversion failure.
6936       The previous change is a backstop to guard against other kinds of
6937       failures in the same area.
6938      </para>
6939     </listitem>
6940
6941     <listitem>
6942      <para>
6943       Fix core dump when <function>to_char()</> is given format codes that
6944       are inappropriate for the type of the data argument (Tom)
6945      </para>
6946     </listitem>
6947
6948     <listitem>
6949      <para>
6950       Fix possible failure in <filename>contrib/tsearch2</> when C locale is
6951       used with a multi-byte encoding (Teodor)
6952      </para>
6953
6954      <para>
6955       Crashes were possible on platforms where <type>wchar_t</> is narrower
6956       than <type>int</>; Windows in particular.
6957      </para>
6958     </listitem>
6959
6960     <listitem>
6961      <para>
6962       Fix extreme inefficiency in <filename>contrib/tsearch2</> parser's
6963       handling of an email-like string containing multiple <literal>@</>
6964       characters (Heikki)
6965      </para>
6966     </listitem>
6967
6968     <listitem>
6969      <para>
6970       Fix decompilation of <literal>CASE WHEN</> with an implicit coercion
6971       (Tom)
6972      </para>
6973
6974      <para>
6975       This mistake could lead to Assert failures in an Assert-enabled build,
6976       or an <quote>unexpected CASE WHEN clause</> error message in other
6977       cases, when trying to examine or dump a view.
6978      </para>
6979     </listitem>
6980
6981     <listitem>
6982      <para>
6983       Fix possible misassignment of the owner of a TOAST table's rowtype (Tom)
6984      </para>
6985
6986      <para>
6987       If <command>CLUSTER</> or a rewriting variant of <command>ALTER TABLE</>
6988       were executed by someone other than the table owner, the
6989       <structname>pg_type</> entry for the table's TOAST table would end up
6990       marked as owned by that someone.  This caused no immediate problems,
6991       since the permissions on the TOAST rowtype aren't examined by any
6992       ordinary database operation.  However, it could lead to unexpected
6993       failures if one later tried to drop the role that issued the command
6994       (in 8.1 or 8.2), or <quote>owner of data type appears to be invalid</>
6995       warnings from <application>pg_dump</> after having done so (in 8.3).
6996      </para>
6997     </listitem>
6998
6999     <listitem>
7000      <para>
7001       Fix PL/pgSQL to not treat <literal>INTO</> after <command>INSERT</> as
7002       an INTO-variables clause anywhere in the string, not only at the start;
7003       in particular, don't fail for <command>INSERT INTO</> within
7004       <command>CREATE RULE</> (Tom)
7005      </para>
7006     </listitem>
7007
7008     <listitem>
7009      <para>
7010       Clean up PL/pgSQL error status variables fully at block exit
7011       (Ashesh Vashi and Dave Page)
7012      </para>
7013
7014      <para>
7015       This is not a problem for PL/pgSQL itself, but the omission could cause
7016       the PL/pgSQL Debugger to crash while examining the state of a function.
7017      </para>
7018     </listitem>
7019
7020     <listitem>
7021      <para>
7022       Retry failed calls to <function>CallNamedPipe()</> on Windows
7023       (Steve Marshall, Magnus)
7024      </para>
7025
7026      <para>
7027       It appears that this function can sometimes fail transiently;
7028       we previously treated any failure as a hard error, which could
7029       confuse <command>LISTEN</>/<command>NOTIFY</> as well as other
7030       operations.
7031      </para>
7032     </listitem>
7033
7034     <listitem>
7035      <para>
7036       Add <literal>MUST</> (Mauritius Island Summer Time) to the default list
7037       of known timezone abbreviations (Xavier Bugaud)
7038      </para>
7039     </listitem>
7040
7041    </itemizedlist>
7042
7043   </sect2>
7044  </sect1>
7045
7046  <sect1 id="release-8-2-12">
7047   <title>Release 8.2.12</title>
7048
7049   <note>
7050   <title>Release date</title>
7051   <simpara>2009-02-02</simpara>
7052   </note>
7053
7054   <para>
7055    This release contains a variety of fixes from 8.2.11.
7056    For information about new features in the 8.2 major release, see
7057    <xref linkend="release-8-2">.
7058   </para>
7059
7060   <sect2>
7061    <title>Migration to Version 8.2.12</title>
7062
7063    <para>
7064     A dump/restore is not required for those running 8.2.X.
7065     However, if you are upgrading from a version earlier than 8.2.11,
7066     see the release notes for 8.2.11.
7067    </para>
7068
7069   </sect2>
7070
7071   <sect2>
7072    <title>Changes</title>
7073
7074    <itemizedlist>
7075
7076     <listitem>
7077      <para>
7078       Improve handling of URLs in <function>headline()</> function (Teodor)
7079      </para>
7080     </listitem>
7081
7082     <listitem>
7083      <para>
7084       Improve handling of overlength headlines in <function>headline()</>
7085       function (Teodor)
7086      </para>
7087     </listitem>
7088
7089     <listitem>
7090      <para>
7091       Prevent possible Assert failure or misconversion if an encoding
7092       conversion is created with the wrong conversion function for the
7093       specified pair of encodings (Tom, Heikki)
7094      </para>
7095     </listitem>
7096
7097     <listitem>
7098      <para>
7099       Fix possible Assert failure if a statement executed in PL/pgSQL is
7100       rewritten into another kind of statement, for example if an
7101       <command>INSERT</> is rewritten into an <command>UPDATE</> (Heikki)
7102      </para>
7103     </listitem>
7104
7105     <listitem>
7106      <para>
7107       Ensure that a snapshot is available to datatype input functions (Tom)
7108      </para>
7109
7110      <para>
7111       This primarily affects domains that are declared with <literal>CHECK</>
7112       constraints involving user-defined stable or immutable functions.  Such
7113       functions typically fail if no snapshot has been set.
7114      </para>
7115     </listitem>
7116
7117     <listitem>
7118      <para>
7119       Make it safer for SPI-using functions to be used within datatype I/O;
7120       in particular, to be used in domain check constraints (Tom)
7121      </para>
7122     </listitem>
7123
7124     <listitem>
7125      <para>
7126       Avoid unnecessary locking of small tables in <command>VACUUM</>
7127       (Heikki)
7128      </para>
7129     </listitem>
7130
7131     <listitem>
7132      <para>
7133       Fix a problem that made <literal>UPDATE RETURNING tableoid</>
7134       return zero instead of the correct OID (Tom)
7135      </para>
7136     </listitem>
7137
7138     <listitem>
7139      <para>
7140       Fix planner misestimation of selectivity when transitive equality
7141       is applied to an outer-join clause (Tom)
7142      </para>
7143
7144      <para>
7145       This could result in bad plans for queries like
7146       <literal>... from a left join b on a.a1 = b.b1 where a.a1 = 42 ...</>
7147      </para>
7148     </listitem>
7149
7150     <listitem>
7151      <para>
7152       Improve optimizer's handling of long <literal>IN</> lists (Tom)
7153      </para>
7154
7155      <para>
7156       This change avoids wasting large amounts of time on such lists
7157       when constraint exclusion is enabled.
7158      </para>
7159     </listitem>
7160
7161     <listitem>
7162      <para>
7163       Ensure that the contents of a holdable cursor don't depend on the
7164       contents of TOAST tables (Tom)
7165      </para>
7166
7167      <para>
7168       Previously, large field values in a cursor result might be represented
7169       as TOAST pointers, which would fail if the referenced table got dropped
7170       before the cursor is read, or if the large value is deleted and then
7171       vacuumed away.  This cannot happen with an ordinary cursor,
7172       but it could with a cursor that is held past its creating transaction.
7173      </para>
7174     </listitem>
7175
7176     <listitem>
7177      <para>
7178       Fix memory leak when a set-returning function is terminated without
7179       reading its whole result (Tom)
7180      </para>
7181     </listitem>
7182
7183     <listitem>
7184      <para>
7185       Fix <filename>contrib/dblink</>'s
7186       <function>dblink_get_result(text,bool)</> function (Joe)
7187      </para>
7188     </listitem>
7189
7190     <listitem>
7191      <para>
7192       Fix possible garbage output from <filename>contrib/sslinfo</> functions
7193       (Tom)
7194      </para>
7195     </listitem>
7196
7197     <listitem>
7198      <para>
7199       Fix <application>configure</> script to properly report failure when
7200       unable to obtain linkage information for PL/Perl (Andrew)
7201      </para>
7202     </listitem>
7203
7204     <listitem>
7205      <para>
7206       Make all documentation reference <literal>pgsql-bugs</> and/or
7207       <literal>pgsql-hackers</> as appropriate, instead of the
7208       now-decommissioned <literal>pgsql-ports</> and <literal>pgsql-patches</>
7209       mailing lists (Tom)
7210      </para>
7211     </listitem>
7212
7213     <listitem>
7214      <para>
7215       Update time zone data files to <application>tzdata</> release 2009a (for
7216       Kathmandu and historical DST corrections in Switzerland, Cuba)
7217      </para>
7218     </listitem>
7219
7220    </itemizedlist>
7221
7222   </sect2>
7223  </sect1>
7224
7225  <sect1 id="release-8-2-11">
7226   <title>Release 8.2.11</title>
7227
7228   <note>
7229   <title>Release date</title>
7230   <simpara>2008-11-03</simpara>
7231   </note>
7232
7233   <para>
7234    This release contains a variety of fixes from 8.2.10.
7235    For information about new features in the 8.2 major release, see
7236    <xref linkend="release-8-2">.
7237   </para>
7238
7239   <sect2>
7240    <title>Migration to Version 8.2.11</title>
7241
7242    <para>
7243     A dump/restore is not required for those running 8.2.X.
7244     However, if you are upgrading from a version earlier than 8.2.7,
7245     see the release notes for 8.2.7.  Also, if you were running a previous
7246     8.2.X release, it is recommended to <command>REINDEX</> all GiST
7247     indexes after the upgrade.
7248    </para>
7249
7250   </sect2>
7251
7252   <sect2>
7253    <title>Changes</title>
7254
7255    <itemizedlist>
7256
7257     <listitem>
7258      <para>
7259       Fix GiST index corruption due to marking the wrong index entry
7260       <quote>dead</> after a deletion (Teodor)
7261      </para>
7262
7263      <para>
7264       This would result in index searches failing to find rows they
7265       should have found.  Corrupted indexes can be fixed with
7266       <command>REINDEX</>.
7267      </para>
7268     </listitem>
7269
7270     <listitem>
7271      <para>
7272       Fix backend crash when the client encoding cannot represent a localized
7273       error message (Tom)
7274      </para>
7275
7276      <para>
7277       We have addressed similar issues before, but it would still fail if
7278       the <quote>character has no equivalent</> message itself couldn't
7279       be converted.  The fix is to disable localization and send the plain
7280       ASCII error message when we detect such a situation.
7281      </para>
7282     </listitem>
7283
7284     <listitem>
7285      <para>
7286       Fix possible crash when deeply nested functions are invoked from
7287       a trigger (Tom)
7288      </para>
7289     </listitem>
7290
7291     <listitem>
7292      <para>
7293       Improve optimization of <replaceable>expression</> <literal>IN</>
7294       (<replaceable>expression-list</>) queries (Tom, per an idea from Robert
7295       Haas)
7296      </para>
7297
7298      <para>
7299       Cases in which there are query variables on the right-hand side had been
7300       handled less efficiently in 8.2.x and 8.3.x than in prior versions.
7301       The fix restores 8.1 behavior for such cases.
7302      </para>
7303     </listitem>
7304
7305     <listitem>
7306      <para>
7307       Fix mis-expansion of rule queries when a sub-<literal>SELECT</> appears
7308       in a function call in <literal>FROM</>,  a multi-row <literal>VALUES</>
7309       list, or a <literal>RETURNING</> list (Tom)
7310      </para>
7311
7312      <para>
7313       The usual symptom of this problem is an <quote>unrecognized node type</>
7314       error.
7315      </para>
7316     </listitem>
7317
7318     <listitem>
7319      <para>
7320       Fix memory leak during rescan of a hashed aggregation plan (Neil)
7321      </para>
7322     </listitem>
7323
7324     <listitem>
7325      <para>
7326       Ensure an error is reported when a newly-defined PL/pgSQL trigger
7327       function is invoked as a normal function (Tom)
7328      </para>
7329     </listitem>
7330
7331     <listitem>
7332      <para>
7333       Prevent possible collision of <structfield>relfilenode</> numbers
7334       when moving a table to another tablespace with <command>ALTER SET
7335       TABLESPACE</> (Heikki)
7336      </para>
7337
7338      <para>
7339       The command tried to re-use the existing filename, instead of
7340       picking one that is known unused in the destination directory.
7341      </para>
7342     </listitem>
7343
7344     <listitem>
7345      <para>
7346       Fix incorrect tsearch2 headline generation when single query
7347       item matches first word of text (Sushant Sinha)
7348      </para>
7349     </listitem>
7350
7351     <listitem>
7352      <para>
7353       Fix improper display of fractional seconds in interval values when
7354       using a non-ISO datestyle in an <option>--enable-integer-datetimes</>
7355       build (Ron Mayer)
7356      </para>
7357     </listitem>
7358
7359     <listitem>
7360      <para>
7361       Ensure <function>SPI_getvalue</> and <function>SPI_getbinval</>
7362       behave correctly when the passed tuple and tuple descriptor have
7363       different numbers of columns (Tom)
7364      </para>
7365
7366      <para>
7367       This situation is normal when a table has had columns added or removed,
7368       but these two functions didn't handle it properly.
7369       The only likely consequence is an incorrect error indication.
7370      </para>
7371     </listitem>
7372
7373     <listitem>
7374      <para>
7375       Fix <application>ecpg</>'s parsing of <command>CREATE ROLE</> (Michael)
7376      </para>
7377     </listitem>
7378
7379     <listitem>
7380      <para>
7381       Fix recent breakage of <literal>pg_ctl restart</> (Tom)
7382      </para>
7383     </listitem>
7384
7385     <listitem>
7386      <para>
7387       Ensure <filename>pg_control</> is opened in binary mode
7388       (Itagaki Takahiro)
7389      </para>
7390
7391      <para>
7392       <application>pg_controldata</> and <application>pg_resetxlog</>
7393       did this incorrectly, and so could fail on Windows.
7394      </para>
7395     </listitem>
7396
7397     <listitem>
7398      <para>
7399       Update time zone data files to <application>tzdata</> release 2008i (for
7400       DST law changes in Argentina, Brazil, Mauritius, Syria)
7401      </para>
7402     </listitem>
7403
7404    </itemizedlist>
7405
7406   </sect2>
7407  </sect1>
7408
7409  <sect1 id="release-8-2-10">
7410   <title>Release 8.2.10</title>
7411
7412   <note>
7413   <title>Release date</title>
7414   <simpara>2008-09-22</simpara>
7415   </note>
7416
7417   <para>
7418    This release contains a variety of fixes from 8.2.9.
7419    For information about new features in the 8.2 major release, see
7420    <xref linkend="release-8-2">.
7421   </para>
7422
7423   <sect2>
7424    <title>Migration to Version 8.2.10</title>
7425
7426    <para>
7427     A dump/restore is not required for those running 8.2.X.
7428     However, if you are upgrading from a version earlier than 8.2.7,
7429     see the release notes for 8.2.7.
7430    </para>
7431
7432   </sect2>
7433
7434   <sect2>
7435    <title>Changes</title>
7436
7437    <itemizedlist>
7438
7439     <listitem>
7440      <para>
7441       Fix bug in btree WAL recovery code (Heikki)
7442      </para>
7443
7444      <para>
7445       Recovery failed if the WAL ended partway through a page split operation.
7446      </para>
7447     </listitem>
7448
7449     <listitem>
7450      <para>
7451       Fix potential miscalculation of <structfield>datfrozenxid</> (Alvaro)
7452      </para>
7453
7454      <para>
7455       This error may explain some recent reports of failure to remove old
7456       <structname>pg_clog</> data.
7457      </para>
7458     </listitem>
7459
7460     <listitem>
7461      <para>
7462       Widen local lock counters from 32 to 64 bits (Tom)
7463      </para>
7464
7465      <para>
7466       This responds to reports that the counters could overflow in
7467       sufficiently long transactions, leading to unexpected <quote>lock is
7468       already held</> errors.
7469      </para>
7470     </listitem>
7471
7472     <listitem>
7473      <para>
7474       Fix possible duplicate output of tuples during a GiST index scan (Teodor)
7475      </para>
7476     </listitem>
7477
7478     <listitem>
7479      <para>
7480       Fix missed permissions checks when a view contains a simple
7481       <literal>UNION ALL</> construct (Heikki)
7482      </para>
7483
7484      <para>
7485       Permissions for the referenced tables were checked properly, but not
7486       permissions for the view itself.
7487      </para>
7488     </listitem>
7489
7490     <listitem>
7491      <para>
7492       Add checks in executor startup to ensure that the tuples produced by an
7493       <command>INSERT</> or <command>UPDATE</> will match the target table's
7494       current rowtype (Tom)
7495      </para>
7496
7497      <para>
7498       <command>ALTER COLUMN TYPE</>, followed by re-use of a previously
7499       cached plan, could produce this type of situation.  The check protects
7500       against data corruption and/or crashes that could ensue.
7501      </para>
7502     </listitem>
7503
7504     <listitem>
7505      <para>
7506       Fix possible repeated drops during <command>DROP OWNED</> (Tom)
7507      </para>
7508
7509      <para>
7510       This would typically result in strange errors such as <quote>cache
7511       lookup failed for relation NNN</>.
7512      </para>
7513     </listitem>
7514
7515     <listitem>
7516      <para>
7517       Fix <literal>AT TIME ZONE</> to first try to interpret its timezone
7518       argument as a timezone abbreviation, and only try it as a full timezone
7519       name if that fails, rather than the other way around as formerly (Tom)
7520      </para>
7521
7522      <para>
7523       The timestamp input functions have always resolved ambiguous zone names
7524       in this order.  Making <literal>AT TIME ZONE</> do so as well improves
7525       consistency, and fixes a compatibility bug introduced in 8.1:
7526       in ambiguous cases we now behave the same as 8.0 and before did,
7527       since in the older versions <literal>AT TIME ZONE</> accepted
7528       <emphasis>only</> abbreviations.
7529      </para>
7530     </listitem>
7531
7532     <listitem>
7533      <para>
7534       Fix datetime input functions to correctly detect integer overflow when
7535       running on a 64-bit platform (Tom)
7536      </para>
7537     </listitem>
7538
7539     <listitem>
7540      <para>
7541       Prevent integer overflows during units conversion when displaying a
7542       configuration parameter that has units (Tom)
7543      </para>
7544     </listitem>
7545
7546     <listitem>
7547      <para>
7548       Improve performance of writing very long log messages to syslog (Tom)
7549      </para>
7550     </listitem>
7551
7552     <listitem>
7553      <para>
7554       Allow spaces in the suffix part of an LDAP URL in
7555       <filename>pg_hba.conf</> (Tom)
7556      </para>
7557     </listitem>
7558
7559     <listitem>
7560      <para>
7561       Fix bug in backwards scanning of a cursor on a <literal>SELECT DISTINCT
7562       ON</> query (Tom)
7563      </para>
7564     </listitem>
7565
7566     <listitem>
7567      <para>
7568       Fix planner bug with nested sub-select expressions (Tom)
7569      </para>
7570
7571      <para>
7572       If the outer sub-select has no direct dependency on the parent query,
7573       but the inner one does, the outer value might not get recalculated
7574       for new parent query rows.
7575      </para>
7576     </listitem>
7577
7578     <listitem>
7579      <para>
7580       Fix planner to estimate that <literal>GROUP BY</> expressions yielding
7581       boolean results always result in two groups, regardless of the
7582       expressions' contents (Tom)
7583      </para>
7584
7585      <para>
7586       This is very substantially more accurate than the regular <literal>GROUP
7587       BY</> estimate for certain boolean tests like <replaceable>col</>
7588       <literal>IS NULL</>.
7589      </para>
7590     </listitem>
7591
7592     <listitem>
7593      <para>
7594       Fix PL/PgSQL to not fail when a <literal>FOR</> loop's target variable
7595       is a record containing composite-type fields (Tom)
7596      </para>
7597     </listitem>
7598
7599     <listitem>
7600      <para>
7601       Fix PL/Tcl to behave correctly with Tcl 8.5, and to be more careful
7602       about the encoding of data sent to or from Tcl (Tom)
7603      </para>
7604     </listitem>
7605
7606     <listitem>
7607      <para>
7608       On Windows, work around a Microsoft bug by preventing
7609       <application>libpq</> from trying to send more than 64kB per system call
7610       (Magnus)
7611      </para>
7612     </listitem>
7613
7614     <listitem>
7615      <para>
7616       Improve <application>pg_dump</> and <application>pg_restore</>'s
7617       error reporting after failure to send a SQL command (Tom)
7618      </para>
7619     </listitem>
7620
7621     <listitem>
7622      <para>
7623       Fix <application>pg_ctl</> to properly preserve postmaster
7624       command-line arguments across a <literal>restart</> (Bruce)
7625      </para>
7626     </listitem>
7627
7628     <listitem>
7629      <para>
7630       Update time zone data files to <application>tzdata</> release 2008f (for
7631       DST law changes in Argentina, Bahamas, Brazil, Mauritius, Morocco,
7632       Pakistan, Palestine, and Paraguay)
7633      </para>
7634     </listitem>
7635
7636    </itemizedlist>
7637
7638   </sect2>
7639  </sect1>
7640
7641  <sect1 id="release-8-2-9">
7642   <title>Release 8.2.9</title>
7643
7644   <note>
7645   <title>Release date</title>
7646   <simpara>2008-06-12</simpara>
7647   </note>
7648
7649   <para>
7650    This release contains one serious and one minor bug fix over 8.2.8.
7651    For information about new features in the 8.2 major release, see
7652    <xref linkend="release-8-2">.
7653   </para>
7654
7655   <sect2>
7656    <title>Migration to Version 8.2.9</title>
7657
7658    <para>
7659     A dump/restore is not required for those running 8.2.X.
7660     However, if you are upgrading from a version earlier than 8.2.7,
7661     see the release notes for 8.2.7.
7662    </para>
7663
7664   </sect2>
7665
7666   <sect2>
7667    <title>Changes</title>
7668
7669    <itemizedlist>
7670
7671     <listitem>
7672      <para>
7673       Make <function>pg_get_ruledef()</> parenthesize negative constants (Tom)
7674      </para>
7675
7676      <para>
7677       Before this fix, a negative constant in a view or rule might be dumped
7678       as, say, <literal>-42::integer</>, which is subtly incorrect: it should
7679       be <literal>(-42)::integer</> due to operator precedence rules.
7680       Usually this would make little difference, but it could interact with
7681       another recent patch to cause
7682       <productname>PostgreSQL</> to reject what had been a valid
7683       <command>SELECT DISTINCT</> view query.  Since this could result in
7684       <application>pg_dump</> output failing to reload, it is being treated
7685       as a high-priority fix.  The only released versions in which dump
7686       output is actually incorrect are 8.3.1 and 8.2.7.
7687      </para>
7688     </listitem>
7689
7690     <listitem>
7691      <para>
7692       Make <command>ALTER AGGREGATE ... OWNER TO</> update
7693       <structname>pg_shdepend</> (Tom)
7694      </para>
7695
7696      <para>
7697       This oversight could lead to problems if the aggregate was later
7698       involved in a <command>DROP OWNED</> or <command>REASSIGN OWNED</>
7699       operation.
7700      </para>
7701     </listitem>
7702
7703    </itemizedlist>
7704
7705   </sect2>
7706  </sect1>
7707
7708  <sect1 id="release-8-2-8">
7709   <title>Release 8.2.8</title>
7710
7711   <note>
7712   <title>Release date</title>
7713   <simpara>never released</simpara>
7714   </note>
7715
7716   <para>
7717    This release contains a variety of fixes from 8.2.7.
7718    For information about new features in the 8.2 major release, see
7719    <xref linkend="release-8-2">.
7720   </para>
7721
7722   <sect2>
7723    <title>Migration to Version 8.2.8</title>
7724
7725    <para>
7726     A dump/restore is not required for those running 8.2.X.
7727     However, if you are upgrading from a version earlier than 8.2.7,
7728     see the release notes for 8.2.7.
7729    </para>
7730
7731   </sect2>
7732
7733   <sect2>
7734    <title>Changes</title>
7735
7736    <itemizedlist>
7737
7738     <listitem>
7739      <para>
7740       Fix <literal>ERRORDATA_STACK_SIZE exceeded</literal> crash that
7741       occurred on Windows when using UTF-8 database encoding and a different
7742       client encoding (Tom)
7743      </para>
7744     </listitem>
7745
7746     <listitem>
7747      <para>
7748       Fix <command>ALTER TABLE ADD COLUMN ... PRIMARY KEY</> so that the new
7749       column is correctly checked to see if it's been initialized to all
7750       non-nulls (Brendan Jurd)
7751      </para>
7752
7753      <para>
7754       Previous versions neglected to check this requirement at all.
7755      </para>
7756     </listitem>
7757
7758     <listitem>
7759      <para>
7760       Fix possible <command>CREATE TABLE</> failure when inheriting the
7761       <quote>same</> constraint from multiple parent relations that
7762       inherited that constraint from a common ancestor (Tom)
7763      </para>
7764     </listitem>
7765
7766     <listitem>
7767      <para>
7768       Fix <function>pg_get_ruledef()</> to show the alias, if any, attached
7769       to the target table of an <command>UPDATE</> or <command>DELETE</>
7770       (Tom)
7771      </para>
7772     </listitem>
7773
7774     <listitem>
7775      <para>
7776       Fix GIN bug that could result in a <literal>too many LWLocks
7777       taken</literal> failure (Teodor)
7778      </para>
7779     </listitem>
7780
7781     <listitem>
7782      <para>
7783       Avoid possible crash when decompressing corrupted data
7784       (Zdenek Kotala)
7785      </para>
7786     </listitem>
7787
7788     <listitem>
7789      <para>
7790       Repair two places where SIGTERM exit of a backend could leave corrupted
7791       state in shared memory (Tom)
7792      </para>
7793
7794      <para>
7795       Neither case is very important if SIGTERM is used to shut down the
7796       whole database cluster together, but there was a problem if someone
7797       tried to SIGTERM individual backends.
7798      </para>
7799     </listitem>
7800
7801     <listitem>
7802      <para>
7803       Fix conversions between ISO-8859-5 and other encodings to handle
7804       Cyrillic <quote>Yo</> characters (<literal>e</> and <literal>E</> with
7805       two dots) (Sergey Burladyan)
7806      </para>
7807     </listitem>
7808
7809     <listitem>
7810      <para>
7811       Fix several datatype input functions, notably <function>array_in()</>,
7812       that were allowing unused bytes in their results to contain
7813       uninitialized, unpredictable values (Tom)
7814      </para>
7815
7816      <para>
7817       This could lead to failures in which two apparently identical literal
7818       values were not seen as equal, resulting in the parser complaining
7819       about unmatched <literal>ORDER BY</> and <literal>DISTINCT</>
7820       expressions.
7821      </para>
7822     </listitem>
7823
7824     <listitem>
7825      <para>
7826       Fix a corner case in regular-expression substring matching
7827       (<literal>substring(<replaceable>string</> from
7828       <replaceable>pattern</>)</literal>) (Tom)
7829      </para>
7830
7831      <para>
7832       The problem occurs when there is a match to the pattern overall but
7833       the user has specified a parenthesized subexpression and that
7834       subexpression hasn't got a match.  An example is
7835       <literal>substring('foo' from 'foo(bar)?')</>.
7836       This should return NULL, since <literal>(bar)</> isn't matched, but
7837       it was mistakenly returning the whole-pattern match instead (ie,
7838       <literal>foo</>).
7839      </para>
7840     </listitem>
7841
7842     <listitem>
7843      <para>
7844       Update time zone data files to <application>tzdata</> release 2008c (for
7845       DST law changes in Morocco, Iraq, Choibalsan, Pakistan, Syria, Cuba, and
7846       Argentina/San_Luis)
7847      </para>
7848     </listitem>
7849
7850     <listitem>
7851      <para>
7852       Fix incorrect result from <application>ecpg</>'s
7853       <function>PGTYPEStimestamp_sub()</> function (Michael)
7854      </para>
7855     </listitem>
7856
7857     <listitem>
7858      <para>
7859       Fix broken GiST comparison function for <filename>contrib/tsearch2</>'s
7860       <type>tsquery</> type (Teodor)
7861      </para>
7862     </listitem>
7863
7864     <listitem>
7865      <para>
7866       Fix possible crashes in <filename>contrib/cube</> functions (Tom)
7867      </para>
7868     </listitem>
7869
7870     <listitem>
7871      <para>
7872       Fix core dump in <filename>contrib/xml2</>'s
7873       <function>xpath_table()</> function when the input query returns a
7874       NULL value (Tom)
7875      </para>
7876     </listitem>
7877
7878     <listitem>
7879      <para>
7880       Fix <filename>contrib/xml2</>'s makefile to not override
7881       <literal>CFLAGS</> (Tom)
7882      </para>
7883     </listitem>
7884
7885     <listitem>
7886      <para>
7887       Fix <literal>DatumGetBool</> macro to not fail with <application>gcc</>
7888       4.3 (Tom)
7889      </para>
7890
7891      <para>
7892       This problem affects <quote>old style</> (V0) C functions that
7893       return boolean.  The fix is already in 8.3, but the need to
7894       back-patch it was not realized at the time.
7895      </para>
7896     </listitem>
7897
7898    </itemizedlist>
7899
7900   </sect2>
7901  </sect1>
7902
7903  <sect1 id="release-8-2-7">
7904   <title>Release 8.2.7</title>
7905
7906   <note>
7907   <title>Release date</title>
7908   <simpara>2008-03-17</simpara>
7909   </note>
7910
7911   <para>
7912    This release contains a variety of fixes from 8.2.6.
7913    For information about new features in the 8.2 major release, see
7914    <xref linkend="release-8-2">.
7915   </para>
7916
7917   <sect2>
7918    <title>Migration to Version 8.2.7</title>
7919
7920    <para>
7921     A dump/restore is not required for those running 8.2.X.
7922     However, you might need to <command>REINDEX</> indexes on textual
7923     columns after updating, if you are affected by the Windows locale
7924     issue described below.
7925    </para>
7926
7927   </sect2>
7928
7929   <sect2>
7930    <title>Changes</title>
7931
7932    <itemizedlist>
7933
7934     <listitem>
7935      <para>
7936       Fix character string comparison for Windows locales that consider
7937       different character combinations as equal (Tom)
7938      </para>
7939
7940      <para>
7941       This fix applies only on Windows and only when using UTF-8
7942       database encoding.  The same fix was made for all other cases
7943       over two years ago, but Windows with UTF-8 uses a separate code
7944       path that was not updated.  If you are using a locale that
7945       considers some non-identical strings as equal, you may need to
7946       <command>REINDEX</> to fix existing indexes on textual columns.
7947      </para>
7948     </listitem>
7949
7950     <listitem>
7951      <para>
7952       Repair potential deadlock between concurrent <command>VACUUM FULL</>
7953       operations on different system catalogs (Tom)
7954      </para>
7955     </listitem>
7956
7957     <listitem>
7958      <para>
7959       Fix longstanding <command>LISTEN</>/<command>NOTIFY</>
7960       race condition (Tom)
7961      </para>
7962
7963      <para>
7964       In rare cases a session that had just executed a
7965       <command>LISTEN</> might not get a notification, even though
7966       one would be expected because the concurrent transaction executing
7967       <command>NOTIFY</> was observed to commit later.
7968      </para>
7969
7970      <para>
7971       A side effect of the fix is that a transaction that has executed
7972       a not-yet-committed <command>LISTEN</> command will not see any
7973       row in <structname>pg_listener</> for the <command>LISTEN</>,
7974       should it choose to look; formerly it would have.  This behavior
7975       was never documented one way or the other, but it is possible that
7976       some applications depend on the old behavior.
7977      </para>
7978     </listitem>
7979
7980     <listitem>
7981      <para>
7982       Disallow <command>LISTEN</> and <command>UNLISTEN</> within a
7983       prepared transaction (Tom)
7984      </para>
7985
7986      <para>
7987       This was formerly allowed but trying to do it had various unpleasant
7988       consequences, notably that the originating backend could not exit
7989       as long as an <command>UNLISTEN</> remained uncommitted.
7990      </para>
7991     </listitem>
7992
7993     <listitem>
7994      <para>
7995       Disallow dropping a temporary table within a
7996       prepared transaction (Heikki)
7997      </para>
7998
7999      <para>
8000       This was correctly disallowed by 8.1, but the check was inadvertently
8001       broken in 8.2.
8002      </para>
8003     </listitem>
8004
8005     <listitem>
8006      <para>
8007       Fix rare crash when an error occurs during a query using a hash index
8008       (Heikki)
8009      </para>
8010     </listitem>
8011
8012     <listitem>
8013      <para>
8014       Fix memory leaks in certain usages of set-returning functions (Neil)
8015      </para>
8016     </listitem>
8017
8018     <listitem>
8019      <para>
8020       Fix input of datetime values for February 29 in years BC (Tom)
8021      </para>
8022
8023      <para>
8024       The former coding was mistaken about which years were leap years.
8025      </para>
8026     </listitem>
8027
8028     <listitem>
8029      <para>
8030       Fix <quote>unrecognized node type</> error in some variants of
8031       <command>ALTER OWNER</> (Tom)
8032      </para>
8033     </listitem>
8034
8035     <listitem>
8036      <para>
8037       Ensure <structname>pg_stat_activity</>.<structfield>waiting</> flag
8038       is cleared when a lock wait is aborted (Tom)
8039      </para>
8040     </listitem>
8041
8042     <listitem>
8043      <para>
8044       Fix handling of process permissions on Windows Vista (Dave, Magnus)
8045      </para>
8046
8047      <para>
8048       In particular, this fix allows starting the server as the Administrator
8049       user.
8050      </para>
8051     </listitem>
8052
8053     <listitem>
8054      <para>
8055       Update time zone data files to <application>tzdata</> release 2008a
8056       (in particular, recent Chile changes); adjust timezone abbreviation
8057       <literal>VET</> (Venezuela) to mean UTC-4:30, not UTC-4:00 (Tom)
8058      </para>
8059     </listitem>
8060
8061     <listitem>
8062      <para>
8063       Fix <application>pg_ctl</> to correctly extract the postmaster's port
8064       number from command-line options (Itagaki Takahiro, Tom)
8065      </para>
8066
8067      <para>
8068       Previously, <literal>pg_ctl start -w</> could try to contact the
8069       postmaster on the wrong port, leading to bogus reports of startup
8070       failure.
8071      </para>
8072     </listitem>
8073
8074     <listitem>
8075      <para>
8076       Use <option>-fwrapv</> to defend against possible misoptimization
8077       in recent <application>gcc</> versions (Tom)
8078      </para>
8079
8080      <para>
8081       This is known to be necessary when building <productname>PostgreSQL</>
8082       with <application>gcc</> 4.3 or later.
8083      </para>
8084     </listitem>
8085
8086
8087     <listitem>
8088      <para>
8089       Correctly enforce <varname>statement_timeout</> values longer
8090       than <literal>INT_MAX</> microseconds (about 35 minutes) (Tom)
8091      </para>
8092
8093      <para>
8094       This bug affects only builds with <option>--enable-integer-datetimes</>.
8095      </para>
8096     </listitem>
8097
8098     <listitem>
8099      <para>
8100       Fix <quote>unexpected PARAM_SUBLINK ID</> planner error when
8101       constant-folding simplifies a sub-select (Tom)
8102      </para>
8103     </listitem>
8104
8105     <listitem>
8106      <para>
8107       Fix logical errors in constraint-exclusion handling of <literal>IS
8108       NULL</> and <literal>NOT</> expressions (Tom)
8109      </para>
8110
8111      <para>
8112       The planner would sometimes exclude partitions that should not
8113       have been excluded because of the possibility of NULL results.
8114      </para>
8115     </listitem>
8116
8117     <listitem>
8118      <para>
8119       Fix another cause of <quote>failed to build any N-way joins</>
8120       planner errors (Tom)
8121      </para>
8122
8123      <para>
8124       This could happen in cases where a clauseless join needed to be
8125       forced before a join clause could be exploited.
8126      </para>
8127     </listitem>
8128
8129     <listitem>
8130      <para>
8131       Fix incorrect constant propagation in outer-join planning (Tom)
8132      </para>
8133
8134      <para>
8135       The planner could sometimes incorrectly conclude that a variable
8136       could be constrained to be equal to a constant, leading
8137       to wrong query results.
8138      </para>
8139     </listitem>
8140
8141     <listitem>
8142      <para>
8143       Fix display of constant expressions in <literal>ORDER BY</>
8144       and <literal>GROUP BY</> (Tom)
8145      </para>
8146
8147      <para>
8148       An explictly casted constant would be shown incorrectly.  This could
8149       for example lead to corruption of a view definition during
8150       dump and reload.
8151      </para>
8152     </listitem>
8153
8154     <listitem>
8155      <para>
8156       Fix <application>libpq</> to handle NOTICE messages correctly
8157       during COPY OUT (Tom)
8158      </para>
8159
8160      <para>
8161       This failure has only been observed to occur when a user-defined
8162       datatype's output routine issues a NOTICE, but there is no
8163       guarantee it couldn't happen due to other causes.
8164      </para>
8165     </listitem>
8166
8167    </itemizedlist>
8168
8169   </sect2>
8170  </sect1>
8171
8172  <sect1 id="release-8-2-6">
8173   <title>Release 8.2.6</title>
8174
8175   <note>
8176   <title>Release date</title>
8177   <simpara>2008-01-07</simpara>
8178   </note>
8179
8180   <para>
8181    This release contains a variety of fixes from 8.2.5,
8182    including fixes for significant security issues.
8183    For information about new features in the 8.2 major release, see
8184    <xref linkend="release-8-2">.
8185   </para>
8186
8187   <sect2>
8188    <title>Migration to Version 8.2.6</title>
8189
8190    <para>
8191     A dump/restore is not required for those running 8.2.X.
8192    </para>
8193
8194   </sect2>
8195
8196   <sect2>
8197    <title>Changes</title>
8198
8199    <itemizedlist>
8200
8201     <listitem>
8202      <para>
8203       Prevent functions in indexes from executing with the privileges of
8204       the user running <command>VACUUM</>, <command>ANALYZE</>, etc (Tom)
8205      </para>
8206
8207      <para>
8208       Functions used in index expressions and partial-index
8209       predicates are evaluated whenever a new table entry is made.  It has
8210       long been understood that this poses a risk of trojan-horse code
8211       execution if one modifies a table owned by an untrustworthy user.
8212       (Note that triggers, defaults, check constraints, etc. pose the
8213       same type of risk.)  But functions in indexes pose extra danger
8214       because they will be executed by routine maintenance operations
8215       such as <command>VACUUM FULL</>, which are commonly performed
8216       automatically under a superuser account.  For example, a nefarious user
8217       can execute code with superuser privileges by setting up a
8218       trojan-horse index definition and waiting for the next routine vacuum.
8219       The fix arranges for standard maintenance operations
8220       (including <command>VACUUM</>, <command>ANALYZE</>, <command>REINDEX</>,
8221       and <command>CLUSTER</>) to execute as the table owner rather than
8222       the calling user, using the same privilege-switching mechanism already
8223       used for <literal>SECURITY DEFINER</> functions.  To prevent bypassing
8224       this security measure, execution of <command>SET SESSION
8225       AUTHORIZATION</> and <command>SET ROLE</> is now forbidden within a
8226       <literal>SECURITY DEFINER</> context.  (CVE-2007-6600)
8227      </para>
8228     </listitem>
8229
8230     <listitem>
8231      <para>
8232       Repair assorted bugs in the regular-expression package (Tom, Will Drewry)
8233      </para>
8234
8235      <para>
8236       Suitably crafted regular-expression patterns could cause crashes,
8237       infinite or near-infinite looping, and/or massive memory consumption,
8238       all of which pose denial-of-service hazards for applications that
8239       accept regex search patterns from untrustworthy sources.
8240       (CVE-2007-4769, CVE-2007-4772, CVE-2007-6067)
8241      </para>
8242     </listitem>
8243
8244     <listitem>
8245      <para>
8246       Require non-superusers who use <filename>/contrib/dblink</> to use only
8247       password authentication, as a security measure (Joe)
8248      </para>
8249
8250      <para>
8251       The fix that appeared for this in 8.2.5 was incomplete, as it plugged
8252       the hole for only some <filename>dblink</> functions.  (CVE-2007-6601,
8253       CVE-2007-3278)
8254      </para>
8255     </listitem>
8256
8257     <listitem>
8258      <para>
8259       Fix bugs in WAL replay for GIN indexes (Teodor)
8260      </para>
8261     </listitem>
8262
8263     <listitem>
8264      <para>
8265       Fix GIN index build to work properly when
8266       <varname>maintenance_work_mem</> is 4GB or more (Tom)
8267      </para>
8268     </listitem>
8269
8270     <listitem>
8271      <para>
8272       Update time zone data files to <application>tzdata</> release 2007k
8273       (in particular, recent Argentina changes) (Tom)
8274      </para>
8275     </listitem>
8276
8277     <listitem>
8278      <para>
8279       Improve planner's handling of LIKE/regex estimation in non-C locales
8280       (Tom)
8281      </para>
8282     </listitem>
8283
8284     <listitem>
8285      <para>
8286       Fix planning-speed problem for deep outer-join nests, as well as
8287       possible poor choice of join order (Tom)
8288      </para>
8289     </listitem>
8290
8291     <listitem>
8292      <para>
8293       Fix planner failure in some cases of <literal>WHERE false AND var IN
8294       (SELECT ...)</> (Tom)
8295      </para>
8296     </listitem>
8297
8298     <listitem>
8299      <para>
8300       Make <command>CREATE TABLE ... SERIAL</> and
8301       <command>ALTER SEQUENCE ... OWNED BY</> not change the
8302       <function>currval()</> state of the sequence (Tom)
8303      </para>
8304     </listitem>
8305
8306     <listitem>
8307      <para>
8308       Preserve the tablespace and storage parameters of indexes that are
8309       rebuilt by <command>ALTER TABLE ... ALTER COLUMN TYPE</> (Tom)
8310      </para>
8311     </listitem>
8312
8313     <listitem>
8314      <para>
8315       Make archive recovery always start a new WAL timeline, rather than only
8316       when a recovery stop time was used (Simon)
8317      </para>
8318
8319      <para>
8320       This avoids a corner-case risk of trying to overwrite an existing
8321       archived copy of the last WAL segment, and seems simpler and cleaner
8322       than the original definition.
8323      </para>
8324     </listitem>
8325
8326     <listitem>
8327      <para>
8328       Make <command>VACUUM</> not use all of <varname>maintenance_work_mem</>
8329       when the table is too small for it to be useful (Alvaro)
8330      </para>
8331     </listitem>
8332
8333     <listitem>
8334      <para>
8335       Fix potential crash in <function>translate()</> when using a multibyte
8336       database encoding (Tom)
8337      </para>
8338     </listitem>
8339
8340     <listitem>
8341      <para>
8342       Make <function>corr()</> return the correct result for negative
8343       correlation values (Neil)
8344      </para>
8345     </listitem>
8346
8347     <listitem>
8348      <para>
8349       Fix overflow in <literal>extract(epoch from interval)</> for intervals
8350       exceeding 68 years (Tom)
8351      </para>
8352     </listitem>
8353
8354     <listitem>
8355      <para>
8356       Fix PL/Perl to not fail when a UTF-8 regular expression is used
8357       in a trusted function (Andrew)
8358      </para>
8359     </listitem>
8360
8361     <listitem>
8362      <para>
8363       Fix PL/Perl to cope when platform's Perl defines type <literal>bool</>
8364       as <literal>int</> rather than <literal>char</> (Tom)
8365      </para>
8366
8367      <para>
8368       While this could theoretically happen anywhere, no standard build of
8369       Perl did things this way ... until <productname>Mac OS X</> 10.5.
8370      </para>
8371     </listitem>
8372
8373     <listitem>
8374      <para>
8375       Fix PL/Python to work correctly with Python 2.5 on 64-bit machines
8376       (Marko Kreen)
8377      </para>
8378     </listitem>
8379
8380     <listitem>
8381      <para>
8382       Fix PL/Python to not crash on long exception messages (Alvaro)
8383      </para>
8384     </listitem>
8385
8386     <listitem>
8387      <para>
8388       Fix <application>pg_dump</> to correctly handle inheritance child tables
8389       that have default expressions different from their parent's (Tom)
8390      </para>
8391     </listitem>
8392
8393     <listitem>
8394      <para>
8395       Fix <application>libpq</> crash when <varname>PGPASSFILE</> refers
8396       to a file that is not a plain file (Martin Pitt)
8397      </para>
8398     </listitem>
8399
8400     <listitem>
8401      <para>
8402       <application>ecpg</> parser fixes (Michael)
8403      </para>
8404     </listitem>
8405
8406     <listitem>
8407      <para>
8408       Make <filename>contrib/pgcrypto</> defend against
8409       <application>OpenSSL</> libraries that fail on keys longer than 128
8410       bits; which is the case at least on some Solaris versions (Marko Kreen)
8411      </para>
8412     </listitem>
8413
8414     <listitem>
8415      <para>
8416       Make <filename>contrib/tablefunc</>'s <function>crosstab()</> handle
8417       NULL rowid as a category in its own right, rather than crashing (Joe)
8418      </para>
8419     </listitem>
8420
8421     <listitem>
8422      <para>
8423       Fix <type>tsvector</> and <type>tsquery</> output routines to
8424       escape backslashes correctly (Teodor, Bruce)
8425      </para>
8426     </listitem>
8427
8428     <listitem>
8429      <para>
8430       Fix crash of <function>to_tsvector()</> on huge input strings (Teodor)
8431      </para>
8432     </listitem>
8433
8434     <listitem>
8435      <para>
8436       Require a specific version of <productname>Autoconf</> to be used
8437       when re-generating the <command>configure</> script (Peter)
8438      </para>
8439
8440      <para>
8441       This affects developers and packagers only.  The change was made
8442       to prevent accidental use of untested combinations of
8443       <productname>Autoconf</> and <productname>PostgreSQL</> versions.
8444       You can remove the version check if you really want to use a
8445       different <productname>Autoconf</> version, but it's
8446       your responsibility whether the result works or not.
8447      </para>
8448     </listitem>
8449
8450     <listitem>
8451      <para>
8452       Update <function>gettimeofday</> configuration check so that
8453       <productname>PostgreSQL</> can be built on newer versions of
8454       <productname>MinGW</> (Magnus)
8455      </para>
8456     </listitem>
8457
8458    </itemizedlist>
8459
8460   </sect2>
8461  </sect1>
8462
8463  <sect1 id="release-8-2-5">
8464   <title>Release 8.2.5</title>
8465
8466   <note>
8467   <title>Release date</title>
8468   <simpara>2007-09-17</simpara>
8469   </note>
8470
8471   <para>
8472    This release contains a variety of fixes from 8.2.4.
8473    For information about new features in the 8.2 major release, see
8474    <xref linkend="release-8-2">.
8475   </para>
8476
8477   <sect2>
8478    <title>Migration to Version 8.2.5</title>
8479
8480    <para>
8481     A dump/restore is not required for those running 8.2.X.
8482    </para>
8483
8484   </sect2>
8485
8486   <sect2>
8487    <title>Changes</title>
8488
8489    <itemizedlist>
8490
8491     <listitem>
8492      <para>
8493       Prevent index corruption when a transaction inserts rows and
8494       then aborts close to the end of a concurrent <command>VACUUM</>
8495       on the same table (Tom)
8496      </para>
8497     </listitem>
8498
8499     <listitem>
8500      <para>
8501       Fix <literal>ALTER DOMAIN ADD CONSTRAINT</> for cases involving
8502       domains over domains (Tom)
8503      </para>
8504     </listitem>
8505
8506     <listitem>
8507      <para>
8508       Make <command>CREATE DOMAIN ... DEFAULT NULL</> work properly (Tom)
8509      </para>
8510     </listitem>
8511
8512     <listitem>
8513      <para>
8514       Fix some planner problems with outer joins, notably poor
8515       size estimation for <literal>t1 LEFT JOIN t2 WHERE t2.col IS NULL</>
8516       (Tom)
8517      </para>
8518     </listitem>
8519
8520     <listitem>
8521      <para>
8522       Allow the <type>interval</> data type to accept input consisting only of
8523       milliseconds or microseconds (Neil)
8524      </para>
8525     </listitem>
8526
8527     <listitem>
8528      <para>
8529       Allow timezone name to appear before the year in <type>timestamp</> input (Tom)
8530      </para>
8531     </listitem>
8532
8533     <listitem>
8534      <para>
8535       Fixes for <acronym>GIN</> indexes used by <filename>/contrib/tsearch2</> (Teodor)
8536      </para>
8537     </listitem>
8538
8539     <listitem>
8540      <para>
8541       Speed up rtree index insertion (Teodor)
8542      </para>
8543     </listitem>
8544
8545     <listitem>
8546      <para>
8547       Fix excessive logging of <acronym>SSL</> error messages (Tom)
8548      </para>
8549     </listitem>
8550
8551     <listitem>
8552      <para>
8553       Fix logging so that log messages are never interleaved when using
8554       the syslogger process (Andrew)
8555      </para>
8556     </listitem>
8557
8558     <listitem>
8559      <para>
8560       Fix crash when <varname>log_min_error_statement</> logging runs out
8561       of memory (Tom)
8562      </para>
8563     </listitem>
8564
8565     <listitem>
8566      <para>
8567       Fix incorrect handling of some foreign-key corner cases (Tom)
8568      </para>
8569     </listitem>
8570
8571     <listitem>
8572      <para>
8573       Fix <function>stddev_pop(numeric)</> and <function>var_pop(numeric)</> (Tom)
8574      </para>
8575     </listitem>
8576
8577     <listitem>
8578      <para>
8579       Prevent <command>REINDEX</> and <command>CLUSTER</> from failing
8580       due to attempting to process temporary tables of other sessions (Alvaro)
8581      </para>
8582     </listitem>
8583
8584     <listitem>
8585      <para>
8586       Update the time zone database rules, particularly New Zealand's upcoming changes (Tom)
8587      </para>
8588     </listitem>
8589
8590     <listitem>
8591      <para>
8592       Windows socket and semaphore improvements (Magnus)
8593      </para>
8594     </listitem>
8595
8596     <listitem>
8597      <para>
8598       Make <command>pg_ctl -w</> work properly in Windows service mode (Dave Page)
8599      </para>
8600     </listitem>
8601
8602     <listitem>
8603      <para>
8604       Fix memory allocation bug when using <application>MIT Kerberos</> on Windows (Magnus)
8605      </para>
8606     </listitem>
8607
8608     <listitem>
8609      <para>
8610       Suppress timezone name (<literal>%Z</>) in log timestamps on Windows
8611       because of possible encoding mismatches (Tom)
8612      </para>
8613     </listitem>
8614
8615     <listitem>
8616      <para>
8617       Require non-superusers who use <filename>/contrib/dblink</> to use only
8618       password authentication, as a security measure (Joe)
8619      </para>
8620     </listitem>
8621
8622     <listitem>
8623      <para>
8624       Restrict <filename>/contrib/pgstattuple</> functions to superusers, for security reasons (Tom)
8625      </para>
8626     </listitem>
8627
8628     <listitem>
8629      <para>
8630       Do not let <filename>/contrib/intarray</> try to make its GIN opclass
8631       the default (this caused problems at dump/restore) (Tom)
8632      </para>
8633     </listitem>
8634
8635    </itemizedlist>
8636
8637   </sect2>
8638  </sect1>
8639
8640  <sect1 id="release-8-2-4">
8641   <title>Release 8.2.4</title>
8642
8643   <note>
8644   <title>Release date</title>
8645   <simpara>2007-04-23</simpara>
8646   </note>
8647
8648   <para>
8649    This release contains a variety of fixes from 8.2.3,
8650    including a security fix.
8651    For information about new features in the 8.2 major release, see
8652    <xref linkend="release-8-2">.
8653   </para>
8654
8655   <sect2>
8656    <title>Migration to Version 8.2.4</title>
8657
8658    <para>
8659     A dump/restore is not required for those running 8.2.X.
8660    </para>
8661
8662   </sect2>
8663
8664   <sect2>
8665    <title>Changes</title>
8666
8667    <itemizedlist>
8668
8669     <listitem>
8670      <para>
8671       Support explicit placement of the temporary-table schema within
8672       <varname>search_path</>, and disable searching it for functions
8673       and operators (Tom)
8674      </para>
8675
8676      <para>
8677       This is needed to allow a security-definer function to set a
8678       truly secure value of <varname>search_path</>.  Without it,
8679       an unprivileged SQL user can use temporary objects to execute code
8680       with the privileges of the security-definer function (CVE-2007-2138).
8681       See <command>CREATE FUNCTION</> for more information.
8682      </para>
8683     </listitem>
8684
8685     <listitem>
8686      <para>
8687       Fix <varname>shared_preload_libraries</> for Windows
8688       by forcing reload in each backend (Korry Douglas)
8689      </para>
8690     </listitem>
8691
8692     <listitem>
8693      <para>
8694       Fix <function>to_char()</> so it properly upper/lower cases localized day or month
8695       names (Pavel Stehule)
8696      </para>
8697     </listitem>
8698
8699     <listitem>
8700      <para>
8701       <filename>/contrib/tsearch2</> crash fixes (Teodor)
8702      </para>
8703     </listitem>
8704
8705     <listitem>
8706      <para>
8707       Require <command>COMMIT PREPARED</> to be executed in the same
8708       database as the transaction was prepared in (Heikki)
8709      </para>
8710     </listitem>
8711
8712     <listitem>
8713      <para>
8714       Allow <command>pg_dump</> to do binary backups larger than two gigabytes
8715       on Windows (Magnus)
8716      </para>
8717     </listitem>
8718
8719     <listitem>
8720      <para>
8721       New traditional (Taiwan) Chinese <acronym>FAQ</> (Zhou Daojing)
8722      </para>
8723     </listitem>
8724
8725     <listitem>
8726      <para>
8727       Prevent the statistics collector from writing to disk too frequently (Tom)
8728      </para>
8729     </listitem>
8730
8731     <listitem>
8732      <para>
8733       Fix potential-data-corruption bug in how <command>VACUUM FULL</> handles
8734       <command>UPDATE</> chains (Tom, Pavan Deolasee)
8735      </para>
8736     </listitem>
8737
8738     <listitem>
8739      <para>
8740       Fix bug in domains that use array types (Tom)
8741      </para>
8742     </listitem>
8743
8744     <listitem>
8745      <para>
8746       Fix <command>pg_dump</> so it can dump a serial column's sequence
8747       using <option>-t</> when not also dumping the owning table
8748       (Tom)
8749      </para>
8750     </listitem>
8751
8752     <listitem>
8753      <para>
8754       Planner fixes, including improving outer join and bitmap scan
8755       selection logic (Tom)
8756      </para>
8757     </listitem>
8758
8759     <listitem>
8760      <para>
8761       Fix possible wrong answers or crash when a PL/pgSQL function tries
8762       to <literal>RETURN</> from within an <literal>EXCEPTION</> block
8763       (Tom)
8764      </para>
8765     </listitem>
8766
8767     <listitem>
8768      <para>
8769       Fix PANIC during enlargement of a hash index (Tom)
8770      </para>
8771     </listitem>
8772
8773     <listitem>
8774      <para>
8775       Fix POSIX-style timezone specs to follow new USA DST rules (Tom)
8776      </para>
8777     </listitem>
8778
8779    </itemizedlist>
8780
8781   </sect2>
8782  </sect1>
8783
8784  <sect1 id="release-8-2-3">
8785   <title>Release 8.2.3</title>
8786
8787   <note>
8788   <title>Release date</title>
8789   <simpara>2007-02-07</simpara>
8790   </note>
8791
8792   <para>
8793    This release contains two fixes from 8.2.2.
8794    For information about new features in the 8.2 major release, see
8795    <xref linkend="release-8-2">.
8796   </para>
8797
8798   <sect2>
8799    <title>Migration to Version 8.2.3</title>
8800
8801    <para>
8802     A dump/restore is not required for those running 8.2.X.
8803    </para>
8804
8805   </sect2>
8806
8807   <sect2>
8808    <title>Changes</title>
8809
8810    <itemizedlist>
8811
8812     <listitem>
8813      <para>
8814       Remove overly-restrictive check for type length in constraints and
8815       functional indexes(Tom)
8816      </para>
8817     </listitem>
8818
8819     <listitem>
8820      <para>
8821       Fix optimization so MIN/MAX in subqueries can again use indexes (Tom)
8822      </para>
8823     </listitem>
8824
8825    </itemizedlist>
8826
8827   </sect2>
8828  </sect1>
8829
8830  <sect1 id="release-8-2-2">
8831   <title>Release 8.2.2</title>
8832
8833   <note>
8834   <title>Release date</title>
8835   <simpara>2007-02-05</simpara>
8836   </note>
8837
8838   <para>
8839    This release contains a variety of fixes from 8.2.1, including
8840    a security fix.
8841    For information about new features in the 8.2 major release, see
8842    <xref linkend="release-8-2">.
8843   </para>
8844
8845   <sect2>
8846    <title>Migration to Version 8.2.2</title>
8847
8848    <para>
8849     A dump/restore is not required for those running 8.2.X.
8850    </para>
8851
8852   </sect2>
8853
8854   <sect2>
8855    <title>Changes</title>
8856
8857    <itemizedlist>
8858
8859     <listitem>
8860      <para>
8861       Remove security vulnerabilities that allowed connected users
8862       to read backend memory (Tom)
8863      </para>
8864
8865      <para>
8866       The vulnerabilities involve suppressing the normal check that a SQL
8867       function returns the data type it's declared to, and changing the
8868       data type of a table column (CVE-2007-0555, CVE-2007-0556).  These
8869       errors can easily be exploited to cause a backend crash, and in
8870       principle might be used to read database content that the user
8871       should not be able to access.
8872      </para>
8873     </listitem>
8874
8875     <listitem>
8876      <para>
8877       Fix not-so-rare-anymore bug wherein btree index page splits could fail
8878       due to choosing an infeasible split point (Heikki Linnakangas)
8879      </para>
8880     </listitem>
8881
8882     <listitem>
8883      <para>
8884       Fix Borland C compile scripts (L Bayuk)
8885      </para>
8886     </listitem>
8887
8888     <listitem>
8889      <para>
8890       Properly handle <function>to_char('CC')</> for years ending in
8891       <literal>00</> (Tom)
8892      </para>
8893
8894      <para>
8895       Year 2000 is in the twentieth century, not the twenty-first.
8896      </para>
8897     </listitem>
8898
8899     <listitem>
8900      <para>
8901       <filename>/contrib/tsearch2</> localization improvements (Tatsuo, Teodor)
8902      </para>
8903     </listitem>
8904
8905     <listitem>
8906      <para>
8907       Fix incorrect permission check in
8908       <literal>information_schema.key_column_usage</> view (Tom)
8909      </para>
8910
8911      <para>
8912       The symptom is <quote>relation with OID nnnnn does not exist</> errors.
8913       To get this fix without using <command>initdb</>, use <command>CREATE OR
8914       REPLACE VIEW</> to install the corrected definition found in
8915       <filename>share/information_schema.sql</>.  Note you will need to do
8916       this in each database.
8917      </para>
8918     </listitem>
8919
8920     <listitem>
8921      <para>
8922       Improve <command>VACUUM</> performance for databases with many tables (Tom)
8923      </para>
8924     </listitem>
8925
8926     <listitem>
8927      <para>
8928       Fix for rare Assert() crash triggered by <literal>UNION</> (Tom)
8929      </para>
8930     </listitem>
8931
8932     <listitem>
8933      <para>
8934       Fix potentially incorrect results from index searches using
8935       <literal>ROW</> inequality conditions (Tom)
8936      </para>
8937     </listitem>
8938
8939     <listitem>
8940      <para>
8941       Tighten security of multi-byte character processing for UTF8 sequences
8942       over three bytes long (Tom)
8943      </para>
8944     </listitem>
8945
8946     <listitem>
8947      <para>
8948       Fix bogus <quote>permission denied</> failures occurring on Windows
8949       due to attempts to fsync already-deleted files (Magnus, Tom)
8950      </para>
8951     </listitem>
8952
8953     <listitem>
8954      <para>
8955       Fix bug that could cause the statistics collector
8956       to hang on Windows (Magnus)
8957      </para>
8958
8959      <para>
8960       This would in turn lead to autovacuum not working.
8961      </para>
8962     </listitem>
8963
8964     <listitem>
8965      <para>
8966       Fix possible crashes when an already-in-use PL/pgSQL function is
8967       updated (Tom)
8968      </para>
8969     </listitem>
8970
8971     <listitem>
8972      <para>
8973       Improve PL/pgSQL handling of domain types (Sergiy Vyshnevetskiy, Tom)
8974      </para>
8975     </listitem>
8976
8977     <listitem>
8978      <para>
8979       Fix possible errors in processing PL/pgSQL exception blocks (Tom)
8980      </para>
8981     </listitem>
8982
8983    </itemizedlist>
8984
8985   </sect2>
8986  </sect1>
8987
8988  <sect1 id="release-8-2-1">
8989   <title>Release 8.2.1</title>
8990
8991   <note>
8992   <title>Release date</title>
8993   <simpara>2007-01-08</simpara>
8994   </note>
8995
8996   <para>
8997    This release contains a variety of fixes from 8.2.
8998    For information about new features in the 8.2 major release, see
8999    <xref linkend="release-8-2">.
9000   </para>
9001
9002   <sect2>
9003    <title>Migration to Version 8.2.1</title>
9004
9005    <para>
9006     A dump/restore is not required for those running 8.2.
9007    </para>
9008
9009   </sect2>
9010
9011   <sect2>
9012    <title>Changes</title>
9013
9014    <itemizedlist>
9015
9016     <listitem>
9017      <para>
9018       Fix crash with <literal>SELECT</> ... <literal>LIMIT ALL</> (also
9019       <literal>LIMIT NULL</>) (Tom)
9020      </para>
9021     </listitem>
9022
9023     <listitem>
9024      <para>
9025       <filename>Several /contrib/tsearch2</> fixes (Teodor)
9026      </para>
9027     </listitem>
9028
9029     <listitem>
9030      <para>
9031       On Windows, make log messages coming from the operating system use
9032       <acronym>ASCII</> encoding (Hiroshi Saito)
9033      </para>
9034
9035      <para>
9036       This fixes a conversion problem when there is a mismatch between
9037       the encoding of the operating system and database server.
9038      </para>
9039     </listitem>
9040
9041     <listitem>
9042      <para>
9043       Fix Windows linking of <application>pg_dump</> using
9044       <filename>win32.mak</>
9045       (Hiroshi Saito)
9046      </para>
9047     </listitem>
9048
9049     <listitem>
9050      <para>
9051       Fix planner mistakes for outer join queries (Tom)
9052      </para>
9053     </listitem>
9054
9055     <listitem>
9056      <para>
9057       Fix several problems in queries involving sub-SELECTs (Tom)
9058      </para>
9059     </listitem>
9060
9061     <listitem>
9062      <para>
9063       Fix potential crash in SPI during subtransaction abort (Tom)
9064      </para>
9065
9066      <para>
9067       This affects all PL functions since they all use SPI.
9068      </para>
9069     </listitem>
9070
9071     <listitem>
9072      <para>
9073       Improve build speed of <acronym>PDF</> documentation (Peter)
9074      </para>
9075     </listitem>
9076
9077     <listitem>
9078      <para>
9079       Re-add <acronym>JST</> (Japan) timezone abbreviation (Tom)
9080      </para>
9081     </listitem>
9082
9083     <listitem>
9084      <para>
9085       Improve optimization decisions related to index scans (Tom)
9086      </para>
9087     </listitem>
9088
9089     <listitem>
9090      <para>
9091       Have <application>psql</> print multi-byte combining characters as
9092       before, rather than output as <literal>\u</> (Tom)
9093      </para>
9094     </listitem>
9095
9096     <listitem>
9097      <para>
9098       Improve index usage of regular expressions that use parentheses (Tom)
9099      </para>
9100
9101      <para>
9102       This improves <application>psql</> <literal>\d</> performance also.
9103      </para>
9104     </listitem>
9105
9106     <listitem>
9107      <para>
9108       Make <application>pg_dumpall</> assume that databases have public
9109       <literal>CONNECT</> privilege, when dumping from a pre-8.2 server (Tom)
9110      </para>
9111
9112      <para>
9113       This preserves the previous behavior that anyone can connect to a
9114       database if allowed by <filename>pg_hba.conf</>.
9115      </para>
9116     </listitem>
9117
9118    </itemizedlist>
9119
9120   </sect2>
9121  </sect1>
9122
9123  <sect1 id="release-8-2">
9124   <title>Release 8.2</title>
9125
9126   <note>
9127    <title>Release date</title>
9128    <simpara>2006-12-05</simpara>
9129   </note>
9130
9131   <sect2>
9132    <title>Overview</title>
9133
9134    <para>
9135     This release adds many functionality and performance improvements that
9136     were requested by users, including:
9137
9138    <itemizedlist>
9139
9140      <listitem>
9141       <para>
9142        Query language enhancements including <command>INSERT/UPDATE/DELETE
9143        RETURNING</command>, multirow <literal>VALUES</literal> lists, and
9144        optional target-table alias in
9145        <command>UPDATE</>/<command>DELETE</command>
9146       </para>
9147      </listitem>
9148
9149      <listitem>
9150       <para>
9151        Index creation without blocking concurrent
9152        <command>INSERT</>/<command>UPDATE</>/<command>DELETE</>
9153        operations
9154       </para>
9155      </listitem>
9156
9157      <listitem>
9158       <para>
9159        Many query optimization improvements, including support for
9160        reordering outer joins
9161       </para>
9162      </listitem>
9163
9164      <listitem>
9165       <para>
9166        Improved sorting performance with lower memory usage
9167       </para>
9168      </listitem>
9169
9170      <listitem>
9171       <para>
9172        More efficient locking with better concurrency
9173       </para>
9174      </listitem>
9175
9176      <listitem>
9177       <para>
9178        More efficient vacuuming
9179       </para>
9180      </listitem>
9181
9182      <listitem>
9183       <para>
9184        Easier administration of warm standby servers
9185       </para>
9186      </listitem>
9187
9188      <listitem>
9189       <para>
9190        New <literal>FILLFACTOR</literal> support for tables and indexes
9191       </para>
9192      </listitem>
9193
9194      <listitem>
9195       <para>
9196        Monitoring, logging, and performance tuning additions
9197       </para>
9198      </listitem>
9199
9200      <listitem>
9201       <para>
9202        More control over creating and dropping objects
9203       </para>
9204      </listitem>
9205
9206      <listitem>
9207       <para>
9208        Table inheritance relationships can be defined
9209        for and removed from pre-existing tables
9210       </para>
9211      </listitem>
9212
9213      <listitem>
9214       <para>
9215        <command>COPY TO</command> can copy the output of an arbitrary
9216        <command>SELECT</command> statement
9217       </para>
9218      </listitem>
9219
9220      <listitem>
9221       <para>
9222        Array improvements, including nulls in arrays
9223       </para>
9224      </listitem>
9225
9226      <listitem>
9227       <para>
9228        Aggregate-function improvements, including multiple-input
9229        aggregates and SQL:2003 statistical functions
9230       </para>
9231      </listitem>
9232
9233      <listitem>
9234       <para>
9235        Many <filename>contrib/</filename> improvements
9236       </para>
9237      </listitem>
9238
9239     </itemizedlist>
9240
9241    </para>
9242
9243   </sect2>
9244
9245   <sect2>
9246    <title>Migration to Version 8.2</title>
9247
9248    <para>
9249     A dump/restore using <application>pg_dump</application> is
9250     required for those wishing to migrate data from any previous
9251     release.
9252    </para>
9253
9254    <para>
9255     Observe the following incompatibilities:
9256    </para>
9257
9258    <itemizedlist>
9259
9260      <listitem>
9261       <para>
9262        Set <link
9263        linkend="guc-escape-string-warning"><varname>escape_string_warning</></link>
9264        to <literal>on</> by default (Bruce)
9265       </para>
9266
9267       <para>
9268        This issues a warning if backslash escapes are used in
9269        <link linkend="sql-syntax-strings">non-escape (non-<literal>E''</>)
9270        strings</link>.
9271       </para>
9272      </listitem>
9273
9274      <listitem>
9275       <para>
9276        Change the <link linkend="sql-syntax-row-constructors">row
9277        constructor syntax</link> (<literal>ROW(...)</>) so that
9278        list elements <literal>foo.*</> will be expanded to a list
9279        of their member fields, rather than creating a nested
9280        row type field as formerly (Tom)
9281       </para>
9282
9283       <para>
9284        The new behavior is substantially more useful since it
9285        allows, for example, triggers to check for data changes
9286        with <literal>IF row(new.*) IS DISTINCT FROM row(old.*)</>.
9287        The old behavior is still available by omitting <literal>.*</>.
9288       </para>
9289      </listitem>
9290
9291      <listitem>
9292       <para>
9293        Make <link linkend="row-wise-comparison">row comparisons</link>
9294        follow <acronym>SQL</> standard semantics and allow them
9295        to be used in index scans (Tom)
9296       </para>
9297
9298       <para>
9299        Previously, row = and &lt;&gt; comparisons followed the
9300        standard but &lt; &lt;= &gt; &gt;= did not.  A row comparison
9301        can now be used as an index constraint for a multicolumn
9302        index matching the row value.
9303       </para>
9304      </listitem>
9305
9306      <listitem>
9307       <para>
9308        Make <link linkend="functions-comparison">row <literal>IS <optional>NOT</> NULL</literal></link>
9309        tests follow <acronym>SQL</> standard semantics (Tom)
9310       </para>
9311
9312       <para>
9313        The former behavior conformed to the standard for simple cases
9314        with <literal>IS NULL</>, but <literal>IS NOT NULL</> would return
9315        true if any row field was non-null, whereas the standard says it
9316        should return true only when all fields are non-null.
9317       </para>
9318      </listitem>
9319
9320      <listitem>
9321       <para>
9322        Make <link linkend="SQL-SET-CONSTRAINTS"><command>SET
9323        CONSTRAINT</></link> affect only one constraint (Kris Jurka)
9324       </para>
9325
9326       <para>
9327        In previous releases, <command>SET CONSTRAINT</> modified
9328        all constraints with a matching name.  In this release,
9329        the schema search path is used to modify only the first
9330        matching constraint.  A schema specification is also
9331        supported.  This more nearly conforms to the SQL standard.
9332       </para>
9333      </listitem>
9334
9335      <listitem>
9336       <para>
9337        Remove <literal>RULE</> permission for tables, for security reasons
9338        (Tom)
9339       </para>
9340
9341       <para>
9342        As of this release, only a table's owner can create or modify
9343        rules for the table.  For backwards compatibility,
9344        <command>GRANT</>/<command>REVOKE RULE</> is still accepted,
9345        but it does nothing.
9346       </para>
9347      </listitem>
9348
9349      <listitem>
9350       <para>
9351        Array comparison improvements (Tom)
9352       </para>
9353
9354       <para>
9355        Now array dimensions are also compared.
9356       </para>
9357      </listitem>
9358
9359      <listitem>
9360       <para>
9361        Change <link linkend="functions-array">array concatenation</link>
9362        to match documented behavior (Tom)
9363       </para>
9364
9365       <para>
9366        This changes the previous behavior where concatenation
9367        would modify the array lower bound.
9368       </para>
9369      </listitem>
9370
9371      <listitem>
9372       <para>
9373        Make command-line options of <application>postmaster</>
9374        and <link linkend="app-postgres"><application>postgres</></link>
9375        identical (Peter)
9376       </para>
9377
9378       <para>
9379        This allows the postmaster to pass arguments to each backend
9380        without using <literal>-o</>.  Note that some options are now
9381        only available as long-form options, because there were conflicting
9382        single-letter options.
9383       </para>
9384      </listitem>
9385
9386      <listitem>
9387       <para>
9388        Deprecate use of <application>postmaster</> symbolic link (Peter)
9389       </para>
9390
9391       <para>
9392        <application>postmaster</> and <application>postgres</>
9393        commands now act identically, with the behavior determined
9394        by command-line options.  The <application>postmaster</> symbolic link is
9395        kept for compatibility, but is not really needed.
9396       </para>
9397      </listitem>
9398
9399      <listitem>
9400       <para>
9401        Change <link
9402        linkend="guc-log-duration"><varname>log_duration</></link>
9403        to output even if the query is not output (Tom)
9404       </para>
9405
9406       <para>
9407        In prior releases, <varname>log_duration</> only printed if
9408        the query appeared earlier in the log.
9409       </para>
9410      </listitem>
9411
9412      <listitem>
9413       <para>
9414        Make <link
9415        linkend="functions-formatting"><function>to_char(time)</></link>
9416        and <link
9417        linkend="functions-formatting"><function>to_char(interval)</></link>
9418        treat <literal>HH</> and <literal>HH12</> as 12-hour
9419        intervals
9420       </para>
9421
9422       <para>
9423        Most applications should use <literal>HH24</> unless they
9424        want a 12-hour display.
9425       </para>
9426      </listitem>
9427
9428      <listitem>
9429       <para>
9430        Zero unmasked bits in conversion from <link
9431        linkend="datatype-inet"><type>INET</></link> to <link
9432        linkend="datatype-inet"><type>CIDR</></link> (Tom)
9433       </para>
9434
9435       <para>
9436        This ensures that the converted value is actually valid for
9437        <type>CIDR</>.
9438       </para>
9439      </listitem>
9440
9441      <listitem>
9442       <para>
9443        Remove <varname>australian_timezones</> configuration variable
9444        (Joachim Wieland)
9445       </para>
9446
9447       <para>
9448        This variable has been superseded by a more general facility
9449        for configuring timezone abbreviations.
9450       </para>
9451      </listitem>
9452
9453      <listitem>
9454       <para>
9455        Improve cost estimation for nested-loop index scans (Tom)
9456       </para>
9457
9458       <para>
9459        This might eliminate the need to set unrealistically small
9460        values of <link
9461        linkend="guc-random-page-cost"><varname>random_page_cost</></link>.
9462        If you have been using a very small <varname>random_page_cost</>,
9463        please recheck your test cases.
9464       </para>
9465      </listitem>
9466
9467      <listitem>
9468       <para>
9469        Change behavior of <command>pg_dump</> <literal>-n</> and
9470        <literal>-t</> options.  (Greg Sabino Mullane)
9471       </para>
9472       <para>
9473        See the <command>pg_dump</> manual page for details.
9474       </para>
9475      </listitem>
9476
9477      <listitem>
9478       <para>
9479        Change <link linkend="libpq"><application>libpq</></link>
9480        <function>PQdsplen()</> to return a useful value (Martijn
9481        van Oosterhout)
9482       </para>
9483      </listitem>
9484
9485      <listitem>
9486       <para>
9487        Declare <link linkend="libpq"><application>libpq</></link>
9488        <function>PQgetssl()</> as returning <literal>void *</>,
9489        rather than <literal>SSL *</> (Martijn van Oosterhout)
9490       </para>
9491
9492       <para>
9493        This allows applications to use the function without including
9494        the OpenSSL headers.
9495       </para>
9496      </listitem>
9497
9498      <listitem>
9499       <para>
9500        C-language loadable modules must now include a
9501        <link linkend="xfunc-c-dynload"><literal>PG_MODULE_MAGIC</></link>
9502        macro call for version compatibility checking
9503        (Martijn van Oosterhout)
9504       </para>
9505      </listitem>
9506
9507      <listitem>
9508       <para>
9509        For security's sake, modules used by a PL/PerlU function are no
9510        longer available to PL/Perl functions (Andrew)
9511       </para>
9512       <note>
9513        <para>
9514         This also implies that data can no longer be shared between a PL/Perl
9515         function and a PL/PerlU function.
9516         Some Perl installations have not been compiled with the correct flags
9517         to allow multiple interpreters to exist within a single process.
9518         In this situation PL/Perl and PL/PerlU cannot both be used in a
9519         single backend. The solution is to get a Perl installation which
9520         supports multiple interpreters.
9521        </para>
9522       </note>
9523      </listitem>
9524
9525      <listitem>
9526       <para>
9527        In <filename>contrib/xml2/</>, rename <function>xml_valid()</> to
9528        <function>xml_is_well_formed()</> (Tom)
9529       </para>
9530
9531       <para>
9532        <function>xml_valid()</> will remain for backward compatibility,
9533        but its behavior will change to do schema checking in a future
9534        release.
9535       </para>
9536      </listitem>
9537
9538      <listitem>
9539       <para>
9540        Remove <filename>contrib/ora2pg/</>, now at <ulink
9541        url="http://www.samse.fr/GPL/ora2pg"></ulink>
9542       </para>
9543      </listitem>
9544
9545      <listitem>
9546       <para>
9547        Remove contrib modules that have been migrated to PgFoundry:
9548        <filename>adddepend</>, <filename>dbase</>, <filename>dbmirror</>,
9549        <filename>fulltextindex</>, <filename>mac</>, <filename>userlock</>
9550       </para>
9551      </listitem>
9552
9553      <listitem>
9554       <para>
9555        Remove abandoned contrib modules:
9556        <filename>mSQL-interface</>, <filename>tips</>
9557       </para>
9558      </listitem>
9559
9560      <listitem>
9561       <para>
9562        Remove <acronym>QNX</> and <acronym>BEOS</> ports (Bruce)
9563       </para>
9564
9565       <para>
9566        These ports no longer had active maintainers.
9567       </para>
9568      </listitem>
9569
9570    </itemizedlist>
9571   </sect2>
9572
9573   <sect2>
9574    <title>Changes</title>
9575
9576    <para>
9577     Below you will find a detailed account of the
9578     changes between <productname>PostgreSQL</productname> 8.2 and
9579     the previous major release.
9580    </para>
9581
9582    <sect3>
9583     <title>Performance Improvements</title>
9584     <itemizedlist>
9585
9586      <listitem>
9587       <para>
9588        Allow the planner to reorder <link linkend="queries-join">outer
9589        joins</link> in some circumstances (Tom)
9590       </para>
9591
9592       <para>
9593        In previous releases, outer joins would always be evaluated in
9594        the order written in the query. This change allows the
9595        query optimizer to consider reordering outer joins, in cases where
9596        it can determine that the join order can be changed without
9597        altering the meaning of the query.  This can make a
9598        considerable performance difference for queries involving
9599        multiple outer joins or mixed inner and outer joins.
9600       </para>
9601      </listitem>
9602
9603      <listitem>
9604       <para>
9605        Improve efficiency of <link
9606        linkend="functions-comparisons"><literal>IN</>
9607        (list-of-expressions)</link> clauses (Tom)
9608       </para>
9609      </listitem>
9610
9611      <listitem>
9612       <para>
9613        Improve sorting speed and reduce memory usage (Simon, Tom)
9614       </para>
9615      </listitem>
9616
9617      <listitem>
9618       <para>
9619        Improve subtransaction performance (Alvaro, Itagaki Takahiro,
9620        Tom)
9621       </para>
9622      </listitem>
9623
9624      <listitem>
9625       <para>
9626        Add <literal>FILLFACTOR</> to <link
9627        linkend="SQL-CREATETABLE">table</link> and <link
9628        linkend="SQL-CREATEINDEX">index</link> creation (ITAGAKI
9629        Takahiro)
9630       </para>
9631
9632       <para>
9633        This leaves extra free space in each table or index page,
9634        allowing improved performance as the database grows.  This
9635        is particularly valuable to maintain clustering.
9636       </para>
9637      </listitem>
9638
9639      <listitem>
9640       <para>
9641        Increase default values for <link
9642        linkend="guc-shared-buffers"><varname>shared_buffers</></link>
9643        and <varname>max_fsm_pages</>
9644        (Andrew)
9645       </para>
9646      </listitem>
9647
9648      <listitem>
9649       <para>
9650        Improve locking performance by breaking the lock manager tables into
9651        sections
9652        (Tom)
9653       </para>
9654
9655       <para>
9656        This allows locking to be more fine-grained, reducing
9657        contention.
9658       </para>
9659      </listitem>
9660
9661      <listitem>
9662       <para>
9663        Reduce locking requirements of sequential scans (Qingqing
9664        Zhou)
9665       </para>
9666      </listitem>
9667
9668      <listitem>
9669       <para>
9670        Reduce locking required for database creation and destruction
9671        (Tom)
9672       </para>
9673      </listitem>
9674
9675      <listitem>
9676       <para>
9677        Improve the optimizer's selectivity estimates for <link
9678        linkend="functions-like"><literal>LIKE</></link>, <link
9679        linkend="functions-like"><literal>ILIKE</></link>, and
9680        <link linkend="functions-posix-regexp">regular expression</link>
9681        operations (Tom)
9682       </para>
9683      </listitem>
9684
9685      <listitem>
9686       <para>
9687        Improve planning of joins to <link linkend="ddl-inherit">inherited
9688        tables</link> and <link linkend="queries-union"><literal>UNION
9689        ALL</></link> views (Tom)
9690       </para>
9691      </listitem>
9692
9693      <listitem>
9694       <para>
9695        Allow <link linkend="guc-constraint-exclusion">constraint
9696        exclusion</link> to be applied to <link
9697        linkend="ddl-inherit">inherited</link> <command>UPDATE</> and
9698        <command>DELETE</> queries (Tom)
9699       </para>
9700
9701       <para>
9702        <command>SELECT</> already honored constraint exclusion.
9703       </para>
9704      </listitem>
9705
9706      <listitem>
9707       <para>
9708        Improve planning of constant <literal>WHERE</> clauses, such as
9709        a condition that depends only on variables inherited from an
9710        outer query level (Tom)
9711       </para>
9712      </listitem>
9713
9714      <listitem>
9715       <para>
9716        Protocol-level unnamed prepared statements are re-planned
9717        for each set of <literal>BIND</> values (Tom)
9718       </para>
9719
9720       <para>
9721        This improves performance because the exact parameter values
9722        can be used in the plan.
9723       </para>
9724      </listitem>
9725
9726      <listitem>
9727       <para>
9728        Speed up vacuuming of B-Tree indexes (Heikki Linnakangas,
9729        Tom)
9730       </para>
9731      </listitem>
9732
9733      <listitem>
9734       <para>
9735        Avoid extra scan of tables without indexes during <link
9736        linkend="SQL-VACUUM"><command>VACUUM</></link> (Greg Stark)
9737       </para>
9738      </listitem>
9739
9740      <listitem>
9741       <para>
9742        Improve multicolumn <link linkend="GiST"><acronym>GiST</></link>
9743        indexing (Oleg, Teodor)
9744       </para>
9745      </listitem>
9746
9747      <listitem>
9748       <para>
9749        Remove dead index entries before B-Tree page split (Junji
9750        Teramoto)
9751       </para>
9752      </listitem>
9753
9754     </itemizedlist>
9755
9756    </sect3>
9757
9758    <sect3>
9759     <title>Server Changes</title>
9760     <itemizedlist>
9761
9762      <listitem>
9763       <para>
9764        Allow a forced switch to a new transaction log file (Simon, Tom)
9765       </para>
9766
9767       <para>
9768        This is valuable for keeping warm standby slave servers
9769        in sync with the master.  Transaction log file switching now also happens
9770        automatically during <link
9771        linkend="functions-admin"><function>pg_stop_backup()</></link>.
9772        This ensures that all
9773        transaction log files needed for recovery can be archived immediately.
9774       </para>
9775      </listitem>
9776
9777      <listitem>
9778       <para>
9779        Add <acronym>WAL</> informational functions (Simon)
9780       </para>
9781
9782       <para>
9783        Add functions for interrogating the current transaction log insertion
9784        point and determining <acronym>WAL</> filenames from the
9785        hex <acronym>WAL</> locations displayed by <link
9786        linkend="functions-admin"><function>pg_stop_backup()</></link>
9787        and related functions.
9788       </para>
9789      </listitem>
9790
9791      <listitem>
9792       <para>
9793        Improve recovery from a crash during <acronym>WAL</> replay (Simon)
9794       </para>
9795
9796       <para>
9797        The server now does periodic checkpoints during <acronym>WAL</>
9798        recovery, so if there is a crash, future <acronym>WAL</>
9799        recovery is shortened.  This also eliminates the need for
9800        warm standby servers to replay the entire log since the
9801        base backup if they crash.
9802       </para>
9803      </listitem>
9804
9805      <listitem>
9806       <para>
9807        Improve reliability of long-term <acronym>WAL</> replay
9808        (Heikki, Simon, Tom)
9809       </para>
9810
9811       <para>
9812        Formerly, trying to roll forward through more than 2 billion
9813        transactions would not work due to XID wraparound.  This meant
9814        warm standby servers had to be reloaded
9815        from fresh base backups periodically.
9816       </para>
9817      </listitem>
9818
9819      <listitem>
9820       <para>
9821        Add <link
9822        linkend="guc-archive-timeout"><varname>archive_timeout</></link>
9823        to force transaction log file switches at a given interval (Simon)
9824       </para>
9825
9826       <para>
9827        This enforces a maximum replication delay for warm standby servers.
9828       </para>
9829      </listitem>
9830
9831      <listitem>
9832       <para>
9833        Add native <link linkend="auth-ldap"><acronym>LDAP</></link>
9834        authentication (Magnus Hagander)
9835       </para>
9836
9837       <para>
9838        This is particularly useful for platforms that do not
9839        support <acronym>PAM</>, such as Windows.
9840       </para>
9841      </listitem>
9842
9843      <listitem>
9844       <para>
9845        Add <link linkend="sql-grant-description-objects"><literal>GRANT
9846        CONNECT ON DATABASE</></link> (Gevik Babakhani)
9847       </para>
9848
9849       <para>
9850        This gives SQL-level control over database access.  It works as
9851        an additional filter on top of the existing
9852        <link linkend="auth-pg-hba-conf"><filename>pg_hba.conf</></link>
9853        controls.
9854       </para>
9855      </listitem>
9856
9857      <listitem>
9858       <para>
9859        Add support for <link linkend="ssl-tcp"><acronym>SSL</>
9860        Certificate Revocation List</link> (<acronym>CRL</>) files
9861        (Libor Hoho&scaron;)
9862       </para>
9863
9864       <para>
9865        The server and <application>libpq</> both recognize <acronym>CRL</>
9866        files now.
9867       </para>
9868      </listitem>
9869
9870      <listitem>
9871       <para>
9872        <link linkend="GiST"><acronym>GiST</></link> indexes are
9873        now clusterable (Teodor)
9874       </para>
9875      </listitem>
9876
9877      <listitem>
9878       <para>
9879        Remove routine autovacuum server log entries (Bruce)
9880       </para>
9881
9882       <para>
9883        <link
9884        linkend="monitoring-stats-views-table"><literal>pg_stat_activity</></link>
9885        now shows autovacuum activity.
9886       </para>
9887      </listitem>
9888
9889      <listitem>
9890       <para>
9891        Track maximum XID age within individual tables, instead of whole databases (Alvaro)
9892       </para>
9893
9894       <para>
9895        This reduces the overhead involved in preventing transaction
9896        ID wraparound, by avoiding unnecessary VACUUMs.
9897       </para>
9898      </listitem>
9899
9900      <listitem>
9901       <para>
9902        Add last vacuum and analyze timestamp columns to the stats
9903        collector (Larry Rosenman)
9904       </para>
9905
9906       <para>
9907        These values now appear in the <link
9908        linkend="monitoring-stats-views-table"><literal>pg_stat_*_tables</></link>
9909        system views.
9910       </para>
9911      </listitem>
9912
9913      <listitem>
9914       <para>
9915        Improve performance of statistics monitoring, especially
9916        <varname>stats_command_string</>
9917        (Tom, Bruce)
9918       </para>
9919
9920       <para>
9921        This release enables <varname>stats_command_string</> by
9922        default, now that its overhead is minimal.  This means
9923        <link
9924        linkend="monitoring-stats-views-table"><literal>pg_stat_activity</></link>
9925        will now show all active queries by default.
9926       </para>
9927      </listitem>
9928
9929      <listitem>
9930       <para>
9931        Add a <literal>waiting</> column to <link
9932        linkend="monitoring-stats-views-table"><literal>pg_stat_activity</></link>
9933        (Tom)
9934       </para>
9935
9936       <para>
9937        This allows <structname>pg_stat_activity</> to show all the
9938        information included in the <application>ps</> display.
9939       </para>
9940      </listitem>
9941
9942      <listitem>
9943       <para>
9944        Add configuration parameter <link
9945        linkend="guc-update-process-title"><varname>update_process_title</></link>
9946        to control whether the <application>ps</> display is updated
9947        for every command (Bruce)
9948       </para>
9949
9950       <para>
9951        On platforms where it is expensive to update the <application>ps</>
9952        display, it might be worthwhile to turn this off and rely solely on
9953        <structname>pg_stat_activity</> for status information.
9954       </para>
9955      </listitem>
9956
9957      <listitem>
9958       <para>
9959        Allow units to be specified in configuration settings
9960        (Peter)
9961       </para>
9962
9963       <para>
9964        For example, you can now set <link
9965        linkend="guc-shared-buffers"><varname>shared_buffers</></link>
9966        to <literal>32MB</> rather than mentally converting sizes.
9967       </para>
9968      </listitem>
9969
9970      <listitem>
9971       <para>
9972        Add support for <link linkend="config-setting">include
9973        directives</link> in <filename>postgresql.conf</> (Joachim
9974        Wieland)
9975       </para>
9976      </listitem>
9977
9978      <listitem>
9979       <para>
9980        Improve logging of protocol-level prepare/bind/execute
9981        messages (Bruce, Tom)
9982       </para>
9983
9984       <para>
9985        Such logging now shows statement names, bind parameter
9986        values, and the text of the query being executed.  Also,
9987        the query text is properly included in logged error messages
9988        when enabled by <varname>log_min_error_statement</>.
9989       </para>
9990      </listitem>
9991
9992      <listitem>
9993       <para>
9994        Prevent <link
9995        linkend="guc-max-stack-depth"><varname>max_stack_depth</></link>
9996        from being set to unsafe values
9997       </para>
9998
9999       <para>
10000        On platforms where we can determine the actual kernel stack depth
10001        limit (which is most), make sure that the initial default value of
10002        <varname>max_stack_depth</> is safe, and reject attempts to set it
10003        to unsafely large values.
10004       </para>
10005      </listitem>
10006
10007      <listitem>
10008       <para>
10009        Enable highlighting of error location in query in more
10010        cases (Tom)
10011       </para>
10012
10013       <para>
10014        The server is now able to report a specific error location for
10015        some semantic errors (such as unrecognized column name), rather
10016        than just for basic syntax errors as before.
10017       </para>
10018      </listitem>
10019
10020      <listitem>
10021       <para>
10022        Fix <quote>failed to re-find parent key</> errors in
10023        <command>VACUUM</> (Tom)
10024       </para>
10025      </listitem>
10026
10027      <listitem>
10028       <para>
10029        Clean out <filename>pg_internal.init</> cache files during server
10030        restart (Simon)
10031       </para>
10032
10033       <para>
10034        This avoids a hazard that the cache files might contain stale
10035        data after PITR recovery.
10036       </para>
10037      </listitem>
10038
10039      <listitem>
10040       <para>
10041        Fix race condition for truncation of a large relation across a
10042        gigabyte boundary by <command>VACUUM</> (Tom)
10043       </para>
10044      </listitem>
10045
10046      <listitem>
10047       <para>
10048        Fix bug causing needless deadlock errors on row-level locks (Tom)
10049       </para>
10050      </listitem>
10051
10052      <listitem>
10053       <para>
10054        Fix bugs affecting multi-gigabyte hash indexes (Tom)
10055       </para>
10056      </listitem>
10057
10058      <listitem>
10059       <para>
10060        Each backend process is now its own process group leader (Tom)
10061       </para>
10062
10063       <para>
10064        This allows query cancel to abort subprocesses invoked from a
10065        backend or archive/recovery process.
10066       </para>
10067      </listitem>
10068
10069     </itemizedlist>
10070
10071    </sect3>
10072
10073    <sect3>
10074     <title>Query Changes</title>
10075     <itemizedlist>
10076
10077      <listitem>
10078       <para>
10079        Add <link linkend="SQL-INSERT"><command>INSERT</></link>/<link
10080        linkend="SQL-UPDATE"><command>UPDATE</></link>/<link
10081        linkend="SQL-DELETE"><command>DELETE</></link>
10082        <literal>RETURNING</> (Jonah Harris, Tom)
10083       </para>
10084
10085       <para>
10086        This allows these commands to return values, such as the
10087        computed serial key for a new row.  In the <command>UPDATE</>
10088        case, values from the updated version of the row are returned.
10089       </para>
10090      </listitem>
10091
10092      <listitem>
10093       <para>
10094        Add support for multiple-row <link
10095        linkend="queries-values"><literal>VALUES</></link> clauses,
10096        per SQL standard (Joe, Tom)
10097       </para>
10098
10099       <para>
10100        This allows <command>INSERT</> to insert multiple rows of
10101        constants, or queries to generate result sets using constants.
10102        For example, <literal>INSERT ...  VALUES (...), (...),
10103        ....</>, and <literal>SELECT * FROM (VALUES (...), (...),
10104        ....) AS alias(f1, ...)</>.
10105       </para>
10106      </listitem>
10107
10108      <listitem>
10109       <para>
10110        Allow <link linkend="SQL-UPDATE"><command>UPDATE</></link>
10111        and <link linkend="SQL-DELETE"><command>DELETE</></link>
10112        to use an alias for the target table (Atsushi Ogawa)
10113       </para>
10114
10115       <para>
10116        The SQL standard does not permit an alias in these commands, but
10117        many database systems allow one anyway for notational convenience.
10118       </para>
10119      </listitem>
10120
10121      <listitem>
10122       <para>
10123        Allow <link linkend="SQL-UPDATE"><command>UPDATE</></link>
10124        to set multiple columns with a list of values (Susanne
10125        Ebrecht)
10126       </para>
10127
10128       <para>
10129        This is basically a short-hand for assigning the columns
10130        and values in pairs.  The syntax is <literal>UPDATE tab
10131        SET (<replaceable>column</>, ...) = (<replaceable>val</>, ...)</>.
10132       </para>
10133      </listitem>
10134
10135      <listitem>
10136       <para>
10137        Make row comparisons work per standard (Tom)
10138       </para>
10139
10140       <para>
10141        The forms &lt;, &lt;=, &gt;, &gt;= now compare rows lexicographically,
10142        that is, compare the first elements, if equal compare the second
10143        elements, and so on.  Formerly they expanded to an AND condition
10144        across all the elements, which was neither standard nor very useful.
10145       </para>
10146      </listitem>
10147
10148      <listitem>
10149       <para>
10150        Add <link linkend="SQL-TRUNCATE"><literal>CASCADE</></link>
10151        option to <command>TRUNCATE</> (Joachim Wieland)
10152       </para>
10153
10154       <para>
10155        This causes <command>TRUNCATE</> to automatically include all tables
10156        that reference the specified table(s) via foreign keys.  While
10157        convenient, this is a dangerous tool &mdash; use with caution!
10158       </para>
10159      </listitem>
10160
10161      <listitem>
10162       <para>
10163        Support <literal>FOR UPDATE</> and <literal>FOR SHARE</>
10164        in the same <link linkend="SQL-INSERT"><literal>SELECT</></link>
10165        command (Tom)
10166       </para>
10167      </listitem>
10168
10169      <listitem>
10170       <para>
10171        Add <link linkend="functions-comparisons"><literal>IS NOT
10172        DISTINCT FROM</></link> (Pavel Stehule)
10173       </para>
10174
10175       <para>
10176        This operator is similar to equality (<literal>=</>), but
10177        evaluates to true when both left and right operands are
10178        <literal>NULL</>, and to false when just one is, rather than
10179        yielding <literal>NULL</> in these cases.
10180       </para>
10181      </listitem>
10182
10183      <listitem>
10184       <para>
10185        Improve the length output used by <link
10186        linkend="queries-union"><literal>UNION</></link>/<literal>INTERSECT</>/<literal>EXCEPT</>
10187        (Tom)
10188       </para>
10189
10190       <para>
10191        When all corresponding columns are of the same defined length, that
10192        length is used for the result, rather than a generic length.
10193       </para>
10194      </listitem>
10195
10196      <listitem>
10197       <para>
10198        Allow <link linkend="functions-like"><literal>ILIKE</></link>
10199        to work for multi-byte encodings (Tom)
10200       </para>
10201
10202       <para>
10203        Internally, <literal>ILIKE</> now calls <function>lower()</>
10204        and then uses <literal>LIKE</>.  Locale-specific regular
10205        expression patterns still do not work in these encodings.
10206       </para>
10207      </listitem>
10208
10209      <listitem>
10210       <para>
10211        Enable <link
10212        linkend="guc-standard-conforming-strings"><varname>standard_conforming_strings</></link>
10213        to be turned <literal>on</> (Kevin Grittner)
10214       </para>
10215
10216       <para>
10217        This allows backslash escaping in strings to be disabled,
10218        making <productname>PostgreSQL</> more
10219        standards-compliant.  The default is <literal>off</> for backwards
10220        compatibility, but future releases will default this to <literal>on</>.
10221       </para>
10222      </listitem>
10223
10224      <listitem>
10225       <para>
10226        Do not flatten subqueries that contain <literal>volatile</>
10227        functions in their target lists (Jaime Casanova)
10228       </para>
10229
10230       <para>
10231        This prevents surprising behavior due to multiple evaluation
10232        of a <literal>volatile</> function (such as <function>random()</>
10233        or <function>nextval()</>).  It might cause performance
10234        degradation in the presence of functions that are unnecessarily
10235        marked as <literal>volatile</>.
10236       </para>
10237      </listitem>
10238
10239      <listitem>
10240       <para>
10241        Add system views <link
10242        linkend="view-pg-prepared-statements"><literal>pg_prepared_statements</></link>
10243        and <link
10244        linkend="view-pg-cursors"><literal>pg_cursors</></link>
10245        to show prepared statements and open cursors (Joachim Wieland, Neil)
10246       </para>
10247
10248       <para>
10249        These are very useful in pooled connection setups.
10250       </para>
10251      </listitem>
10252
10253      <listitem>
10254       <para>
10255        Support portal parameters in <link
10256        linkend="SQL-EXPLAIN"><command>EXPLAIN</></link> and <link
10257        linkend="SQL-EXECUTE"><command>EXECUTE</></link> (Tom)
10258       </para>
10259
10260       <para>
10261        This allows, for example, <acronym>JDBC</> <literal>?</> parameters to
10262        work in these commands.
10263       </para>
10264      </listitem>
10265
10266      <listitem>
10267       <para>
10268        If <acronym>SQL</>-level <link
10269        linkend="SQL-PREPARE"><command>PREPARE</></link> parameters
10270        are unspecified, infer their types from the content of the
10271        query (Neil)
10272       </para>
10273
10274       <para>
10275        Protocol-level <command>PREPARE</> already did this.
10276       </para>
10277      </listitem>
10278
10279      <listitem>
10280       <para>
10281        Allow <literal>LIMIT</> and <literal>OFFSET</> to exceed
10282        two billion (Dhanaraj M)
10283       </para>
10284      </listitem>
10285
10286     </itemizedlist>
10287
10288    </sect3>
10289
10290    <sect3>
10291     <title>Object Manipulation Changes</title>
10292     <itemizedlist>
10293
10294      <listitem>
10295       <para>
10296        Add <literal>TABLESPACE</> clause to <link
10297        linkend="SQL-CREATETABLEAS"><command>CREATE TABLE AS</></link>
10298        (Neil)
10299       </para>
10300
10301       <para>
10302        This allows a tablespace to be specified for the new table.
10303       </para>
10304      </listitem>
10305
10306      <listitem>
10307       <para>
10308        Add <literal>ON COMMIT</> clause to <link
10309        linkend="SQL-CREATETABLEAS"><command>CREATE TABLE AS</></link>
10310        (Neil)
10311       </para>
10312
10313       <para>
10314        This allows temporary tables to be truncated or dropped on
10315        transaction commit.  The default behavior is for the table
10316        to remain until the session ends.
10317       </para>
10318      </listitem>
10319
10320      <listitem>
10321       <para>
10322        Add <literal>INCLUDING CONSTRAINTS</> to <link
10323        linkend="SQL-CREATETABLE"><command>CREATE TABLE LIKE</></link>
10324        (Greg Stark)
10325       </para>
10326
10327       <para>
10328        This allows easy copying of <literal>CHECK</> constraints to a new
10329        table.
10330       </para>
10331      </listitem>
10332
10333      <listitem>
10334       <para>
10335        Allow the creation of placeholder (shell) <link
10336        linkend="SQL-CREATETYPE">types</link> (Martijn van Oosterhout)
10337       </para>
10338
10339       <para>
10340        A shell type declaration creates a type name, without specifying
10341        any of the details of the type.  Making a shell type is useful
10342        because it allows cleaner declaration of the type's input/output
10343        functions, which must exist before the type can be defined <quote>for
10344        real</>.  The syntax is <command>CREATE TYPE <replaceable
10345        class="parameter">typename</replaceable></>.
10346       </para>
10347      </listitem>
10348
10349      <listitem>
10350       <para>
10351        <link linkend="SQL-CREATEAGGREGATE">Aggregate functions</link>
10352        now support multiple input parameters (Sergey Koposov, Tom)
10353       </para>
10354      </listitem>
10355
10356      <listitem>
10357       <para>
10358        Add new aggregate creation <link
10359        linkend="SQL-CREATEAGGREGATE">syntax</link> (Tom)
10360       </para>
10361
10362       <para>
10363        The new syntax is <command>CREATE AGGREGATE
10364        <replaceable>aggname</> (<replaceable>input_type</>)
10365        (<replaceable>parameter_list</>)</command>.  This more
10366        naturally supports the new multi-parameter aggregate
10367        functionality.  The previous syntax is still supported.
10368       </para>
10369      </listitem>
10370
10371      <listitem>
10372       <para>
10373        Add <link
10374        linkend="SQL-ALTERROLE"><command>ALTER ROLE PASSWORD NULL</></link>
10375        to remove a previously set role password (Peter)
10376       </para>
10377      </listitem>
10378
10379      <listitem>
10380       <para>
10381        Add <command>DROP</> object <literal>IF EXISTS</> for many
10382        object types (Andrew)
10383       </para>
10384
10385       <para>
10386        This allows <command>DROP</> operations on non-existent
10387        objects without generating an error.
10388       </para>
10389      </listitem>
10390
10391      <listitem>
10392       <para>
10393        Add <link linkend="SQL-DROP-OWNED"><literal>DROP OWNED</></link>
10394        to drop all objects owned by a role (Alvaro)
10395       </para>
10396      </listitem>
10397
10398      <listitem>
10399       <para>
10400        Add <link linkend="SQL-REASSIGN-OWNED"><literal>REASSIGN
10401        OWNED</></link> to reassign ownership of all objects owned
10402        by a role (Alvaro)
10403       </para>
10404
10405       <para>
10406        This, and <literal>DROP OWNED</> above, facilitate dropping
10407        roles.
10408       </para>
10409      </listitem>
10410
10411      <listitem>
10412       <para>
10413        Add <link linkend="SQL-GRANT"><command>GRANT ON SEQUENCE</></link>
10414        syntax (Bruce)
10415       </para>
10416
10417       <para>
10418        This was added for setting sequence-specific permissions.
10419        <literal>GRANT ON TABLE</> for sequences is still supported
10420        for backward compatibility.
10421       </para>
10422      </listitem>
10423
10424      <listitem>
10425       <para>
10426        Add <link linkend="SQL-GRANT"><literal>USAGE</></link>
10427        permission for sequences that allows only <function>currval()</>
10428        and <function>nextval()</>, not <function>setval()</>
10429        (Bruce)
10430       </para>
10431
10432       <para>
10433        <literal>USAGE</> permission allows more fine-grained
10434        control over sequence access.  Granting <literal>USAGE</>
10435        allows users to increment
10436        a sequence, but prevents them from setting the sequence to
10437        an arbitrary value using <function>setval()</>.
10438       </para>
10439      </listitem>
10440
10441      <listitem>
10442       <para>
10443        Add <link linkend="SQL-ALTERTABLE"><literal>ALTER TABLE
10444        [ NO ] INHERIT</></link> (Greg Stark)
10445       </para>
10446
10447       <para>
10448        This allows inheritance to be adjusted dynamically, rather than
10449        just at table creation and destruction.  This is very valuable
10450        when using inheritance to implement table partitioning.
10451       </para>
10452      </listitem>
10453
10454      <listitem>
10455       <para>
10456        Allow <link linkend="SQL-COMMENT">comments</link> on global
10457        objects to be stored globally (Kris Jurka)
10458       </para>
10459
10460       <para>
10461        Previously, comments attached to databases were stored in individual
10462        databases, making them ineffective, and there was no provision
10463        at all for comments on roles or tablespaces.  This change adds a new
10464        shared catalog <link
10465        linkend="catalog-pg-shdescription"><structname>pg_shdescription</structname></link>
10466        and stores comments on databases, roles, and tablespaces therein.
10467       </para>
10468      </listitem>
10469
10470     </itemizedlist>
10471
10472    </sect3>
10473
10474    <sect3>
10475     <title>Utility Command Changes</title>
10476     <itemizedlist>
10477
10478      <listitem>
10479       <para>
10480        Add option to allow indexes to be created without blocking
10481        concurrent writes to the table (Greg Stark, Tom)
10482       </para>
10483
10484       <para>
10485        The new syntax is <link linkend="SQL-CREATEINDEX"><command>CREATE
10486        INDEX CONCURRENTLY</></link>.  The default behavior is
10487        still to block table modification while a index is being
10488        created.
10489       </para>
10490      </listitem>
10491
10492      <listitem>
10493       <para>
10494        Provide <link linkend="functions-advisory-locks">advisory
10495        locking</link> functionality (Abhijit Menon-Sen, Tom)
10496       </para>
10497
10498       <para>
10499        This is a new locking API designed to replace what used to be
10500        in /contrib/userlock.  The userlock code is now on pgfoundry.
10501       </para>
10502      </listitem>
10503
10504      <listitem>
10505       <para>
10506        Allow <link linkend="SQL-COPY"><command>COPY</></link> to
10507        dump a <command>SELECT</> query (Zoltan Boszormenyi, Karel
10508        Zak)
10509       </para>
10510
10511       <para>
10512        This allows <command>COPY</> to dump arbitrary <acronym>SQL</>
10513        queries. The syntax is <literal>COPY (SELECT ...) TO</>.
10514       </para>
10515      </listitem>
10516
10517      <listitem>
10518       <para>
10519        Make the <link linkend="SQL-COPY"><command>COPY</></link>
10520        command return a command tag that includes the number of
10521        rows copied (Volkan YAZICI)
10522       </para>
10523      </listitem>
10524
10525      <listitem>
10526       <para>
10527        Allow <link linkend="SQL-VACUUM"><command>VACUUM</></link>
10528        to expire rows without being affected by other concurrent
10529        <command>VACUUM</> operations (Hannu Krossing, Alvaro, Tom)
10530       </para>
10531      </listitem>
10532
10533      <listitem>
10534       <para>
10535        Make <link linkend="APP-INITDB"><application>initdb</></link>
10536        detect the operating system locale and set the default
10537        <varname>DateStyle</> accordingly (Peter)
10538       </para>
10539
10540       <para>
10541        This makes it more likely that the installed
10542        <filename>postgresql.conf</> <varname>DateStyle</> value will
10543        be as desired.
10544       </para>
10545      </listitem>
10546
10547      <listitem>
10548       <para>
10549        Reduce number of progress messages displayed by <application>initdb</> (Tom)
10550       </para>
10551      </listitem>
10552
10553     </itemizedlist>
10554
10555    </sect3>
10556
10557    <sect3>
10558     <title>Date/Time Changes</title>
10559     <itemizedlist>
10560
10561      <listitem>
10562       <para>
10563        Allow full timezone names in <link
10564        linkend="datatype-datetime"><type>timestamp</></link> input values
10565        (Joachim Wieland)
10566       </para>
10567
10568       <para>
10569        For example, <literal>'2006-05-24 21:11
10570        America/New_York'::timestamptz</>.
10571       </para>
10572      </listitem>
10573
10574      <listitem>
10575       <para>
10576        Support configurable timezone abbreviations (Joachim Wieland)
10577       </para>
10578
10579       <para>
10580        A desired set of timezone abbreviations can be chosen via the
10581        configuration parameter <link
10582        linkend="guc-timezone-abbreviations"><varname>timezone_abbreviations</></link>.
10583       </para>
10584      </listitem>
10585
10586      <listitem>
10587       <para>
10588        Add <link
10589        linkend="view-pg-timezone-abbrevs"><varname>pg_timezone_abbrevs</></link>
10590        and <link
10591        linkend="view-pg-timezone-names"><varname>pg_timezone_names</></link>
10592        views to show supported timezones (Magnus Hagander)
10593       </para>
10594      </listitem>
10595
10596      <listitem>
10597       <para>
10598        Add <link
10599        linkend="functions-datetime-table"><function>clock_timestamp()</></link>,
10600        <link
10601        linkend="functions-datetime-table"><function>statement_timestamp()</></link>,
10602        and <link
10603        linkend="functions-datetime-table"><function>transaction_timestamp()</></link>
10604        (Bruce)
10605       </para>
10606
10607       <para>
10608        <function>clock_timestamp()</> is the current wall-clock time,
10609        <function>statement_timestamp()</> is the time the current
10610        statement arrived at the server, and
10611        <function>transaction_timestamp()</> is an alias for
10612        <function>now()</>.
10613       </para>
10614      </listitem>
10615
10616      <listitem>
10617       <para>
10618        Allow <link
10619        linkend="functions-formatting"><function>to_char()</></link>
10620        to print localized month and day names (Euler Taveira de
10621        Oliveira)
10622       </para>
10623      </listitem>
10624
10625      <listitem>
10626       <para>
10627        Allow <link
10628        linkend="functions-formatting"><function>to_char(time)</></link>
10629        and <link
10630        linkend="functions-formatting"><function>to_char(interval)</></link>
10631        to output <acronym>AM</>/<acronym>PM</> specifications
10632        (Bruce)
10633       </para>
10634
10635       <para>
10636        Intervals and times are treated as 24-hour periods, e.g.
10637        <literal>25 hours</> is considered <acronym>AM</>.
10638       </para>
10639      </listitem>
10640
10641      <listitem>
10642       <para>
10643        Add new function <link
10644        linkend="functions-datetime-table"><function>justify_interval()</></link>
10645        to adjust interval units (Mark Dilger)
10646       </para>
10647      </listitem>
10648
10649      <listitem>
10650       <para>
10651        Allow timezone offsets up to 14:59 away from GMT
10652       </para>
10653
10654       <para>
10655        Kiribati uses GMT+14, so we'd better accept that.
10656       </para>
10657      </listitem>
10658
10659      <listitem>
10660       <para>
10661        Interval computation improvements (Michael Glaesemann, Bruce)
10662       </para>
10663      </listitem>
10664
10665     </itemizedlist>
10666
10667    </sect3>
10668
10669    <sect3>
10670     <title>Other Data Type and Function Changes</title>
10671     <itemizedlist>
10672
10673      <listitem>
10674       <para>
10675        Allow arrays to contain <literal>NULL</> elements (Tom)
10676       </para>
10677      </listitem>
10678
10679      <listitem>
10680       <para>
10681        Allow assignment to array elements not contiguous with the existing
10682        entries (Tom)
10683       </para>
10684
10685       <para>
10686        The intervening array positions will be filled with nulls.
10687        This is per SQL standard.
10688       </para>
10689      </listitem>
10690
10691      <listitem>
10692       <para>
10693        New built-in <link linkend="functions-array">operators</link>
10694        for array-subset comparisons (<literal>@&gt;</>,
10695        <literal>&lt;@</>, <literal>&amp;&amp;</>) (Teodor, Tom)
10696       </para>
10697
10698       <para>
10699        These operators can be indexed for many data types using
10700        <acronym>GiST</> or <acronym>GIN</> indexes.
10701       </para>
10702      </listitem>
10703
10704      <listitem>
10705       <para>
10706        Add convenient arithmetic <link
10707        linkend="cidr-inet-operators-table">operations</link> on
10708        <type>INET</>/<type>CIDR</> values (Stephen R. van den
10709        Berg)
10710       </para>
10711
10712       <para>
10713        The new operators are <literal>&amp;</> (and), <literal>|</>
10714        (or), <literal>~</> (not), <type>inet</> <literal>+</> <type>int8</>,
10715        <type>inet</> <literal>-</> <type>int8</>, and
10716        <type>inet</> <literal>-</> <type>inet</>.
10717       </para>
10718      </listitem>
10719
10720      <listitem>
10721       <para>
10722        Add new <link
10723        linkend="functions-aggregate-statistics-table">aggregate functions</link>
10724        from SQL:2003 (Neil)
10725       </para>
10726
10727       <para>
10728        The new functions are <function>var_pop()</>,
10729        <function>var_samp()</>, <function>stddev_pop()</>, and
10730        <function>stddev_samp()</>.  <function>var_samp()</> and
10731        <function>stddev_samp()</> are merely renamings of the
10732        existing aggregates <function>variance()</> and
10733        <function>stddev()</>.  The latter names remain available
10734        for backward compatibility.
10735       </para>
10736      </listitem>
10737
10738      <listitem>
10739       <para>
10740        Add SQL:2003 statistical <link
10741        linkend="functions-aggregate-statistics-table">aggregates</link>
10742        (Sergey Koposov)
10743       </para>
10744
10745       <para>
10746        New functions:  <function>regr_intercept()</>,
10747        <function>regr_slope()</>, <function>regr_r2()</>,
10748        <function>corr()</>, <function>covar_samp()</>,
10749        <function>covar_pop()</>, <function>regr_avgx()</>,
10750        <function>regr_avgy()</>, <function>regr_sxy()</>,
10751        <function>regr_sxx()</>, <function>regr_syy()</>,
10752        <function>regr_count()</>.
10753       </para>
10754      </listitem>
10755
10756      <listitem>
10757       <para>
10758        Allow <link linkend="SQL-CREATEDOMAIN">domains</link> to be
10759        based on other domains (Tom)
10760       </para>
10761      </listitem>
10762
10763      <listitem>
10764       <para>
10765        Properly enforce domain <link
10766        linkend="ddl-constraints"><literal>CHECK</></link> constraints
10767        everywhere (Neil, Tom)
10768       </para>
10769
10770       <para>
10771        For example, the result of a user-defined function that is
10772        declared to return a domain type is now checked against the
10773        domain's constraints. This closes a significant hole in the domain
10774        implementation.
10775       </para>
10776      </listitem>
10777
10778      <listitem>
10779       <para>
10780        Fix problems with dumping renamed <link
10781        linkend="datatype-serial"><type>SERIAL</></link> columns
10782        (Tom)
10783       </para>
10784
10785       <para>
10786        The fix is to dump a <type>SERIAL</> column by explicitly
10787        specifying its <literal>DEFAULT</> and sequence elements,
10788        and reconstructing the <type>SERIAL</> column on reload
10789        using a new <link linkend="SQL-ALTERSEQUENCE"><command>ALTER
10790        SEQUENCE OWNED BY</></link> command.  This also allows
10791        dropping a <type>SERIAL</> column specification.
10792       </para>
10793      </listitem>
10794
10795      <listitem>
10796       <para>
10797        Add a server-side sleep function <link
10798        linkend="functions-datetime-delay"><function>pg_sleep()</></link>
10799        (Joachim Wieland)
10800       </para>
10801      </listitem>
10802
10803      <listitem>
10804       <para>
10805        Add all comparison operators for the <link
10806        linkend="datatype-oid"><type>tid</></link> (tuple id) data
10807        type (Mark Kirkwood, Greg Stark, Tom)
10808       </para>
10809      </listitem>
10810
10811     </itemizedlist>
10812
10813    </sect3>
10814
10815    <sect3>
10816     <title>PL/PgSQL Server-Side Language Changes</title>
10817     <itemizedlist>
10818
10819      <listitem>
10820       <para>
10821        Add <literal>TG_table_name</> and <literal>TG_table_schema</> to
10822        trigger parameters (Andrew)
10823       </para>
10824
10825       <para>
10826        <literal>TG_relname</> is now deprecated.  Comparable
10827        changes have been made in the trigger parameters for the other
10828        PLs as well.
10829       </para>
10830      </listitem>
10831
10832      <listitem>
10833       <para>
10834        Allow <literal>FOR</> statements to return values to scalars
10835        as well as records and row types (Pavel Stehule)
10836       </para>
10837      </listitem>
10838
10839      <listitem>
10840       <para>
10841        Add a <literal>BY</> clause to the <literal>FOR</> loop,
10842        to control the iteration increment (Jaime Casanova)
10843       </para>
10844      </listitem>
10845
10846      <listitem>
10847       <para>
10848        Add <literal>STRICT</> to <link
10849        linkend="plpgsql-statements-sql-onerow"><command>SELECT
10850        INTO</></link> (Matt Miller)
10851       </para>
10852
10853       <para>
10854        <literal>STRICT</> mode throws an exception if more or less
10855        than one row is returned by the <command>SELECT</>, for
10856        <productname>Oracle PL/SQL</> compatibility.
10857       </para>
10858      </listitem>
10859
10860     </itemizedlist>
10861
10862    </sect3>
10863
10864    <sect3>
10865     <title>PL/Perl Server-Side Language Changes</title>
10866     <itemizedlist>
10867
10868      <listitem>
10869       <para>
10870        Add <literal>table_name</> and <literal>table_schema</> to
10871        trigger parameters (Adam Sj&oslash;gren)
10872       </para>
10873      </listitem>
10874
10875      <listitem>
10876       <para>
10877        Add prepared queries (Dmitry Karasik)
10878       </para>
10879      </listitem>
10880
10881      <listitem>
10882       <para>
10883        Make <literal>$_TD</> trigger data a global variable (Andrew)
10884       </para>
10885
10886       <para>
10887        Previously, it was lexical, which caused unexpected sharing
10888        violations.
10889       </para>
10890      </listitem>
10891
10892      <listitem>
10893       <para>
10894        Run PL/Perl and PL/PerlU in separate interpreters, for security
10895        reasons (Andrew)
10896       </para>
10897       <para>
10898        In consequence, they can no longer share data nor loaded modules.
10899        Also, if Perl has not been compiled with the requisite flags to
10900        allow multiple interpreters, only one of these languages can be used
10901        in any given backend process.
10902       </para>
10903      </listitem>
10904
10905     </itemizedlist>
10906
10907    </sect3>
10908
10909    <sect3>
10910     <title>PL/Python Server-Side Language Changes</title>
10911     <itemizedlist>
10912
10913      <listitem>
10914       <para>
10915        Named parameters are passed as ordinary variables, as well as in the
10916        <literal>args[]</> array (Sven Suursoho)
10917       </para>
10918      </listitem>
10919
10920      <listitem>
10921       <para>
10922        Add <literal>table_name</> and <literal>table_schema</> to
10923        trigger parameters (Andrew)
10924       </para>
10925      </listitem>
10926
10927      <listitem>
10928       <para>
10929        Allow returning of composite types and result sets (Sven Suursoho)
10930       </para>
10931      </listitem>
10932
10933      <listitem>
10934       <para>
10935        Return result-set as <literal>list</>, <literal>iterator</>,
10936        or <literal>generator </>(Sven Suursoho)
10937       </para>
10938      </listitem>
10939
10940      <listitem>
10941       <para>
10942        Allow functions to return <literal>void</> (Neil)
10943       </para>
10944      </listitem>
10945
10946      <listitem>
10947       <para>
10948        Python 2.5 is now supported (Tom)
10949       </para>
10950      </listitem>
10951
10952     </itemizedlist>
10953
10954    </sect3>
10955
10956    <sect3>
10957     <title><link linkend="APP-PSQL"><application>psql</></link> Changes</title>
10958     <itemizedlist>
10959
10960      <listitem>
10961       <para>
10962        Add new command <literal>\password</> for changing role
10963        password with client-side password encryption (Peter)
10964       </para>
10965      </listitem>
10966
10967      <listitem>
10968       <para>
10969        Allow <literal>\c</> to connect to a new host and port
10970        number (David, Volkan YAZICI)
10971       </para>
10972      </listitem>
10973
10974      <listitem>
10975       <para>
10976        Add tablespace display to <literal>\l+</> (Philip Yarra)
10977       </para>
10978      </listitem>
10979
10980      <listitem>
10981       <para>
10982        Improve <literal>\df</> slash command to include the argument
10983        names and modes (<literal>OUT</> or <literal>INOUT</>) of
10984        the function (David Fetter)
10985       </para>
10986      </listitem>
10987
10988      <listitem>
10989       <para>
10990        Support binary <command>COPY</> (Andreas Pflug)
10991       </para>
10992      </listitem>
10993
10994      <listitem>
10995       <para>
10996        Add option to run the entire session in a single transaction
10997        (Simon)
10998       </para>
10999
11000       <para>
11001        Use option <literal>-1</> or <literal>--single-transaction</>.
11002       </para>
11003      </listitem>
11004
11005      <listitem>
11006       <para>
11007        Support for automatically retrieving <command>SELECT</>
11008        results in batches using a cursor (Chris Mair)
11009       </para>
11010
11011       <para>
11012        This is enabled using <command>\set FETCH_COUNT
11013        <replaceable>n</></command>. This
11014        feature allows large result sets to be retrieved in
11015        <application>psql</> without attempting to buffer the entire
11016        result set in memory.
11017       </para>
11018      </listitem>
11019
11020      <listitem>
11021       <para>
11022        Make multi-line values align in the proper column
11023        (Martijn van Oosterhout)
11024       </para>
11025
11026       <para>
11027        Field values containing newlines are now displayed in a more
11028        readable fashion.
11029       </para>
11030      </listitem>
11031
11032      <listitem>
11033       <para>
11034        Save multi-line statements as a single entry, rather than
11035        one line at a time (Sergey E. Koposov)
11036       </para>
11037
11038       <para>
11039        This makes up-arrow recall of queries easier.  (This is
11040        not available on Windows, because that platform uses the native
11041        command-line editing present in the operating system.)
11042       </para>
11043      </listitem>
11044
11045      <listitem>
11046       <para>
11047        Make the line counter 64-bit so it can handle files with more
11048        than two billion lines (David Fetter)
11049       </para>
11050      </listitem>
11051
11052      <listitem>
11053       <para>
11054        Report both the returned data and the command status tag
11055        for <command>INSERT</>/<command>UPDATE</>/<command>DELETE
11056        RETURNING</> (Tom)
11057       </para>
11058      </listitem>
11059
11060     </itemizedlist>
11061
11062    </sect3>
11063
11064    <sect3>
11065     <title><link linkend="APP-PGDUMP"><application>pg_dump</></link> Changes</title>
11066     <itemizedlist>
11067
11068      <listitem>
11069       <para>
11070        Allow complex selection of objects to be included or excluded
11071        by <application>pg_dump</> (Greg Sabino Mullane)
11072       </para>
11073
11074       <para>
11075        <application>pg_dump</> now supports multiple <literal>-n</>
11076        (schema) and <literal>-t</> (table) options, and adds
11077        <literal>-N</> and <literal>-T</> options to exclude objects.
11078        Also, the arguments of these switches can now be wild-card expressions
11079        rather than single object names, for example
11080        <literal>-t 'foo*'</>, and a schema can be part of
11081        a <literal>-t</> or <literal>-T</> switch, for example
11082        <literal>-t schema1.table1</>.
11083       </para>
11084      </listitem>
11085
11086      <listitem>
11087       <para>
11088        Add <link linkend="APP-PGRESTORE"><application>pg_restore</></link>
11089        <literal>--no-data-for-failed-tables</> option to suppress
11090        loading data if table creation failed (i.e., the table already
11091        exists) (Martin Pitt)
11092       </para>
11093      </listitem>
11094
11095      <listitem>
11096       <para>
11097        Add <link linkend="APP-PGRESTORE"><application>pg_restore</></link>
11098        option to run the entire session in a single transaction
11099        (Simon)
11100       </para>
11101
11102       <para>
11103        Use option <literal>-1</> or <literal>--single-transaction</>.
11104       </para>
11105      </listitem>
11106
11107     </itemizedlist>
11108
11109    </sect3>
11110
11111    <sect3>
11112     <title><link linkend="libpq"><application>libpq</></link> Changes</title>
11113     <itemizedlist>
11114
11115      <listitem>
11116       <para>
11117        Add <link
11118        linkend="libpq-misc"><function>PQencryptPassword()</></link>
11119        to encrypt passwords (Tom)
11120       </para>
11121
11122       <para>
11123        This allows passwords to be sent pre-encrypted for commands
11124        like <link linkend="SQL-ALTERROLE"><command>ALTER ROLE ...
11125        PASSWORD</></link>.
11126       </para>
11127      </listitem>
11128
11129      <listitem>
11130       <para>
11131        Add function <link
11132        linkend="libpq-threading"><function>PQisthreadsafe()</></link>
11133        (Bruce)
11134       </para>
11135
11136       <para>
11137        This allows applications to query the thread-safety status
11138        of the library.
11139       </para>
11140      </listitem>
11141
11142      <listitem>
11143       <para>
11144        Add <link
11145        linkend="libpq-exec-main"><function>PQdescribePrepared()</></link>,
11146        <link
11147        linkend="libpq-exec-main"><function>PQdescribePortal()</></link>,
11148        and related functions to return information about previously
11149        prepared statements and open cursors (Volkan YAZICI)
11150       </para>
11151      </listitem>
11152
11153      <listitem>
11154       <para>
11155        Allow <link linkend="libpq-ldap"><acronym>LDAP</></link> lookups
11156        from <link
11157        linkend="libpq-pgservice"><filename>pg_service.conf</></link>
11158        (Laurenz Albe)
11159       </para>
11160      </listitem>
11161
11162      <listitem>
11163       <para>
11164        Allow a hostname in <link
11165        linkend="libpq-pgpass"><filename>~/.pgpass</></link>
11166        to match the default socket directory (Bruce)
11167       </para>
11168
11169       <para>
11170        A blank hostname continues to match any Unix-socket connection,
11171        but this addition allows entries that are specific to one of
11172        several postmasters on the machine.
11173       </para>
11174      </listitem>
11175
11176     </itemizedlist>
11177
11178    </sect3>
11179
11180    <sect3>
11181     <title><link linkend="ecpg"><application>ecpg</></link> Changes</title>
11182     <itemizedlist>
11183
11184      <listitem>
11185       <para>
11186        Allow <link linkend="SQL-SHOW"><command>SHOW</></link> to
11187        put its result into a variable (Joachim Wieland)
11188       </para>
11189      </listitem>
11190
11191      <listitem>
11192       <para>
11193        Add <link linkend="SQL-COPY"><command>COPY TO STDOUT</></link>
11194        (Joachim Wieland)
11195       </para>
11196      </listitem>
11197
11198      <listitem>
11199       <para>
11200        Add regression tests (Joachim Wieland, Michael)
11201       </para>
11202      </listitem>
11203
11204      <listitem>
11205       <para>
11206        Major source code cleanups (Joachim Wieland, Michael)
11207       </para>
11208      </listitem>
11209
11210     </itemizedlist>
11211
11212    </sect3>
11213
11214    <sect3>
11215     <title><application>Windows</> Port</title>
11216     <itemizedlist>
11217
11218      <listitem>
11219       <para>
11220        Allow <acronym>MSVC</> to compile the <productname>PostgreSQL</>
11221        server (Magnus, Hiroshi Saito)
11222       </para>
11223      </listitem>
11224
11225      <listitem>
11226       <para>
11227        Add <acronym>MSVC</> support for utility commands and <link
11228        linkend="APP-PGDUMP"><application>pg_dump</></link> (Hiroshi
11229        Saito)
11230       </para>
11231      </listitem>
11232
11233      <listitem>
11234       <para>
11235        Add support for Windows code pages <literal>1253</>,
11236        <literal>1254</>, <literal>1255</>, and <literal>1257</>
11237        (Kris Jurka)
11238       </para>
11239      </listitem>
11240
11241      <listitem>
11242       <para>
11243        Drop privileges on startup, so that the server can be started from
11244        an administrative account (Magnus)
11245       </para>
11246      </listitem>
11247
11248      <listitem>
11249       <para>
11250        Stability fixes (Qingqing Zhou, Magnus)
11251       </para>
11252      </listitem>
11253
11254      <listitem>
11255       <para>
11256        Add native semaphore implementation (Qingqing Zhou)
11257       </para>
11258
11259       <para>
11260        The previous code mimicked SysV semaphores.
11261       </para>
11262      </listitem>
11263
11264     </itemizedlist>
11265
11266    </sect3>
11267
11268    <sect3>
11269     <title>Source Code Changes</title>
11270     <itemizedlist>
11271
11272      <listitem>
11273       <para>
11274        Add <link linkend="GIN"><acronym>GIN</></link> (Generalized
11275        Inverted iNdex) index access method (Teodor, Oleg)
11276       </para>
11277      </listitem>
11278
11279      <listitem>
11280       <para>
11281        Remove R-tree indexing (Tom)
11282       </para>
11283
11284       <para>
11285        Rtree has been re-implemented using <link
11286        linkend="GiST"><acronym>GiST</></link>. Among other
11287        differences, this means that rtree indexes now have support
11288        for crash recovery via write-ahead logging (WAL).
11289       </para>
11290      </listitem>
11291
11292      <listitem>
11293       <para>
11294        Reduce libraries needlessly linked into the backend (Martijn
11295        van Oosterhout, Tom)
11296       </para>
11297      </listitem>
11298
11299      <listitem>
11300       <para>
11301        Add a configure flag to allow libedit to be preferred over
11302        <acronym>GNU</> readline (Bruce)
11303       </para>
11304
11305       <para>
11306        Use configure <link
11307        linkend="configure"><literal>--with-libedit-preferred</></link>.
11308       </para>
11309      </listitem>
11310
11311      <listitem>
11312       <para>
11313        Allow installation into directories containing spaces
11314        (Peter)
11315       </para>
11316      </listitem>
11317
11318      <listitem>
11319       <para>
11320        Improve ability to relocate installation directories (Tom)
11321       </para>
11322      </listitem>
11323
11324      <listitem>
11325       <para>
11326        Add support for <productname>Solaris x86_64</> using the
11327        <productname>Solaris</> compiler (Pierre Girard, Theo
11328        Schlossnagle, Bruce)
11329       </para>
11330      </listitem>
11331
11332      <listitem>
11333       <para>
11334        Add <application>DTrace</> support (Robert Lor)
11335       </para>
11336      </listitem>
11337
11338      <listitem>
11339       <para>
11340        Add <literal>PG_VERSION_NUM</> for use by third-party
11341        applications wanting to test the backend version in C using &gt;
11342        and &lt; comparisons (Bruce)
11343       </para>
11344      </listitem>
11345
11346      <listitem>
11347       <para>
11348        Add <literal>XLOG_BLCKSZ</> as independent from <literal>BLCKSZ</>
11349        (Mark Wong)
11350       </para>
11351      </listitem>
11352
11353      <listitem>
11354       <para>
11355        Add <literal>LWLOCK_STATS</> define to report locking
11356        activity (Tom)
11357       </para>
11358      </listitem>
11359
11360      <listitem>
11361       <para>
11362        Emit warnings for unknown <application>configure</> options
11363        (Martijn van Oosterhout)
11364       </para>
11365      </listitem>
11366
11367      <listitem>
11368       <para>
11369        Add server support for <quote>plugin</> libraries
11370        that can be used for add-on tasks such as debugging and performance
11371        measurement (Korry Douglas)
11372       </para>
11373
11374       <para>
11375        This consists of two features: a table of <quote>rendezvous
11376        variables</> that allows separately-loaded shared libraries to
11377        communicate, and a new configuration parameter <link
11378        linkend="guc-local-preload-libraries"><varname>local_preload_libraries</></link>
11379        that allows libraries to be loaded into specific sessions without
11380        explicit cooperation from the client application.  This allows
11381        external add-ons to implement features such as a PL/PgSQL debugger.
11382       </para>
11383      </listitem>
11384
11385      <listitem>
11386       <para>
11387        Rename existing configuration parameter
11388        <varname>preload_libraries</> to <link
11389        linkend="guc-shared-preload-libraries"><varname>shared_preload_libraries</></link>
11390        (Tom)
11391       </para>
11392
11393       <para>
11394        This was done for clarity in comparison to
11395        <varname>local_preload_libraries</>.
11396       </para>
11397      </listitem>
11398
11399      <listitem>
11400       <para>
11401        Add new configuration parameter <link
11402        linkend="guc-server-version-num"><varname>server_version_num</></link>
11403        (Greg Sabino Mullane)
11404       </para>
11405
11406       <para>
11407        This is like <varname>server_version</varname>, but is an
11408        integer, e.g.  <literal>80200</>. This allows applications to
11409        make version checks more easily.
11410       </para>
11411      </listitem>
11412
11413      <listitem>
11414       <para>
11415        Add a configuration parameter <link
11416        linkend="guc-seq-page-cost"><varname>seq_page_cost</></link>
11417        (Tom)
11418       </para>
11419      </listitem>
11420
11421      <listitem>
11422       <para>
11423        Re-implement the <link linkend="regress">regression test</link> script as a C program
11424        (Magnus, Tom)
11425       </para>
11426      </listitem>
11427
11428      <listitem>
11429       <para>
11430        Allow loadable modules to allocate shared memory and
11431        lightweight locks (Marc Munro)
11432       </para>
11433      </listitem>
11434
11435      <listitem>
11436       <para>
11437        Add automatic initialization and finalization of dynamically
11438        loaded libraries (Ralf Engelschall, Tom)
11439       </para>
11440
11441       <para>
11442        New <link linkend="xfunc-c-dynload">functions</link>
11443        <function>_PG_init()</> and <function>_PG_fini()</> are
11444        called if the library defines such symbols.  Hence we no
11445        longer need to specify an initialization function in
11446        <varname>shared_preload_libraries</>; we can assume that
11447        the library used the <function>_PG_init()</> convention
11448        instead.
11449       </para>
11450      </listitem>
11451
11452      <listitem>
11453       <para>
11454        Add <link
11455        linkend="xfunc-c-dynload"><literal>PG_MODULE_MAGIC</></link>
11456        header block to all shared object files (Martijn van
11457        Oosterhout)
11458       </para>
11459
11460       <para>
11461        The magic block prevents version mismatches between loadable object
11462        files and servers.
11463       </para>
11464      </listitem>
11465
11466      <listitem>
11467       <para>
11468         Add shared library support for AIX (Laurenz Albe)
11469       </para>
11470      </listitem>
11471
11472      <listitem>
11473       <para>
11474        New <link linkend="datatype-xml"><acronym>XML</></link>
11475        documentation section (Bruce)
11476       </para>
11477      </listitem>
11478
11479     </itemizedlist>
11480
11481    </sect3>
11482
11483    <sect3>
11484     <title>Contrib Changes</title>
11485     <itemizedlist>
11486
11487      <listitem>
11488       <para>
11489        Major tsearch2 improvements (Oleg, Teodor)
11490       </para>
11491
11492       <itemizedlist>
11493
11494        <listitem>
11495         <para>
11496          multibyte encoding support, including <acronym>UTF8</>
11497         </para>
11498        </listitem>
11499        <listitem>
11500         <para>
11501          query rewriting support
11502         </para>
11503        </listitem>
11504        <listitem>
11505         <para>
11506          improved ranking functions
11507         </para>
11508        </listitem>
11509        <listitem>
11510         <para>
11511          thesaurus dictionary support
11512         </para>
11513        </listitem>
11514        <listitem>
11515         <para>
11516          Ispell dictionaries now recognize <application>MySpell</>
11517          format, used by <application>OpenOffice</>
11518         </para>
11519        </listitem>
11520        <listitem>
11521         <para>
11522          <acronym>GIN</> support
11523         </para>
11524        </listitem>
11525
11526       </itemizedlist>
11527
11528      </listitem>
11529
11530      <listitem>
11531       <para>
11532        Add adminpack module containing <application>Pgadmin</> administration
11533        functions (Dave)
11534       </para>
11535
11536       <para>
11537        These functions provide additional file system access
11538        routines not present in the default <productname>PostgreSQL</>
11539        server.
11540       </para>
11541      </listitem>
11542
11543      <listitem>
11544       <para>
11545        Add sslinfo module (Victor Wagner)
11546       </para>
11547
11548       <para>
11549        Reports information about the current connection's <acronym>SSL</>
11550        certificate.
11551       </para>
11552      </listitem>
11553
11554      <listitem>
11555       <para>
11556        Add pgrowlocks module (Tatsuo)
11557       </para>
11558
11559       <para>
11560        This shows row locking information for a specified table.
11561       </para>
11562      </listitem>
11563
11564      <listitem>
11565       <para>
11566        Add hstore module (Oleg, Teodor)
11567       </para>
11568      </listitem>
11569
11570      <listitem>
11571       <para>
11572        Add isn module, replacing isbn_issn (Jeremy Kronuz)
11573       </para>
11574
11575       <para>
11576        This new implementation supports <acronym>EAN13</>, <acronym>UPC</>,
11577        <acronym>ISBN</> (books), <acronym>ISMN</> (music), and
11578        <acronym>ISSN</> (serials).
11579       </para>
11580      </listitem>
11581
11582      <listitem>
11583       <para>
11584        Add index information functions to pgstattuple (ITAGAKI Takahiro,
11585        Satoshi Nagayasu)
11586       </para>
11587      </listitem>
11588
11589      <listitem>
11590       <para>
11591        Add pg_freespacemap module to display free space map information
11592        (Mark Kirkwood)
11593       </para>
11594      </listitem>
11595
11596      <listitem>
11597       <para>
11598        pgcrypto now has all planned functionality (Marko Kreen)
11599       </para>
11600       <itemizedlist>
11601        <listitem>
11602         <para>
11603          Include iMath library in pgcrypto to have the public-key encryption
11604          functions always available.
11605         </para>
11606        </listitem>
11607        <listitem>
11608         <para>
11609          Add SHA224 algorithm that was missing in OpenBSD code.
11610         </para>
11611        </listitem>
11612        <listitem>
11613         <para>
11614          Activate builtin code for SHA224/256/384/512 hashes on older
11615          OpenSSL to have those algorithms always available.
11616         </para>
11617        </listitem>
11618        <listitem>
11619         <para>
11620          New function gen_random_bytes() that returns cryptographically strong
11621          randomness.  Useful for generating encryption keys.
11622         </para>
11623        </listitem>
11624        <listitem>
11625         <para>
11626          Remove digest_exists(), hmac_exists() and cipher_exists() functions.
11627         </para>
11628        </listitem>
11629       </itemizedlist>
11630      </listitem>
11631
11632      <listitem>
11633       <para>
11634        Improvements to cube module (Joshua Reich)
11635       </para>
11636
11637       <para>
11638        New functions are <function>cube(float[])</>,
11639        <function>cube(float[], float[])</>, and
11640        <function>cube_subset(cube, int4[])</>.
11641       </para>
11642      </listitem>
11643
11644      <listitem>
11645       <para>
11646        Add async query capability to dblink (Kai Londenberg,
11647        Joe Conway)
11648       </para>
11649      </listitem>
11650
11651      <listitem>
11652       <para>
11653        New operators for array-subset comparisons (<literal>@&gt;</>,
11654        <literal>&lt;@</>, <literal>&amp;&amp;</>) (Tom)
11655       </para>
11656
11657       <para>
11658        Various contrib packages already had these operators for their
11659        datatypes, but the naming wasn't consistent.  We have now added
11660        consistently named array-subset comparison operators to the core code
11661        and all the contrib packages that have such functionality.
11662        (The old names remain available, but are deprecated.)
11663       </para>
11664      </listitem>
11665
11666      <listitem>
11667       <para>
11668        Add uninstall scripts for all contrib packages that have install
11669        scripts (David, Josh Drake)
11670       </para>
11671      </listitem>
11672
11673     </itemizedlist>
11674
11675    </sect3>
11676
11677   </sect2>
11678  </sect1>
11679
11680  <sect1 id="release-8-1-17">
11681   <title>Release 8.1.17</title>
11682
11683   <note>
11684   <title>Release date</title>
11685   <simpara>2009-03-16</simpara>
11686   </note>
11687
11688   <para>
11689    This release contains a variety of fixes from 8.1.16.
11690    For information about new features in the 8.1 major release, see
11691    <xref linkend="release-8-1">.
11692   </para>
11693
11694   <sect2>
11695    <title>Migration to Version 8.1.17</title>
11696
11697    <para>
11698     A dump/restore is not required for those running 8.1.X.
11699     However, if you are upgrading from a version earlier than 8.1.15,
11700     see the release notes for 8.1.15.
11701    </para>
11702
11703   </sect2>
11704
11705   <sect2>
11706    <title>Changes</title>
11707
11708    <itemizedlist>
11709
11710     <listitem>
11711      <para>
11712       Prevent error recursion crashes when encoding conversion fails (Tom)
11713      </para>
11714
11715      <para>
11716       This change extends fixes made in the last two minor releases for
11717       related failure scenarios.  The previous fixes were narrowly tailored
11718       for the original problem reports, but we have now recognized that
11719       <emphasis>any</> error thrown by an encoding conversion function could
11720       potentially lead to infinite recursion while trying to report the
11721       error.  The solution therefore is to disable translation and encoding
11722       conversion and report the plain-ASCII form of any error message,
11723       if we find we have gotten into a recursive error reporting situation.
11724       (CVE-2009-0922)
11725      </para>
11726     </listitem>
11727
11728     <listitem>
11729      <para>
11730       Disallow <command>CREATE CONVERSION</> with the wrong encodings
11731       for the specified conversion function (Heikki)
11732      </para>
11733
11734      <para>
11735       This prevents one possible scenario for encoding conversion failure.
11736       The previous change is a backstop to guard against other kinds of
11737       failures in the same area.
11738      </para>
11739     </listitem>
11740
11741     <listitem>
11742      <para>
11743       Fix core dump when <function>to_char()</> is given format codes that
11744       are inappropriate for the type of the data argument (Tom)
11745      </para>
11746     </listitem>
11747
11748     <listitem>
11749      <para>
11750       Fix decompilation of <literal>CASE WHEN</> with an implicit coercion
11751       (Tom)
11752      </para>
11753
11754      <para>
11755       This mistake could lead to Assert failures in an Assert-enabled build,
11756       or an <quote>unexpected CASE WHEN clause</> error message in other
11757       cases, when trying to examine or dump a view.
11758      </para>
11759     </listitem>
11760
11761     <listitem>
11762      <para>
11763       Fix possible misassignment of the owner of a TOAST table's rowtype (Tom)
11764      </para>
11765
11766      <para>
11767       If <command>CLUSTER</> or a rewriting variant of <command>ALTER TABLE</>
11768       were executed by someone other than the table owner, the
11769       <structname>pg_type</> entry for the table's TOAST table would end up
11770       marked as owned by that someone.  This caused no immediate problems,
11771       since the permissions on the TOAST rowtype aren't examined by any
11772       ordinary database operation.  However, it could lead to unexpected
11773       failures if one later tried to drop the role that issued the command
11774       (in 8.1 or 8.2), or <quote>owner of data type appears to be invalid</>
11775       warnings from <application>pg_dump</> after having done so (in 8.3).
11776      </para>
11777     </listitem>
11778
11779     <listitem>
11780      <para>
11781       Clean up PL/pgSQL error status variables fully at block exit
11782       (Ashesh Vashi and Dave Page)
11783      </para>
11784
11785      <para>
11786       This is not a problem for PL/pgSQL itself, but the omission could cause
11787       the PL/pgSQL Debugger to crash while examining the state of a function.
11788      </para>
11789     </listitem>
11790
11791     <listitem>
11792      <para>
11793       Add <literal>MUST</> (Mauritius Island Summer Time) to the default list
11794       of known timezone abbreviations (Xavier Bugaud)
11795      </para>
11796     </listitem>
11797
11798    </itemizedlist>
11799
11800   </sect2>
11801  </sect1>
11802
11803  <sect1 id="release-8-1-16">
11804   <title>Release 8.1.16</title>
11805
11806   <note>
11807   <title>Release date</title>
11808   <simpara>2009-02-02</simpara>
11809   </note>
11810
11811   <para>
11812    This release contains a variety of fixes from 8.1.15.
11813    For information about new features in the 8.1 major release, see
11814    <xref linkend="release-8-1">.
11815   </para>
11816
11817   <sect2>
11818    <title>Migration to Version 8.1.16</title>
11819
11820    <para>
11821     A dump/restore is not required for those running 8.1.X.
11822     However, if you are upgrading from a version earlier than 8.1.15,
11823     see the release notes for 8.1.15.
11824    </para>
11825
11826   </sect2>
11827
11828   <sect2>
11829    <title>Changes</title>
11830
11831    <itemizedlist>
11832
11833     <listitem>
11834      <para>
11835       Fix crash in autovacuum (Alvaro)
11836      </para>
11837
11838      <para>
11839       The crash occurs only after vacuuming a whole database for
11840       anti-transaction-wraparound purposes, which means that it occurs
11841       infrequently and is hard to track down.
11842      </para>
11843     </listitem>
11844
11845     <listitem>
11846      <para>
11847       Improve handling of URLs in <function>headline()</> function (Teodor)
11848      </para>
11849     </listitem>
11850
11851     <listitem>
11852      <para>
11853       Improve handling of overlength headlines in <function>headline()</>
11854       function (Teodor)
11855      </para>
11856     </listitem>
11857
11858     <listitem>
11859      <para>
11860       Prevent possible Assert failure or misconversion if an encoding
11861       conversion is created with the wrong conversion function for the
11862       specified pair of encodings (Tom, Heikki)
11863      </para>
11864     </listitem>
11865
11866     <listitem>
11867      <para>
11868       Avoid unnecessary locking of small tables in <command>VACUUM</>
11869       (Heikki)
11870      </para>
11871     </listitem>
11872
11873     <listitem>
11874      <para>
11875       Ensure that the contents of a holdable cursor don't depend on the
11876       contents of TOAST tables (Tom)
11877      </para>
11878
11879      <para>
11880       Previously, large field values in a cursor result might be represented
11881       as TOAST pointers, which would fail if the referenced table got dropped
11882       before the cursor is read, or if the large value is deleted and then
11883       vacuumed away.  This cannot happen with an ordinary cursor,
11884       but it could with a cursor that is held past its creating transaction.
11885      </para>
11886     </listitem>
11887
11888     <listitem>
11889      <para>
11890       Fix uninitialized variables in <filename>contrib/tsearch2</>'s
11891       <function>get_covers()</> function (Teodor)
11892      </para>
11893     </listitem>
11894
11895     <listitem>
11896      <para>
11897       Fix <application>configure</> script to properly report failure when
11898       unable to obtain linkage information for PL/Perl (Andrew)
11899      </para>
11900     </listitem>
11901
11902     <listitem>
11903      <para>
11904       Make all documentation reference <literal>pgsql-bugs</> and/or
11905       <literal>pgsql-hackers</> as appropriate, instead of the
11906       now-decommissioned <literal>pgsql-ports</> and <literal>pgsql-patches</>
11907       mailing lists (Tom)
11908      </para>
11909     </listitem>
11910
11911     <listitem>
11912      <para>
11913       Update time zone data files to <application>tzdata</> release 2009a (for
11914       Kathmandu and historical DST corrections in Switzerland, Cuba)
11915      </para>
11916     </listitem>
11917
11918    </itemizedlist>
11919
11920   </sect2>
11921  </sect1>
11922
11923  <sect1 id="release-8-1-15">
11924   <title>Release 8.1.15</title>
11925
11926   <note>
11927   <title>Release date</title>
11928   <simpara>2008-11-03</simpara>
11929   </note>
11930
11931   <para>
11932    This release contains a variety of fixes from 8.1.14.
11933    For information about new features in the 8.1 major release, see
11934    <xref linkend="release-8-1">.
11935   </para>
11936
11937   <sect2>
11938    <title>Migration to Version 8.1.15</title>
11939
11940    <para>
11941     A dump/restore is not required for those running 8.1.X.
11942     However, if you are upgrading from a version earlier than 8.1.2,
11943     see the release notes for 8.1.2.  Also, if you were running a previous
11944     8.1.X release, it is recommended to <command>REINDEX</> all GiST
11945     indexes after the upgrade.
11946    </para>
11947
11948   </sect2>
11949
11950   <sect2>
11951    <title>Changes</title>
11952
11953    <itemizedlist>
11954
11955     <listitem>
11956      <para>
11957       Fix GiST index corruption due to marking the wrong index entry
11958       <quote>dead</> after a deletion (Teodor)
11959      </para>
11960
11961      <para>
11962       This would result in index searches failing to find rows they
11963       should have found.  Corrupted indexes can be fixed with
11964       <command>REINDEX</>.
11965      </para>
11966     </listitem>
11967
11968     <listitem>
11969      <para>
11970       Fix backend crash when the client encoding cannot represent a localized
11971       error message (Tom)
11972      </para>
11973
11974      <para>
11975       We have addressed similar issues before, but it would still fail if
11976       the <quote>character has no equivalent</> message itself couldn't
11977       be converted.  The fix is to disable localization and send the plain
11978       ASCII error message when we detect such a situation.
11979      </para>
11980     </listitem>
11981
11982     <listitem>
11983      <para>
11984       Fix possible crash when deeply nested functions are invoked from
11985       a trigger (Tom)
11986      </para>
11987     </listitem>
11988
11989     <listitem>
11990      <para>
11991       Fix mis-expansion of rule queries when a sub-<literal>SELECT</> appears
11992       in a function call in <literal>FROM</>,  a multi-row <literal>VALUES</>
11993       list, or a <literal>RETURNING</> list (Tom)
11994      </para>
11995
11996      <para>
11997       The usual symptom of this problem is an <quote>unrecognized node type</>
11998       error.
11999      </para>
12000     </listitem>
12001
12002     <listitem>
12003      <para>
12004       Ensure an error is reported when a newly-defined PL/pgSQL trigger
12005       function is invoked as a normal function (Tom)
12006      </para>
12007     </listitem>
12008
12009     <listitem>
12010      <para>
12011       Prevent possible collision of <structfield>relfilenode</> numbers
12012       when moving a table to another tablespace with <command>ALTER SET
12013       TABLESPACE</> (Heikki)
12014      </para>
12015
12016      <para>
12017       The command tried to re-use the existing filename, instead of
12018       picking one that is known unused in the destination directory.
12019      </para>
12020     </listitem>
12021
12022     <listitem>
12023      <para>
12024       Fix incorrect tsearch2 headline generation when single query
12025       item matches first word of text (Sushant Sinha)
12026      </para>
12027     </listitem>
12028
12029     <listitem>
12030      <para>
12031       Fix improper display of fractional seconds in interval values when
12032       using a non-ISO datestyle in an <option>--enable-integer-datetimes</>
12033       build (Ron Mayer)
12034      </para>
12035     </listitem>
12036
12037     <listitem>
12038      <para>
12039       Ensure <function>SPI_getvalue</> and <function>SPI_getbinval</>
12040       behave correctly when the passed tuple and tuple descriptor have
12041       different numbers of columns (Tom)
12042      </para>
12043
12044      <para>
12045       This situation is normal when a table has had columns added or removed,
12046       but these two functions didn't handle it properly.
12047       The only likely consequence is an incorrect error indication.
12048      </para>
12049     </listitem>
12050
12051     <listitem>
12052      <para>
12053       Fix <application>ecpg</>'s parsing of <command>CREATE ROLE</> (Michael)
12054      </para>
12055     </listitem>
12056
12057     <listitem>
12058      <para>
12059       Fix recent breakage of <literal>pg_ctl restart</> (Tom)
12060      </para>
12061     </listitem>
12062
12063     <listitem>
12064      <para>
12065       Update time zone data files to <application>tzdata</> release 2008i (for
12066       DST law changes in Argentina, Brazil, Mauritius, Syria)
12067      </para>
12068     </listitem>
12069
12070    </itemizedlist>
12071
12072   </sect2>
12073  </sect1>
12074
12075  <sect1 id="release-8-1-14">
12076   <title>Release 8.1.14</title>
12077
12078   <note>
12079   <title>Release date</title>
12080   <simpara>2008-09-22</simpara>
12081   </note>
12082
12083   <para>
12084    This release contains a variety of fixes from 8.1.13.
12085    For information about new features in the 8.1 major release, see
12086    <xref linkend="release-8-1">.
12087   </para>
12088
12089   <sect2>
12090    <title>Migration to Version 8.1.14</title>
12091
12092    <para>
12093     A dump/restore is not required for those running 8.1.X.
12094     However, if you are upgrading from a version earlier than 8.1.2,
12095     see the release notes for 8.1.2.
12096    </para>
12097
12098   </sect2>
12099
12100   <sect2>
12101    <title>Changes</title>
12102
12103    <itemizedlist>
12104
12105     <listitem>
12106      <para>
12107       Widen local lock counters from 32 to 64 bits (Tom)
12108      </para>
12109
12110      <para>
12111       This responds to reports that the counters could overflow in
12112       sufficiently long transactions, leading to unexpected <quote>lock is
12113       already held</> errors.
12114      </para>
12115     </listitem>
12116
12117     <listitem>
12118      <para>
12119       Fix possible duplicate output of tuples during a GiST index scan (Teodor)
12120      </para>
12121     </listitem>
12122
12123     <listitem>
12124      <para>
12125       Add checks in executor startup to ensure that the tuples produced by an
12126       <command>INSERT</> or <command>UPDATE</> will match the target table's
12127       current rowtype (Tom)
12128      </para>
12129
12130      <para>
12131       <command>ALTER COLUMN TYPE</>, followed by re-use of a previously
12132       cached plan, could produce this type of situation.  The check protects
12133       against data corruption and/or crashes that could ensue.
12134      </para>
12135     </listitem>
12136
12137     <listitem>
12138      <para>
12139       Fix <literal>AT TIME ZONE</> to first try to interpret its timezone
12140       argument as a timezone abbreviation, and only try it as a full timezone
12141       name if that fails, rather than the other way around as formerly (Tom)
12142      </para>
12143
12144      <para>
12145       The timestamp input functions have always resolved ambiguous zone names
12146       in this order.  Making <literal>AT TIME ZONE</> do so as well improves
12147       consistency, and fixes a compatibility bug introduced in 8.1:
12148       in ambiguous cases we now behave the same as 8.0 and before did,
12149       since in the older versions <literal>AT TIME ZONE</> accepted
12150       <emphasis>only</> abbreviations.
12151      </para>
12152     </listitem>
12153
12154     <listitem>
12155      <para>
12156       Fix datetime input functions to correctly detect integer overflow when
12157       running on a 64-bit platform (Tom)
12158      </para>
12159     </listitem>
12160
12161     <listitem>
12162      <para>
12163       Improve performance of writing very long log messages to syslog (Tom)
12164      </para>
12165     </listitem>
12166
12167     <listitem>
12168      <para>
12169       Fix bug in backwards scanning of a cursor on a <literal>SELECT DISTINCT
12170       ON</> query (Tom)
12171      </para>
12172     </listitem>
12173
12174     <listitem>
12175      <para>
12176       Fix planner bug with nested sub-select expressions (Tom)
12177      </para>
12178
12179      <para>
12180       If the outer sub-select has no direct dependency on the parent query,
12181       but the inner one does, the outer value might not get recalculated
12182       for new parent query rows.
12183      </para>
12184     </listitem>
12185
12186     <listitem>
12187      <para>
12188       Fix planner to estimate that <literal>GROUP BY</> expressions yielding
12189       boolean results always result in two groups, regardless of the
12190       expressions' contents (Tom)
12191      </para>
12192
12193      <para>
12194       This is very substantially more accurate than the regular <literal>GROUP
12195       BY</> estimate for certain boolean tests like <replaceable>col</>
12196       <literal>IS NULL</>.
12197      </para>
12198     </listitem>
12199
12200     <listitem>
12201      <para>
12202       Fix PL/PgSQL to not fail when a <literal>FOR</> loop's target variable
12203       is a record containing composite-type fields (Tom)
12204      </para>
12205     </listitem>
12206
12207     <listitem>
12208      <para>
12209       Fix PL/Tcl to behave correctly with Tcl 8.5, and to be more careful
12210       about the encoding of data sent to or from Tcl (Tom)
12211      </para>
12212     </listitem>
12213
12214     <listitem>
12215      <para>
12216       Fix PL/Python to work with Python 2.5
12217      </para>
12218
12219      <para>
12220       This is a back-port of fixes made during the 8.2 development cycle.
12221      </para>
12222     </listitem>
12223
12224     <listitem>
12225      <para>
12226       Improve <application>pg_dump</> and <application>pg_restore</>'s
12227       error reporting after failure to send a SQL command (Tom)
12228      </para>
12229     </listitem>
12230
12231     <listitem>
12232      <para>
12233       Fix <application>pg_ctl</> to properly preserve postmaster
12234       command-line arguments across a <literal>restart</> (Bruce)
12235      </para>
12236     </listitem>
12237
12238     <listitem>
12239      <para>
12240       Update time zone data files to <application>tzdata</> release 2008f (for
12241       DST law changes in Argentina, Bahamas, Brazil, Mauritius, Morocco,
12242       Pakistan, Palestine, and Paraguay)
12243      </para>
12244     </listitem>
12245
12246    </itemizedlist>
12247
12248   </sect2>
12249  </sect1>
12250
12251  <sect1 id="release-8-1-13">
12252   <title>Release 8.1.13</title>
12253
12254   <note>
12255   <title>Release date</title>
12256   <simpara>2008-06-12</simpara>
12257   </note>
12258
12259   <para>
12260    This release contains one serious and one minor bug fix over 8.1.12.
12261    For information about new features in the 8.1 major release, see
12262    <xref linkend="release-8-1">.
12263   </para>
12264
12265   <sect2>
12266    <title>Migration to Version 8.1.13</title>
12267
12268    <para>
12269     A dump/restore is not required for those running 8.1.X.
12270     However, if you are upgrading from a version earlier than 8.1.2,
12271     see the release notes for 8.1.2.
12272    </para>
12273
12274   </sect2>
12275
12276   <sect2>
12277    <title>Changes</title>
12278
12279    <itemizedlist>
12280
12281     <listitem>
12282      <para>
12283       Make <function>pg_get_ruledef()</> parenthesize negative constants (Tom)
12284      </para>
12285
12286      <para>
12287       Before this fix, a negative constant in a view or rule might be dumped
12288       as, say, <literal>-42::integer</>, which is subtly incorrect: it should
12289       be <literal>(-42)::integer</> due to operator precedence rules.
12290       Usually this would make little difference, but it could interact with
12291       another recent patch to cause
12292       <productname>PostgreSQL</> to reject what had been a valid
12293       <command>SELECT DISTINCT</> view query.  Since this could result in
12294       <application>pg_dump</> output failing to reload, it is being treated
12295       as a high-priority fix.  The only released versions in which dump
12296       output is actually incorrect are 8.3.1 and 8.2.7.
12297      </para>
12298     </listitem>
12299
12300     <listitem>
12301      <para>
12302       Make <command>ALTER AGGREGATE ... OWNER TO</> update
12303       <structname>pg_shdepend</> (Tom)
12304      </para>
12305
12306      <para>
12307       This oversight could lead to problems if the aggregate was later
12308       involved in a <command>DROP OWNED</> or <command>REASSIGN OWNED</>
12309       operation.
12310      </para>
12311     </listitem>
12312
12313    </itemizedlist>
12314
12315   </sect2>
12316  </sect1>
12317
12318  <sect1 id="release-8-1-12">
12319   <title>Release 8.1.12</title>
12320
12321   <note>
12322   <title>Release date</title>
12323   <simpara>never released</simpara>
12324   </note>
12325
12326   <para>
12327    This release contains a variety of fixes from 8.1.11.
12328    For information about new features in the 8.1 major release, see
12329    <xref linkend="release-8-1">.
12330   </para>
12331
12332   <sect2>
12333    <title>Migration to Version 8.1.12</title>
12334
12335    <para>
12336     A dump/restore is not required for those running 8.1.X.
12337     However, if you are upgrading from a version earlier than 8.1.2,
12338     see the release notes for 8.1.2.
12339    </para>
12340
12341   </sect2>
12342
12343   <sect2>
12344    <title>Changes</title>
12345
12346    <itemizedlist>
12347
12348     <listitem>
12349      <para>
12350       Fix <command>ALTER TABLE ADD COLUMN ... PRIMARY KEY</> so that the new
12351       column is correctly checked to see if it's been initialized to all
12352       non-nulls (Brendan Jurd)
12353      </para>
12354
12355      <para>
12356       Previous versions neglected to check this requirement at all.
12357      </para>
12358     </listitem>
12359
12360     <listitem>
12361      <para>
12362       Fix possible <command>CREATE TABLE</> failure when inheriting the
12363       <quote>same</> constraint from multiple parent relations that
12364       inherited that constraint from a common ancestor (Tom)
12365      </para>
12366     </listitem>
12367
12368     <listitem>
12369      <para>
12370       Fix conversions between ISO-8859-5 and other encodings to handle
12371       Cyrillic <quote>Yo</> characters (<literal>e</> and <literal>E</> with
12372       two dots) (Sergey Burladyan)
12373      </para>
12374     </listitem>
12375
12376     <listitem>
12377      <para>
12378       Fix a few datatype input functions
12379       that were allowing unused bytes in their results to contain
12380       uninitialized, unpredictable values (Tom)
12381      </para>
12382
12383      <para>
12384       This could lead to failures in which two apparently identical literal
12385       values were not seen as equal, resulting in the parser complaining
12386       about unmatched <literal>ORDER BY</> and <literal>DISTINCT</>
12387       expressions.
12388      </para>
12389     </listitem>
12390
12391     <listitem>
12392      <para>
12393       Fix a corner case in regular-expression substring matching
12394       (<literal>substring(<replaceable>string</> from
12395       <replaceable>pattern</>)</literal>) (Tom)
12396      </para>
12397
12398      <para>
12399       The problem occurs when there is a match to the pattern overall but
12400       the user has specified a parenthesized subexpression and that
12401       subexpression hasn't got a match.  An example is
12402       <literal>substring('foo' from 'foo(bar)?')</>.
12403       This should return NULL, since <literal>(bar)</> isn't matched, but
12404       it was mistakenly returning the whole-pattern match instead (ie,
12405       <literal>foo</>).
12406      </para>
12407     </listitem>
12408
12409     <listitem>
12410      <para>
12411       Update time zone data files to <application>tzdata</> release 2008c (for
12412       DST law changes in Morocco, Iraq, Choibalsan, Pakistan, Syria, Cuba,
12413       Argentina/San_Luis, and Chile)
12414      </para>
12415     </listitem>
12416
12417     <listitem>
12418      <para>
12419       Fix incorrect result from <application>ecpg</>'s
12420       <function>PGTYPEStimestamp_sub()</> function (Michael)
12421      </para>
12422     </listitem>
12423
12424     <listitem>
12425      <para>
12426       Fix core dump in <filename>contrib/xml2</>'s
12427       <function>xpath_table()</> function when the input query returns a
12428       NULL value (Tom)
12429      </para>
12430     </listitem>
12431
12432     <listitem>
12433      <para>
12434       Fix <filename>contrib/xml2</>'s makefile to not override
12435       <literal>CFLAGS</> (Tom)
12436      </para>
12437     </listitem>
12438
12439     <listitem>
12440      <para>
12441       Fix <literal>DatumGetBool</> macro to not fail with <application>gcc</>
12442       4.3 (Tom)
12443      </para>
12444
12445      <para>
12446       This problem affects <quote>old style</> (V0) C functions that
12447       return boolean.  The fix is already in 8.3, but the need to
12448       back-patch it was not realized at the time.
12449      </para>
12450     </listitem>
12451
12452     <listitem>
12453      <para>
12454       Fix longstanding <command>LISTEN</>/<command>NOTIFY</>
12455       race condition (Tom)
12456      </para>
12457
12458      <para>
12459       In rare cases a session that had just executed a
12460       <command>LISTEN</> might not get a notification, even though
12461       one would be expected because the concurrent transaction executing
12462       <command>NOTIFY</> was observed to commit later.
12463      </para>
12464
12465      <para>
12466       A side effect of the fix is that a transaction that has executed
12467       a not-yet-committed <command>LISTEN</> command will not see any
12468       row in <structname>pg_listener</> for the <command>LISTEN</>,
12469       should it choose to look; formerly it would have.  This behavior
12470       was never documented one way or the other, but it is possible that
12471       some applications depend on the old behavior.
12472      </para>
12473     </listitem>
12474
12475     <listitem>
12476      <para>
12477       Disallow <command>LISTEN</> and <command>UNLISTEN</> within a
12478       prepared transaction (Tom)
12479      </para>
12480
12481      <para>
12482       This was formerly allowed but trying to do it had various unpleasant
12483       consequences, notably that the originating backend could not exit
12484       as long as an <command>UNLISTEN</> remained uncommitted.
12485      </para>
12486     </listitem>
12487
12488     <listitem>
12489      <para>
12490       Fix rare crash when an error occurs during a query using a hash index
12491       (Heikki)
12492      </para>
12493     </listitem>
12494
12495     <listitem>
12496      <para>
12497       Fix input of datetime values for February 29 in years BC (Tom)
12498      </para>
12499
12500      <para>
12501       The former coding was mistaken about which years were leap years.
12502      </para>
12503     </listitem>
12504
12505     <listitem>
12506      <para>
12507       Fix <quote>unrecognized node type</> error in some variants of
12508       <command>ALTER OWNER</> (Tom)
12509      </para>
12510     </listitem>
12511
12512     <listitem>
12513      <para>
12514       Fix <application>pg_ctl</> to correctly extract the postmaster's port
12515       number from command-line options (Itagaki Takahiro, Tom)
12516      </para>
12517
12518      <para>
12519       Previously, <literal>pg_ctl start -w</> could try to contact the
12520       postmaster on the wrong port, leading to bogus reports of startup
12521       failure.
12522      </para>
12523     </listitem>
12524
12525     <listitem>
12526      <para>
12527       Use <option>-fwrapv</> to defend against possible misoptimization
12528       in recent <application>gcc</> versions (Tom)
12529      </para>
12530
12531      <para>
12532       This is known to be necessary when building <productname>PostgreSQL</>
12533       with <application>gcc</> 4.3 or later.
12534      </para>
12535     </listitem>
12536
12537     <listitem>
12538      <para>
12539       Fix display of constant expressions in <literal>ORDER BY</>
12540       and <literal>GROUP BY</> (Tom)
12541      </para>
12542
12543      <para>
12544       An explictly casted constant would be shown incorrectly.  This could
12545       for example lead to corruption of a view definition during
12546       dump and reload.
12547      </para>
12548     </listitem>
12549
12550     <listitem>
12551      <para>
12552       Fix <application>libpq</> to handle NOTICE messages correctly
12553       during COPY OUT (Tom)
12554      </para>
12555
12556      <para>
12557       This failure has only been observed to occur when a user-defined
12558       datatype's output routine issues a NOTICE, but there is no
12559       guarantee it couldn't happen due to other causes.
12560      </para>
12561     </listitem>
12562
12563    </itemizedlist>
12564
12565   </sect2>
12566  </sect1>
12567
12568  <sect1 id="release-8-1-11">
12569   <title>Release 8.1.11</title>
12570
12571   <note>
12572   <title>Release date</title>
12573   <simpara>2008-01-07</simpara>
12574   </note>
12575
12576   <para>
12577    This release contains a variety of fixes from 8.1.10,
12578    including fixes for significant security issues.
12579    For information about new features in the 8.1 major release, see
12580    <xref linkend="release-8-1">.
12581   </para>
12582
12583   <para>
12584    This is the last 8.1.X release for which the <productname>PostgreSQL</>
12585    community will produce binary packages for <productname>Windows</>.
12586    Windows users are encouraged to move to 8.2.X or later,
12587    since there are Windows-specific fixes in 8.2.X that
12588    are impractical to back-port.  8.1.X will continue to
12589    be supported on other platforms.
12590   </para>
12591
12592   <sect2>
12593    <title>Migration to Version 8.1.11</title>
12594
12595    <para>
12596     A dump/restore is not required for those running 8.1.X.
12597     However, if you are upgrading from a version earlier than 8.1.2,
12598     see the release notes for 8.1.2.
12599    </para>
12600
12601   </sect2>
12602
12603   <sect2>
12604    <title>Changes</title>
12605
12606    <itemizedlist>
12607
12608     <listitem>
12609      <para>
12610       Prevent functions in indexes from executing with the privileges of
12611       the user running <command>VACUUM</>, <command>ANALYZE</>, etc (Tom)
12612      </para>
12613
12614      <para>
12615       Functions used in index expressions and partial-index
12616       predicates are evaluated whenever a new table entry is made.  It has
12617       long been understood that this poses a risk of trojan-horse code
12618       execution if one modifies a table owned by an untrustworthy user.
12619       (Note that triggers, defaults, check constraints, etc. pose the
12620       same type of risk.)  But functions in indexes pose extra danger
12621       because they will be executed by routine maintenance operations
12622       such as <command>VACUUM FULL</>, which are commonly performed
12623       automatically under a superuser account.  For example, a nefarious user
12624       can execute code with superuser privileges by setting up a
12625       trojan-horse index definition and waiting for the next routine vacuum.
12626       The fix arranges for standard maintenance operations
12627       (including <command>VACUUM</>, <command>ANALYZE</>, <command>REINDEX</>,
12628       and <command>CLUSTER</>) to execute as the table owner rather than
12629       the calling user, using the same privilege-switching mechanism already
12630       used for <literal>SECURITY DEFINER</> functions.  To prevent bypassing
12631       this security measure, execution of <command>SET SESSION
12632       AUTHORIZATION</> and <command>SET ROLE</> is now forbidden within a
12633       <literal>SECURITY DEFINER</> context.  (CVE-2007-6600)
12634      </para>
12635     </listitem>
12636
12637     <listitem>
12638      <para>
12639       Repair assorted bugs in the regular-expression package (Tom, Will Drewry)
12640      </para>
12641
12642      <para>
12643       Suitably crafted regular-expression patterns could cause crashes,
12644       infinite or near-infinite looping, and/or massive memory consumption,
12645       all of which pose denial-of-service hazards for applications that
12646       accept regex search patterns from untrustworthy sources.
12647       (CVE-2007-4769, CVE-2007-4772, CVE-2007-6067)
12648      </para>
12649     </listitem>
12650
12651     <listitem>
12652      <para>
12653       Require non-superusers who use <filename>/contrib/dblink</> to use only
12654       password authentication, as a security measure (Joe)
12655      </para>
12656
12657      <para>
12658       The fix that appeared for this in 8.1.10 was incomplete, as it plugged
12659       the hole for only some <filename>dblink</> functions.  (CVE-2007-6601,
12660       CVE-2007-3278)
12661      </para>
12662     </listitem>
12663
12664     <listitem>
12665      <para>
12666       Update time zone data files to <application>tzdata</> release 2007k
12667       (in particular, recent Argentina changes) (Tom)
12668      </para>
12669     </listitem>
12670
12671     <listitem>
12672      <para>
12673       Improve planner's handling of LIKE/regex estimation in non-C locales
12674       (Tom)
12675      </para>
12676     </listitem>
12677
12678     <listitem>
12679      <para>
12680       Fix planner failure in some cases of <literal>WHERE false AND var IN
12681       (SELECT ...)</> (Tom)
12682      </para>
12683     </listitem>
12684
12685     <listitem>
12686      <para>
12687       Preserve the tablespace of indexes that are
12688       rebuilt by <command>ALTER TABLE ... ALTER COLUMN TYPE</> (Tom)
12689      </para>
12690     </listitem>
12691
12692     <listitem>
12693      <para>
12694       Make archive recovery always start a new WAL timeline, rather than only
12695       when a recovery stop time was used (Simon)
12696      </para>
12697
12698      <para>
12699       This avoids a corner-case risk of trying to overwrite an existing
12700       archived copy of the last WAL segment, and seems simpler and cleaner
12701       than the original definition.
12702      </para>
12703     </listitem>
12704
12705     <listitem>
12706      <para>
12707       Make <command>VACUUM</> not use all of <varname>maintenance_work_mem</>
12708       when the table is too small for it to be useful (Alvaro)
12709      </para>
12710     </listitem>
12711
12712     <listitem>
12713      <para>
12714       Fix potential crash in <function>translate()</> when using a multibyte
12715       database encoding (Tom)
12716      </para>
12717     </listitem>
12718
12719     <listitem>
12720      <para>
12721       Fix overflow in <literal>extract(epoch from interval)</> for intervals
12722       exceeding 68 years (Tom)
12723      </para>
12724     </listitem>
12725
12726     <listitem>
12727      <para>
12728       Fix PL/Perl to not fail when a UTF-8 regular expression is used
12729       in a trusted function (Andrew)
12730      </para>
12731     </listitem>
12732
12733     <listitem>
12734      <para>
12735       Fix PL/Perl to cope when platform's Perl defines type <literal>bool</>
12736       as <literal>int</> rather than <literal>char</> (Tom)
12737      </para>
12738
12739      <para>
12740       While this could theoretically happen anywhere, no standard build of
12741       Perl did things this way ... until <productname>Mac OS X</> 10.5.
12742      </para>
12743     </listitem>
12744
12745     <listitem>
12746      <para>
12747       Fix PL/Python to not crash on long exception messages (Alvaro)
12748      </para>
12749     </listitem>
12750
12751     <listitem>
12752      <para>
12753       Fix <application>pg_dump</> to correctly handle inheritance child tables
12754       that have default expressions different from their parent's (Tom)
12755      </para>
12756     </listitem>
12757
12758     <listitem>
12759      <para>
12760       Fix <application>libpq</> crash when <varname>PGPASSFILE</> refers
12761       to a file that is not a plain file (Martin Pitt)
12762      </para>
12763     </listitem>
12764
12765     <listitem>
12766      <para>
12767       <application>ecpg</> parser fixes (Michael)
12768      </para>
12769     </listitem>
12770
12771     <listitem>
12772      <para>
12773       Make <filename>contrib/pgcrypto</> defend against
12774       <application>OpenSSL</> libraries that fail on keys longer than 128
12775       bits; which is the case at least on some Solaris versions (Marko Kreen)
12776      </para>
12777     </listitem>
12778
12779     <listitem>
12780      <para>
12781       Make <filename>contrib/tablefunc</>'s <function>crosstab()</> handle
12782       NULL rowid as a category in its own right, rather than crashing (Joe)
12783      </para>
12784     </listitem>
12785
12786     <listitem>
12787      <para>
12788       Fix <type>tsvector</> and <type>tsquery</> output routines to
12789       escape backslashes correctly (Teodor, Bruce)
12790      </para>
12791     </listitem>
12792
12793     <listitem>
12794      <para>
12795       Fix crash of <function>to_tsvector()</> on huge input strings (Teodor)
12796      </para>
12797     </listitem>
12798
12799     <listitem>
12800      <para>
12801       Require a specific version of <productname>Autoconf</> to be used
12802       when re-generating the <command>configure</> script (Peter)
12803      </para>
12804
12805      <para>
12806       This affects developers and packagers only.  The change was made
12807       to prevent accidental use of untested combinations of
12808       <productname>Autoconf</> and <productname>PostgreSQL</> versions.
12809       You can remove the version check if you really want to use a
12810       different <productname>Autoconf</> version, but it's
12811       your responsibility whether the result works or not.
12812      </para>
12813     </listitem>
12814
12815    </itemizedlist>
12816
12817   </sect2>
12818  </sect1>
12819
12820  <sect1 id="release-8-1-10">
12821   <title>Release 8.1.10</title>
12822
12823   <note>
12824   <title>Release date</title>
12825   <simpara>2007-09-17</simpara>
12826   </note>
12827
12828   <para>
12829    This release contains a variety of fixes from 8.1.9.
12830    For information about new features in the 8.1 major release, see
12831    <xref linkend="release-8-1">.
12832   </para>
12833
12834   <sect2>
12835    <title>Migration to Version 8.1.10</title>
12836
12837    <para>
12838     A dump/restore is not required for those running 8.1.X.
12839     However, if you are upgrading from a version earlier than 8.1.2,
12840     see the release notes for 8.1.2.
12841    </para>
12842
12843   </sect2>
12844
12845   <sect2>
12846    <title>Changes</title>
12847
12848    <itemizedlist>
12849
12850     <listitem>
12851      <para>
12852       Prevent index corruption when a transaction inserts rows and
12853       then aborts close to the end of a concurrent <command>VACUUM</>
12854       on the same table (Tom)
12855      </para>
12856     </listitem>
12857
12858     <listitem>
12859      <para>
12860       Make <command>CREATE DOMAIN ... DEFAULT NULL</> work properly (Tom)
12861      </para>
12862     </listitem>
12863
12864     <listitem>
12865      <para>
12866       Allow the <type>interval</> data type to accept input consisting only of
12867       milliseconds or microseconds (Neil)
12868      </para>
12869     </listitem>
12870
12871     <listitem>
12872      <para>
12873       Speed up rtree index insertion (Teodor)
12874      </para>
12875     </listitem>
12876
12877     <listitem>
12878      <para>
12879       Fix excessive logging of <acronym>SSL</> error messages (Tom)
12880      </para>
12881     </listitem>
12882
12883     <listitem>
12884      <para>
12885       Fix logging so that log messages are never interleaved when using
12886       the syslogger process (Andrew)
12887      </para>
12888     </listitem>
12889
12890     <listitem>
12891      <para>
12892       Fix crash when <varname>log_min_error_statement</> logging runs out
12893       of memory (Tom)
12894      </para>
12895     </listitem>
12896
12897     <listitem>
12898      <para>
12899       Fix incorrect handling of some foreign-key corner cases (Tom)
12900      </para>
12901     </listitem>
12902
12903     <listitem>
12904      <para>
12905       Prevent <command>REINDEX</> and <command>CLUSTER</> from failing
12906       due to attempting to process temporary tables of other sessions (Alvaro)
12907      </para>
12908     </listitem>
12909
12910     <listitem>
12911      <para>
12912       Update the time zone database rules, particularly New Zealand's upcoming changes (Tom)
12913      </para>
12914     </listitem>
12915
12916     <listitem>
12917      <para>
12918       Windows socket improvements (Magnus)
12919      </para>
12920     </listitem>
12921
12922     <listitem>
12923      <para>
12924       Suppress timezone name (<literal>%Z</>) in log timestamps on Windows
12925       because of possible encoding mismatches (Tom)
12926      </para>
12927     </listitem>
12928
12929     <listitem>
12930      <para>
12931       Require non-superusers who use <filename>/contrib/dblink</> to use only
12932       password authentication, as a security measure (Joe)
12933      </para>
12934     </listitem>
12935
12936    </itemizedlist>
12937
12938   </sect2>
12939  </sect1>
12940
12941  <sect1 id="release-8-1-9">
12942   <title>Release 8.1.9</title>
12943
12944   <note>
12945   <title>Release date</title>
12946   <simpara>2007-04-23</simpara>
12947   </note>
12948
12949   <para>
12950    This release contains a variety of fixes from 8.1.8,
12951    including a security fix.
12952    For information about new features in the 8.1 major release, see
12953    <xref linkend="release-8-1">.
12954   </para>
12955
12956   <sect2>
12957    <title>Migration to Version 8.1.9</title>
12958
12959    <para>
12960     A dump/restore is not required for those running 8.1.X.
12961     However, if you are upgrading from a version earlier than 8.1.2,
12962     see the release notes for 8.1.2.
12963    </para>
12964
12965   </sect2>
12966
12967   <sect2>
12968    <title>Changes</title>
12969
12970    <itemizedlist>
12971
12972     <listitem>
12973     <para>
12974      Support explicit placement of the temporary-table schema within
12975      <varname>search_path</>, and disable searching it for functions
12976      and operators (Tom)
12977     </para>
12978     <para>
12979      This is needed to allow a security-definer function to set a
12980      truly secure value of <varname>search_path</>.  Without it,
12981      an unprivileged SQL user can use temporary objects to execute code
12982      with the privileges of the security-definer function (CVE-2007-2138).
12983      See <command>CREATE FUNCTION</> for more information.
12984     </para>
12985     </listitem>
12986
12987     <listitem>
12988     <para>
12989      <filename>/contrib/tsearch2</> crash fixes (Teodor)
12990     </para>
12991     </listitem>
12992
12993     <listitem>
12994     <para>
12995      Require <command>COMMIT PREPARED</> to be executed in the same
12996      database as the transaction was prepared in (Heikki)
12997     </para>
12998     </listitem>
12999
13000     <listitem>
13001     <para>
13002      Fix potential-data-corruption bug in how <command>VACUUM FULL</> handles
13003      <command>UPDATE</> chains (Tom, Pavan Deolasee)
13004     </para>
13005     </listitem>
13006
13007     <listitem>
13008     <para>
13009      Planner fixes, including improving outer join and bitmap scan
13010      selection logic (Tom)
13011     </para>
13012     </listitem>
13013
13014     <listitem>
13015     <para>
13016      Fix PANIC during enlargement of a hash index (bug introduced in 8.1.6)
13017      (Tom)
13018     </para>
13019     </listitem>
13020
13021     <listitem>
13022     <para>
13023      Fix POSIX-style timezone specs to follow new USA DST rules (Tom)
13024     </para>
13025     </listitem>
13026
13027    </itemizedlist>
13028
13029   </sect2>
13030  </sect1>
13031
13032  <sect1 id="release-8-1-8">
13033   <title>Release 8.1.8</title>
13034
13035   <note>
13036   <title>Release date</title>
13037   <simpara>2007-02-07</simpara>
13038   </note>
13039
13040   <para>
13041    This release contains one fix from 8.1.7.
13042    For information about new features in the 8.1 major release, see
13043    <xref linkend="release-8-1">.
13044   </para>
13045
13046   <sect2>
13047    <title>Migration to Version 8.1.8</title>
13048
13049    <para>
13050     A dump/restore is not required for those running 8.1.X.
13051     However, if you are upgrading from a version earlier than 8.1.2,
13052     see the release notes for 8.1.2.
13053    </para>
13054
13055   </sect2>
13056
13057   <sect2>
13058    <title>Changes</title>
13059
13060    <itemizedlist>
13061
13062     <listitem>
13063     <para>
13064      Remove overly-restrictive check for type length in constraints and
13065      functional indexes(Tom)
13066     </para>
13067     </listitem>
13068
13069    </itemizedlist>
13070
13071   </sect2>
13072  </sect1>
13073
13074  <sect1 id="release-8-1-7">
13075   <title>Release 8.1.7</title>
13076
13077   <note>
13078   <title>Release date</title>
13079   <simpara>2007-02-05</simpara>
13080   </note>
13081
13082   <para>
13083    This release contains a variety of fixes from 8.1.6, including
13084    a security fix.
13085    For information about new features in the 8.1 major release, see
13086    <xref linkend="release-8-1">.
13087   </para>
13088
13089   <sect2>
13090    <title>Migration to Version 8.1.7</title>
13091
13092    <para>
13093     A dump/restore is not required for those running 8.1.X.
13094     However, if you are upgrading from a version earlier than 8.1.2,
13095     see the release notes for 8.1.2.
13096    </para>
13097
13098   </sect2>
13099
13100   <sect2>
13101    <title>Changes</title>
13102
13103    <itemizedlist>
13104
13105     <listitem>
13106     <para>
13107      Remove security vulnerabilities that allowed connected users
13108      to read backend memory (Tom)
13109     </para>
13110     <para>
13111      The vulnerabilities involve suppressing the normal check that a SQL
13112      function returns the data type it's declared to, and changing the
13113      data type of a table column (CVE-2007-0555, CVE-2007-0556).  These
13114      errors can easily be exploited to cause a backend crash, and in
13115      principle might be used to read database content that the user
13116      should not be able to access.
13117     </para>
13118     </listitem>
13119
13120     <listitem>
13121     <para>
13122      Fix rare bug wherein btree index page splits could fail
13123      due to choosing an infeasible split point (Heikki Linnakangas)
13124     </para>
13125     </listitem>
13126
13127     <listitem>
13128     <para>
13129      Improve <command>VACUUM</> performance for databases with many tables (Tom)
13130     </para>
13131     </listitem>
13132
13133     <listitem>
13134     <para>
13135      Fix autovacuum to avoid leaving non-permanent transaction IDs in
13136      non-connectable databases (Alvaro)
13137     </para>
13138
13139     <para>
13140      This bug affects the 8.1 branch only.
13141     </para>
13142     </listitem>
13143
13144     <listitem>
13145     <para>
13146      Fix for rare Assert() crash triggered by <literal>UNION</> (Tom)
13147     </para>
13148     </listitem>
13149
13150     <listitem>
13151     <para>
13152      Tighten security of multi-byte character processing for UTF8 sequences
13153      over three bytes long (Tom)
13154     </para>
13155     </listitem>
13156
13157     <listitem>
13158     <para>
13159      Fix bogus <quote>permission denied</> failures occurring on Windows
13160      due to attempts to fsync already-deleted files (Magnus, Tom)
13161     </para>
13162     </listitem>
13163
13164     <listitem>
13165     <para>
13166      Fix possible crashes when an already-in-use PL/pgSQL function is
13167      updated (Tom)
13168     </para>
13169     </listitem>
13170
13171    </itemizedlist>
13172
13173   </sect2>
13174  </sect1>
13175
13176  <sect1 id="release-8-1-6">
13177   <title>Release 8.1.6</title>
13178
13179   <note>
13180   <title>Release date</title>
13181   <simpara>2007-01-08</simpara>
13182   </note>
13183
13184   <para>
13185    This release contains a variety of fixes from 8.1.5.
13186    For information about new features in the 8.1 major release, see
13187    <xref linkend="release-8-1">.
13188   </para>
13189
13190   <sect2>
13191    <title>Migration to Version 8.1.6</title>
13192
13193    <para>
13194     A dump/restore is not required for those running 8.1.X.
13195     However, if you are upgrading from a version earlier than 8.1.2,
13196     see the release notes for 8.1.2.
13197    </para>
13198
13199   </sect2>
13200
13201   <sect2>
13202    <title>Changes</title>
13203
13204    <itemizedlist>
13205
13206     <listitem>
13207      <para>
13208       Improve handling of <function>getaddrinfo()</> on AIX (Tom)
13209      </para>
13210
13211      <para>
13212       This fixes a problem with starting the statistics collector,
13213       among other things.
13214      </para>
13215     </listitem>
13216
13217     <listitem>
13218      <para>
13219       Fix <application>pg_restore</> to handle a tar-format backup
13220       that contains large objects (blobs) with comments (Tom)
13221      </para>
13222     </listitem>
13223
13224      <listitem>
13225       <para>
13226        Fix <quote>failed to re-find parent key</> errors in
13227        <command>VACUUM</> (Tom)
13228       </para>
13229      </listitem>
13230
13231      <listitem>
13232       <para>
13233        Clean out <filename>pg_internal.init</> cache files during server
13234        restart (Simon)
13235       </para>
13236
13237       <para>
13238        This avoids a hazard that the cache files might contain stale
13239        data after PITR recovery.
13240       </para>
13241      </listitem>
13242
13243      <listitem>
13244       <para>
13245        Fix race condition for truncation of a large relation across a
13246        gigabyte boundary by <command>VACUUM</> (Tom)
13247       </para>
13248      </listitem>
13249
13250      <listitem>
13251       <para>
13252        Fix bug causing needless deadlock errors on row-level locks (Tom)
13253       </para>
13254      </listitem>
13255
13256      <listitem>
13257       <para>
13258        Fix bugs affecting multi-gigabyte hash indexes (Tom)
13259       </para>
13260      </listitem>
13261
13262     <listitem>
13263      <para>
13264       Fix possible deadlock in Windows signal handling (Teodor)
13265      </para>
13266     </listitem>
13267
13268     <listitem>
13269      <para>
13270       Fix error when constructing an <literal>ARRAY[]</> made up of multiple
13271       empty elements (Tom)
13272      </para>
13273     </listitem>
13274
13275     <listitem>
13276      <para>
13277       Fix ecpg memory leak during connection (Michael)
13278      </para>
13279     </listitem>
13280
13281     <listitem>
13282      <para>
13283       Fix for Darwin (OS X) compilation (Tom)
13284      </para>
13285     </listitem>
13286
13287     <listitem>
13288      <para>
13289       <function>to_number()</> and <function>to_char(numeric)</>
13290       are now <literal>STABLE</>, not <literal>IMMUTABLE</>, for
13291       new <application>initdb</> installs (Tom)
13292      </para>
13293
13294      <para>
13295       This is because <varname>lc_numeric</> can potentially
13296       change the output of these functions.
13297      </para>
13298     </listitem>
13299
13300     <listitem>
13301      <para>
13302       Improve index usage of regular expressions that use parentheses (Tom)
13303      </para>
13304
13305      <para>
13306       This improves <application>psql</> <literal>\d</> performance also.
13307      </para>
13308     </listitem>
13309
13310     <listitem>
13311      <para>
13312       Update timezone database
13313      </para>
13314
13315      <para>
13316       This affects Australian and Canadian daylight-savings rules in
13317       particular.
13318      </para>
13319     </listitem>
13320
13321    </itemizedlist>
13322
13323   </sect2>
13324  </sect1>
13325
13326  <sect1 id="release-8-1-5">
13327   <title>Release 8.1.5</title>
13328
13329   <note>
13330   <title>Release date</title>
13331   <simpara>2006-10-16</simpara>
13332   </note>
13333
13334   <para>
13335    This release contains a variety of fixes from 8.1.4.
13336    For information about new features in the 8.1 major release, see
13337    <xref linkend="release-8-1">.
13338   </para>
13339
13340   <sect2>
13341    <title>Migration to Version 8.1.5</title>
13342
13343    <para>
13344     A dump/restore is not required for those running 8.1.X.
13345     However, if you are upgrading from a version earlier than 8.1.2,
13346     see the release notes for 8.1.2.
13347    </para>
13348
13349   </sect2>
13350
13351   <sect2>
13352    <title>Changes</title>
13353
13354 <itemizedlist>
13355 <listitem><para>Disallow aggregate functions in <command>UPDATE</>
13356 commands, except within sub-SELECTs (Tom)</para>
13357 <para>The behavior of such an aggregate was unpredictable, and in 8.1.X
13358 could cause a crash, so it has been disabled.  The SQL standard does not allow
13359 this either.</para></listitem>
13360 <listitem><para>Fix core dump when an untyped literal is taken as
13361 ANYARRAY</para></listitem>
13362 <listitem><para>Fix core dump in duration logging for extended query protocol
13363 when a <command>COMMIT</> or <command>ROLLBACK</> is
13364 executed</para></listitem>
13365 <listitem><para>Fix mishandling of AFTER triggers when query contains a SQL
13366 function returning multiple rows (Tom)</para></listitem>
13367 <listitem><para>Fix <command>ALTER TABLE ... TYPE</> to recheck
13368 <literal>NOT NULL</> for <literal>USING</> clause (Tom)</para></listitem>
13369 <listitem><para>Fix <function>string_to_array()</> to handle overlapping
13370  matches for the separator string</para>
13371 <para>For example, <literal>string_to_array('123xx456xxx789', 'xx')</>.
13372 </para></listitem>
13373 <listitem><para>Fix <function>to_timestamp()</> for
13374 <literal>AM</>/<literal>PM</> formats (Bruce)</para></listitem>
13375 <listitem><para>Fix autovacuum's calculation that decides whether
13376  <command>ANALYZE</> is needed (Alvaro)</para></listitem>
13377 <listitem><para>Fix corner cases in pattern matching for
13378  <application>psql</>'s <literal>\d</> commands</para></listitem>
13379 <listitem><para>Fix index-corrupting bugs in /contrib/ltree
13380  (Teodor)</para></listitem>
13381 <listitem><para>Numerous robustness fixes in <application>ecpg</> (Joachim
13382 Wieland)</para></listitem>
13383 <listitem><para>Fix backslash escaping in /contrib/dbmirror</para></listitem>
13384 <listitem><para>Minor fixes in /contrib/dblink and /contrib/tsearch2</para>
13385 </listitem>
13386 <listitem><para>Efficiency improvements in hash tables and bitmap index scans
13387 (Tom)</para></listitem>
13388 <listitem><para>Fix instability of statistics collection on Windows (Tom, Andrew)</para></listitem>
13389 <listitem><para>Fix <varname>statement_timeout</> to use the proper
13390 units on Win32 (Bruce)</para>
13391 <para>In previous Win32 8.1.X versions, the delay was off by a factor of
13392 100.</para></listitem>
13393 <listitem><para>Fixes for <acronym>MSVC</> and <productname>Borland C++</>
13394 compilers (Hiroshi Saito)</para></listitem>
13395 <listitem><para>Fixes for <systemitem class="osname">AIX</> and
13396 <productname>Intel</> compilers (Tom)</para></listitem>
13397 <listitem><para>Fix rare bug in continuous archiving (Tom)</para></listitem>
13398 </itemizedlist>
13399
13400   </sect2>
13401  </sect1>
13402
13403  <sect1 id="release-8-1-4">
13404   <title>Release 8.1.4</title>
13405
13406   <note>
13407   <title>Release date</title>
13408   <simpara>2006-05-23</simpara>
13409   </note>
13410
13411   <para>
13412    This release contains a variety of fixes from 8.1.3,
13413    including patches for extremely serious security issues.
13414    For information about new features in the 8.1 major release, see
13415    <xref linkend="release-8-1">.
13416   </para>
13417
13418   <sect2>
13419    <title>Migration to Version 8.1.4</title>
13420
13421    <para>
13422     A dump/restore is not required for those running 8.1.X.
13423     However, if you are upgrading from a version earlier than 8.1.2,
13424     see the release notes for 8.1.2.
13425    </para>
13426
13427    <para>
13428     Full security against the SQL-injection attacks described in
13429     CVE-2006-2313 and CVE-2006-2314 might require changes in application
13430     code.  If you have applications that embed untrustworthy strings
13431     into SQL commands, you should examine them as soon as possible to
13432     ensure that they are using recommended escaping techniques.  In
13433     most cases, applications should be using subroutines provided by
13434     libraries or drivers (such as <application>libpq</>'s
13435     <function>PQescapeStringConn()</>) to perform string escaping,
13436     rather than relying on <foreignphrase>ad hoc</> code to do it.
13437    </para>
13438   </sect2>
13439
13440   <sect2>
13441    <title>Changes</title>
13442
13443 <itemizedlist>
13444 <listitem><para>Change the server to reject invalidly-encoded multibyte
13445 characters in all cases (Tatsuo, Tom)</para>
13446 <para>While <productname>PostgreSQL</> has been moving in this direction for
13447 some time, the checks are now applied uniformly to all encodings and all
13448 textual input, and are now always errors not merely warnings.  This change
13449 defends against SQL-injection attacks of the type described in CVE-2006-2313.
13450 </para></listitem>
13451
13452 <listitem><para>Reject unsafe uses of <literal>\'</> in string literals</para>
13453 <para>As a server-side defense against SQL-injection attacks of the type
13454 described in CVE-2006-2314, the server now only accepts <literal>''</> and not
13455 <literal>\'</> as a representation of ASCII single quote in SQL string
13456 literals.  By default, <literal>\'</> is rejected only when
13457 <varname>client_encoding</> is set to a client-only encoding (SJIS, BIG5, GBK,
13458 GB18030, or UHC), which is the scenario in which SQL injection is possible.
13459 A new configuration parameter <varname>backslash_quote</> is available to
13460 adjust this behavior when needed.  Note that full security against
13461 CVE-2006-2314 might require client-side changes; the purpose of
13462 <varname>backslash_quote</> is in part to make it obvious that insecure
13463 clients are insecure.
13464 </para></listitem>
13465
13466 <listitem><para>Modify <application>libpq</>'s string-escaping routines to be
13467 aware of encoding considerations and
13468 <varname>standard_conforming_strings</></para>
13469 <para>This fixes <application>libpq</>-using applications for the security
13470 issues described in CVE-2006-2313 and CVE-2006-2314, and also future-proofs
13471 them against the planned changeover to SQL-standard string literal syntax.
13472 Applications that use multiple <productname>PostgreSQL</> connections
13473 concurrently should migrate to <function>PQescapeStringConn()</> and
13474 <function>PQescapeByteaConn()</> to ensure that escaping is done correctly
13475 for the settings in use in each database connection.  Applications that
13476 do string escaping <quote>by hand</> should be modified to rely on library
13477 routines instead.
13478 </para></listitem>
13479
13480 <listitem><para>Fix weak key selection in pgcrypto (Marko Kreen)</para>
13481 <para>Errors in fortuna PRNG reseeding logic could cause a predictable
13482 session key to be selected by <function>pgp_sym_encrypt()</> in some cases.
13483 This only affects non-OpenSSL-using builds.
13484 </para></listitem>
13485
13486 <listitem><para>Fix some incorrect encoding conversion functions</para>
13487 <para><function>win1251_to_iso</>, <function>win866_to_iso</>,
13488 <function>euc_tw_to_big5</>, <function>euc_tw_to_mic</>,
13489 <function>mic_to_euc_tw</> were all broken to varying
13490 extents.
13491 </para></listitem>
13492
13493 <listitem><para>Clean up stray remaining uses of <literal>\'</> in strings
13494 (Bruce, Jan)</para></listitem>
13495
13496 <listitem><para>Make autovacuum visible in <structname>pg_stat_activity</>
13497 (Alvaro)</para></listitem>
13498
13499 <listitem><para>Disable <literal>full_page_writes</> (Tom)</para>
13500 <para>In certain cases, having <literal>full_page_writes</> off would cause
13501 crash recovery to fail.  A proper fix will appear in 8.2; for now it's just
13502 disabled.
13503 </para></listitem>
13504
13505 <listitem><para>Various planner fixes, particularly for bitmap index scans and
13506 MIN/MAX optimization (Tom)</para></listitem>
13507
13508 <listitem><para>Fix incorrect optimization in merge join (Tom)</para>
13509 <para>Outer joins could sometimes emit multiple copies of unmatched rows.
13510 </para></listitem>
13511
13512 <listitem><para>Fix crash from using and modifying a plpgsql function in the
13513 same transaction</para></listitem>
13514
13515 <listitem><para>Fix WAL replay for case where a B-Tree index has been
13516 truncated</para></listitem>
13517
13518 <listitem><para>Fix <literal>SIMILAR TO</> for patterns involving
13519 <literal>|</> (Tom)</para></listitem>
13520
13521 <listitem><para>Fix <command>SELECT INTO</> and <command>CREATE TABLE AS</> to
13522 create tables in the default tablespace, not the base directory (Kris
13523 Jurka)</para></listitem>
13524
13525 <listitem><para>Fix server to use custom DH SSL parameters correctly (Michael
13526 Fuhr)</para></listitem>
13527
13528 <listitem><para>Improve qsort performance (Dann Corbit)</para>
13529 <para>Currently this code is only used on Solaris.
13530 </para></listitem>
13531
13532 <listitem><para>Fix for OS/X Bonjour on x86 systems (Ashley Clark)</para></listitem>
13533
13534 <listitem><para>Fix various minor memory leaks</para></listitem>
13535
13536 <listitem><para>Fix problem with password prompting on some Win32 systems
13537 (Robert Kinberg)</para></listitem>
13538
13539 <listitem><para>Improve <application>pg_dump</>'s handling of default values
13540 for domains</para></listitem>
13541
13542 <listitem><para>Fix <application>pg_dumpall</> to handle identically-named
13543 users and groups reasonably (only possible when dumping from a pre-8.1 server)
13544 (Tom)</para>
13545 <para>The user and group will be merged into a single role with
13546 <literal>LOGIN</> permission.  Formerly the merged role wouldn't have
13547 <literal>LOGIN</> permission, making it unusable as a user.
13548 </para></listitem>
13549
13550 <listitem><para>Fix <application>pg_restore</> <literal>-n</> to work as
13551 documented (Tom)</para></listitem>
13552 </itemizedlist>
13553
13554   </sect2>
13555  </sect1>
13556
13557  <sect1 id="release-8-1-3">
13558   <title>Release 8.1.3</title>
13559
13560   <note>
13561   <title>Release date</title>
13562   <simpara>2006-02-14</simpara>
13563   </note>
13564
13565   <para>
13566    This release contains a variety of fixes from 8.1.2,
13567    including one very serious security issue.
13568    For information about new features in the 8.1 major release, see
13569    <xref linkend="release-8-1">.
13570   </para>
13571
13572   <sect2>
13573    <title>Migration to Version 8.1.3</title>
13574
13575    <para>
13576     A dump/restore is not required for those running 8.1.X.
13577     However, if you are upgrading from a version earlier than 8.1.2,
13578     see the release notes for 8.1.2.
13579    </para>
13580   </sect2>
13581
13582   <sect2>
13583    <title>Changes</title>
13584
13585 <itemizedlist>
13586
13587 <listitem><para>Fix bug that allowed any logged-in user to <command>SET
13588 ROLE</> to any other database user id (CVE-2006-0553)</para>
13589 <para>Due to inadequate validity checking, a user could exploit the special
13590 case that <command>SET ROLE</> normally uses to restore the previous role
13591 setting after an error.  This allowed ordinary users to acquire superuser
13592 status, for example.
13593 The escalation-of-privilege risk exists only in 8.1.0-8.1.2.
13594 However, in all releases back to 7.3 there is a related bug in <command>SET
13595 SESSION AUTHORIZATION</> that allows unprivileged users to crash the server,
13596 if it has been compiled with Asserts enabled (which is not the default).
13597 Thanks to Akio Ishida for reporting this problem.
13598 </para></listitem>
13599
13600 <listitem><para>Fix bug with row visibility logic in self-inserted
13601 rows (Tom)</para>
13602 <para>Under rare circumstances a row inserted by the current command
13603 could be seen as already valid, when it should not be.  Repairs bug
13604 created in 8.0.4, 7.4.9, and 7.3.11 releases.
13605 </para></listitem>
13606
13607 <listitem><para>Fix race condition that could lead to <quote>file already
13608 exists</> errors during pg_clog and pg_subtrans file creation
13609 (Tom)</para></listitem>
13610
13611 <listitem><para>Fix cases that could lead to crashes if a cache-invalidation
13612 message arrives at just the wrong time (Tom)</para></listitem>
13613
13614 <listitem><para>Properly check <literal>DOMAIN</> constraints for
13615 <literal>UNKNOWN</> parameters in prepared statements
13616 (Neil)</para></listitem>
13617
13618 <listitem><para>Ensure <command>ALTER COLUMN TYPE</> will process
13619 <literal>FOREIGN KEY</>, <literal>UNIQUE</>, and <literal>PRIMARY KEY</>
13620 constraints in the proper order (Nakano Yoshihisa)</para></listitem>
13621
13622 <listitem><para>Fixes to allow restoring dumps that have cross-schema
13623 references to custom operators or operator classes (Tom)</para></listitem>
13624
13625 <listitem><para>Allow <application>pg_restore</> to continue properly after a
13626 <command>COPY</> failure; formerly it tried to treat the remaining
13627 <command>COPY</> data as SQL commands (Stephen Frost)</para></listitem>
13628
13629 <listitem><para>Fix <application>pg_ctl</> <literal>unregister</> crash
13630 when the  data directory is not specified (Magnus)</para></listitem>
13631
13632 <listitem><para>Fix <application>libpq</> <function>PQprint</> HTML tags
13633 (Christoph Zwerschke)</para></listitem>
13634
13635 <listitem><para>Fix <application>ecpg</> crash on AMD64 and PPC
13636 (Neil)</para></listitem>
13637
13638 <listitem><para>Allow <literal>SETOF</> and <literal>%TYPE</> to be used
13639 together in function result type declarations</para></listitem>
13640
13641 <listitem><para>Recover properly if error occurs during argument passing
13642 in <application>PL/python</> (Neil)</para></listitem>
13643
13644 <listitem><para>Fix memory leak in <function>plperl_return_next</>
13645 (Neil)</para></listitem>
13646
13647 <listitem><para>Fix <application>PL/perl</>'s handling of locales on
13648 Win32 to match the backend (Andrew)</para></listitem>
13649
13650 <listitem><para>Various optimizer fixes (Tom)</para></listitem>
13651
13652 <listitem><para>Fix crash when <literal>log_min_messages</> is set to
13653 <literal>DEBUG3</> or above in <filename>postgresql.conf</> on Win32
13654 (Bruce)</para></listitem>
13655
13656 <listitem><para>Fix <application>pgxs</> <literal>-L</> library path
13657 specification for Win32, Cygwin, OS X, AIX (Bruce)</para></listitem>
13658
13659 <listitem><para>Check that SID is enabled while checking for Win32 admin
13660 privileges (Magnus)</para></listitem>
13661
13662 <listitem><para>Properly reject out-of-range date inputs (Kris
13663 Jurka)</para></listitem>
13664
13665 <listitem><para>Portability fix for testing presence of <function>finite</>
13666 and <function>isinf</> during configure (Tom)</para></listitem>
13667
13668 <listitem><para>Improve speed of <command>COPY IN</> via libpq, by
13669 avoiding a kernel call per data line (Alon Goldshuv)</para></listitem>
13670
13671 <listitem><para>Improve speed of <filename>/contrib/tsearch2</> index
13672 creation (Tom)</para></listitem>
13673
13674 </itemizedlist>
13675
13676   </sect2>
13677  </sect1>
13678
13679  <sect1 id="release-8-1-2">
13680   <title>Release 8.1.2</title>
13681
13682   <note>
13683   <title>Release date</title>
13684   <simpara>2006-01-09</simpara>
13685   </note>
13686
13687   <para>
13688    This release contains a variety of fixes from 8.1.1.
13689    For information about new features in the 8.1 major release, see
13690    <xref linkend="release-8-1">.
13691   </para>
13692
13693   <sect2>
13694    <title>Migration to Version 8.1.2</title>
13695
13696    <para>
13697     A dump/restore is not required for those running 8.1.X.
13698     However, you might need to <command>REINDEX</> indexes on textual
13699     columns after updating, if you are affected by the locale or
13700     <application>plperl</> issues described below.
13701    </para>
13702   </sect2>
13703
13704   <sect2>
13705    <title>Changes</title>
13706
13707 <itemizedlist>
13708
13709 <listitem><para>Fix Windows code so that postmaster will continue rather
13710 than exit if there is no more room in ShmemBackendArray (Magnus)</para>
13711 <para>The previous behavior could lead to a denial-of-service situation if too
13712 many connection requests arrive close together.  This applies
13713 <emphasis>only</> to the Windows port.</para></listitem>
13714
13715 <listitem><para>Fix bug introduced in 8.0 that could allow ReadBuffer
13716 to return an already-used page as new, potentially causing loss of
13717 recently-committed data (Tom)</para></listitem>
13718
13719 <listitem><para>Fix for protocol-level Describe messages issued
13720 outside a transaction or in a failed transaction (Tom)</para></listitem>
13721
13722 <listitem><para>Fix character string comparison for locales that consider
13723 different character combinations as equal, such as Hungarian (Tom)</para>
13724 <para>This might require <command>REINDEX</> to fix existing indexes on
13725 textual columns.</para></listitem>
13726
13727 <listitem><para>Set locale environment variables during postmaster startup
13728 to ensure that <application>plperl</> won't change the locale later</para>
13729 <para>This fixes a problem that occurred if the <application>postmaster</> was
13730 started with environment variables specifying a different locale than what
13731 <application>initdb</> had been told.  Under these conditions, any use of
13732 <application>plperl</> was likely to lead to corrupt indexes.  You might need
13733 <command>REINDEX</> to fix existing indexes on
13734 textual columns if this has happened to you.</para></listitem>
13735
13736 <listitem><para>Allow more flexible relocation of installation
13737 directories (Tom)</para>
13738 <para>Previous releases supported relocation only if all installation
13739 directory paths were the same except for the last component.</para></listitem>
13740
13741 <listitem><para>Prevent crashes caused by the use of
13742 <literal>ISO-8859-5</> and <literal>ISO-8859-9</> encodings
13743 (Tatsuo)</para></listitem>
13744
13745 <listitem><para>Fix longstanding bug in strpos() and regular expression
13746 handling in certain rarely used Asian multi-byte character sets (Tatsuo)
13747 </para></listitem>
13748
13749 <listitem><para>Fix bug where COPY CSV mode considered any
13750 <literal>\.</> to terminate the copy data</para> <para>The new code
13751 requires <literal>\.</> to appear alone on a line, as per
13752 documentation.</para></listitem>
13753
13754 <listitem><para>Make COPY CSV mode quote a literal data value of
13755 <literal>\.</> to ensure it cannot be interpreted as the
13756 end-of-data marker (Bruce)</para></listitem>
13757
13758 <listitem><para>Various fixes for functions returning <literal>RECORD</>s
13759 (Tom) </para></listitem>
13760
13761 <listitem><para>Fix processing of <filename>postgresql.conf</> so a
13762 final line with no newline is processed properly (Tom)
13763 </para></listitem>
13764
13765 <listitem><para>Fix bug in <filename>/contrib/pgcrypto</> gen_salt,
13766 which caused it not to use all available salt space for MD5 and
13767 XDES algorithms (Marko Kreen, Solar Designer)</para>
13768 <para>Salts for Blowfish and standard DES are unaffected.</para></listitem>
13769
13770 <listitem><para>Fix autovacuum crash when processing expression indexes
13771 </para></listitem>
13772
13773 <listitem><para>Fix <filename>/contrib/dblink</> to throw an error,
13774 rather than crashing, when the number of columns specified is different from
13775 what's actually returned by the query (Joe)</para></listitem>
13776
13777 </itemizedlist>
13778
13779   </sect2>
13780  </sect1>
13781
13782  <sect1 id="release-8-1-1">
13783   <title>Release 8.1.1</title>
13784
13785   <note>
13786   <title>Release date</title>
13787   <simpara>2005-12-12</simpara>
13788   </note>
13789
13790   <para>
13791    This release contains a variety of fixes from 8.1.0.
13792    For information about new features in the 8.1 major release, see
13793    <xref linkend="release-8-1">.
13794   </para>
13795
13796   <sect2>
13797    <title>Migration to Version 8.1.1</title>
13798
13799    <para>
13800     A dump/restore is not required for those running 8.1.X.
13801    </para>
13802   </sect2>
13803
13804   <sect2>
13805    <title>Changes</title>
13806
13807 <itemizedlist>
13808 <listitem><para>Fix incorrect optimizations of outer-join conditions
13809 (Tom)</para></listitem>
13810
13811 <listitem><para>Fix problems with wrong reported column names in cases
13812 involving sub-selects flattened by the optimizer (Tom)</para></listitem>
13813
13814 <listitem><para>Fix update failures in scenarios involving CHECK constraints,
13815 toasted columns, <emphasis>and</> indexes (Tom)</para></listitem>
13816
13817 <listitem><para>Fix bgwriter problems after recovering from errors
13818 (Tom)</para>
13819 <para>
13820 The background writer was found to leak buffer pins after write errors.
13821 While not fatal in itself, this might lead to mysterious blockages of
13822 later VACUUM commands.
13823 </para>
13824 </listitem>
13825
13826 <listitem><para>Prevent failure if client sends Bind protocol message
13827 when current transaction is already aborted</para></listitem>
13828
13829 <listitem><para><filename>/contrib/tsearch2</> and <filename>/contrib/ltree</>
13830 fixes (Teodor)</para></listitem>
13831
13832 <listitem><para>Fix problems with translated error messages in
13833 languages that require word reordering, such as Turkish; also problems with
13834 unexpected truncation of output strings and wrong display of the smallest
13835 possible bigint value (Andrew, Tom)</para>
13836 <para>
13837 These problems only appeared on platforms that were using our
13838 <filename>port/snprintf.c</> code, which includes BSD variants if
13839 <literal>--enable-nls</> was given, and perhaps others.  In addition,
13840 a different form of the translated-error-message problem could appear
13841 on Windows depending on which version of <filename>libintl</> was used.
13842 </para></listitem>
13843
13844 <listitem><para>Re-allow <literal>AM</>/<literal>PM</>, <literal>HH</>,
13845 <literal>HH12</>, and <literal>D</> format specifiers for
13846 <function>to_char(time)</> and <function>to_char(interval)</>.
13847 (<function>to_char(interval)</> should probably use
13848 <literal>HH24</>.) (Bruce)</para></listitem>
13849
13850 <listitem><para>AIX, HPUX, and MSVC compile fixes (Tom, Hiroshi
13851 Saito)</para></listitem>
13852
13853 <listitem><para>Optimizer improvements (Tom)</para></listitem>
13854
13855 <listitem><para>Retry file reads and writes after Windows
13856 NO_SYSTEM_RESOURCES error (Qingqing Zhou)</para></listitem>
13857
13858 <listitem><para>Prevent <application>autovacuum</> from crashing during
13859 ANALYZE of expression index (Alvaro)</para></listitem>
13860
13861 <listitem><para>Fix problems with ON COMMIT DELETE ROWS temp
13862 tables</para></listitem>
13863
13864 <listitem><para>Fix problems when a trigger alters the output of a SELECT
13865 DISTINCT query</para></listitem>
13866
13867 <listitem><para>Add 8.1.0 release note item on how to migrate invalid
13868 <literal>UTF-8</> byte sequences (Paul Lindner)</para></listitem>
13869 </itemizedlist>
13870
13871   </sect2>
13872  </sect1>
13873
13874  <sect1 id="release-8-1">
13875   <title>Release 8.1</title>
13876
13877   <note>
13878    <title>Release date</title>
13879    <simpara>2005-11-08</simpara>
13880   </note>
13881
13882   <sect2>
13883    <title>Overview</title>
13884
13885    <para>
13886     Major changes in this release:
13887    </para>
13888
13889    <variablelist>
13890
13891     <varlistentry>
13892      <term>
13893       Improve concurrent access to the shared buffer cache (Tom)
13894      </term>
13895
13896      <listitem>
13897       <para>
13898        Access to the shared buffer cache was identified as a
13899        significant scalability problem, particularly on multi-CPU
13900        systems. In this release, the way that locking is done in the
13901        buffer manager has been overhauled to reduce lock contention
13902        and improve scalability. The buffer manager has also been
13903        changed to use a <quote>clock sweep</quote> replacement
13904        policy.
13905       </para>
13906      </listitem>
13907     </varlistentry>
13908
13909     <varlistentry>
13910      <term>
13911       Allow index scans to use an intermediate in-memory bitmap (Tom)
13912      </term>
13913
13914      <listitem>
13915       <para>
13916        In previous releases, only a single index could be used to do
13917        lookups on a table. With this feature, if a query has
13918        <command>WHERE tab.col1 = 4 and tab.col2 = 9</>, and there is
13919        no multicolumn index on <literal>col1</> and <literal>col2</>,
13920        but there is an index on <literal>col1</> and another on
13921        <literal>col2</>, it is possible to search both indexes and
13922        combine the results in memory, then do heap fetches for only
13923        the rows matching both the <literal>col1</> and
13924        <literal>col2</> restrictions. This is very useful in
13925        environments that have a lot of unstructured queries where it
13926        is impossible to create indexes that match all possible access
13927        conditions.  Bitmap scans are useful even with a single index,
13928        as they reduce the amount of random access needed; a bitmap
13929        index scan is efficient for retrieving fairly large fractions
13930        of the complete table, whereas plain index scans are not.
13931       </para>
13932      </listitem>
13933     </varlistentry>
13934
13935     <varlistentry>
13936      <term>
13937       Add two-phase commit (Heikki Linnakangas, Alvaro, Tom)
13938      </term>
13939
13940      <listitem>
13941       <para>
13942        Two-phase commit allows transactions to be "prepared" on several
13943        computers, and once all computers have successfully prepared
13944        their transactions (none failed), all transactions can be
13945        committed. Even if a machine crashes after a prepare, the
13946        prepared transaction can be committed after the machine is
13947        restarted. New syntax includes <command>PREPARE TRANSACTION</> and
13948        <command>COMMIT/ROLLBACK PREPARED</>. A new system view
13949        <literal>pg_prepared_xacts</> has also been added.
13950       </para>
13951      </listitem>
13952     </varlistentry>
13953
13954     <varlistentry>
13955      <term>
13956       Create a new role system that replaces users and groups
13957       (Stephen Frost)
13958      </term>
13959
13960      <listitem>
13961       <para>
13962        Roles are a combination of users and groups. Like users, they
13963        can have login capability, and like groups, a role can have
13964        other roles as members. Roles basically remove the distinction
13965        between users and groups. For example, a role can:
13966       </para>
13967
13968       <itemizedlist>
13969
13970        <listitem>
13971         <para>
13972           Have login capability (optionally)
13973         </para>
13974        </listitem>
13975
13976        <listitem>
13977         <para>
13978          Own objects
13979         </para>
13980        </listitem>
13981
13982        <listitem>
13983         <para>
13984          Hold access permissions for database objects
13985         </para>
13986        </listitem>
13987
13988        <listitem>
13989         <para>
13990          Inherit permissions from other roles it is a member of
13991         </para>
13992        </listitem>
13993
13994       </itemizedlist>
13995       <para>
13996        Once a user logs into a role, she obtains capabilities of
13997        the login role plus any inherited roles, and can use
13998        <command>SET ROLE</> to switch to other roles she is a member of.
13999        This feature is a generalization of the SQL standard's concept of
14000        roles.
14001        This change also replaces <structname>pg_shadow</> and
14002        <structname>pg_group</> by new role-capable catalogs
14003        <structname>pg_authid</> and <structname>pg_auth_members</>. The old
14004        tables are redefined as read-only views on the new role tables.
14005       </para>
14006      </listitem>
14007     </varlistentry>
14008
14009     <varlistentry>
14010      <term>
14011       Automatically use indexes for <function>MIN()</> and
14012       <function>MAX()</> (Tom)
14013      </term>
14014
14015      <listitem>
14016       <para>
14017        In previous releases, the only way to use an index for
14018        <function>MIN()</> or <function>MAX()</> was to rewrite the
14019        query as <command>SELECT col FROM tab ORDER BY col LIMIT 1</>.
14020        Index usage now happens automatically.
14021       </para>
14022      </listitem>
14023     </varlistentry>
14024
14025     <varlistentry>
14026      <term>
14027       Move <filename>/contrib/pg_autovacuum</> into the main server
14028       (Alvaro)
14029      </term>
14030
14031      <listitem>
14032       <para>
14033        Integrating autovacuum into the server allows it to be
14034        automatically started and stopped in sync with the database
14035        server, and allows autovacuum to be configured from
14036        <filename>postgresql.conf</>.
14037       </para>
14038      </listitem>
14039     </varlistentry>
14040
14041     <varlistentry>
14042      <term>
14043       Add shared row level locks using <command>SELECT ... FOR SHARE</>
14044       (Alvaro)
14045      </term>
14046
14047      <listitem>
14048       <para>
14049        While <productname>PostgreSQL</productname>'s MVCC locking
14050        allows <command>SELECT</> to never be blocked by writers and
14051        therefore does not need shared row locks for typical operations,
14052        shared locks are useful for applications that require shared row
14053        locking.  In particular this reduces the locking requirements
14054        imposed by referential integrity checks.
14055       </para>
14056      </listitem>
14057     </varlistentry>
14058
14059     <varlistentry>
14060      <term>
14061       Add dependencies on shared objects, specifically roles
14062       (Alvaro)
14063      </term>
14064
14065      <listitem>
14066       <para>
14067        This extension of the dependency mechanism prevents roles from
14068        being dropped while there are still database objects they own.
14069        Formerly it was possible to accidentally <quote>orphan</> objects by
14070        deleting their owner.  While this could be recovered from, it
14071        was messy and unpleasant.
14072       </para>
14073      </listitem>
14074     </varlistentry>
14075
14076     <varlistentry>
14077      <term>
14078       Improve performance for partitioned tables (Simon)
14079      </term>
14080
14081      <listitem>
14082       <para>
14083        The new <varname>constraint_exclusion</varname> configuration
14084        parameter avoids lookups on child tables where constraints indicate
14085        that no matching rows exist in the child table.
14086       </para>
14087       <para>
14088        This allows for a basic type of table partitioning. If child tables
14089        store separate key ranges and this is enforced using appropriate
14090        <command>CHECK</> constraints, the optimizer will skip child
14091        table accesses when the constraint guarantees no matching rows
14092        exist in the child table.
14093       </para>
14094      </listitem>
14095     </varlistentry>
14096
14097    </variablelist>
14098   </sect2>
14099
14100   <sect2>
14101    <title>Migration to Version 8.1</title>
14102
14103    <para>
14104     A dump/restore using <application>pg_dump</application> is required
14105     for those wishing to migrate data from any previous release.
14106    </para>
14107
14108    <para>
14109     The 8.0 release announced that the <function>to_char()</> function
14110     for intervals would be removed in 8.1. However, since no better API
14111     has been suggested, <function>to_char(interval)</> has been enhanced in
14112     8.1 and will remain in the server.
14113    </para>
14114
14115    <para>
14116     Observe the following incompatibilities:
14117    </para>
14118
14119    <itemizedlist>
14120
14121     <listitem>
14122      <para>
14123       <varname>add_missing_from</> is now false by default (Neil)
14124      </para>
14125      <para>
14126       By default, we now generate an error if a table is used in a query
14127       without a <literal>FROM</> reference.  The old behavior is still
14128       available, but the parameter must be set to 'true' to obtain it.
14129      </para>
14130
14131      <para>
14132       It might be necessary to set <varname>add_missing_from</> to true
14133       in order to load an existing dump file, if the dump contains any
14134       views or rules created using the implicit-<literal>FROM</> syntax.
14135       This should be a one-time annoyance, because
14136       <productname>PostgreSQL</productname> 8.1 will convert
14137       such views and rules to standard explicit-<literal>FROM</> syntax.
14138       Subsequent dumps will therefore not have the problem.
14139      </para>
14140     </listitem>
14141
14142     <listitem>
14143      <para>
14144       Cause input of a zero-length string (<literal>''</literal>) for
14145       <type>float4</type>/<type>float8</type>/<type>oid</type>
14146       to throw an error, rather than treating it as a zero (Neil)
14147      </para>
14148      <para>
14149       This change is consistent with the current handling of
14150       zero-length strings for integers. The schedule for this change
14151       was announced in 8.0.
14152      </para>
14153     </listitem>
14154
14155     <listitem>
14156      <para>
14157       <varname>default_with_oids</> is now false by default (Neil)
14158      </para>
14159      <para>
14160       With this option set to false, user-created tables no longer
14161       have an OID column unless <command>WITH OIDS</> is specified in
14162       <command>CREATE TABLE</>. Though OIDs have existed in all
14163       releases of <productname>PostgreSQL</>, their use is limited
14164       because they are only four bytes long and the counter is shared
14165       across all installed databases. The preferred way of uniquely
14166       identifying rows is via sequences and the <type>SERIAL</> type,
14167       which have been supported since <productname>PostgreSQL</> 6.4.
14168      </para>
14169     </listitem>
14170
14171     <listitem>
14172      <para>
14173       Add <literal>E''</> syntax so eventually ordinary strings can
14174       treat backslashes literally (Bruce)
14175      </para>
14176      <para>
14177       Currently <productname>PostgreSQL</productname> processes a
14178       backslash in a string literal as introducing a special escape sequence,
14179       e.g. <literal>\n</> or <literal>\010</>.
14180       While this allows easy entry of special values, it is
14181       nonstandard and makes porting of applications from other
14182       databases more difficult. For this reason, the
14183       <productname>PostgreSQL</productname> project is planning to
14184       remove the special meaning of backslashes in strings. For
14185       backward compatibility and for users who want special backslash
14186       processing, a new string syntax has been created. This new string
14187       syntax is formed by writing an <literal>E</> immediately preceding the
14188       single quote that starts the string, e.g. <literal>E'hi\n'</>. While
14189       this release does not change the handling of backslashes in strings, it
14190       does add new configuration parameters to help users migrate applications
14191       for future releases:
14192      </para>
14193      <itemizedlist>
14194
14195       <listitem>
14196        <para>
14197         <varname>standard_conforming_strings</> &mdash; does this release
14198         treat backslashes literally in ordinary strings?
14199        </para>
14200       </listitem>
14201
14202       <listitem>
14203       <para>
14204        <varname>escape_string_warning</> &mdash; warn about backslashes in
14205        ordinary (non-E) strings
14206       </para>
14207      </listitem>
14208
14209      </itemizedlist>
14210
14211      <para>
14212       The <varname>standard_conforming_strings</> value is read-only.
14213       Applications can retrieve the value to know how backslashes are
14214       processed.  (Presence of the parameter can also be taken as an
14215       indication that <literal>E''</> string syntax is supported.)
14216       In a future release, <varname>standard_conforming_strings</>
14217       will be true, meaning backslashes will be treated literally in
14218       non-E strings. To prepare for this change, use <literal>E''</>
14219       strings in places that need special backslash processing, and
14220       turn on <varname>escape_string_warning</> to find additional
14221       strings that need to be converted to use <literal>E''</>.
14222       Also, use two single-quotes (<literal>''</>) to embed a literal
14223       single-quote in a string, rather than the
14224       <productname>PostgreSQL</productname>-supported syntax of
14225       backslash single-quote (<literal>\'</>).  The former is
14226       standards-conforming and does not require the use of the
14227       <literal>E''</> string syntax.  You can also use the
14228       <literal>$$</> string syntax, which does not treat backslashes
14229       specially.
14230      </para>
14231     </listitem>
14232
14233     <listitem>
14234      <para>
14235       Make <command>REINDEX DATABASE</> reindex all indexes in the
14236       database (Tom)
14237      </para>
14238      <para>
14239       Formerly, <command>REINDEX DATABASE</> reindexed only
14240       system tables. This new behavior seems more intuitive. A new
14241       command <command>REINDEX SYSTEM</> provides the old functionality
14242       of reindexing just the system tables.
14243      </para>
14244     </listitem>
14245
14246     <listitem>
14247      <para>
14248       Read-only large object descriptors now obey MVCC snapshot semantics
14249      </para>
14250      <para>
14251       When a large object is opened with <literal>INV_READ</> (and not
14252       <literal>INV_WRITE</>), the data read from the descriptor will now
14253       reflect a <quote>snapshot</> of the large object's state at the
14254       time of the transaction snapshot in use by the query that called
14255       <function>lo_open()</>.  To obtain the old behavior of always
14256       returning the latest committed data, include <literal>INV_WRITE</>
14257       in the mode flags for <function>lo_open()</>.
14258      </para>
14259     </listitem>
14260
14261     <listitem>
14262      <para>
14263       Add proper dependencies for arguments of sequence functions (Tom)
14264      </para>
14265      <para>
14266       In previous releases, sequence names passed to <function>nextval()</>,
14267       <function>currval()</>, and <function>setval()</> were stored as
14268       simple text strings, meaning that renaming or dropping a
14269       sequence used in a <literal>DEFAULT</> clause made the clause
14270       invalid. This release stores all newly-created sequence function
14271       arguments as internal OIDs, allowing them to track sequence
14272       renaming, and adding dependency information that prevents
14273       improper sequence removal. It also makes such <literal>DEFAULT</>
14274       clauses immune to schema renaming and search path changes.
14275      </para>
14276      <para>
14277       Some applications might rely on the old behavior of
14278       run-time lookup for sequence names. This can still be done by
14279       explicitly casting the argument to <type>text</>, for example
14280       <literal>nextval('myseq'::text)</>.
14281      </para>
14282      <para>
14283       Pre-8.1 database dumps loaded into 8.1 will use the old text-based
14284       representation and therefore will not have the features of
14285       OID-stored arguments. However, it is possible to update a
14286       database containing text-based <literal>DEFAULT</> clauses.
14287       First, save this query into a file, such as <filename>fixseq.sql</>:
14288 <programlisting>
14289 SELECT  'ALTER TABLE ' ||
14290    pg_catalog.quote_ident(n.nspname) || '.' ||
14291    pg_catalog.quote_ident(c.relname) ||
14292    ' ALTER COLUMN ' || pg_catalog.quote_ident(a.attname) ||
14293    ' SET DEFAULT ' ||
14294    regexp_replace(d.adsrc,
14295                   $$val\(\(('[^']*')::text\)::regclass$$,
14296                   $$val(\1$$,
14297                   'g') ||
14298    ';'
14299 FROM    pg_namespace n, pg_class c, pg_attribute a, pg_attrdef d
14300 WHERE   n.oid = c.relnamespace AND
14301    c.oid = a.attrelid AND
14302    a.attrelid = d.adrelid AND
14303    a.attnum = d.adnum AND
14304    d.adsrc ~ $$val\(\('[^']*'::text\)::regclass$$;
14305 </programlisting>
14306       Next, run the query against a database to find what
14307       adjustments are required, like this for database <literal>db1</>:
14308 <programlisting>
14309 psql -t -f fixseq.sql db1
14310 </programlisting>
14311       This will show the <command>ALTER TABLE</> commands needed to
14312       convert the database to the newer OID-based representation.
14313       If the commands look reasonable, run this to update the database:
14314 <programlisting>
14315 psql -t -f fixseq.sql db1 | psql -e db1
14316 </programlisting>
14317       This process must be repeated in each database to be updated.
14318      </para>
14319     </listitem>
14320
14321     <listitem>
14322      <para>
14323       In <application>psql</application>, treat unquoted
14324       <literal>\{digit}+</> sequences as octal (Bruce)
14325      </para>
14326      <para>
14327       In previous releases, <literal>\{digit}+</> sequences were
14328       treated as decimal, and only <literal>\0{digit}+</> were treated
14329       as octal. This change was made for consistency.
14330      </para>
14331     </listitem>
14332
14333     <listitem>
14334      <para>
14335       Remove grammar productions for prefix and postfix <literal>%</>
14336       and <literal>^</> operators
14337       (Tom)
14338      </para>
14339      <para>
14340       These have never been documented and complicated the use of the
14341       modulus operator (<literal>%</>) with negative numbers.
14342      </para>
14343     </listitem>
14344
14345     <listitem>
14346      <para>
14347       Make <literal>&amp;&lt;</> and <literal>&amp;&gt;</> for polygons
14348       consistent with the box "over" operators (Tom)
14349      </para>
14350     </listitem>
14351
14352     <listitem>
14353      <para>
14354       <command>CREATE LANGUAGE</> can ignore the provided arguments
14355       in favor of information from <structname>pg_pltemplate</>
14356       (Tom)
14357      </para>
14358      <para>
14359       A new system catalog <structname>pg_pltemplate</> has been defined
14360       to carry information about the preferred definitions of procedural
14361       languages (such as whether they have validator functions).  When
14362       an entry exists in this catalog for the language being created,
14363       <command>CREATE LANGUAGE</> will ignore all its parameters except the
14364       language name and instead use the catalog information.  This measure
14365       was taken because of increasing problems with obsolete language
14366       definitions being loaded by old dump files.  As of 8.1,
14367       <application>pg_dump</> will dump procedural language definitions as
14368       just <command>CREATE LANGUAGE <replaceable>name</></command>, relying
14369       on a template entry to exist at load time.  We expect this will be a
14370       more future-proof representation.
14371      </para>
14372     </listitem>
14373
14374     <listitem>
14375      <para>
14376       Make <function>pg_cancel_backend(int)</function> return a
14377       <type>boolean</type> rather than an <type>integer</type> (Neil)
14378      </para>
14379     </listitem>
14380
14381     <listitem>
14382      <para>
14383       Some users are having problems loading UTF-8 data into 8.1.X.
14384       This is because previous versions allowed invalid UTF-8 byte
14385       sequences to be entered into the database, and this release
14386       properly accepts only valid UTF-8 sequences. One way to correct a
14387       dumpfile is to run the command <command>iconv -c -f UTF-8 -t
14388       UTF-8 -o cleanfile.sql dumpfile.sql</>. The <literal>-c</> option
14389       removes invalid character sequences. A diff of the two files will
14390       show the sequences that are invalid. <command>iconv</> reads the
14391       entire input file into memory so it might be necessary to use
14392       <application>split</> to break up the dump into multiple smaller
14393       files for processing.
14394      </para>
14395     </listitem>
14396
14397    </itemizedlist>
14398   </sect2>
14399
14400   <sect2>
14401    <title>Additional Changes</title>
14402
14403    <para>
14404     Below you will find a detailed account of the additional changes
14405     between <productname>PostgreSQL</productname> 8.1 and the
14406     previous major release.
14407    </para>
14408
14409    <sect3>
14410     <title>Performance Improvements</title>
14411     <itemizedlist>
14412
14413      <listitem>
14414       <para>
14415        Improve GiST and R-tree index performance (Neil)
14416       </para>
14417      </listitem>
14418
14419      <listitem>
14420       <para>
14421        Improve the optimizer, including auto-resizing of hash joins
14422        (Tom)
14423       </para>
14424      </listitem>
14425
14426      <listitem>
14427       <para>
14428        Overhaul internal API in several areas
14429       </para>
14430      </listitem>
14431
14432      <listitem>
14433       <para>
14434        Change WAL record CRCs from 64-bit to 32-bit (Tom)
14435       </para>
14436       <para>
14437        We determined that the extra cost of computing 64-bit CRCs was
14438        significant, and the gain in reliability too marginal to justify it.
14439       </para>
14440      </listitem>
14441
14442      <listitem>
14443       <para>
14444        Prevent writing large empty gaps in WAL pages (Tom)
14445       </para>
14446      </listitem>
14447
14448      <listitem>
14449       <para>
14450        Improve spinlock behavior on SMP machines, particularly Opterons (Tom)
14451       </para>
14452      </listitem>
14453
14454      <listitem>
14455       <para>
14456        Allow nonconsecutive index columns to be used in a multicolumn
14457        index (Tom)
14458       </para>
14459       <para>
14460        For example, this allows an index on columns a,b,c to be used in
14461        a query with <command>WHERE a = 4 and c = 10</>.
14462       </para>
14463      </listitem>
14464
14465      <listitem>
14466       <para>
14467        Skip WAL logging for <command>CREATE TABLE AS</> /
14468        <command>SELECT INTO</> (Simon)
14469       </para>
14470       <para>
14471        Since a crash during <command>CREATE TABLE AS</> would cause the
14472        table to be dropped during recovery, there is no reason to WAL
14473        log as the table is loaded.  (Logging still happens if WAL
14474        archiving is enabled, however.)
14475       </para>
14476      </listitem>
14477
14478      <listitem>
14479       <para>
14480        Allow concurrent GiST index access (Teodor, Oleg)
14481       </para>
14482      </listitem>
14483
14484      <listitem>
14485       <para>
14486        Add configuration parameter <varname>full_page_writes</> to
14487        control writing full pages to WAL (Bruce)
14488       </para>
14489       <para>
14490        To prevent partial disk writes from corrupting the database,
14491        <productname>PostgreSQL</productname> writes a complete copy of
14492        each database disk page to WAL the first time it is modified
14493        after a checkpoint. This option turns off that functionality for more
14494        speed.  This is safe to use with battery-backed disk caches where
14495        partial page writes cannot happen.
14496       </para>
14497      </listitem>
14498
14499      <listitem>
14500       <para>
14501        Use <literal>O_DIRECT</> if available when using
14502        <literal>O_SYNC</> for <varname>wal_sync_method</varname>
14503        (Itagaki Takahiro)
14504       </para>
14505       <para>
14506        <literal>O_DIRECT</> causes disk writes to bypass the kernel
14507        cache, and for WAL writes, this improves performance.
14508       </para>
14509      </listitem>
14510
14511      <listitem>
14512       <para>
14513        Improve <command>COPY FROM</> performance (Alon Goldshuv)
14514       </para>
14515       <para>
14516        This was accomplished by reading <command>COPY</> input in
14517        larger chunks, rather than character by character.
14518       </para>
14519      </listitem>
14520
14521      <listitem>
14522       <para>
14523        Improve the performance of <function>COUNT()</function>,
14524        <function>SUM</function>, <function>AVG()</function>,
14525        <function>STDDEV()</function>, and
14526        <function>VARIANCE()</function> (Neil, Tom)
14527       </para>
14528      </listitem>
14529     </itemizedlist>
14530    </sect3>
14531
14532    <sect3>
14533     <title>Server Changes</title>
14534     <itemizedlist>
14535
14536      <listitem>
14537       <para>
14538        Prevent problems due to transaction ID (XID) wraparound (Tom)
14539       </para>
14540       <para>
14541        The server will now warn when the transaction counter approaches
14542        the wraparound point.  If the counter becomes too close to wraparound,
14543        the server will stop accepting queries.  This ensures that data is
14544        not lost before needed vacuuming is performed.
14545       </para>
14546      </listitem>
14547
14548      <listitem>
14549       <para>
14550        Fix problems with object IDs (OIDs) conflicting with existing system
14551        objects after the OID counter has wrapped around (Tom)
14552       </para>
14553      </listitem>
14554
14555      <listitem>
14556       <para>
14557        Add warning about the need to increase
14558        <varname>max_fsm_relations</> and <varname>max_fsm_pages</>
14559        during <command>VACUUM</> (Ron Mayer)
14560       </para>
14561      </listitem>
14562
14563      <listitem>
14564       <para>
14565        Add <varname>temp_buffers</> configuration parameter to allow
14566        users to determine the size of the local buffer area for
14567        temporary table access (Tom)
14568       </para>
14569      </listitem>
14570
14571      <listitem>
14572       <para>
14573        Add session start time and client IP address to
14574        <literal>pg_stat_activity</> (Magnus)
14575       </para>
14576      </listitem>
14577
14578      <listitem>
14579       <para>
14580        Adjust <literal>pg_stat</> views for bitmap scans (Tom)
14581       </para>
14582       <para>
14583        The meanings of some of the fields have changed slightly.
14584       </para>
14585      </listitem>
14586
14587      <listitem>
14588       <para>
14589        Enhance <literal>pg_locks</> view (Tom)
14590       </para>
14591      </listitem>
14592
14593      <listitem>
14594       <para>
14595        Log queries for client-side <command>PREPARE</> and
14596        <command>EXECUTE</> (Simon)
14597       </para>
14598      </listitem>
14599
14600      <listitem>
14601       <para>
14602        Allow Kerberos name and user name case sensitivity to be
14603        specified in <filename>postgresql.conf</> (Magnus)
14604       </para>
14605      </listitem>
14606
14607      <listitem>
14608       <para>
14609        Add configuration parameter <varname>krb_server_hostname</> so
14610        that the server host name can be specified as part of service
14611        principal (Todd Kover)
14612       </para>
14613       <para>
14614        If not set, any service principal matching an entry in the
14615        keytab can be used. This is new Kerberos matching behavior in
14616        this release.
14617       </para>
14618      </listitem>
14619
14620      <listitem>
14621       <para>
14622        Add <varname>log_line_prefix</> options for millisecond
14623        timestamps (<literal>%m</>) and remote host (<literal>%h</>) (Ed
14624        L.)
14625       </para>
14626      </listitem>
14627
14628      <listitem>
14629       <para>
14630        Add WAL logging for GiST indexes (Teodor, Oleg)
14631       </para>
14632       <para>
14633        GiST indexes are now safe for crash and point-in-time recovery.
14634       </para>
14635      </listitem>
14636
14637      <listitem>
14638       <para>
14639        Remove old <filename>*.backup</> files when we do
14640        <function>pg_stop_backup()</> (Bruce)
14641       </para>
14642       <para>
14643        This prevents a large number of <filename>*.backup</> files from
14644        existing in <filename>pg_xlog/</>.
14645       </para>
14646      </listitem>
14647
14648      <listitem>
14649       <para>
14650        Add configuration parameters to control TCP/IP keep-alive
14651        times for idle, interval, and count (Oliver Jowett)
14652       </para>
14653
14654       <para>
14655        These values can be changed to allow more rapid detection of
14656        lost client connections.
14657       </para>
14658      </listitem>
14659
14660      <listitem>
14661       <para>
14662        Add per-user and per-database connection limits (Petr Jelinek)
14663       </para>
14664       <para>
14665        Using <command>ALTER USER</> and <command>ALTER DATABASE</>,
14666        limits can now be enforced on the maximum number of sessions that
14667        can concurrently connect as a specific user or to a specific database.
14668        Setting the limit to zero disables user or database connections.
14669       </para>
14670      </listitem>
14671
14672      <listitem>
14673       <para>
14674        Allow more than two gigabytes of shared memory and per-backend
14675        work memory on 64-bit machines (Koichi Suzuki)
14676       </para>
14677      </listitem>
14678
14679      <listitem>
14680       <para>
14681        New system catalog <structname>pg_pltemplate</> allows overriding
14682        obsolete procedural-language definitions in dump files (Tom)
14683       </para>
14684      </listitem>
14685
14686     </itemizedlist>
14687    </sect3>
14688
14689
14690    <sect3>
14691     <title>Query Changes</title>
14692     <itemizedlist>
14693
14694      <listitem>
14695       <para>
14696        Add temporary views (Koju Iijima, Neil)
14697       </para>
14698      </listitem>
14699
14700      <listitem>
14701       <para>
14702        Fix <command>HAVING</> without any aggregate functions or
14703        <command>GROUP BY</> so that the query returns a single group (Tom)
14704       </para>
14705       <para>
14706        Previously, such a case would treat the <command>HAVING</>
14707        clause the same as a <command>WHERE</> clause.  This was not per spec.
14708       </para>
14709      </listitem>
14710
14711      <listitem>
14712       <para>
14713        Add <command>USING</> clause to allow additional tables to be
14714        specified to <command>DELETE</> (Euler Taveira de Oliveira, Neil)
14715       </para>
14716       <para>
14717        In prior releases, there was no clear method for specifying
14718        additional tables to be used for joins in a <command>DELETE</>
14719        statement. <command>UPDATE</> already has a <literal>FROM</>
14720        clause for this purpose.
14721       </para>
14722      </listitem>
14723
14724      <listitem>
14725       <para>
14726        Add support for <literal>\x</> hex escapes in backend and ecpg
14727        strings (Bruce)
14728       </para>
14729       <para>
14730        This is just like the standard C <literal>\x</> escape syntax.
14731        Octal escapes were already supported.
14732       </para>
14733      </listitem>
14734
14735      <listitem>
14736       <para>
14737        Add <command>BETWEEN SYMMETRIC</> query syntax (Pavel Stehule)
14738       </para>
14739       <para>
14740        This feature allows <command>BETWEEN</> comparisons without
14741        requiring the first value to be less than the second. For
14742        example, <command>2 BETWEEN [ASYMMETRIC] 3 AND 1</> returns
14743        false, while <command>2 BETWEEN SYMMETRIC 3 AND 1</> returns
14744        true. <command>BETWEEN ASYMMETRIC</> was already supported.
14745       </para>
14746      </listitem>
14747
14748      <listitem>
14749       <para>
14750        Add <command>NOWAIT</> option to <command>SELECT ... FOR
14751        UPDATE/SHARE</> (Hans-Juergen Schoenig)
14752       </para>
14753       <para>
14754        While the <varname>statement_timeout</> configuration
14755        parameter allows a query taking more than a certain amount of
14756        time to be cancelled, the <command>NOWAIT</> option allows a
14757        query to be canceled as soon as a <command>SELECT ... FOR
14758        UPDATE/SHARE</> command cannot immediately acquire a row lock.
14759       </para>
14760      </listitem>
14761     </itemizedlist>
14762    </sect3>
14763
14764
14765    <sect3>
14766     <title>Object Manipulation Changes</title>
14767     <itemizedlist>
14768
14769      <listitem>
14770       <para>
14771        Track dependencies of shared objects (Alvaro)
14772       </para>
14773       <para>
14774        <productname>PostgreSQL</productname> allows global tables
14775        (users, databases, tablespaces) to reference information in
14776        multiple databases. This addition adds dependency information
14777        for global tables, so, for example, user ownership can be
14778        tracked across databases, so a user who owns something in any
14779        database can no longer be removed. Dependency tracking already
14780        existed for database-local objects.
14781       </para>
14782      </listitem>
14783
14784      <listitem>
14785       <para>
14786        Allow limited <command>ALTER OWNER</> commands to be performed
14787        by the object owner (Stephen Frost)
14788       </para>
14789       <para>
14790        Prior releases allowed only superusers to change object owners.
14791        Now, ownership can be transferred if the user executing the command
14792        owns the object and would be able to create it as the new owner
14793        (that is, the user is a member of the new owning role and that role
14794        has the CREATE permission that would be needed to create the object
14795        afresh).
14796       </para>
14797      </listitem>
14798
14799      <listitem>
14800       <para>
14801        Add <command>ALTER</> object <command>SET SCHEMA</> capability
14802        for some object types (tables, functions, types) (Bernd Helmle)
14803       </para>
14804       <para>
14805        This allows objects to be moved to different schemas.
14806       </para>
14807      </listitem>
14808
14809      <listitem>
14810       <para>
14811        Add <command>ALTER TABLE ENABLE/DISABLE TRIGGER</command> to
14812        disable triggers (Satoshi Nagayasu)
14813       </para>
14814      </listitem>
14815
14816     </itemizedlist>
14817    </sect3>
14818
14819
14820    <sect3>
14821     <title>Utility Command Changes</title>
14822     <itemizedlist>
14823
14824      <listitem>
14825       <para>
14826        Allow <command>TRUNCATE</> to truncate multiple tables in a
14827        single command (Alvaro)
14828       </para>
14829       <para>
14830        Because of referential integrity checks, it is not allowed to
14831        truncate a table that is part of a referential integrity
14832        constraint. Using this new functionality, <command>TRUNCATE</>
14833        can be used to truncate such tables, if both tables involved in
14834        a referential integrity constraint are truncated in a single
14835        <command>TRUNCATE</> command.
14836       </para>
14837      </listitem>
14838
14839      <listitem>
14840       <para>
14841        Properly process carriage returns and line feeds in
14842        <command>COPY CSV</> mode (Andrew)
14843       </para>
14844       <para>
14845        In release 8.0, carriage returns and line feeds in <command>CSV
14846        COPY TO</> were processed in an inconsistent manner. (This was
14847        documented on the TODO list.)
14848       </para>
14849      </listitem>
14850
14851      <listitem>
14852       <para>
14853        Add <command>COPY WITH CSV HEADER</> to allow a header line as
14854        the first line in <command>COPY</> (Andrew)
14855       </para>
14856       <para>
14857        This allows handling of the common <command>CSV</> usage of
14858        placing the column names on the first line of the data file. For
14859        <command>COPY TO</>, the first line contains the column names,
14860        and for <command>COPY FROM</>, the first line is ignored.
14861       </para>
14862      </listitem>
14863
14864      <listitem>
14865       <para>
14866        On Windows, display better sub-second precision in
14867        <command>EXPLAIN ANALYZE</> (Magnus)
14868       </para>
14869      </listitem>
14870
14871      <listitem>
14872       <para>
14873        Add trigger duration display to <command>EXPLAIN ANALYZE</>
14874        (Tom)
14875       </para>
14876       <para>
14877        Prior releases included trigger execution time as part of the
14878        total execution time, but did not show it separately.  It is now
14879        possible to see how much time is spent in each trigger.
14880       </para>
14881      </listitem>
14882
14883      <listitem>
14884       <para>
14885        Add support for <literal>\x</> hex escapes in <command>COPY</>
14886        (Sergey Ten)
14887       </para>
14888       <para>
14889        Previous releases only supported octal escapes.
14890       </para>
14891      </listitem>
14892
14893      <listitem>
14894       <para>
14895        Make <command>SHOW ALL</> include variable descriptions
14896        (Matthias Schmidt)
14897       </para>
14898       <para>
14899        <command>SHOW</> varname still only displays the variable's
14900        value and does not include the description.
14901       </para>
14902      </listitem>
14903
14904      <listitem>
14905       <para>
14906        Make <application>initdb</application> create a new standard
14907        database called <literal>postgres</>, and convert utilities to
14908        use <literal>postgres</> rather than <literal>template1</> for
14909        standard lookups (Dave)
14910       </para>
14911       <para>
14912        In prior releases, <literal>template1</> was used both as a
14913        default connection for utilities like
14914        <application>createuser</application>, and as a template for
14915        new databases. This caused <command>CREATE DATABASE</> to
14916        sometimes fail, because a new database cannot be created if
14917        anyone else is in the template database. With this change, the
14918        default connection database is now <literal>postgres</>,
14919        meaning it is much less likely someone will be using
14920        <literal>template1</> during <command>CREATE DATABASE</>.
14921       </para>
14922      </listitem>
14923
14924      <listitem>
14925       <para>
14926        Create new <application>reindexdb</application> command-line
14927        utility by moving <filename>/contrib/reindexdb</> into the
14928        server (Euler Taveira de Oliveira)
14929       </para>
14930      </listitem>
14931
14932     </itemizedlist>
14933    </sect3>
14934
14935
14936    <sect3>
14937     <title>Data Type and Function Changes</title>
14938     <itemizedlist>
14939
14940      <listitem>
14941       <para>
14942        Add <function>MAX()</> and <function>MIN()</> aggregates for
14943        array types (Koju Iijima)
14944       </para>
14945      </listitem>
14946
14947      <listitem>
14948       <para>
14949        Fix <function>to_date()</> and <function>to_timestamp()</> to
14950        behave reasonably when <literal>CC</> and <literal>YY</> fields
14951        are both used (Karel Zak)
14952       </para>
14953       <para>
14954        If the format specification contains <literal>CC</> and a year
14955        specification is <literal>YYY</> or longer, ignore the
14956        <literal>CC</>. If the year specification is <literal>YY</> or
14957        shorter, interpret <literal>CC</> as the previous century.
14958       </para>
14959      </listitem>
14960
14961      <listitem>
14962       <para>
14963        Add <function>md5(bytea)</> (Abhijit Menon-Sen)
14964       </para>
14965       <para>
14966        <function>md5(text)</> already existed.
14967       </para>
14968      </listitem>
14969
14970      <listitem>
14971       <para>
14972        Add support for <command>numeric ^ numeric</> based on
14973        <function>power(numeric, numeric)</>
14974       </para>
14975       <para>
14976        The function already existed, but there was no operator assigned
14977        to it.
14978       </para>
14979      </listitem>
14980
14981      <listitem>
14982       <para>
14983        Fix <type>NUMERIC</> modulus by properly truncating the quotient
14984        during computation (Bruce)
14985       </para>
14986       <para>
14987        In previous releases, modulus for large values sometimes
14988        returned negative results due to rounding of the quotient.
14989       </para>
14990      </listitem>
14991
14992      <listitem>
14993       <para>
14994        Add a function <function>lastval()</> (Dennis Bj&ouml;rklund)
14995       </para>
14996       <para>
14997        <function>lastval()</> is a simplified version of
14998        <function>currval()</>. It automatically determines the proper
14999        sequence name based on the most recent <function>nextval()</> or
15000        <function>setval()</> call performed by the current session.
15001       </para>
15002      </listitem>
15003
15004      <listitem>
15005       <para>
15006        Add <function>to_timestamp(DOUBLE PRECISION) (Michael Glaesemann)</>
15007       </para>
15008       <para>
15009        Converts Unix seconds since 1970 to a <type>TIMESTAMP WITH
15010        TIMEZONE</>.
15011       </para>
15012      </listitem>
15013
15014      <listitem>
15015       <para>
15016        Add <function>pg_postmaster_start_time()</> function (Euler
15017        Taveira de Oliveira, Matthias Schmidt)
15018       </para>
15019      </listitem>
15020
15021      <listitem>
15022       <para>
15023        Allow the full use of time zone names in <command>AT TIME
15024        ZONE</>, not just the short list previously available (Magnus)
15025       </para>
15026       <para>
15027        Previously, only a predefined list of time zone names were
15028        supported by <command>AT TIME ZONE</>. Now any supported time
15029        zone name can be used, e.g.:
15030        <programlisting>
15031         SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London';
15032        </programlisting>
15033        In the above query, the time zone used is adjusted based on the
15034        daylight saving time rules that were in effect on the supplied
15035        date.
15036       </para>
15037      </listitem>
15038
15039      <listitem>
15040       <para>
15041        Add <function>GREATEST()</> and <function>LEAST()</> variadic
15042        functions (Pavel Stehule)
15043       </para>
15044       <para>
15045        These functions take a variable number of arguments and return
15046        the greatest or least value among the arguments.
15047       </para>
15048      </listitem>
15049
15050      <listitem>
15051       <para>
15052        Add <function>pg_column_size()</> (Mark Kirkwood)
15053       </para>
15054       <para>
15055        This returns storage size of a column, which might be compressed.
15056       </para>
15057      </listitem>
15058
15059      <listitem>
15060       <para>
15061        Add <function>regexp_replace()</> (Atsushi Ogawa)
15062       </para>
15063       <para>
15064        This allows regular expression replacement, like sed. An optional
15065        flag argument allows selection of global (replace all) and
15066        case-insensitive modes.
15067       </para>
15068      </listitem>
15069
15070      <listitem>
15071       <para>
15072        Fix interval division and multiplication (Bruce)
15073       </para>
15074       <para>
15075        Previous versions sometimes returned unjustified results, like
15076        <command>'4 months'::interval / 5</> returning <command>'1 mon
15077        -6 days'</>.
15078       </para>
15079      </listitem>
15080
15081      <listitem>
15082       <para>
15083        Fix roundoff behavior in timestamp, time, and interval output (Tom)
15084       </para>
15085       <para>
15086        This fixes some cases in which the seconds field would be shown as
15087        <literal>60</> instead of incrementing the higher-order fields.
15088       </para>
15089      </listitem>
15090
15091      <listitem>
15092       <para>
15093        Add a separate day field to type <type>interval</> so a one day
15094        interval can be distinguished from a 24 hour interval (Michael
15095        Glaesemann)
15096       </para>
15097       <para>
15098        Days that contain a daylight saving time adjustment are not 24
15099        hours long, but typically 23 or 25 hours.  This change creates a
15100        conceptual distinction between intervals of <quote>so many days</>
15101        and intervals of <quote>so many hours</>.  Adding
15102        <literal>1 day</> to a timestamp now gives the same local time on
15103        the next day even if a daylight saving time adjustment occurs
15104        between, whereas adding <literal>24 hours</> will give a different
15105        local time when this happens.  For example, under US DST rules:
15106        <programlisting>
15107         '2005-04-03 00:00:00-05' + '1 day' = '2005-04-04 00:00:00-04'
15108         '2005-04-03 00:00:00-05' + '24 hours' = '2005-04-04 01:00:00-04'
15109        </programlisting>
15110       </para>
15111      </listitem>
15112
15113      <listitem>
15114       <para>
15115        Add <function>justify_days()</> and <function>justify_hours()</>
15116        (Michael Glaesemann)
15117       </para>
15118       <para>
15119        These functions, respectively, adjust days to an appropriate
15120        number of full months and days, and adjust hours to an
15121        appropriate number of full days and hours.
15122       </para>
15123      </listitem>
15124
15125      <listitem>
15126       <para>
15127        Move <filename>/contrib/dbsize</> into the backend, and rename
15128        some of the functions (Dave Page, Andreas Pflug)
15129       </para>
15130       <para>
15131        <itemizedlist>
15132
15133         <listitem>
15134          <para>
15135            <function>pg_tablespace_size()</>
15136          </para>
15137         </listitem>
15138
15139         <listitem>
15140          <para>
15141           <function>pg_database_size()</>
15142          </para>
15143         </listitem>
15144
15145         <listitem>
15146          <para>
15147           <function>pg_relation_size()</>
15148          </para>
15149         </listitem>
15150
15151         <listitem>
15152          <para>
15153           <function>pg_total_relation_size()</>
15154          </para>
15155         </listitem>
15156
15157         <listitem>
15158          <para>
15159           <function>pg_size_pretty()</>
15160          </para>
15161         </listitem>
15162
15163        </itemizedlist>
15164       </para>
15165       <para>
15166        <function>pg_total_relation_size()</> includes indexes and TOAST
15167        tables.
15168       </para>
15169      </listitem>
15170
15171      <listitem>
15172       <para>
15173        Add functions for read-only file access to the cluster directory
15174        (Dave Page, Andreas Pflug)
15175       </para>
15176       <para>
15177        <itemizedlist>
15178
15179         <listitem>
15180          <para>
15181           <function>pg_stat_file()</>
15182          </para>
15183         </listitem>
15184
15185         <listitem>
15186          <para>
15187           <function>pg_read_file()</>
15188          </para>
15189         </listitem>
15190
15191         <listitem>
15192          <para>
15193           <function>pg_ls_dir()</>
15194          </para>
15195         </listitem>
15196
15197        </itemizedlist>
15198       </para>
15199      </listitem>
15200
15201      <listitem>
15202       <para>
15203        Add <function>pg_reload_conf()</> to force reloading of the
15204        configuration files (Dave Page, Andreas Pflug)
15205       </para>
15206      </listitem>
15207
15208      <listitem>
15209       <para>
15210        Add <function>pg_rotate_logfile()</> to force rotation of the
15211        server log file (Dave Page, Andreas Pflug)
15212       </para>
15213      </listitem>
15214
15215      <listitem>
15216       <para>
15217        Change <literal>pg_stat_*</> views to include TOAST tables (Tom)
15218       </para>
15219      </listitem>
15220
15221     </itemizedlist>
15222    </sect3>
15223
15224
15225    <sect3>
15226     <title>Encoding and Locale Changes</title>
15227     <itemizedlist>
15228
15229      <listitem>
15230       <para>
15231        Rename some encodings to be more consistent and to follow
15232        international standards (Bruce)
15233       </para>
15234       <para>
15235        <itemizedlist>
15236
15237         <listitem>
15238          <para>
15239           <literal>UNICODE</> is now <literal>UTF8</>
15240          </para>
15241         </listitem>
15242
15243         <listitem>
15244          <para>
15245           <literal>ALT</> is now <literal>WIN866</>
15246          </para>
15247         </listitem>
15248
15249         <listitem>
15250          <para>
15251           <literal>WIN</> is now <literal>WIN1251</>
15252          </para>
15253         </listitem>
15254
15255         <listitem>
15256          <para>
15257          <literal>TCVN</> is now <literal>WIN1258</>
15258          </para>
15259         </listitem>
15260
15261        </itemizedlist>
15262       </para>
15263
15264       <para>
15265        The original names still work.
15266       </para>
15267      </listitem>
15268
15269      <listitem>
15270       <para>
15271        Add support for <literal>WIN1252</> encoding (Roland Volkmann)
15272       </para>
15273      </listitem>
15274
15275      <listitem>
15276       <para>
15277        Add support for four-byte <literal>UTF8</> characters (John
15278        Hansen)
15279       </para>
15280       <para>
15281        Previously only one, two, and three-byte <literal>UTF8</> characters
15282        were supported. This is particularly important for support for
15283        some Chinese character sets.
15284       </para>
15285      </listitem>
15286
15287      <listitem>
15288       <para>
15289        Allow direct conversion between <literal>EUC_JP</> and
15290        <literal>SJIS</> to improve performance (Atsushi Ogawa)
15291       </para>
15292      </listitem>
15293
15294      <listitem>
15295       <para>
15296        Allow the UTF8 encoding to work on Windows (Magnus)
15297       </para>
15298       <para>
15299        This is done by mapping UTF8 to the Windows-native UTF16
15300        implementation.
15301       </para>
15302      </listitem>
15303
15304     </itemizedlist>
15305    </sect3>
15306
15307
15308    <sect3>
15309     <title>General Server-Side Language Changes</title>
15310     <itemizedlist>
15311
15312      <listitem>
15313       <para>
15314        Fix <command>ALTER LANGUAGE RENAME</> (Sergey Yatskevich)
15315       </para>
15316      </listitem>
15317
15318      <listitem>
15319       <para>
15320        Allow function characteristics, like strictness and volatility,
15321        to be modified via <command>ALTER FUNCTION</> (Neil)
15322       </para>
15323      </listitem>
15324
15325      <listitem>
15326       <para>
15327        Increase the maximum number of function arguments to 100 (Tom)
15328       </para>
15329      </listitem>
15330
15331      <listitem>
15332       <para>
15333        Allow SQL and PL/PgSQL functions to use <command>OUT</> and
15334        <command>INOUT</> parameters (Tom)
15335       </para>
15336       <para>
15337        <command>OUT</> is an alternate way for a function to return
15338        values. Instead of using <command>RETURN</>, values can be
15339        returned by assigning to parameters declared as <command>OUT</> or
15340        <command>INOUT</>.  This is notationally simpler in some cases,
15341        particularly so when multiple values need to be returned.
15342        While returning multiple values from a function
15343        was possible in previous releases, this greatly simplifies the
15344        process.  (The feature will be extended to other server-side
15345        languages in future releases.)
15346       </para>
15347      </listitem>
15348
15349      <listitem>
15350       <para>
15351        Move language handler functions into the <literal>pg_catalog</> schema
15352       </para>
15353       <para>
15354        This makes it easier to drop the public schema if desired.
15355       </para>
15356      </listitem>
15357
15358      <listitem>
15359       <para>
15360        Add <function>SPI_getnspname()</function> to SPI (Neil)
15361       </para>
15362      </listitem>
15363
15364     </itemizedlist>
15365    </sect3>
15366
15367    <sect3>
15368     <title>PL/PgSQL Server-Side Language Changes</title>
15369     <itemizedlist>
15370
15371      <listitem>
15372       <para>
15373        Overhaul the memory management of PL/PgSQL functions (Neil)
15374       </para>
15375       <para>
15376        The parsetree of each function is now stored in a separate
15377        memory context. This allows this memory to be easily reclaimed
15378        when it is no longer needed.
15379       </para>
15380      </listitem>
15381
15382      <listitem>
15383       <para>
15384        Check function syntax at <command>CREATE FUNCTION</> time,
15385        rather than at runtime (Neil)
15386       </para>
15387       <para>
15388        Previously, most syntax errors were reported only when the
15389        function was executed.
15390       </para>
15391      </listitem>
15392
15393      <listitem>
15394       <para>
15395        Allow <command>OPEN</> to open non-<command>SELECT</> queries
15396        like <command>EXPLAIN</> and <command>SHOW</> (Tom)
15397       </para>
15398      </listitem>
15399
15400      <listitem>
15401       <para>
15402        No longer require functions to issue a <command>RETURN</>
15403        statement (Tom)
15404       </para>
15405       <para>
15406        This is a byproduct of the newly added <command>OUT</> and
15407        <command>INOUT</> functionality.  <command>RETURN</> can
15408        be omitted when it is not needed to provide the function's
15409        return value.
15410       </para>
15411      </listitem>
15412
15413      <listitem>
15414       <para>
15415        Add support for an optional <command>INTO</> clause to
15416        PL/PgSQL's <command>EXECUTE</> statement (Pavel Stehule, Neil)
15417       </para>
15418      </listitem>
15419
15420      <listitem>
15421       <para>
15422        Make <command>CREATE TABLE AS</> set <command>ROW_COUNT</> (Tom)
15423       </para>
15424      </listitem>
15425
15426      <listitem>
15427       <para>
15428        Define <literal>SQLSTATE</> and <literal>SQLERRM</> to return
15429        the <literal>SQLSTATE</> and error message of the current
15430        exception (Pavel Stehule, Neil)
15431       </para>
15432       <para>
15433        These variables are only defined inside exception blocks.
15434       </para>
15435      </listitem>
15436
15437      <listitem>
15438       <para>
15439        Allow the parameters to the <command>RAISE</> statement to be
15440        expressions (Pavel Stehule, Neil)
15441       </para>
15442      </listitem>
15443
15444      <listitem>
15445       <para>
15446        Add a loop <command>CONTINUE</> statement (Pavel Stehule, Neil)
15447       </para>
15448      </listitem>
15449
15450      <listitem>
15451       <para>
15452        Allow block and loop labels (Pavel Stehule)
15453       </para>
15454      </listitem>
15455
15456     </itemizedlist>
15457    </sect3>
15458
15459
15460    <sect3>
15461     <title>PL/Perl Server-Side Language Changes</title>
15462     <itemizedlist>
15463
15464      <listitem>
15465       <para>
15466        Allow large result sets to be returned efficiently (Abhijit
15467        Menon-Sen)
15468       </para>
15469       <para>
15470        This allows functions to use <function>return_next()</> to avoid
15471        building the entire result set in memory.
15472       </para>
15473      </listitem>
15474
15475      <listitem>
15476       <para>
15477        Allow one-row-at-a-time retrieval of query results (Abhijit Menon-Sen)
15478       </para>
15479       <para>
15480        This allows functions to use <function>spi_query()</> and
15481        <function>spi_fetchrow()</> to avoid accumulating the entire
15482        result set in memory.
15483       </para>
15484      </listitem>
15485
15486      <listitem>
15487       <para>
15488        Force PL/Perl to handle strings as <literal>UTF8</> if the
15489        server encoding is <literal>UTF8</> (David Kamholz)
15490       </para>
15491      </listitem>
15492
15493      <listitem>
15494       <para>
15495        Add a validator function for PL/Perl (Andrew)
15496       </para>
15497       <para>
15498        This allows syntax errors to be reported at definition time,
15499        rather than execution time.
15500       </para>
15501      </listitem>
15502
15503      <listitem>
15504       <para>
15505        Allow PL/Perl to return a Perl array when the function returns
15506        an array type (Andrew)
15507       </para>
15508       <para>
15509        This basically maps <productname>PostgreSQL</productname> arrays
15510        to Perl arrays.
15511       </para>
15512      </listitem>
15513
15514      <listitem>
15515       <para>
15516        Allow Perl nonfatal warnings to generate <command>NOTICE</>
15517        messages (Andrew)
15518       </para>
15519      </listitem>
15520
15521      <listitem>
15522       <para>
15523        Allow Perl's <literal>strict</> mode to be enabled (Andrew)
15524       </para>
15525      </listitem>
15526
15527     </itemizedlist>
15528    </sect3>
15529
15530
15531    <sect3>
15532     <title><application>psql</> Changes</title>
15533     <itemizedlist>
15534
15535      <listitem>
15536       <para>
15537        Add <command>\set ON_ERROR_ROLLBACK</> to allow statements in
15538        a transaction to error without affecting the rest of the
15539        transaction (Greg Sabino Mullane)
15540       </para>
15541       <para>
15542        This is basically implemented by wrapping every statement in a
15543        sub-transaction.
15544       </para>
15545      </listitem>
15546
15547      <listitem>
15548       <para>
15549        Add support for <literal>\x</> hex strings in
15550        <application>psql</> variables (Bruce)
15551       </para>
15552       <para>
15553        Octal escapes were already supported.
15554       </para>
15555      </listitem>
15556
15557      <listitem>
15558       <para>
15559        Add support for <command>troff -ms</> output format (Roger
15560        Leigh)
15561       </para>
15562      </listitem>
15563
15564      <listitem>
15565       <para>
15566        Allow the history file location to be controlled by
15567        <envar>HISTFILE</> (Andreas Seltenreich)
15568       </para>
15569       <para>
15570        This allows configuration of per-database history storage.
15571       </para>
15572      </listitem>
15573
15574      <listitem>
15575       <para>
15576        Prevent <command>\x</> (expanded mode) from affecting
15577        the output of <command>\d tablename</> (Neil)
15578       </para>
15579      </listitem>
15580
15581      <listitem>
15582       <para>
15583        Add <option>-L</> option to <application>psql</application> to
15584        log sessions (Lorne Sunley)
15585       </para>
15586       <para>
15587        This option was added because some operating systems do not have
15588        simple command-line activity logging functionality.
15589       </para>
15590      </listitem>
15591
15592      <listitem>
15593       <para>
15594        Make <command>\d</> show the tablespaces of indexes (Qingqing
15595        Zhou)
15596       </para>
15597      </listitem>
15598
15599      <listitem>
15600       <para>
15601        Allow <application>psql</application> help (<command>\h</>) to
15602        make a best guess on the proper help information (Greg Sabino
15603        Mullane)
15604       </para>
15605       <para>
15606        This allows the user to just add <command>\h</> to the front of
15607        the syntax error query and get help on the supported syntax.
15608        Previously any additional query text beyond the command name
15609        had to be removed to use <command>\h</>.
15610       </para>
15611      </listitem>
15612
15613      <listitem>
15614       <para>
15615        Add <command>\pset numericlocale</> to allow numbers to be
15616        output in a locale-aware format (Eugen Nedelcu)
15617       </para>
15618       <para>
15619        For example, using <literal>C</> locale <literal>100000</> would
15620        be output as <literal>100,000.0</> while a European locale might
15621        output this value as <literal>100.000,0</>.
15622       </para>
15623      </listitem>
15624
15625      <listitem>
15626       <para>
15627        Make startup banner show both server version number and
15628        <application>psql</>'s version number, when they are different (Bruce)
15629       </para>
15630       <para>
15631        Also, a warning will be shown if the server and <application>psql</>
15632        are from different major releases.
15633       </para>
15634      </listitem>
15635
15636     </itemizedlist>
15637    </sect3>
15638
15639
15640    <sect3>
15641     <title><application>pg_dump</> Changes</title>
15642     <itemizedlist>
15643
15644      <listitem>
15645       <para>
15646        Add <option>-n</> / <option>--schema</> switch to
15647        <application>pg_restore</> (Richard van den Berg)
15648       </para>
15649       <para>
15650        This allows just the objects in a specified schema to be restored.
15651       </para>
15652      </listitem>
15653
15654      <listitem>
15655       <para>
15656        Allow <application>pg_dump</> to dump large objects even in
15657        text mode (Tom)
15658       </para>
15659       <para>
15660        With this change, large objects are now always dumped; the former
15661        <option>-b</> switch is a no-op.
15662       </para>
15663      </listitem>
15664
15665      <listitem>
15666       <para>
15667        Allow <application>pg_dump</> to dump a consistent snapshot of
15668        large objects (Tom)
15669       </para>
15670      </listitem>
15671
15672      <listitem>
15673       <para>
15674        Dump comments for large objects (Tom)
15675       </para>
15676      </listitem>
15677
15678      <listitem>
15679       <para>
15680        Add <option>--encoding</> to <application>pg_dump</>
15681        (Magnus Hagander)
15682       </para>
15683       <para>
15684        This allows a database to be dumped in an encoding that is
15685        different from the server's encoding. This is valuable when
15686        transferring the dump to a machine with a different encoding.
15687       </para>
15688      </listitem>
15689
15690      <listitem>
15691       <para>
15692        Rely on <structname>pg_pltemplate</> for procedural languages (Tom)
15693       </para>
15694       <para>
15695        If the call handler for a procedural language is in the
15696        <literal>pg_catalog</> schema, <application>pg_dump</> does not
15697        dump the handler.  Instead, it dumps the language using just
15698        <command>CREATE LANGUAGE <replaceable>name</></command>,
15699        relying on the <structname>pg_pltemplate</> catalog to provide
15700        the language's creation parameters at load time.
15701       </para>
15702      </listitem>
15703
15704     </itemizedlist>
15705    </sect3>
15706
15707
15708    <sect3>
15709     <title><application>libpq</application> Changes</title>
15710     <itemizedlist>
15711
15712      <listitem>
15713       <para>
15714        Add a <envar>PGPASSFILE</> environment variable to specify the
15715        password file's filename (Andrew)
15716       </para>
15717      </listitem>
15718
15719      <listitem>
15720       <para>
15721        Add <function>lo_create()</>, that is similar to
15722        <function>lo_creat()</> but allows the OID of the large object
15723        to be specified (Tom)
15724       </para>
15725      </listitem>
15726
15727      <listitem>
15728       <para>
15729        Make <application>libpq</application> consistently return an error
15730        to the client application on <function>malloc()</function>
15731        failure (Neil)
15732       </para>
15733      </listitem>
15734     </itemizedlist>
15735    </sect3>
15736
15737
15738    <sect3>
15739     <title>Source Code Changes</title>
15740     <itemizedlist>
15741
15742      <listitem>
15743       <para>
15744        Fix <application>pgxs</> to support building against a relocated
15745        installation
15746       </para>
15747      </listitem>
15748
15749      <listitem>
15750       <para>
15751        Add spinlock support for the Itanium processor using Intel
15752        compiler (Vikram Kalsi)
15753       </para>
15754      </listitem>
15755
15756      <listitem>
15757       <para>
15758        Add Kerberos 5 support for Windows (Magnus)
15759       </para>
15760      </listitem>
15761
15762      <listitem>
15763       <para>
15764        Add Chinese FAQ (laser@pgsqldb.com)
15765       </para>
15766      </listitem>
15767
15768      <listitem>
15769       <para>
15770        Rename Rendezvous to Bonjour to match OS/X feature renaming
15771        (Bruce)
15772       </para>
15773      </listitem>
15774
15775      <listitem>
15776       <para>
15777        Add support for <literal>fsync_writethrough</literal> on
15778        Darwin (Chris Campbell)
15779       </para>
15780      </listitem>
15781
15782      <listitem>
15783       <para>
15784        Streamline the passing of information within the server, the
15785        optimizer, and the lock system (Tom)
15786       </para>
15787      </listitem>
15788
15789      <listitem>
15790       <para>
15791        Allow <application>pg_config</> to be compiled using MSVC (Andrew)
15792       </para>
15793       <para>
15794        This is required to build DBD::Pg using <application>MSVC</>.
15795       </para>
15796      </listitem>
15797
15798      <listitem>
15799       <para>
15800        Remove support for Kerberos V4 (Magnus)
15801       </para>
15802       <para>
15803        Kerberos 4 had security vulnerabilities and is no longer
15804        maintained.
15805       </para>
15806      </listitem>
15807
15808      <listitem>
15809       <para>
15810        Code cleanups (Coverity static analysis performed by
15811        EnterpriseDB)
15812       </para>
15813      </listitem>
15814
15815      <listitem>
15816       <para>
15817        Modify <filename>postgresql.conf</> to use documentation defaults
15818        <literal>on</>/<literal>off</> rather than
15819        <literal>true</>/<literal>false</> (Bruce)
15820       </para>
15821      </listitem>
15822
15823      <listitem>
15824       <para>
15825        Enhance <application>pg_config</> to be able to report more
15826        build-time values (Tom)
15827       </para>
15828      </listitem>
15829
15830      <listitem>
15831       <para>
15832        Allow <application>libpq</application> to be built thread-safe
15833        on Windows (Dave Page)
15834       </para>
15835      </listitem>
15836
15837      <listitem>
15838       <para>
15839        Allow IPv6 connections to be used on Windows (Andrew)
15840       </para>
15841      </listitem>
15842
15843      <listitem>
15844       <para>
15845        Add Server Administration documentation about I/O subsystem
15846        reliability (Bruce)
15847       </para>
15848      </listitem>
15849
15850      <listitem>
15851       <para>
15852        Move private declarations from <filename>gist.h</filename> to
15853        <filename>gist_private.h</filename> (Neil)
15854       </para>
15855
15856       <para>
15857        In previous releases, <filename>gist.h</> contained both the
15858        public GiST API (intended for use by authors of GiST index
15859        implementations) as well as some private declarations used by
15860        the implementation of GiST itself. The latter have been moved
15861        to a separate file, <filename>gist_private.h</>. Most GiST
15862        index implementations should be unaffected.
15863       </para>
15864      </listitem>
15865
15866      <listitem>
15867       <para>
15868        Overhaul GiST memory management (Neil)
15869       </para>
15870
15871       <para>
15872        GiST methods are now always invoked in a short-lived memory
15873        context. Therefore, memory allocated via <function>palloc()</>
15874        will be reclaimed automatically, so GiST index implementations
15875        do not need to manually release allocated memory via
15876        <function>pfree()</>.
15877       </para>
15878      </listitem>
15879     </itemizedlist>
15880    </sect3>
15881
15882
15883    <sect3>
15884     <title>Contrib Changes</title>
15885     <itemizedlist>
15886
15887      <listitem>
15888       <para>
15889        Add <filename>/contrib/pg_buffercache</> contrib module (Mark
15890        Kirkwood)
15891       </para>
15892       <para>
15893        This displays the contents of the buffer cache, for debugging and
15894        performance tuning purposes.
15895       </para>
15896      </listitem>
15897
15898      <listitem>
15899       <para>
15900        Remove <filename>/contrib/array</> because it is obsolete (Tom)
15901       </para>
15902      </listitem>
15903
15904      <listitem>
15905       <para>
15906        Clean up the <filename>/contrib/lo</> module (Tom)
15907       </para>
15908      </listitem>
15909
15910      <listitem>
15911       <para>
15912        Move <filename>/contrib/findoidjoins</> to
15913        <filename>/src/tools</> (Tom)
15914       </para>
15915      </listitem>
15916
15917      <listitem>
15918       <para>
15919        Remove the <literal>&lt;&lt;</>, <literal>&gt;&gt;</>,
15920        <literal>&amp;&lt;</>, and <literal>&amp;&gt;</> operators from
15921        <filename>/contrib/cube</>
15922       </para>
15923       <para>
15924        These operators were not useful.
15925       </para>
15926      </listitem>
15927
15928      <listitem>
15929       <para>
15930        Improve <filename>/contrib/btree_gist</> (Janko Richter)
15931       </para>
15932      </listitem>
15933
15934      <listitem>
15935       <para>
15936        Improve <filename>/contrib/pgbench</> (Tomoaki Sato, Tatsuo)
15937       </para>
15938       <para>
15939        There is now a facility for testing with SQL command scripts given
15940        by the user, instead of only a hard-wired command sequence.
15941       </para>
15942      </listitem>
15943
15944      <listitem>
15945       <para>
15946        Improve <filename>/contrib/pgcrypto</> (Marko Kreen)
15947       </para>
15948
15949       <itemizedlist>
15950
15951        <listitem>
15952         <para>
15953          Implementation of OpenPGP symmetric-key and public-key encryption
15954         </para>
15955         <para>
15956          Both RSA and Elgamal public-key algorithms are supported.
15957         </para>
15958        </listitem>
15959
15960        <listitem>
15961         <para>
15962          Stand alone build: include SHA256/384/512 hashes, Fortuna PRNG
15963         </para>
15964        </listitem>
15965
15966        <listitem>
15967         <para>
15968          OpenSSL build: support 3DES, use internal AES with OpenSSL &lt; 0.9.7
15969         </para>
15970        </listitem>
15971
15972        <listitem>
15973         <para>
15974          Take build parameters (OpenSSL, zlib) from <filename>configure</> result
15975         </para>
15976         <para>
15977          There is no need to edit the <filename>Makefile</> anymore.
15978         </para>
15979        </listitem>
15980
15981        <listitem>
15982         <para>
15983          Remove support for <filename>libmhash</> and <filename>libmcrypt</>
15984         </para>
15985        </listitem>
15986
15987       </itemizedlist>
15988      </listitem>
15989
15990     </itemizedlist>
15991    </sect3>
15992
15993   </sect2>
15994  </sect1>
15995
15996  <sect1 id="release-8-0-21">
15997   <title>Release 8.0.21</title>
15998
15999   <note>
16000   <title>Release date</title>
16001   <simpara>2009-03-16</simpara>
16002   </note>
16003
16004   <para>
16005    This release contains a variety of fixes from 8.0.20.
16006    For information about new features in the 8.0 major release, see
16007    <xref linkend="release-8-0">.
16008   </para>
16009
16010   <sect2>
16011    <title>Migration to Version 8.0.21</title>
16012
16013    <para>
16014     A dump/restore is not required for those running 8.0.X.
16015     However, if you are upgrading from a version earlier than 8.0.6,
16016     see the release notes for 8.0.6.
16017    </para>
16018
16019   </sect2>
16020
16021   <sect2>
16022    <title>Changes</title>
16023
16024    <itemizedlist>
16025
16026     <listitem>
16027      <para>
16028       Prevent error recursion crashes when encoding conversion fails (Tom)
16029      </para>
16030
16031      <para>
16032       This change extends fixes made in the last two minor releases for
16033       related failure scenarios.  The previous fixes were narrowly tailored
16034       for the original problem reports, but we have now recognized that
16035       <emphasis>any</> error thrown by an encoding conversion function could
16036       potentially lead to infinite recursion while trying to report the
16037       error.  The solution therefore is to disable translation and encoding
16038       conversion and report the plain-ASCII form of any error message,
16039       if we find we have gotten into a recursive error reporting situation.
16040       (CVE-2009-0922)
16041      </para>
16042     </listitem>
16043
16044     <listitem>
16045      <para>
16046       Disallow <command>CREATE CONVERSION</> with the wrong encodings
16047       for the specified conversion function (Heikki)
16048      </para>
16049
16050      <para>
16051       This prevents one possible scenario for encoding conversion failure.
16052       The previous change is a backstop to guard against other kinds of
16053       failures in the same area.
16054      </para>
16055     </listitem>
16056
16057     <listitem>
16058      <para>
16059       Fix core dump when <function>to_char()</> is given format codes that
16060       are inappropriate for the type of the data argument (Tom)
16061      </para>
16062     </listitem>
16063
16064     <listitem>
16065      <para>
16066       Add <literal>MUST</> (Mauritius Island Summer Time) to the default list
16067       of known timezone abbreviations (Xavier Bugaud)
16068      </para>
16069     </listitem>
16070
16071    </itemizedlist>
16072
16073   </sect2>
16074  </sect1>
16075
16076  <sect1 id="release-8-0-20">
16077   <title>Release 8.0.20</title>
16078
16079   <note>
16080   <title>Release date</title>
16081   <simpara>2009-02-02</simpara>
16082   </note>
16083
16084   <para>
16085    This release contains a variety of fixes from 8.0.19.
16086    For information about new features in the 8.0 major release, see
16087    <xref linkend="release-8-0">.
16088   </para>
16089
16090   <sect2>
16091    <title>Migration to Version 8.0.20</title>
16092
16093    <para>
16094     A dump/restore is not required for those running 8.0.X.
16095     However, if you are upgrading from a version earlier than 8.0.6,
16096     see the release notes for 8.0.6.
16097    </para>
16098
16099   </sect2>
16100
16101   <sect2>
16102    <title>Changes</title>
16103
16104    <itemizedlist>
16105
16106     <listitem>
16107      <para>
16108       Improve handling of URLs in <function>headline()</> function (Teodor)
16109      </para>
16110     </listitem>
16111
16112     <listitem>
16113      <para>
16114       Improve handling of overlength headlines in <function>headline()</>
16115       function (Teodor)
16116      </para>
16117     </listitem>
16118
16119     <listitem>
16120      <para>
16121       Prevent possible Assert failure or misconversion if an encoding
16122       conversion is created with the wrong conversion function for the
16123       specified pair of encodings (Tom, Heikki)
16124      </para>
16125     </listitem>
16126
16127     <listitem>
16128      <para>
16129       Avoid unnecessary locking of small tables in <command>VACUUM</>
16130       (Heikki)
16131      </para>
16132     </listitem>
16133
16134     <listitem>
16135      <para>
16136       Fix uninitialized variables in <filename>contrib/tsearch2</>'s
16137       <function>get_covers()</> function (Teodor)
16138      </para>
16139     </listitem>
16140
16141     <listitem>
16142      <para>
16143       Make all documentation reference <literal>pgsql-bugs</> and/or
16144       <literal>pgsql-hackers</> as appropriate, instead of the
16145       now-decommissioned <literal>pgsql-ports</> and <literal>pgsql-patches</>
16146       mailing lists (Tom)
16147      </para>
16148     </listitem>
16149
16150     <listitem>
16151      <para>
16152       Update time zone data files to <application>tzdata</> release 2009a (for
16153       Kathmandu and historical DST corrections in Switzerland, Cuba)
16154      </para>
16155     </listitem>
16156
16157    </itemizedlist>
16158
16159   </sect2>
16160  </sect1>
16161
16162  <sect1 id="release-8-0-19">
16163   <title>Release 8.0.19</title>
16164
16165   <note>
16166   <title>Release date</title>
16167   <simpara>2008-11-03</simpara>
16168   </note>
16169
16170   <para>
16171    This release contains a variety of fixes from 8.0.18.
16172    For information about new features in the 8.0 major release, see
16173    <xref linkend="release-8-0">.
16174   </para>
16175
16176   <sect2>
16177    <title>Migration to Version 8.0.19</title>
16178
16179    <para>
16180     A dump/restore is not required for those running 8.0.X.
16181     However, if you are upgrading from a version earlier than 8.0.6,
16182     see the release notes for 8.0.6.
16183    </para>
16184
16185   </sect2>
16186
16187   <sect2>
16188    <title>Changes</title>
16189
16190    <itemizedlist>
16191
16192     <listitem>
16193      <para>
16194       Fix backend crash when the client encoding cannot represent a localized
16195       error message (Tom)
16196      </para>
16197
16198      <para>
16199       We have addressed similar issues before, but it would still fail if
16200       the <quote>character has no equivalent</> message itself couldn't
16201       be converted.  The fix is to disable localization and send the plain
16202       ASCII error message when we detect such a situation.
16203      </para>
16204     </listitem>
16205
16206     <listitem>
16207      <para>
16208       Fix possible crash when deeply nested functions are invoked from
16209       a trigger (Tom)
16210      </para>
16211     </listitem>
16212
16213     <listitem>
16214      <para>
16215       Ensure an error is reported when a newly-defined PL/pgSQL trigger
16216       function is invoked as a normal function (Tom)
16217      </para>
16218     </listitem>
16219
16220     <listitem>
16221      <para>
16222       Fix incorrect tsearch2 headline generation when single query
16223       item matches first word of text (Sushant Sinha)
16224      </para>
16225     </listitem>
16226
16227     <listitem>
16228      <para>
16229       Fix improper display of fractional seconds in interval values when
16230       using a non-ISO datestyle in an <option>--enable-integer-datetimes</>
16231       build (Ron Mayer)
16232      </para>
16233     </listitem>
16234
16235     <listitem>
16236      <para>
16237       Ensure <function>SPI_getvalue</> and <function>SPI_getbinval</>
16238       behave correctly when the passed tuple and tuple descriptor have
16239       different numbers of columns (Tom)
16240      </para>
16241
16242      <para>
16243       This situation is normal when a table has had columns added or removed,
16244       but these two functions didn't handle it properly.
16245       The only likely consequence is an incorrect error indication.
16246      </para>
16247     </listitem>
16248
16249     <listitem>
16250      <para>
16251       Fix <application>ecpg</>'s parsing of <command>CREATE USER</> (Michael)
16252      </para>
16253     </listitem>
16254
16255     <listitem>
16256      <para>
16257       Fix recent breakage of <literal>pg_ctl restart</> (Tom)
16258      </para>
16259     </listitem>
16260
16261     <listitem>
16262      <para>
16263       Update time zone data files to <application>tzdata</> release 2008i (for
16264       DST law changes in Argentina, Brazil, Mauritius, Syria)
16265      </para>
16266     </listitem>
16267
16268    </itemizedlist>
16269
16270   </sect2>
16271  </sect1>
16272
16273  <sect1 id="release-8-0-18">
16274   <title>Release 8.0.18</title>
16275
16276   <note>
16277   <title>Release date</title>
16278   <simpara>2008-09-22</simpara>
16279   </note>
16280
16281   <para>
16282    This release contains a variety of fixes from 8.0.17.
16283    For information about new features in the 8.0 major release, see
16284    <xref linkend="release-8-0">.
16285   </para>
16286
16287   <sect2>
16288    <title>Migration to Version 8.0.18</title>
16289
16290    <para>
16291     A dump/restore is not required for those running 8.0.X.
16292     However, if you are upgrading from a version earlier than 8.0.6,
16293     see the release notes for 8.0.6.
16294    </para>
16295
16296   </sect2>
16297
16298   <sect2>
16299    <title>Changes</title>
16300
16301    <itemizedlist>
16302
16303     <listitem>
16304      <para>
16305       Widen local lock counters from 32 to 64 bits (Tom)
16306      </para>
16307
16308      <para>
16309       This responds to reports that the counters could overflow in
16310       sufficiently long transactions, leading to unexpected <quote>lock is
16311       already held</> errors.
16312      </para>
16313     </listitem>
16314
16315     <listitem>
16316      <para>
16317       Add checks in executor startup to ensure that the tuples produced by an
16318       <command>INSERT</> or <command>UPDATE</> will match the target table's
16319       current rowtype (Tom)
16320      </para>
16321
16322      <para>
16323       <command>ALTER COLUMN TYPE</>, followed by re-use of a previously
16324       cached plan, could produce this type of situation.  The check protects
16325       against data corruption and/or crashes that could ensue.
16326      </para>
16327     </listitem>
16328
16329     <listitem>
16330      <para>
16331       Fix datetime input functions to correctly detect integer overflow when
16332       running on a 64-bit platform (Tom)
16333      </para>
16334     </listitem>
16335
16336     <listitem>
16337      <para>
16338       Improve performance of writing very long log messages to syslog (Tom)
16339      </para>
16340     </listitem>
16341
16342     <listitem>
16343      <para>
16344       Fix bug in backwards scanning of a cursor on a <literal>SELECT DISTINCT
16345       ON</> query (Tom)
16346      </para>
16347     </listitem>
16348
16349     <listitem>
16350      <para>
16351       Fix planner to estimate that <literal>GROUP BY</> expressions yielding
16352       boolean results always result in two groups, regardless of the
16353       expressions' contents (Tom)
16354      </para>
16355
16356      <para>
16357       This is very substantially more accurate than the regular <literal>GROUP
16358       BY</> estimate for certain boolean tests like <replaceable>col</>
16359       <literal>IS NULL</>.
16360      </para>
16361     </listitem>
16362
16363     <listitem>
16364      <para>
16365       Fix PL/Tcl to behave correctly with Tcl 8.5, and to be more careful
16366       about the encoding of data sent to or from Tcl (Tom)
16367      </para>
16368     </listitem>
16369
16370     <listitem>
16371      <para>
16372       Fix PL/Python to work with Python 2.5
16373      </para>
16374
16375      <para>
16376       This is a back-port of fixes made during the 8.2 development cycle.
16377      </para>
16378     </listitem>
16379
16380     <listitem>
16381      <para>
16382       Improve <application>pg_dump</> and <application>pg_restore</>'s
16383       error reporting after failure to send a SQL command (Tom)
16384      </para>
16385     </listitem>
16386
16387     <listitem>
16388      <para>
16389       Fix <application>pg_ctl</> to properly preserve postmaster
16390       command-line arguments across a <literal>restart</> (Bruce)
16391      </para>
16392     </listitem>
16393
16394     <listitem>
16395      <para>
16396       Update time zone data files to <application>tzdata</> release 2008f (for
16397       DST law changes in Argentina, Bahamas, Brazil, Mauritius, Morocco,
16398       Pakistan, Palestine, and Paraguay)
16399      </para>
16400     </listitem>
16401
16402    </itemizedlist>
16403
16404   </sect2>
16405  </sect1>
16406
16407  <sect1 id="release-8-0-17">
16408   <title>Release 8.0.17</title>
16409
16410   <note>
16411   <title>Release date</title>
16412   <simpara>2008-06-12</simpara>
16413   </note>
16414
16415   <para>
16416    This release contains one serious bug fix over 8.0.16.
16417    For information about new features in the 8.0 major release, see
16418    <xref linkend="release-8-0">.
16419   </para>
16420
16421   <sect2>
16422    <title>Migration to Version 8.0.17</title>
16423
16424    <para>
16425     A dump/restore is not required for those running 8.0.X.
16426     However, if you are upgrading from a version earlier than 8.0.6,
16427     see the release notes for 8.0.6.
16428    </para>
16429
16430   </sect2>
16431
16432   <sect2>
16433    <title>Changes</title>
16434
16435    <itemizedlist>
16436
16437     <listitem>
16438      <para>
16439       Make <function>pg_get_ruledef()</> parenthesize negative constants (Tom)
16440      </para>
16441
16442      <para>
16443       Before this fix, a negative constant in a view or rule might be dumped
16444       as, say, <literal>-42::integer</>, which is subtly incorrect: it should
16445       be <literal>(-42)::integer</> due to operator precedence rules.
16446       Usually this would make little difference, but it could interact with
16447       another recent patch to cause
16448       <productname>PostgreSQL</> to reject what had been a valid
16449       <command>SELECT DISTINCT</> view query.  Since this could result in
16450       <application>pg_dump</> output failing to reload, it is being treated
16451       as a high-priority fix.  The only released versions in which dump
16452       output is actually incorrect are 8.3.1 and 8.2.7.
16453      </para>
16454     </listitem>
16455
16456    </itemizedlist>
16457
16458   </sect2>
16459  </sect1>
16460
16461  <sect1 id="release-8-0-16">
16462   <title>Release 8.0.16</title>
16463
16464   <note>
16465   <title>Release date</title>
16466   <simpara>never released</simpara>
16467   </note>
16468
16469   <para>
16470    This release contains a variety of fixes from 8.0.15.
16471    For information about new features in the 8.0 major release, see
16472    <xref linkend="release-8-0">.
16473   </para>
16474
16475   <sect2>
16476    <title>Migration to Version 8.0.16</title>
16477
16478    <para>
16479     A dump/restore is not required for those running 8.0.X.
16480     However, if you are upgrading from a version earlier than 8.0.6,
16481     see the release notes for 8.0.6.
16482    </para>
16483
16484   </sect2>
16485
16486   <sect2>
16487    <title>Changes</title>
16488
16489    <itemizedlist>
16490
16491     <listitem>
16492      <para>
16493       Fix <command>ALTER TABLE ADD COLUMN ... PRIMARY KEY</> so that the new
16494       column is correctly checked to see if it's been initialized to all
16495       non-nulls (Brendan Jurd)
16496      </para>
16497
16498      <para>
16499       Previous versions neglected to check this requirement at all.
16500      </para>
16501     </listitem>
16502
16503     <listitem>
16504      <para>
16505       Fix possible <command>CREATE TABLE</> failure when inheriting the
16506       <quote>same</> constraint from multiple parent relations that
16507       inherited that constraint from a common ancestor (Tom)
16508      </para>
16509     </listitem>
16510
16511     <listitem>
16512      <para>
16513       Fix conversions between ISO-8859-5 and other encodings to handle
16514       Cyrillic <quote>Yo</> characters (<literal>e</> and <literal>E</> with
16515       two dots) (Sergey Burladyan)
16516      </para>
16517     </listitem>
16518
16519     <listitem>
16520      <para>
16521       Fix a few datatype input functions
16522       that were allowing unused bytes in their results to contain
16523       uninitialized, unpredictable values (Tom)
16524      </para>
16525
16526      <para>
16527       This could lead to failures in which two apparently identical literal
16528       values were not seen as equal, resulting in the parser complaining
16529       about unmatched <literal>ORDER BY</> and <literal>DISTINCT</>
16530       expressions.
16531      </para>
16532     </listitem>
16533
16534     <listitem>
16535      <para>
16536       Fix a corner case in regular-expression substring matching
16537       (<literal>substring(<replaceable>string</> from
16538       <replaceable>pattern</>)</literal>) (Tom)
16539      </para>
16540
16541      <para>
16542       The problem occurs when there is a match to the pattern overall but
16543       the user has specified a parenthesized subexpression and that
16544       subexpression hasn't got a match.  An example is
16545       <literal>substring('foo' from 'foo(bar)?')</>.
16546       This should return NULL, since <literal>(bar)</> isn't matched, but
16547       it was mistakenly returning the whole-pattern match instead (ie,
16548       <literal>foo</>).
16549      </para>
16550     </listitem>
16551
16552     <listitem>
16553      <para>
16554       Update time zone data files to <application>tzdata</> release 2008c (for
16555       DST law changes in Morocco, Iraq, Choibalsan, Pakistan, Syria, Cuba,
16556       Argentina/San_Luis, and Chile)
16557      </para>
16558     </listitem>
16559
16560     <listitem>
16561      <para>
16562       Fix incorrect result from <application>ecpg</>'s
16563       <function>PGTYPEStimestamp_sub()</> function (Michael)
16564      </para>
16565     </listitem>
16566
16567     <listitem>
16568      <para>
16569       Fix core dump in <filename>contrib/xml2</>'s
16570       <function>xpath_table()</> function when the input query returns a
16571       NULL value (Tom)
16572      </para>
16573     </listitem>
16574
16575     <listitem>
16576      <para>
16577       Fix <filename>contrib/xml2</>'s makefile to not override
16578       <literal>CFLAGS</> (Tom)
16579      </para>
16580     </listitem>
16581
16582     <listitem>
16583      <para>
16584       Fix <literal>DatumGetBool</> macro to not fail with <application>gcc</>
16585       4.3 (Tom)
16586      </para>
16587
16588      <para>
16589       This problem affects <quote>old style</> (V0) C functions that
16590       return boolean.  The fix is already in 8.3, but the need to
16591       back-patch it was not realized at the time.
16592      </para>
16593     </listitem>
16594
16595     <listitem>
16596      <para>
16597       Fix longstanding <command>LISTEN</>/<command>NOTIFY</>
16598       race condition (Tom)
16599      </para>
16600
16601      <para>
16602       In rare cases a session that had just executed a
16603       <command>LISTEN</> might not get a notification, even though
16604       one would be expected because the concurrent transaction executing
16605       <command>NOTIFY</> was observed to commit later.
16606      </para>
16607
16608      <para>
16609       A side effect of the fix is that a transaction that has executed
16610       a not-yet-committed <command>LISTEN</> command will not see any
16611       row in <structname>pg_listener</> for the <command>LISTEN</>,
16612       should it choose to look; formerly it would have.  This behavior
16613       was never documented one way or the other, but it is possible that
16614       some applications depend on the old behavior.
16615      </para>
16616     </listitem>
16617
16618     <listitem>
16619      <para>
16620       Fix rare crash when an error occurs during a query using a hash index
16621       (Heikki)
16622      </para>
16623     </listitem>
16624
16625     <listitem>
16626      <para>
16627       Fix input of datetime values for February 29 in years BC (Tom)
16628      </para>
16629
16630      <para>
16631       The former coding was mistaken about which years were leap years.
16632      </para>
16633     </listitem>
16634
16635     <listitem>
16636      <para>
16637       Fix <quote>unrecognized node type</> error in some variants of
16638       <command>ALTER OWNER</> (Tom)
16639      </para>
16640     </listitem>
16641
16642     <listitem>
16643      <para>
16644       Fix <application>pg_ctl</> to correctly extract the postmaster's port
16645       number from command-line options (Itagaki Takahiro, Tom)
16646      </para>
16647
16648      <para>
16649       Previously, <literal>pg_ctl start -w</> could try to contact the
16650       postmaster on the wrong port, leading to bogus reports of startup
16651       failure.
16652      </para>
16653     </listitem>
16654
16655     <listitem>
16656      <para>
16657       Use <option>-fwrapv</> to defend against possible misoptimization
16658       in recent <application>gcc</> versions (Tom)
16659      </para>
16660
16661      <para>
16662       This is known to be necessary when building <productname>PostgreSQL</>
16663       with <application>gcc</> 4.3 or later.
16664      </para>
16665     </listitem>
16666
16667     <listitem>
16668      <para>
16669       Fix display of constant expressions in <literal>ORDER BY</>
16670       and <literal>GROUP BY</> (Tom)
16671      </para>
16672
16673      <para>
16674       An explictly casted constant would be shown incorrectly.  This could
16675       for example lead to corruption of a view definition during
16676       dump and reload.
16677      </para>
16678     </listitem>
16679
16680     <listitem>
16681      <para>
16682       Fix <application>libpq</> to handle NOTICE messages correctly
16683       during COPY OUT (Tom)
16684      </para>
16685
16686      <para>
16687       This failure has only been observed to occur when a user-defined
16688       datatype's output routine issues a NOTICE, but there is no
16689       guarantee it couldn't happen due to other causes.
16690      </para>
16691     </listitem>
16692
16693    </itemizedlist>
16694
16695   </sect2>
16696  </sect1>
16697
16698  <sect1 id="release-8-0-15">
16699   <title>Release 8.0.15</title>
16700
16701   <note>
16702   <title>Release date</title>
16703   <simpara>2008-01-07</simpara>
16704   </note>
16705
16706   <para>
16707    This release contains a variety of fixes from 8.0.14,
16708    including fixes for significant security issues.
16709    For information about new features in the 8.0 major release, see
16710    <xref linkend="release-8-0">.
16711   </para>
16712
16713   <para>
16714    This is the last 8.0.X release for which the <productname>PostgreSQL</>
16715    community will produce binary packages for <productname>Windows</>.
16716    Windows users are encouraged to move to 8.2.X or later,
16717    since there are Windows-specific fixes in 8.2.X that
16718    are impractical to back-port.  8.0.X will continue to
16719    be supported on other platforms.
16720   </para>
16721
16722   <sect2>
16723    <title>Migration to Version 8.0.15</title>
16724
16725    <para>
16726     A dump/restore is not required for those running 8.0.X.  However,
16727     if you are upgrading from a version earlier than 8.0.6, see the release
16728     notes for 8.0.6.
16729    </para>
16730
16731   </sect2>
16732
16733   <sect2>
16734    <title>Changes</title>
16735
16736    <itemizedlist>
16737
16738     <listitem>
16739      <para>
16740       Prevent functions in indexes from executing with the privileges of
16741       the user running <command>VACUUM</>, <command>ANALYZE</>, etc (Tom)
16742      </para>
16743
16744      <para>
16745       Functions used in index expressions and partial-index
16746       predicates are evaluated whenever a new table entry is made.  It has
16747       long been understood that this poses a risk of trojan-horse code
16748       execution if one modifies a table owned by an untrustworthy user.
16749       (Note that triggers, defaults, check constraints, etc. pose the
16750       same type of risk.)  But functions in indexes pose extra danger
16751       because they will be executed by routine maintenance operations
16752       such as <command>VACUUM FULL</>, which are commonly performed
16753       automatically under a superuser account.  For example, a nefarious user
16754       can execute code with superuser privileges by setting up a
16755       trojan-horse index definition and waiting for the next routine vacuum.
16756       The fix arranges for standard maintenance operations
16757       (including <command>VACUUM</>, <command>ANALYZE</>, <command>REINDEX</>,
16758       and <command>CLUSTER</>) to execute as the table owner rather than
16759       the calling user, using the same privilege-switching mechanism already
16760       used for <literal>SECURITY DEFINER</> functions.  To prevent bypassing
16761       this security measure, execution of <command>SET SESSION
16762       AUTHORIZATION</> and <command>SET ROLE</> is now forbidden within a
16763       <literal>SECURITY DEFINER</> context.  (CVE-2007-6600)
16764      </para>
16765     </listitem>
16766
16767     <listitem>
16768      <para>
16769       Repair assorted bugs in the regular-expression package (Tom, Will Drewry)
16770      </para>
16771
16772      <para>
16773       Suitably crafted regular-expression patterns could cause crashes,
16774       infinite or near-infinite looping, and/or massive memory consumption,
16775       all of which pose denial-of-service hazards for applications that
16776       accept regex search patterns from untrustworthy sources.
16777       (CVE-2007-4769, CVE-2007-4772, CVE-2007-6067)
16778      </para>
16779     </listitem>
16780
16781     <listitem>
16782      <para>
16783       Require non-superusers who use <filename>/contrib/dblink</> to use only
16784       password authentication, as a security measure (Joe)
16785      </para>
16786
16787      <para>
16788       The fix that appeared for this in 8.0.14 was incomplete, as it plugged
16789       the hole for only some <filename>dblink</> functions.  (CVE-2007-6601,
16790       CVE-2007-3278)
16791      </para>
16792     </listitem>
16793
16794     <listitem>
16795      <para>
16796       Update time zone data files to <application>tzdata</> release 2007k
16797       (in particular, recent Argentina changes) (Tom)
16798      </para>
16799     </listitem>
16800
16801     <listitem>
16802      <para>
16803       Fix planner failure in some cases of <literal>WHERE false AND var IN
16804       (SELECT ...)</> (Tom)
16805      </para>
16806     </listitem>
16807
16808     <listitem>
16809      <para>
16810       Preserve the tablespace of indexes that are
16811       rebuilt by <command>ALTER TABLE ... ALTER COLUMN TYPE</> (Tom)
16812      </para>
16813     </listitem>
16814
16815     <listitem>
16816      <para>
16817       Make archive recovery always start a new WAL timeline, rather than only
16818       when a recovery stop time was used (Simon)
16819      </para>
16820
16821      <para>
16822       This avoids a corner-case risk of trying to overwrite an existing
16823       archived copy of the last WAL segment, and seems simpler and cleaner
16824       than the original definition.
16825      </para>
16826     </listitem>
16827
16828     <listitem>
16829      <para>
16830       Make <command>VACUUM</> not use all of <varname>maintenance_work_mem</>
16831       when the table is too small for it to be useful (Alvaro)
16832      </para>
16833     </listitem>
16834
16835     <listitem>
16836      <para>
16837       Fix potential crash in <function>translate()</> when using a multibyte
16838       database encoding (Tom)
16839      </para>
16840     </listitem>
16841
16842     <listitem>
16843      <para>
16844       Fix PL/Perl to cope when platform's Perl defines type <literal>bool</>
16845       as <literal>int</> rather than <literal>char</> (Tom)
16846      </para>
16847
16848      <para>
16849       While this could theoretically happen anywhere, no standard build of
16850       Perl did things this way ... until <productname>Mac OS X</> 10.5.
16851      </para>
16852     </listitem>
16853
16854     <listitem>
16855      <para>
16856       Fix PL/Python to not crash on long exception messages (Alvaro)
16857      </para>
16858     </listitem>
16859
16860     <listitem>
16861      <para>
16862       Fix <application>pg_dump</> to correctly handle inheritance child tables
16863       that have default expressions different from their parent's (Tom)
16864      </para>
16865     </listitem>
16866
16867     <listitem>
16868      <para>
16869       <application>ecpg</> parser fixes (Michael)
16870      </para>
16871     </listitem>
16872
16873     <listitem>
16874      <para>
16875       Make <filename>contrib/tablefunc</>'s <function>crosstab()</> handle
16876       NULL rowid as a category in its own right, rather than crashing (Joe)
16877      </para>
16878     </listitem>
16879
16880     <listitem>
16881      <para>
16882       Fix <type>tsvector</> and <type>tsquery</> output routines to
16883       escape backslashes correctly (Teodor, Bruce)
16884      </para>
16885     </listitem>
16886
16887     <listitem>
16888      <para>
16889       Fix crash of <function>to_tsvector()</> on huge input strings (Teodor)
16890      </para>
16891     </listitem>
16892
16893     <listitem>
16894      <para>
16895       Require a specific version of <productname>Autoconf</> to be used
16896       when re-generating the <command>configure</> script (Peter)
16897      </para>
16898
16899      <para>
16900       This affects developers and packagers only.  The change was made
16901       to prevent accidental use of untested combinations of
16902       <productname>Autoconf</> and <productname>PostgreSQL</> versions.
16903       You can remove the version check if you really want to use a
16904       different <productname>Autoconf</> version, but it's
16905       your responsibility whether the result works or not.
16906      </para>
16907     </listitem>
16908
16909    </itemizedlist>
16910
16911   </sect2>
16912  </sect1>
16913
16914  <sect1 id="release-8-0-14">
16915   <title>Release 8.0.14</title>
16916
16917   <note>
16918   <title>Release date</title>
16919   <simpara>2007-09-17</simpara>
16920   </note>
16921
16922   <para>
16923    This release contains a variety of fixes from 8.0.13.
16924    For information about new features in the 8.0 major release, see
16925    <xref linkend="release-8-0">.
16926   </para>
16927
16928   <sect2>
16929    <title>Migration to Version 8.0.14</title>
16930
16931    <para>
16932     A dump/restore is not required for those running 8.0.X.  However,
16933     if you are upgrading from a version earlier than 8.0.6, see the release
16934     notes for 8.0.6.
16935    </para>
16936
16937   </sect2>
16938
16939   <sect2>
16940    <title>Changes</title>
16941
16942    <itemizedlist>
16943
16944     <listitem>
16945      <para>
16946       Prevent index corruption when a transaction inserts rows and
16947       then aborts close to the end of a concurrent <command>VACUUM</>
16948       on the same table (Tom)
16949      </para>
16950     </listitem>
16951
16952     <listitem>
16953      <para>
16954       Make <command>CREATE DOMAIN ... DEFAULT NULL</> work properly (Tom)
16955      </para>
16956     </listitem>
16957
16958     <listitem>
16959      <para>
16960       Fix excessive logging of <acronym>SSL</> error messages (Tom)
16961      </para>
16962     </listitem>
16963
16964     <listitem>
16965      <para>
16966       Fix logging so that log messages are never interleaved when using
16967       the syslogger process (Andrew)
16968      </para>
16969     </listitem>
16970
16971     <listitem>
16972      <para>
16973       Fix crash when <varname>log_min_error_statement</> logging runs out
16974       of memory (Tom)
16975      </para>
16976     </listitem>
16977
16978     <listitem>
16979      <para>
16980       Fix incorrect handling of some foreign-key corner cases (Tom)
16981      </para>
16982     </listitem>
16983
16984     <listitem>
16985      <para>
16986       Prevent <command>CLUSTER</> from failing
16987       due to attempting to process temporary tables of other sessions (Alvaro)
16988      </para>
16989     </listitem>
16990
16991     <listitem>
16992      <para>
16993       Update the time zone database rules, particularly New Zealand's upcoming changes (Tom)
16994      </para>
16995     </listitem>
16996
16997     <listitem>
16998      <para>
16999       Windows socket improvements (Magnus)
17000      </para>
17001     </listitem>
17002
17003     <listitem>
17004      <para>
17005       Suppress timezone name (<literal>%Z</>) in log timestamps on Windows
17006       because of possible encoding mismatches (Tom)
17007      </para>
17008     </listitem>
17009
17010     <listitem>
17011      <para>
17012       Require non-superusers who use <filename>/contrib/dblink</> to use only
17013       password authentication, as a security measure (Joe)
17014      </para>
17015     </listitem>
17016
17017    </itemizedlist>
17018
17019   </sect2>
17020  </sect1>
17021
17022  <sect1 id="release-8-0-13">
17023   <title>Release 8.0.13</title>
17024
17025   <note>
17026   <title>Release date</title>
17027   <simpara>2007-04-23</simpara>
17028   </note>
17029
17030   <para>
17031    This release contains a variety of fixes from 8.0.12,
17032    including a security fix.
17033    For information about new features in the 8.0 major release, see
17034    <xref linkend="release-8-0">.
17035   </para>
17036
17037   <sect2>
17038    <title>Migration to Version 8.0.13</title>
17039
17040    <para>
17041     A dump/restore is not required for those running 8.0.X.  However,
17042     if you are upgrading from a version earlier than 8.0.6, see the release
17043     notes for 8.0.6.
17044    </para>
17045
17046   </sect2>
17047
17048   <sect2>
17049    <title>Changes</title>
17050
17051    <itemizedlist>
17052
17053     <listitem>
17054     <para>
17055      Support explicit placement of the temporary-table schema within
17056      <varname>search_path</>, and disable searching it for functions
17057      and operators (Tom)
17058     </para>
17059     <para>
17060      This is needed to allow a security-definer function to set a
17061      truly secure value of <varname>search_path</>.  Without it,
17062      an unprivileged SQL user can use temporary objects to execute code
17063      with the privileges of the security-definer function (CVE-2007-2138).
17064      See <command>CREATE FUNCTION</> for more information.
17065     </para>
17066     </listitem>
17067
17068     <listitem>
17069     <para>
17070      <filename>/contrib/tsearch2</> crash fixes (Teodor)
17071     </para>
17072     </listitem>
17073
17074     <listitem>
17075     <para>
17076      Fix potential-data-corruption bug in how <command>VACUUM FULL</> handles
17077      <command>UPDATE</> chains (Tom, Pavan Deolasee)
17078     </para>
17079     </listitem>
17080
17081     <listitem>
17082     <para>
17083      Fix PANIC during enlargement of a hash index (bug introduced in 8.0.10)
17084      (Tom)
17085     </para>
17086     </listitem>
17087
17088     <listitem>
17089     <para>
17090      Fix POSIX-style timezone specs to follow new USA DST rules (Tom)
17091     </para>
17092     </listitem>
17093
17094    </itemizedlist>
17095
17096   </sect2>
17097  </sect1>
17098
17099  <sect1 id="release-8-0-12">
17100   <title>Release 8.0.12</title>
17101
17102   <note>
17103   <title>Release date</title>
17104   <simpara>2007-02-07</simpara>
17105   </note>
17106
17107   <para>
17108    This release contains one fix from 8.0.11.
17109    For information about new features in the 8.0 major release, see
17110    <xref linkend="release-8-0">.
17111   </para>
17112
17113   <sect2>
17114    <title>Migration to Version 8.0.12</title>
17115
17116    <para>
17117     A dump/restore is not required for those running 8.0.X.  However,
17118     if you are upgrading from a version earlier than 8.0.6, see the release
17119     notes for 8.0.6.
17120    </para>
17121
17122   </sect2>
17123
17124   <sect2>
17125    <title>Changes</title>
17126
17127    <itemizedlist>
17128
17129     <listitem>
17130     <para>
17131      Remove overly-restrictive check for type length in constraints and
17132      functional indexes(Tom)
17133     </para>
17134     </listitem>
17135
17136    </itemizedlist>
17137
17138   </sect2>
17139  </sect1>
17140
17141  <sect1 id="release-8-0-11">
17142   <title>Release 8.0.11</title>
17143
17144   <note>
17145   <title>Release date</title>
17146   <simpara>2007-02-05</simpara>
17147   </note>
17148
17149   <para>
17150    This release contains a variety of fixes from 8.0.10, including
17151    a security fix.
17152    For information about new features in the 8.0 major release, see
17153    <xref linkend="release-8-0">.
17154   </para>
17155
17156   <sect2>
17157    <title>Migration to Version 8.0.11</title>
17158
17159    <para>
17160     A dump/restore is not required for those running 8.0.X.  However,
17161     if you are upgrading from a version earlier than 8.0.6, see the release
17162     notes for 8.0.6.
17163    </para>
17164
17165   </sect2>
17166
17167   <sect2>
17168    <title>Changes</title>
17169
17170    <itemizedlist>
17171
17172     <listitem>
17173     <para>
17174      Remove security vulnerabilities that allowed connected users
17175      to read backend memory (Tom)
17176     </para>
17177     <para>
17178      The vulnerabilities involve suppressing the normal check that a SQL
17179      function returns the data type it's declared to, and changing the
17180      data type of a table column (CVE-2007-0555, CVE-2007-0556).  These
17181      errors can easily be exploited to cause a backend crash, and in
17182      principle might be used to read database content that the user
17183      should not be able to access.
17184     </para>
17185     </listitem>
17186
17187     <listitem>
17188     <para>
17189      Fix rare bug wherein btree index page splits could fail
17190      due to choosing an infeasible split point (Heikki Linnakangas)
17191     </para>
17192     </listitem>
17193
17194     <listitem>
17195     <para>
17196      Fix for rare Assert() crash triggered by <literal>UNION</> (Tom)
17197     </para>
17198     </listitem>
17199
17200     <listitem>
17201     <para>
17202      Tighten security of multi-byte character processing for UTF8 sequences
17203      over three bytes long (Tom)
17204     </para>
17205     </listitem>
17206
17207    </itemizedlist>
17208
17209   </sect2>
17210  </sect1>
17211
17212  <sect1 id="release-8-0-10">
17213   <title>Release 8.0.10</title>
17214
17215   <note>
17216   <title>Release date</title>
17217   <simpara>2007-01-08</simpara>
17218   </note>
17219
17220   <para>
17221    This release contains a variety of fixes from 8.0.9.
17222    For information about new features in the 8.0 major release, see
17223    <xref linkend="release-8-0">.
17224   </para>
17225
17226   <sect2>
17227    <title>Migration to Version 8.0.10</title>
17228
17229    <para>
17230     A dump/restore is not required for those running 8.0.X.  However,
17231     if you are upgrading from a version earlier than 8.0.6, see the release
17232     notes for 8.0.6.
17233    </para>
17234
17235   </sect2>
17236
17237   <sect2>
17238    <title>Changes</title>
17239
17240    <itemizedlist>
17241
17242     <listitem>
17243      <para>
17244       Improve handling of <function>getaddrinfo()</> on AIX (Tom)
17245      </para>
17246
17247      <para>
17248       This fixes a problem with starting the statistics collector,
17249       among other things.
17250      </para>
17251     </listitem>
17252
17253      <listitem>
17254       <para>
17255        Fix <quote>failed to re-find parent key</> errors in
17256        <command>VACUUM</> (Tom)
17257       </para>
17258      </listitem>
17259
17260      <listitem>
17261       <para>
17262        Fix race condition for truncation of a large relation across a
17263        gigabyte boundary by <command>VACUUM</> (Tom)
17264       </para>
17265      </listitem>
17266
17267      <listitem>
17268       <para>
17269        Fix bugs affecting multi-gigabyte hash indexes (Tom)
17270       </para>
17271      </listitem>
17272
17273     <listitem>
17274      <para>
17275       Fix possible deadlock in Windows signal handling (Teodor)
17276      </para>
17277     </listitem>
17278
17279     <listitem>
17280      <para>
17281       Fix error when constructing an <literal>ARRAY[]</> made up of multiple
17282       empty elements (Tom)
17283      </para>
17284     </listitem>
17285
17286     <listitem>
17287      <para>
17288       Fix ecpg memory leak during connection (Michael)
17289      </para>
17290     </listitem>
17291
17292     <listitem>
17293      <para>
17294       <function>to_number()</> and <function>to_char(numeric)</>
17295       are now <literal>STABLE</>, not <literal>IMMUTABLE</>, for
17296       new <application>initdb</> installs (Tom)
17297      </para>
17298
17299      <para>
17300       This is because <varname>lc_numeric</> can potentially
17301       change the output of these functions.
17302      </para>
17303     </listitem>
17304
17305     <listitem>
17306      <para>
17307       Improve index usage of regular expressions that use parentheses (Tom)
17308      </para>
17309
17310      <para>
17311       This improves <application>psql</> <literal>\d</> performance also.
17312      </para>
17313     </listitem>
17314
17315     <listitem>
17316      <para>
17317       Update timezone database
17318      </para>
17319
17320      <para>
17321       This affects Australian and Canadian daylight-savings rules in
17322       particular.
17323      </para>
17324     </listitem>
17325
17326    </itemizedlist>
17327
17328   </sect2>
17329  </sect1>
17330
17331  <sect1 id="release-8-0-9">
17332   <title>Release 8.0.9</title>
17333
17334   <note>
17335   <title>Release date</title>
17336   <simpara>2006-10-16</simpara>
17337   </note>
17338
17339   <para>
17340    This release contains a variety of fixes from 8.0.8.
17341    For information about new features in the 8.0 major release, see
17342    <xref linkend="release-8-0">.
17343   </para>
17344
17345   <sect2>
17346    <title>Migration to Version 8.0.9</title>
17347
17348    <para>
17349     A dump/restore is not required for those running 8.0.X.  However,
17350     if you are upgrading from a version earlier than 8.0.6, see the release
17351     notes for 8.0.6.
17352    </para>
17353
17354   </sect2>
17355
17356   <sect2>
17357    <title>Changes</title>
17358
17359 <itemizedlist>
17360 <listitem><para>Fix crash when referencing <literal>NEW</> row
17361 values in rule WHERE expressions (Tom)</para></listitem>
17362 <listitem><para>Fix core dump when an untyped literal is taken as
17363 ANYARRAY</para></listitem>
17364 <listitem><para>Fix mishandling of AFTER triggers when query contains a SQL
17365 function returning multiple rows (Tom)</para></listitem>
17366 <listitem><para>Fix <command>ALTER TABLE ... TYPE</> to recheck
17367 <literal>NOT NULL</> for <literal>USING</> clause (Tom)</para></listitem>
17368 <listitem><para>Fix <function>string_to_array()</> to handle overlapping
17369  matches for the separator string</para>
17370 <para>For example, <literal>string_to_array('123xx456xxx789', 'xx')</>.
17371 </para></listitem>
17372 <listitem><para>Fix corner cases in pattern matching for
17373  <application>psql</>'s <literal>\d</> commands</para></listitem>
17374 <listitem><para>Fix index-corrupting bugs in /contrib/ltree
17375  (Teodor)</para></listitem>
17376 <listitem><para>Numerous robustness fixes in <application>ecpg</> (Joachim
17377 Wieland)</para></listitem>
17378 <listitem><para>Fix backslash escaping in /contrib/dbmirror</para></listitem>
17379 <listitem><para>Fix instability of statistics collection on Win32 (Tom, Andrew)</para></listitem>
17380 <listitem><para>Fixes for <systemitem class="osname">AIX</> and
17381 <productname>Intel</> compilers (Tom)</para></listitem>
17382 </itemizedlist>
17383
17384   </sect2>
17385  </sect1>
17386
17387  <sect1 id="release-8-0-8">
17388   <title>Release 8.0.8</title>
17389
17390   <note>
17391   <title>Release date</title>
17392   <simpara>2006-05-23</simpara>
17393   </note>
17394
17395   <para>
17396    This release contains a variety of fixes from 8.0.7,
17397    including patches for extremely serious security issues.
17398    For information about new features in the 8.0 major release, see
17399    <xref linkend="release-8-0">.
17400   </para>
17401
17402   <sect2>
17403    <title>Migration to Version 8.0.8</title>
17404
17405    <para>
17406     A dump/restore is not required for those running 8.0.X.  However,
17407     if you are upgrading from a version earlier than 8.0.6, see the release
17408     notes for 8.0.6.
17409    </para>
17410
17411    <para>
17412     Full security against the SQL-injection attacks described in
17413     CVE-2006-2313 and CVE-2006-2314 might require changes in application
17414     code.  If you have applications that embed untrustworthy strings
17415     into SQL commands, you should examine them as soon as possible to
17416     ensure that they are using recommended escaping techniques.  In
17417     most cases, applications should be using subroutines provided by
17418     libraries or drivers (such as <application>libpq</>'s
17419     <function>PQescapeStringConn()</>) to perform string escaping,
17420     rather than relying on <foreignphrase>ad hoc</> code to do it.
17421    </para>
17422   </sect2>
17423
17424   <sect2>
17425    <title>Changes</title>
17426
17427 <itemizedlist>
17428 <listitem><para>Change the server to reject invalidly-encoded multibyte
17429 characters in all cases (Tatsuo, Tom)</para>
17430 <para>While <productname>PostgreSQL</> has been moving in this direction for
17431 some time, the checks are now applied uniformly to all encodings and all
17432 textual input, and are now always errors not merely warnings.  This change
17433 defends against SQL-injection attacks of the type described in CVE-2006-2313.
17434 </para></listitem>
17435
17436 <listitem><para>Reject unsafe uses of <literal>\'</> in string literals</para>
17437 <para>As a server-side defense against SQL-injection attacks of the type
17438 described in CVE-2006-2314, the server now only accepts <literal>''</> and not
17439 <literal>\'</> as a representation of ASCII single quote in SQL string
17440 literals.  By default, <literal>\'</> is rejected only when
17441 <varname>client_encoding</> is set to a client-only encoding (SJIS, BIG5, GBK,
17442 GB18030, or UHC), which is the scenario in which SQL injection is possible.
17443 A new configuration parameter <varname>backslash_quote</> is available to
17444 adjust this behavior when needed.  Note that full security against
17445 CVE-2006-2314 might require client-side changes; the purpose of
17446 <varname>backslash_quote</> is in part to make it obvious that insecure
17447 clients are insecure.
17448 </para></listitem>
17449
17450 <listitem><para>Modify <application>libpq</>'s string-escaping routines to be
17451 aware of encoding considerations and
17452 <varname>standard_conforming_strings</></para>
17453 <para>This fixes <application>libpq</>-using applications for the security
17454 issues described in CVE-2006-2313 and CVE-2006-2314, and also future-proofs
17455 them against the planned changeover to SQL-standard string literal syntax.
17456 Applications that use multiple <productname>PostgreSQL</> connections
17457 concurrently should migrate to <function>PQescapeStringConn()</> and
17458 <function>PQescapeByteaConn()</> to ensure that escaping is done correctly
17459 for the settings in use in each database connection.  Applications that
17460 do string escaping <quote>by hand</> should be modified to rely on library
17461 routines instead.
17462 </para></listitem>
17463
17464 <listitem><para>Fix some incorrect encoding conversion functions</para>
17465 <para><function>win1251_to_iso</>, <function>alt_to_iso</>,
17466 <function>euc_tw_to_big5</>, <function>euc_tw_to_mic</>,
17467 <function>mic_to_euc_tw</> were all broken to varying
17468 extents.
17469 </para></listitem>
17470
17471 <listitem><para>Clean up stray remaining uses of <literal>\'</> in strings
17472 (Bruce, Jan)</para></listitem>
17473
17474 <listitem><para>Fix bug that sometimes caused OR'd index scans to
17475 miss rows they should have returned</para></listitem>
17476
17477 <listitem><para>Fix WAL replay for case where a btree index has been
17478 truncated</para></listitem>
17479
17480 <listitem><para>Fix <literal>SIMILAR TO</> for patterns involving
17481 <literal>|</> (Tom)</para></listitem>
17482
17483 <listitem><para>Fix <command>SELECT INTO</> and <command>CREATE TABLE AS</> to
17484 create tables in the default tablespace, not the base directory (Kris
17485 Jurka)</para></listitem>
17486
17487 <listitem><para>Fix server to use custom DH SSL parameters correctly (Michael
17488 Fuhr)</para></listitem>
17489
17490 <listitem><para>Fix for Bonjour on Intel Macs (Ashley Clark)</para></listitem>
17491
17492 <listitem><para>Fix various minor memory leaks</para></listitem>
17493
17494 <listitem><para>Fix problem with password prompting on some Win32 systems
17495 (Robert Kinberg)</para></listitem>
17496 </itemizedlist>
17497
17498   </sect2>
17499  </sect1>
17500
17501  <sect1 id="release-8-0-7">
17502   <title>Release 8.0.7</title>
17503
17504   <note>
17505   <title>Release date</title>
17506   <simpara>2006-02-14</simpara>
17507   </note>
17508
17509   <para>
17510    This release contains a variety of fixes from 8.0.6.
17511    For information about new features in the 8.0 major release, see
17512    <xref linkend="release-8-0">.
17513   </para>
17514
17515   <sect2>
17516    <title>Migration to Version 8.0.7</title>
17517
17518    <para>
17519     A dump/restore is not required for those running 8.0.X.  However,
17520     if you are upgrading from a version earlier than 8.0.6, see the release
17521     notes for 8.0.6.
17522    </para>
17523   </sect2>
17524
17525   <sect2>
17526    <title>Changes</title>
17527
17528 <itemizedlist>
17529
17530 <listitem><para>Fix potential crash in <command>SET
17531 SESSION AUTHORIZATION</> (CVE-2006-0553)</para>
17532 <para>An unprivileged user could crash the server process, resulting in
17533 momentary denial of service to other users, if the server has been compiled
17534 with Asserts enabled (which is not the default).
17535 Thanks to Akio Ishida for reporting this problem.
17536 </para></listitem>
17537
17538 <listitem><para>Fix bug with row visibility logic in self-inserted
17539 rows (Tom)</para>
17540 <para>Under rare circumstances a row inserted by the current command
17541 could be seen as already valid, when it should not be.  Repairs bug
17542 created in 8.0.4, 7.4.9, and 7.3.11 releases.
17543 </para></listitem>
17544
17545 <listitem><para>Fix race condition that could lead to <quote>file already
17546 exists</> errors during pg_clog and pg_subtrans file creation
17547 (Tom)</para></listitem>
17548
17549 <listitem><para>Fix cases that could lead to crashes if a cache-invalidation
17550 message arrives at just the wrong time (Tom)</para></listitem>
17551
17552 <listitem><para>Properly check <literal>DOMAIN</> constraints for
17553 <literal>UNKNOWN</> parameters in prepared statements
17554 (Neil)</para></listitem>
17555
17556 <listitem><para>Ensure <command>ALTER COLUMN TYPE</> will process
17557 <literal>FOREIGN KEY</>, <literal>UNIQUE</>, and <literal>PRIMARY KEY</>
17558 constraints in the proper order (Nakano Yoshihisa)</para></listitem>
17559
17560 <listitem><para>Fixes to allow restoring dumps that have cross-schema
17561 references to custom operators or operator classes (Tom)</para></listitem>
17562
17563 <listitem><para>Allow <application>pg_restore</> to continue properly after a
17564 <command>COPY</> failure; formerly it tried to treat the remaining
17565 <command>COPY</> data as SQL commands (Stephen Frost)</para></listitem>
17566
17567 <listitem><para>Fix <application>pg_ctl</> <literal>unregister</> crash
17568 when the  data directory is not specified (Magnus)</para></listitem>
17569
17570 <listitem><para>Fix <application>ecpg</> crash on AMD64 and PPC
17571 (Neil)</para></listitem>
17572
17573 <listitem><para>Recover properly if error occurs during argument passing
17574 in <application>PL/python</> (Neil)</para></listitem>
17575
17576 <listitem><para>Fix <application>PL/perl</>'s handling of locales on
17577 Win32 to match the backend (Andrew)</para></listitem>
17578
17579 <listitem><para>Fix crash when <literal>log_min_messages</> is set to
17580 <literal>DEBUG3</> or above in <filename>postgresql.conf</> on Win32
17581 (Bruce)</para></listitem>
17582
17583 <listitem><para>Fix <application>pgxs</> <literal>-L</> library path
17584 specification for Win32, Cygwin, OS X, AIX (Bruce)</para></listitem>
17585
17586 <listitem><para>Check that SID is enabled while checking for Win32 admin
17587 privileges (Magnus)</para></listitem>
17588
17589 <listitem><para>Properly reject out-of-range date inputs (Kris
17590 Jurka)</para></listitem>
17591
17592 <listitem><para>Portability fix for testing presence of <function>finite</>
17593 and <function>isinf</> during configure (Tom)</para></listitem>
17594
17595 </itemizedlist>
17596
17597   </sect2>
17598  </sect1>
17599
17600  <sect1 id="release-8-0-6">
17601   <title>Release 8.0.6</title>
17602
17603   <note>
17604   <title>Release date</title>
17605   <simpara>2006-01-09</simpara>
17606   </note>
17607
17608   <para>
17609    This release contains a variety of fixes from 8.0.5.
17610    For information about new features in the 8.0 major release, see
17611    <xref linkend="release-8-0">.
17612   </para>
17613
17614   <sect2>
17615    <title>Migration to Version 8.0.6</title>
17616
17617    <para>
17618     A dump/restore is not required for those running 8.0.X.  However,
17619     if you are upgrading from a version earlier than 8.0.3, see the release
17620     notes for 8.0.3.
17621     Also, you might need to <command>REINDEX</> indexes on textual
17622     columns after updating, if you are affected by the locale or
17623     <application>plperl</> issues described below.
17624    </para>
17625   </sect2>
17626
17627   <sect2>
17628    <title>Changes</title>
17629
17630 <itemizedlist>
17631
17632 <listitem><para>Fix Windows code so that postmaster will continue rather
17633 than exit if there is no more room in ShmemBackendArray (Magnus)</para>
17634 <para>The previous behavior could lead to a denial-of-service situation if too
17635 many connection requests arrive close together.  This applies
17636 <emphasis>only</> to the Windows port.</para></listitem>
17637
17638 <listitem><para>Fix bug introduced in 8.0 that could allow ReadBuffer
17639 to return an already-used page as new, potentially causing loss of
17640 recently-committed data (Tom)</para></listitem>
17641
17642 <listitem><para>Fix for protocol-level Describe messages issued
17643 outside a transaction or in a failed transaction (Tom)</para></listitem>
17644
17645 <listitem><para>Fix character string comparison for locales that consider
17646 different character combinations as equal, such as Hungarian (Tom)</para>
17647 <para>This might require <command>REINDEX</> to fix existing indexes on
17648 textual columns.</para></listitem>
17649
17650 <listitem><para>Set locale environment variables during postmaster startup
17651 to ensure that <application>plperl</> won't change the locale later</para>
17652 <para>This fixes a problem that occurred if the <application>postmaster</> was
17653 started with environment variables specifying a different locale than what
17654 <application>initdb</> had been told.  Under these conditions, any use of
17655 <application>plperl</> was likely to lead to corrupt indexes.  You might need
17656 <command>REINDEX</> to fix existing indexes on
17657 textual columns if this has happened to you.</para></listitem>
17658
17659 <listitem><para>Allow more flexible relocation of installation
17660 directories (Tom)</para>
17661 <para>Previous releases supported relocation only if all installation
17662 directory paths were the same except for the last component.</para></listitem>
17663
17664 <listitem><para>Fix longstanding bug in strpos() and regular expression
17665 handling in certain rarely used Asian multi-byte character sets (Tatsuo)
17666 </para></listitem>
17667
17668 <listitem><para>Various fixes for functions returning <literal>RECORD</>s
17669 (Tom) </para></listitem>
17670
17671 <listitem><para>Fix bug in <filename>/contrib/pgcrypto</> gen_salt,
17672 which caused it not to use all available salt space for MD5 and
17673 XDES algorithms (Marko Kreen, Solar Designer)</para>
17674 <para>Salts for Blowfish and standard DES are unaffected.</para></listitem>
17675
17676 <listitem><para>Fix <filename>/contrib/dblink</> to throw an error,
17677 rather than crashing, when the number of columns specified is different from
17678 what's actually returned by the query (Joe)</para></listitem>
17679
17680 </itemizedlist>
17681
17682   </sect2>
17683  </sect1>
17684
17685  <sect1 id="release-8-0-5">
17686   <title>Release 8.0.5</title>
17687
17688   <note>
17689   <title>Release date</title>
17690   <simpara>2005-12-12</simpara>
17691   </note>
17692
17693   <para>
17694    This release contains a variety of fixes from 8.0.4.
17695    For information about new features in the 8.0 major release, see
17696    <xref linkend="release-8-0">.
17697   </para>
17698
17699   <sect2>
17700    <title>Migration to Version 8.0.5</title>
17701
17702    <para>
17703     A dump/restore is not required for those running 8.0.X.  However,
17704     if you are upgrading from a version earlier than 8.0.3, see the release
17705     notes for 8.0.3.
17706    </para>
17707   </sect2>
17708
17709   <sect2>
17710    <title>Changes</title>
17711
17712 <itemizedlist>
17713
17714 <listitem><para>Fix race condition in transaction log management</para>
17715 <para>There was a narrow window in which an I/O operation could be initiated
17716 for the wrong page, leading to an Assert failure or data
17717 corruption.</para>
17718 </listitem>
17719
17720 <listitem><para>Fix bgwriter problems after recovering from errors
17721 (Tom)</para>
17722 <para>
17723 The background writer was found to leak buffer pins after write errors.
17724 While not fatal in itself, this might lead to mysterious blockages of
17725 later VACUUM commands.
17726 </para>
17727 </listitem>
17728
17729 <listitem><para>Prevent failure if client sends Bind protocol message
17730 when current transaction is already aborted</para></listitem>
17731
17732 <listitem><para><filename>/contrib/ltree</> fixes (Teodor)</para></listitem>
17733
17734 <listitem><para>AIX and HPUX compile fixes (Tom)</para></listitem>
17735
17736 <listitem><para>Retry file reads and writes after Windows
17737 NO_SYSTEM_RESOURCES error (Qingqing Zhou)</para></listitem>
17738
17739 <listitem><para>Fix intermittent failure when <varname>log_line_prefix</>
17740 includes <literal>%i</></para></listitem>
17741
17742 <listitem><para>Fix <application>psql</> performance issue with long scripts
17743 on Windows (Merlin Moncure)</para></listitem>
17744
17745 <listitem><para>Fix missing updates of <filename>pg_group</> flat
17746 file</para></listitem>
17747
17748 <listitem><para>Fix longstanding planning error for outer joins</para>
17749 <para>This bug sometimes caused a bogus error <quote>RIGHT JOIN is
17750 only supported with merge-joinable join conditions</>.</para></listitem>
17751
17752 <listitem><para>Postpone timezone initialization until after
17753 <filename>postmaster.pid</> is created</para>
17754 <para>This avoids confusing startup scripts that expect the pid file to appear
17755 quickly.</para></listitem>
17756
17757 <listitem><para>Prevent core dump in <application>pg_autovacuum</> when a
17758 table has been dropped</para></listitem>
17759
17760 <listitem><para>Fix problems with whole-row references (<literal>foo.*</>)
17761 to subquery results</para></listitem>
17762 </itemizedlist>
17763
17764   </sect2>
17765  </sect1>
17766
17767  <sect1 id="release-8-0-4">
17768   <title>Release 8.0.4</title>
17769
17770   <note>
17771   <title>Release date</title>
17772   <simpara>2005-10-04</simpara>
17773   </note>
17774
17775   <para>
17776    This release contains a variety of fixes from 8.0.3.
17777    For information about new features in the 8.0 major release, see
17778    <xref linkend="release-8-0">.
17779   </para>
17780
17781   <sect2>
17782    <title>Migration to Version 8.0.4</title>
17783
17784    <para>
17785     A dump/restore is not required for those running 8.0.X.  However,
17786     if you are upgrading from a version earlier than 8.0.3, see the release
17787     notes for 8.0.3.
17788    </para>
17789   </sect2>
17790
17791   <sect2>
17792    <title>Changes</title>
17793
17794 <itemizedlist>
17795 <listitem><para>Fix error that allowed <command>VACUUM</> to remove
17796 <literal>ctid</> chains too soon, and add more checking in code that follows
17797 <literal>ctid</> links</para>
17798 <para>This fixes a long-standing problem that could cause crashes in very rare
17799 circumstances.</para></listitem>
17800 <listitem><para>Fix <type>CHAR()</> to properly pad spaces to the specified
17801 length when using a multiple-byte character set (Yoshiyuki Asaba)</para>
17802 <para>In prior releases, the padding of <type>CHAR()</> was incorrect
17803 because it only padded to the specified number of bytes without
17804 considering how many characters were stored.</para></listitem>
17805 <listitem><para>Force a checkpoint before committing <command>CREATE
17806 DATABASE</></para>
17807 <para>This should fix recent reports of <quote>index is not a btree</>
17808 failures when a crash occurs shortly after <command>CREATE
17809 DATABASE</>.</para></listitem>
17810 <listitem><para>Fix the sense of the test for read-only transaction
17811 in <command>COPY</></para>
17812 <para>The code formerly prohibited <command>COPY TO</>, where it should
17813 prohibit <command>COPY FROM</>.
17814 </para></listitem>
17815 <listitem><para>Handle consecutive embedded newlines in <command>COPY</>
17816 CSV-mode input</para></listitem>
17817 <listitem><para>Fix <function>date_trunc(week)</> for dates near year
17818 end</para></listitem>
17819 <listitem><para>Fix planning problem with outer-join ON clauses that reference
17820 only the inner-side relation</para></listitem>
17821 <listitem><para>Further fixes for <literal>x FULL JOIN y ON true</> corner
17822 cases</para></listitem>
17823 <listitem><para>Fix overenthusiastic optimization of <literal>x IN (SELECT
17824 DISTINCT ...)</> and related cases</para></listitem>
17825 <listitem><para>Fix mis-planning of queries with small <literal>LIMIT</>
17826 values due to poorly thought out <quote>fuzzy</> cost
17827 comparison</para></listitem>
17828 <listitem><para>Make <function>array_in</> and <function>array_recv</> more
17829 paranoid about validating their OID parameter</para></listitem>
17830 <listitem><para>Fix missing rows in queries like <literal>UPDATE a=... WHERE
17831 a...</> with GiST index on column <literal>a</></para></listitem>
17832 <listitem><para>Improve robustness of datetime parsing</para></listitem>
17833 <listitem><para>Improve checking for partially-written WAL
17834 pages</para></listitem>
17835 <listitem><para>Improve robustness of signal handling when SSL is
17836 enabled</para></listitem>
17837 <listitem><para>Improve MIPS and M68K spinlock code</para></listitem>
17838 <listitem><para>Don't try to open more than <literal>max_files_per_process</>
17839 files during postmaster startup</para></listitem>
17840 <listitem><para>Various memory leakage fixes</para></listitem>
17841 <listitem><para>Various portability improvements</para></listitem>
17842 <listitem><para>Update timezone data files</para></listitem>
17843 <listitem><para>Improve handling of DLL load failures on Windows</para></listitem>
17844 <listitem><para>Improve random-number generation on Windows</para></listitem>
17845 <listitem><para>Make <literal>psql -f filename</> return a nonzero exit code
17846 when opening the file fails</para></listitem>
17847 <listitem><para>Change <application>pg_dump</> to handle inherited check
17848 constraints more reliably</para></listitem>
17849 <listitem><para>Fix password prompting in <application>pg_restore</> on
17850 Windows</para></listitem>
17851 <listitem><para>Fix PL/PgSQL to handle <literal>var := var</> correctly when
17852 the variable is of pass-by-reference type</para></listitem>
17853 <listitem><para>Fix PL/Perl <literal>%_SHARED</> so it's actually
17854 shared</para></listitem>
17855 <listitem><para>Fix <filename>contrib/pg_autovacuum</> to allow sleep
17856 intervals over 2000 sec</para></listitem>
17857 <listitem><para>Update <filename>contrib/tsearch2</> to use current Snowball
17858 code</para></listitem>
17859 </itemizedlist>
17860
17861   </sect2>
17862  </sect1>
17863
17864  <sect1 id="release-8-0-3">
17865   <title>Release 8.0.3</title>
17866
17867   <note>
17868   <title>Release date</title>
17869   <simpara>2005-05-09</simpara>
17870   </note>
17871
17872   <para>
17873    This release contains a variety of fixes from 8.0.2, including several
17874    security-related issues.
17875    For information about new features in the 8.0 major release, see
17876    <xref linkend="release-8-0">.
17877   </para>
17878
17879   <sect2>
17880    <title>Migration to Version 8.0.3</title>
17881
17882    <para>
17883     A dump/restore is not required for those running 8.0.X.  However,
17884     it is one possible way of handling two significant security problems
17885     that have been found in the initial contents of 8.0.X system
17886     catalogs.  A dump/initdb/reload sequence using 8.0.3's initdb will
17887     automatically correct these problems.
17888    </para>
17889
17890    <para>
17891     The larger security problem is that the built-in character set encoding
17892     conversion functions can be invoked from SQL commands by unprivileged
17893     users, but the functions were not designed for such use and are not
17894     secure against malicious choices of arguments.  The fix involves changing
17895     the declared parameter list of these functions so that they can no longer
17896     be invoked from SQL commands.  (This does not affect their normal use
17897     by the encoding conversion machinery.)
17898    </para>
17899
17900    <para>
17901     The lesser problem is that the <filename>contrib/tsearch2</> module
17902     creates several functions that are improperly declared to return
17903     <type>internal</> when they do not accept <type>internal</> arguments.
17904     This breaks type safety for all functions using <type>internal</>
17905     arguments.
17906    </para>
17907
17908    <para>
17909     It is strongly recommended that all installations repair these errors,
17910     either by initdb or by following the manual repair procedure given
17911     below.  The errors at least allow unprivileged database users to crash
17912     their server process, and might allow unprivileged users to gain the
17913     privileges of a database superuser.
17914    </para>
17915
17916    <para>
17917     If you wish not to do an initdb, perform the same manual repair
17918     procedures shown in the <link linkend="release-7-4-8">7.4.8 release
17919     notes</link>.
17920    </para>
17921   </sect2>
17922
17923   <sect2>
17924    <title>Changes</title>
17925
17926 <itemizedlist>
17927 <listitem><para>Change encoding function signature to prevent
17928 misuse</para></listitem>
17929 <listitem><para>Change <filename>contrib/tsearch2</> to avoid unsafe use of
17930 <type>INTERNAL</> function results</para></listitem>
17931 <listitem><para>Guard against incorrect second parameter to
17932 <function>record_out</></para></listitem>
17933 <listitem><para>Repair ancient race condition that allowed a transaction to be
17934 seen as committed for some purposes (eg SELECT FOR UPDATE) slightly sooner
17935 than for other purposes</para>
17936 <para>This is an extremely serious bug since it could lead to apparent
17937 data inconsistencies being briefly visible to applications.</para></listitem>
17938 <listitem><para>Repair race condition between relation extension and
17939 VACUUM</para>
17940 <para>This could theoretically have caused loss of a page's worth of
17941 freshly-inserted data, although the scenario seems of very low probability.
17942 There are no known cases of it having caused more than an Assert failure.
17943 </para></listitem>
17944 <listitem><para>Fix comparisons of <type>TIME WITH TIME ZONE</> values</para>
17945 <para>
17946 The comparison code was wrong in the case where the
17947 <literal>--enable-integer-datetimes</> configuration switch had been used.
17948 NOTE: if you have an index on a <type>TIME WITH TIME ZONE</> column,
17949 it will need to be <command>REINDEX</>ed after installing this update, because
17950 the fix corrects the sort order of column values.
17951 </para></listitem>
17952 <listitem><para>Fix <function>EXTRACT(EPOCH)</> for
17953 <type>TIME WITH TIME ZONE</> values</para></listitem>
17954 <listitem><para>Fix mis-display of negative fractional seconds in
17955 <type>INTERVAL</> values</para>
17956 <para>
17957 This error only occurred when the
17958 <literal>--enable-integer-datetimes</> configuration switch had been used.
17959 </para></listitem>
17960 <listitem><para>Fix pg_dump to dump trigger names containing <literal>%</>
17961 correctly (Neil)</para></listitem>
17962 <listitem><para>Still more 64-bit fixes for
17963 <filename>contrib/intagg</></para></listitem>
17964 <listitem><para>Prevent incorrect optimization of functions returning
17965 <type>RECORD</></para></listitem>
17966 <listitem><para>Prevent crash on <literal>COALESCE(NULL,NULL)</></para></listitem>
17967 <listitem><para>Fix Borland makefile for libpq</para></listitem>
17968 <listitem><para>Fix <filename>contrib/btree_gist</> for <type>timetz</> type
17969 (Teodor)</para></listitem>
17970 <listitem><para>Make <command>pg_ctl</> check the PID found in
17971 <filename>postmaster.pid</> to see if it is still a live
17972 process</para></listitem>
17973 <listitem><para>Fix <command>pg_dump</>/<command>pg_restore</> problems caused
17974 by addition of dump timestamps</para></listitem>
17975 <listitem><para>Fix interaction between materializing holdable cursors and
17976 firing deferred triggers during transaction commit</para></listitem>
17977 <listitem><para>Fix memory leak in SQL functions returning pass-by-reference
17978 data types</para></listitem>
17979 </itemizedlist>
17980
17981   </sect2>
17982  </sect1>
17983
17984  <sect1 id="release-8-0-2">
17985   <title>Release 8.0.2</title>
17986
17987   <note>
17988   <title>Release date</title>
17989   <simpara>2005-04-07</simpara>
17990   </note>
17991
17992   <para>
17993    This release contains a variety of fixes from 8.0.1.
17994    For information about new features in the 8.0 major release, see
17995    <xref linkend="release-8-0">.
17996   </para>
17997
17998   <sect2>
17999    <title>Migration to Version 8.0.2</title>
18000
18001    <para>
18002     A dump/restore is not required for those running 8.0.*.
18003     This release updates the major version number of the
18004     <productname>PostgreSQL</productname> libraries, so it might be
18005     necessary to re-link some user applications if they cannot
18006     find the properly-numbered shared library.
18007    </para>
18008   </sect2>
18009
18010   <sect2>
18011    <title>Changes</title>
18012
18013 <itemizedlist>
18014 <listitem><para>Increment the major version number of all interface
18015 libraries (Bruce)</para>
18016 <para>
18017 This should have been done in 8.0.0.  It is required so 7.4.X versions
18018 of PostgreSQL client applications, like <application>psql</>,
18019 can be used on the same machine as 8.0.X applications.  This might require
18020 re-linking user applications that use these libraries.
18021 </para></listitem>
18022 <listitem><para>Add Windows-only <varname>wal_sync_method</> setting of
18023 <option>fsync_writethrough</> (Magnus, Bruce)</para>
18024 <para>
18025 This setting causes <productname>PostgreSQL</productname> to write through
18026 any disk-drive write cache when writing to WAL.
18027 This behavior was formerly called <option>fsync</>, but was
18028 renamed because it acts quite differently from <option>fsync</> on other
18029 platforms.
18030 </para>
18031 </listitem>
18032 <listitem><para>Enable the <varname>wal_sync_method</> setting of
18033 <option>open_datasync</> on Windows, and make it the default for that
18034  platform (Magnus, Bruce)</para>
18035 <para>
18036 Because the default is no longer <option>fsync_writethrough</>,
18037 data loss is possible during a power failure if the disk drive has
18038 write caching enabled. To turn off the write cache on Windows,
18039 from the <application>Device Manager</>, choose the drive properties,
18040 then <literal>Policies</>.
18041 </para>
18042 </listitem>
18043 <listitem><para>New cache management algorithm <acronym>2Q</> replaces
18044 <acronym>ARC</> (Tom)</para>
18045 <para>
18046 This was done to avoid a pending US patent on <acronym>ARC</>.  The
18047 <acronym>2Q</> code might be a few percentage points slower than
18048 <acronym>ARC</> for some work loads.  A better cache management algorithm
18049 will appear in 8.1.
18050 </para></listitem>
18051 <listitem><para>Planner adjustments to improve behavior on freshly-created
18052 tables (Tom)</para></listitem>
18053 <listitem><para>Allow plpgsql to assign to an element of an array that is
18054 initially <literal>NULL</> (Tom)</para>
18055 <para>
18056 Formerly the array would remain <literal>NULL</>, but now it becomes a
18057 single-element array.  The main SQL engine was changed to handle
18058 <command>UPDATE</> of a null array value this way in 8.0, but the similar
18059 case in plpgsql was overlooked.
18060 </para>
18061 </listitem>
18062 <listitem><para>Convert <literal>\r\n</> and <literal>\r</> to <literal>\n</>
18063 in plpython function bodies (Michael Fuhr)</para>
18064 <para>
18065  This prevents syntax errors when plpython code is written on a Windows or
18066  Mac client.
18067 </para>
18068 </listitem>
18069 <listitem><para>Allow SPI cursors to handle utility commands that return rows,
18070 such as <command>EXPLAIN</> (Tom)</para></listitem>
18071 <listitem><para>Fix <command>CLUSTER</> failure after <command>ALTER TABLE
18072 SET WITHOUT OIDS</> (Tom)</para></listitem>
18073 <listitem><para>Reduce memory usage of <command>ALTER TABLE ADD COLUMN</>
18074 (Neil)</para></listitem>
18075 <listitem><para>Fix <command>ALTER LANGUAGE RENAME</> (Tom)</para></listitem>
18076 <listitem><para>Document the Windows-only <literal>register</> and
18077 <literal>unregister</> options of <application>pg_ctl</> (Magnus)</para></listitem>
18078 <listitem><para>Ensure operations done during backend shutdown are counted by
18079 statistics collector</para>
18080 <para>
18081 This is expected to resolve reports of <application>pg_autovacuum</>
18082 not vacuuming the system catalogs often enough &mdash; it was not being
18083 told about catalog deletions caused by temporary table removal during
18084 backend exit.
18085 </para></listitem>
18086 <listitem><para>Change the Windows default for configuration parameter
18087 <varname>log_destination</> to <option>eventlog</> (Magnus)</para>
18088 <para>
18089 By default, a server running on Windows will now send log output to the
18090 Windows event logger rather than standard error.
18091 </para></listitem>
18092 <listitem><para>Make Kerberos authentication work on Windows (Magnus)</para></listitem>
18093 <listitem><para>Allow <command>ALTER DATABASE RENAME</> by superusers
18094 who aren't flagged as having CREATEDB privilege (Tom)</para></listitem>
18095 <listitem><para>Modify WAL log entries for <command>CREATE</> and
18096 <command>DROP DATABASE</> to not specify absolute paths (Tom)</para>
18097 <para>This allows point-in-time recovery on a different machine with possibly
18098 different database location.  Note that <command>CREATE TABLESPACE</> still
18099 poses a hazard in such situations.
18100 </para></listitem>
18101 <listitem><para>Fix crash from a backend exiting with an open transaction
18102 that created a table and opened a cursor on it (Tom)</para></listitem>
18103 <listitem><para>Fix <function>array_map()</> so it can call PL functions
18104 (Tom)</para></listitem>
18105 <listitem><para>Several <filename>contrib/tsearch2</> and
18106 <filename>contrib/btree_gist</> fixes (Teodor)
18107 </para></listitem>
18108 <listitem><para>Fix crash of some <filename>contrib/pgcrypto</>
18109 functions on some platforms (Marko Kreen)</para></listitem>
18110 <listitem><para>Fix <filename>contrib/intagg</> for 64-bit platforms
18111 (Tom)</para></listitem>
18112 <listitem><para>Fix ecpg bugs in parsing of <command>CREATE</> statement
18113 (Michael)</para></listitem>
18114 <listitem><para>Work around gcc bug on powerpc and amd64 causing problems in
18115 ecpg (Christof Petig)</para></listitem>
18116 <listitem><para>Do not use locale-aware versions of <function>upper()</>,
18117 <function>lower()</>, and <function>initcap()</> when the locale is
18118 <literal>C</> (Bruce)</para>
18119 <para>
18120  This allows these functions to work on platforms that generate errors
18121  for non-7-bit data when the locale is <literal>C</>.
18122 </para></listitem>
18123 <listitem><para>Fix <function>quote_ident()</> to quote names that match keywords (Tom)</para></listitem>
18124 <listitem><para>Fix <function>to_date()</> to behave reasonably when
18125 <literal>CC</> and <literal>YY</> fields are both used (Karel)</para></listitem>
18126 <listitem><para>Prevent <function>to_char(interval)</> from failing
18127 when given a zero-month interval (Tom)</para></listitem>
18128 <listitem><para>Fix wrong week returned by <function>date_trunc('week')</>
18129 (Bruce)</para>
18130 <para>
18131 <function>date_trunc('week')</>
18132 returned the wrong year for the first few days of January in some years.
18133 </para></listitem>
18134 <listitem><para>Use the correct default mask length for class <literal>D</>
18135 addresses in <type>INET</> data types (Tom)</para></listitem>
18136 </itemizedlist>
18137
18138   </sect2>
18139  </sect1>
18140
18141  <sect1 id="release-8-0-1">
18142   <title>Release 8.0.1</title>
18143
18144   <note>
18145   <title>Release date</title>
18146   <simpara>2005-01-31</simpara>
18147   </note>
18148
18149   <para>
18150    This release contains a variety of fixes from 8.0.0, including several
18151    security-related issues.
18152    For information about new features in the 8.0 major release, see
18153    <xref linkend="release-8-0">.
18154   </para>
18155
18156   <sect2>
18157    <title>Migration to Version 8.0.1</title>
18158
18159    <para>
18160     A dump/restore is not required for those running 8.0.0.
18161    </para>
18162   </sect2>
18163
18164   <sect2>
18165    <title>Changes</title>
18166
18167 <itemizedlist>
18168 <listitem><para>Disallow <command>LOAD</> to non-superusers</para>
18169 <para>
18170 On platforms that will automatically execute initialization functions of a
18171 shared library (this includes at least Windows and ELF-based Unixen),
18172 <command>LOAD</> can be used to make the server execute arbitrary code.
18173 Thanks to NGS Software for reporting this.</para></listitem>
18174 <listitem><para>Check that creator of an aggregate function has the right to
18175 execute the specified transition functions</para>
18176 <para>
18177 This oversight made it possible to bypass denial of EXECUTE
18178 permission on a function.</para></listitem>
18179 <listitem><para>Fix security and 64-bit issues in
18180 contrib/intagg</para></listitem>
18181 <listitem><para>Add needed STRICT marking to some contrib functions (Kris
18182 Jurka)</para></listitem>
18183 <listitem><para>Avoid buffer overrun when plpgsql cursor declaration has too
18184 many parameters (Neil)</para></listitem>
18185 <listitem><para>Make <command>ALTER TABLE ADD COLUMN</> enforce domain
18186 constraints in all cases</para></listitem>
18187 <listitem><para>Fix planning error for FULL and RIGHT outer joins</para>
18188 <para>
18189 The result of the join was mistakenly supposed to be sorted the same as the
18190 left input.  This could not only deliver mis-sorted output to the user, but
18191 in case of nested merge joins could give outright wrong answers.
18192 </para></listitem>
18193 <listitem><para>Improve planning of grouped aggregate queries</para></listitem>
18194 <listitem><para><command>ROLLBACK TO <replaceable>savepoint</></command>
18195 closes cursors created since the savepoint</para></listitem>
18196 <listitem><para>Fix inadequate backend stack size on Windows</para></listitem>
18197 <listitem><para>Avoid SHGetSpecialFolderPath() on Windows
18198 (Magnus)</para></listitem>
18199 <listitem><para>Fix some problems in running pg_autovacuum as a Windows
18200 service (Dave Page)</para></listitem>
18201 <listitem><para>Multiple minor bug fixes in
18202 pg_dump/pg_restore</para></listitem>
18203 <listitem><para>Fix ecpg segfault with named structs used in
18204 typedefs (Michael)</para></listitem>
18205 </itemizedlist>
18206
18207   </sect2>
18208  </sect1>
18209
18210  <sect1 id="release-8-0">
18211   <title>Release 8.0</title>
18212
18213   <note>
18214    <title>Release date</title>
18215    <simpara>2005-01-19</simpara>
18216   </note>
18217
18218   <sect2>
18219    <title>Overview</title>
18220
18221    <para>
18222     Major changes in this release:
18223    </para>
18224
18225    <variablelist>
18226     <varlistentry>
18227      <term>
18228       Microsoft Windows Native Server
18229      </term>
18230
18231      <listitem>
18232       <para>
18233        This is the first <productname>PostgreSQL</productname> release
18234        to run natively on <trademark class="registered">Microsoft Windows</> as
18235        a server. It can run as a <productname>Windows</> service. This
18236        release supports NT-based Windows releases like
18237        <productname>Windows 2000 SP4</>, <productname>Windows XP</>, and
18238        <productname>Windows 2003</>. Older releases like
18239        <productname>Windows 95</>, <productname>Windows 98</>, and
18240        <productname>Windows ME</> are not supported because these operating
18241        systems do not have the infrastructure to support
18242        <productname>PostgreSQL</productname>. A separate installer
18243        project has been created to ease installation on
18244        <productname>Windows</> &mdash; see <ulink
18245        url="http://www.postgresql.org/ftp/win32/"></ulink>.
18246       </para>
18247
18248       <para>
18249        Although tested throughout our release cycle, the Windows port
18250        does not have the benefit of years of use in production
18251        environments that <productname>PostgreSQL</productname> has on
18252        Unix platforms.  Therefore it should be treated with the same
18253        level of caution as you would a new product.
18254       </para>
18255
18256       <para>
18257        Previous releases required the Unix emulation toolkit
18258        <productname>Cygwin</> in order to run the server on Windows
18259        operating systems.  <productname>PostgreSQL</productname> has
18260        supported native clients on Windows for many years.
18261       </para>
18262      </listitem>
18263     </varlistentry>
18264
18265     <varlistentry>
18266      <term>
18267       Savepoints
18268      </term>
18269
18270      <listitem>
18271       <para>
18272        Savepoints allow specific parts of a transaction to be aborted
18273        without affecting the remainder of the transaction. Prior
18274        releases had no such capability; there was no way to recover
18275        from a statement failure within a transaction except by
18276        aborting the whole transaction. This feature is valuable for
18277        application writers who require error recovery within a
18278        complex transaction.
18279       </para>
18280      </listitem>
18281     </varlistentry>
18282
18283     <varlistentry>
18284      <term>
18285       Point-In-Time Recovery
18286      </term>
18287
18288      <listitem>
18289       <para>
18290        In previous releases there was no way to recover from disk
18291        drive failure except to restore from a previous backup or use
18292        a standby replication server.  Point-in-time recovery allows
18293        continuous backup of the server.  You can recover either to
18294        the point of failure or to some transaction in the past.
18295       </para>
18296      </listitem>
18297     </varlistentry>
18298
18299     <varlistentry>
18300      <term>
18301       Tablespaces
18302      </term>
18303
18304      <listitem>
18305       <para>
18306        Tablespaces allow administrators to select different file systems
18307        for storage of individual tables, indexes, and databases.
18308        This improves performance and control over disk space
18309        usage. Prior releases used <application>initlocation</> and
18310        manual symlink management for such tasks.
18311       </para>
18312      </listitem>
18313     </varlistentry>
18314
18315     <varlistentry>
18316      <term>
18317       Improved Buffer Management, <command>CHECKPOINT</command>,
18318       <command>VACUUM</command>
18319      </term>
18320
18321      <listitem>
18322       <para>
18323        This release has a more intelligent buffer replacement strategy,
18324        which will make better use of available shared buffers and
18325        improve performance. The performance impact of vacuum and
18326        checkpoints is also lessened.
18327       </para>
18328      </listitem>
18329     </varlistentry>
18330
18331     <varlistentry>
18332      <term>
18333       Change Column Types
18334      </term>
18335
18336      <listitem>
18337       <para>
18338        A column's data type can now be changed with <command>ALTER
18339        TABLE</command>.
18340       </para>
18341      </listitem>
18342     </varlistentry>
18343
18344     <varlistentry>
18345      <term>
18346       New Perl Server-Side Language
18347      </term>
18348
18349      <listitem>
18350       <para>
18351        A new version of the <application>plperl</> server-side language now
18352        supports a persistent shared storage area, triggers, returning records
18353        and arrays of records, and SPI calls to access the database.
18354       </para>
18355      </listitem>
18356     </varlistentry>
18357
18358     <varlistentry>
18359      <term>
18360        Comma-separated-value (CSV) support in <command>COPY</command>
18361      </term>
18362
18363      <listitem>
18364       <para>
18365        <command>COPY</command> can now read and write
18366        comma-separated-value files. It has the flexibility to
18367        interpret nonstandard quoting and separation characters too.
18368       </para>
18369      </listitem>
18370     </varlistentry>
18371
18372    </variablelist>
18373   </sect2>
18374
18375   <sect2>
18376    <title>Migration to Version 8.0</title>
18377
18378    <para>
18379     A dump/restore using <application>pg_dump</application> is
18380     required for those wishing to migrate data from any previous
18381     release.
18382    </para>
18383
18384    <para>
18385     Observe the following incompatibilities:
18386    </para>
18387
18388    <itemizedlist>
18389
18390     <listitem>
18391      <para>
18392       In <option>READ COMMITTED</> serialization mode, volatile functions
18393       now see the results of concurrent transactions committed up to the
18394       beginning of each statement within the function, rather than up to the
18395       beginning of the interactive command that called the function.
18396      </para>
18397     </listitem>
18398
18399     <listitem>
18400      <para>
18401       Functions declared <option>STABLE</> or <option>IMMUTABLE</> always
18402       use the snapshot of the calling query, and therefore do not see the
18403       effects of actions taken after the calling query starts, whether in
18404       their own transaction or other transactions.  Such a function must be
18405       read-only, too, meaning that it cannot use any SQL commands other than
18406       <command>SELECT</>.
18407      </para>
18408     </listitem>
18409
18410     <listitem>
18411      <para>
18412       Nondeferred <option>AFTER</> triggers are now fired immediately
18413       after completion of the triggering query, rather than upon
18414       finishing the current interactive command. This makes a
18415       difference when the triggering query occurred within a function:
18416       the trigger is invoked before the function proceeds to its next
18417       operation.
18418      </para>
18419     </listitem>
18420
18421     <listitem>
18422      <para>
18423       Server configuration parameters <varname>virtual_host</> and
18424       <varname>tcpip_socket</> have been replaced with a more general
18425       parameter <varname>listen_addresses</>. Also, the server now listens on
18426       <literal>localhost</> by default, which eliminates the need for the
18427       <literal>-i</> postmaster switch in many scenarios.
18428      </para>
18429     </listitem>
18430
18431     <listitem>
18432      <para>
18433       Server configuration parameters <varname>SortMem</> and
18434       <varname>VacuumMem</> have been renamed to <varname>work_mem</>
18435       and <varname>maintenance_work_mem</> to better reflect their
18436       use. The original names are still supported in
18437       <command>SET</command> and <command>SHOW</command>.
18438      </para>
18439     </listitem>
18440
18441     <listitem>
18442      <para>
18443       Server configuration parameters <varname>log_pid</>,
18444       <varname>log_timestamp</>, and <varname>log_source_port</> have been
18445       replaced with a more general parameter <varname>log_line_prefix</>.
18446      </para>
18447     </listitem>
18448
18449     <listitem>
18450      <para>
18451       Server configuration parameter <varname>syslog</> has been
18452       replaced with a more logical <varname>log_destination</> variable to
18453       control the log output destination.
18454      </para>
18455     </listitem>
18456
18457     <listitem>
18458      <para>
18459       Server configuration parameter <varname>log_statement</> has been
18460       changed so it can selectively log just database modification or
18461       data definition statements.  Server configuration parameter
18462       <varname>log_duration</> now prints only when <varname>log_statement</>
18463       prints the query.
18464      </para>
18465     </listitem>
18466
18467     <listitem>
18468      <para>
18469       Server configuration parameter <varname>max_expr_depth</> parameter has
18470       been replaced with <varname>max_stack_depth</> which measures the
18471       physical stack size rather than the expression nesting depth. This
18472       helps prevent session termination due to stack overflow caused by
18473       recursive functions.
18474      </para>
18475     </listitem>
18476
18477     <listitem>
18478      <para>
18479       The <function>length()</> function no longer counts trailing spaces in
18480       <type>CHAR(n)</> values.
18481      </para>
18482     </listitem>
18483
18484    <listitem>
18485     <para>
18486      Casting an integer to <type>BIT(N)</> selects the rightmost N bits of the
18487      integer, not the leftmost N bits as before.
18488     </para>
18489    </listitem>
18490
18491    <listitem>
18492     <para>
18493      Updating an element or slice of a NULL array value now produces
18494      a nonnull array result, namely an array containing
18495      just the assigned-to positions.
18496     </para>
18497    </listitem>
18498
18499     <listitem>
18500      <para>
18501       Syntax checking of array input values has been tightened up
18502       considerably. Junk that was previously allowed in odd places with
18503       odd results now causes an error. Empty-string element values
18504       must now be written as <literal>""</>, rather than writing nothing.
18505       Also changed behavior with respect to whitespace surrounding
18506       array elements: trailing whitespace is now ignored, for symmetry
18507       with leading whitespace (which has always been ignored).
18508      </para>
18509     </listitem>
18510
18511     <listitem>
18512      <para>
18513       Overflow in integer arithmetic operations is now detected and
18514       reported as an error.
18515      </para>
18516     </listitem>
18517
18518     <listitem>
18519      <para>
18520       The arithmetic operators associated with the single-byte
18521       <type>"char"</> data type have been removed.
18522      </para>
18523     </listitem>
18524
18525     <listitem>
18526      <para>
18527       The <function>extract()</> function (also called
18528       <function>date_part</>) now returns the proper year for BC dates.
18529       It previously returned one less than the correct year. The
18530       function now also returns the proper values for millennium and
18531       century.
18532      </para>
18533     </listitem>
18534
18535    <listitem>
18536     <para>
18537      <type>CIDR</> values now must have their nonmasked bits be zero.
18538      For example, we no longer allow
18539      <literal>204.248.199.1/31</literal> as a <type>CIDR</> value. Such
18540      values should never have been accepted by
18541      <productname>PostgreSQL</productname> and will now be rejected.
18542     </para>
18543    </listitem>
18544
18545     <listitem>
18546      <para>
18547       <command>EXECUTE</command> now returns a completion tag that
18548       matches the executed statement.
18549      </para>
18550     </listitem>
18551
18552     <listitem>
18553      <para>
18554       <application>psql</>'s <command>\copy</> command now reads or
18555       writes to the query's <literal>stdin/stdout</>, rather than
18556       <application>psql</>'s <literal>stdin/stdout</>. The previous
18557       behavior can be accessed via new
18558       <option>pstdin</>/<option>pstdout</> parameters.
18559      </para>
18560     </listitem>
18561
18562     <listitem>
18563      <para>
18564      The JDBC client interface has been removed from the core
18565      distribution, and is now hosted at <ulink url=
18566      "http://jdbc.postgresql.org"></ulink>.
18567      </para>
18568     </listitem>
18569
18570     <listitem>
18571      <para>
18572      The Tcl client interface has also been removed. There are several
18573      Tcl interfaces now hosted at <ulink url=
18574      "http://gborg.postgresql.org"></ulink>.
18575      </para>
18576     </listitem>
18577
18578     <listitem>
18579      <para>
18580       The server now uses its own time zone database, rather than the
18581       one supplied by the operating system. This will provide consistent
18582       behavior across all platforms.  In most cases, there should be
18583       little noticeable difference in time zone behavior, except that
18584       the time zone names used by <command>SET</>/<command>SHOW</>
18585       <varname>TimeZone</> might be different from what your platform provides.
18586      </para>
18587     </listitem>
18588
18589     <listitem>
18590      <para>
18591       <application>Configure</>'s threading option no longer requires
18592       users to run tests or edit configuration files; threading options
18593       are now detected automatically.
18594      </para>
18595     </listitem>
18596
18597     <listitem>
18598      <para>
18599       Now that tablespaces have been implemented,
18600       <application>initlocation</> has been removed.
18601      </para>
18602     </listitem>
18603
18604     <listitem>
18605      <para>
18606       The API for user-defined GiST indexes has been changed. The
18607       Union and PickSplit methods are now passed a pointer to a
18608       special <structname>GistEntryVector</structname> structure,
18609       rather than a <type>bytea</type>.
18610      </para>
18611     </listitem>
18612
18613    </itemizedlist>
18614   </sect2>
18615
18616  <sect2>
18617   <title>Deprecated Features</title>
18618
18619   <para>
18620     Some aspects of <productname>PostgreSQL</productname>'s behavior
18621     have been determined to be suboptimal. For the sake of backward
18622     compatibility these have not been removed in 8.0, but they are
18623     considered deprecated and will be removed in the next major
18624     release.
18625     </para>
18626
18627    <itemizedlist>
18628     <listitem>
18629      <para>
18630       The 8.1 release will remove the <function>to_char()</> function
18631       for intervals.
18632      </para>
18633     </listitem>
18634
18635      <listitem>
18636       <para>
18637        The server now warns of empty strings passed to
18638        <type>oid</type>/<type>float4</type>/<type>float8</type> data
18639        types, but continues to interpret them as zeroes as before.
18640        In the next major release, empty strings will be considered
18641        invalid input for these data types.
18642       </para>
18643      </listitem>
18644
18645     <listitem>
18646      <para>
18647       By default, tables in <productname>PostgreSQL</productname> 8.0
18648       and earlier are created with <type>OID</>s. In the next release,
18649       this will <emphasis>not</emphasis> be the case: to create a table
18650       that contains <type>OID</>s, the <option>WITH OIDS</> clause must
18651       be specified or the <varname>default_with_oids</varname>
18652       configuration parameter must be set. Users are encouraged to
18653       explicitly specify <option>WITH OIDS</> if their tables
18654       require OIDs for compatibility with future releases of
18655       <productname>PostgreSQL</productname>.
18656      </para>
18657     </listitem>
18658
18659    </itemizedlist>
18660   </sect2>
18661
18662   <sect2>
18663    <title>Changes</title>
18664
18665    <para>
18666     Below you will find a detailed account of the changes between
18667     release 8.0 and the previous major release.
18668    </para>
18669
18670    <sect3>
18671     <title>Performance Improvements</title>
18672     <itemizedlist>
18673
18674      <listitem>
18675       <para>
18676        Support cross-data-type index usage (Tom)
18677       </para>
18678       <para>
18679        Before this change, many queries would not use an index if the data
18680        types did not match exactly. This improvement makes index usage more
18681        intuitive and consistent.
18682       </para>
18683      </listitem>
18684
18685      <listitem>
18686       <para>
18687        New buffer replacement strategy that improves caching (Jan)
18688       </para>
18689       <para>
18690        Prior releases used a least-recently-used (LRU) cache to keep
18691        recently referenced pages in memory. The LRU algorithm
18692        did not consider the number of times a specific cache entry was
18693        accessed, so large table scans could force out useful cache pages.
18694        The new cache algorithm uses four separate lists to track most
18695        recently used and most frequently used cache pages and dynamically
18696        optimize their replacement based on the work load. This should
18697        lead to much more efficient use of the shared buffer cache.
18698        Administrators who have tested shared buffer sizes in the past
18699        should retest with this new cache replacement policy.
18700       </para>
18701      </listitem>
18702
18703      <listitem>
18704       <para>
18705        Add subprocess to write dirty buffers periodically to reduce
18706        checkpoint writes (Jan)
18707       </para>
18708       <para>
18709        In previous releases, the checkpoint process, which runs every few
18710        minutes, would write all dirty buffers to the operating system's
18711        buffer cache then flush all dirty operating system buffers to
18712        disk. This resulted in a periodic spike in disk usage that often
18713        hurt performance. The new code uses a background writer to trickle
18714        disk writes at a steady pace so checkpoints have far fewer dirty
18715        pages to write to disk. Also, the new code does not issue a global
18716        <function>sync()</> call, but instead <function>fsync()</>s just
18717        the files written since the last checkpoint. This should improve
18718        performance and minimize degradation during checkpoints.
18719       </para>
18720      </listitem>
18721
18722      <listitem>
18723       <para>
18724        Add ability to prolong vacuum to reduce performance impact (Jan)
18725       </para>
18726       <para>
18727        On busy systems, <command>VACUUM</command> performs many I/O
18728        requests which can hurt performance for other users. This
18729        release allows you to slow down <command>VACUUM</command> to
18730        reduce its impact on other users, though this increases the
18731        total duration of <command>VACUUM</command>.
18732       </para>
18733      </listitem>
18734
18735      <listitem>
18736       <para>
18737        Improve B-tree index performance for duplicate keys (Dmitry Tkach, Tom)
18738       </para>
18739       <para>
18740        This improves the way indexes are scanned when many duplicate
18741        values exist in the index.
18742       </para>
18743      </listitem>
18744
18745      <listitem>
18746       <para>
18747        Use dynamically-generated table size estimates while planning (Tom)
18748       </para>
18749       <para>
18750        Formerly the planner estimated table sizes using the values seen
18751        by the last <command>VACUUM</command> or <command>ANALYZE</command>,
18752        both as to physical table size (number of pages) and number of rows.
18753        Now, the current physical table size is obtained from the kernel,
18754        and the number of rows is estimated by multiplying the table size
18755        by the row density (rows per page) seen by the last
18756        <command>VACUUM</command> or <command>ANALYZE</command>.  This should
18757        produce more reliable estimates in cases where the table size has
18758        changed significantly since the last housekeeping command.
18759       </para>
18760      </listitem>
18761
18762      <listitem>
18763       <para>
18764        Improved index usage with <literal>OR</> clauses (Tom)
18765       </para>
18766       <para>
18767        This allows the optimizer to use indexes in statements with many OR
18768        clauses that would not have been indexed in the past.  It can also use
18769        multi-column indexes where the first column is specified and the second
18770        column is part of an <literal>OR</> clause.
18771       </para>
18772      </listitem>
18773
18774      <listitem>
18775       <para>
18776        Improve matching of partial index clauses (Tom)
18777       </para>
18778       <para>
18779        The server is now smarter about using partial indexes in queries
18780        involving complex <option>WHERE</> clauses.
18781       </para>
18782      </listitem>
18783
18784      <listitem>
18785       <para>
18786        Improve performance of the GEQO optimizer (Tom)
18787       </para>
18788       <para>
18789        The GEQO optimizer is used to plan queries involving many tables (by
18790        default, twelve or more). This release speeds up the way queries are
18791        analyzed to decrease time spent in optimization.
18792       </para>
18793      </listitem>
18794
18795      <listitem>
18796       <para>
18797        Miscellaneous optimizer improvements
18798       </para>
18799       <para>
18800        There is not room here to list all the minor improvements made, but
18801        numerous special cases work better than in prior releases.
18802       </para>
18803      </listitem>
18804
18805      <listitem>
18806       <para>
18807        Improve lookup speed for C functions (Tom)
18808       </para>
18809       <para>
18810        This release uses a hash table to lookup information for dynamically
18811        loaded C functions. This improves their speed so they perform nearly as
18812        quickly as functions that are built into the server executable.
18813       </para>
18814      </listitem>
18815
18816      <listitem>
18817       <para>
18818        Add type-specific <command>ANALYZE</command> statistics
18819        capability (Mark Cave-Ayland)
18820       </para>
18821       <para>
18822        This feature allows more flexibility in generating statistics
18823        for nonstandard data types.
18824       </para>
18825      </listitem>
18826
18827      <listitem>
18828       <para>
18829        <command>ANALYZE</command> now collects statistics for
18830        expression indexes (Tom)
18831       </para>
18832       <para>
18833        Expression indexes (also called functional indexes) allow users to
18834        index not just columns but the results of expressions and function
18835        calls. With this release, the optimizer can gather and use statistics
18836        about the contents of expression indexes.  This will greatly improve
18837        the quality of planning for queries in which an expression index is
18838        relevant.
18839       </para>
18840      </listitem>
18841
18842      <listitem>
18843       <para>
18844        New two-stage sampling method for <command>ANALYZE</command>
18845        (Manfred Koizar)
18846       </para>
18847       <para>
18848        This gives better statistics when the density of valid rows is very
18849        different in different regions of a table.
18850       </para>
18851      </listitem>
18852
18853      <listitem>
18854       <para>
18855        Speed up <command>TRUNCATE</command> (Tom)
18856       </para>
18857       <para>
18858        This buys back some of the performance loss observed in 7.4, while still
18859        keeping <command>TRUNCATE</command> transaction-safe.
18860       </para>
18861      </listitem>
18862
18863     </itemizedlist>
18864    </sect3>
18865
18866
18867    <sect3>
18868     <title>Server Changes</title>
18869     <itemizedlist>
18870
18871      <listitem>
18872       <para>
18873        Add WAL file archiving and point-in-time recovery (Simon Riggs)
18874       </para>
18875      </listitem>
18876
18877      <listitem>
18878       <para>
18879        Add tablespaces so admins can control disk layout (Gavin)
18880       </para>
18881      </listitem>
18882
18883      <listitem>
18884       <para>
18885        Add a built-in log rotation program (Andreas Pflug)
18886       </para>
18887       <para>
18888        It is now possible to log server messages conveniently without
18889        relying on either <application>syslog</> or an external log
18890        rotation program.
18891       </para>
18892      </listitem>
18893
18894      <listitem>
18895       <para>
18896        Add new read-only server configuration parameters to show server
18897        compile-time settings: <varname>block_size</>,
18898        <varname>integer_datetimes</>, <varname>max_function_args</>,
18899        <varname>max_identifier_length</>, <varname>max_index_keys</>  (Joe)
18900       </para>
18901      </listitem>
18902
18903      <listitem>
18904       <para>
18905        Make quoting of <literal>sameuser</>, <literal>samegroup</>, and
18906        <literal>all</> remove special meaning of these terms in
18907        <filename>pg_hba.conf</> (Andrew)
18908       </para>
18909      </listitem>
18910
18911      <listitem>
18912       <para>
18913        Use clearer IPv6 name <literal>::1/128</> for
18914        <literal>localhost</> in default <filename>pg_hba.conf</> (Andrew)
18915       </para>
18916      </listitem>
18917
18918      <listitem>
18919       <para>
18920        Use CIDR format in <filename>pg_hba.conf</> examples (Andrew)
18921       </para>
18922      </listitem>
18923
18924      <listitem>
18925       <para>
18926        Rename server configuration parameters <varname>SortMem</> and
18927        <varname>VacuumMem</> to <varname>work_mem</> and
18928        <varname>maintenance_work_mem</> (Old names still supported) (Tom)
18929       </para>
18930       <para>
18931        This change was made to clarify that bulk operations such as index and
18932        foreign key creation use <varname>maintenance_work_mem</>, while
18933        <varname>work_mem</> is for workspaces used during query execution.
18934       </para>
18935      </listitem>
18936
18937      <listitem>
18938       <para>
18939        Allow logging of session disconnections using server configuration
18940        <varname>log_disconnections</> (Andrew)
18941       </para>
18942      </listitem>
18943
18944      <listitem>
18945       <para>
18946        Add new server configuration parameter <varname>log_line_prefix</> to
18947        allow control of information emitted in each log line (Andrew)
18948       </para>
18949       <para>
18950        Available information includes user name, database name, remote IP
18951        address, and session start time.
18952       </para>
18953      </listitem>
18954
18955      <listitem>
18956       <para>
18957        Remove server configuration parameters <varname>log_pid</>,
18958        <varname>log_timestamp</>, <varname>log_source_port</>; functionality
18959        superseded by <varname>log_line_prefix</> (Andrew)
18960       </para>
18961      </listitem>
18962
18963      <listitem>
18964       <para>
18965        Replace the <varname>virtual_host</> and <varname>tcpip_socket</>
18966        parameters with a unified <varname>listen_addresses</> parameter
18967        (Andrew, Tom)
18968       </para>
18969       <para>
18970        <varname>virtual_host</> could only specify a single IP address to
18971        listen on.  <varname>listen_addresses</> allows multiple addresses
18972        to be specified.
18973       </para>
18974      </listitem>
18975
18976      <listitem>
18977       <para>
18978        Listen on localhost by default, which eliminates the need for the
18979        <option>-i</> postmaster switch in many scenarios (Andrew)
18980       </para>
18981       <para>
18982        Listening on localhost (<literal>127.0.0.1</>) opens no new
18983        security holes but allows configurations like Windows and JDBC,
18984        which do not support local sockets, to work without special
18985        adjustments.
18986       </para>
18987      </listitem>
18988
18989      <listitem>
18990       <para>
18991        Remove <varname>syslog</> server configuration parameter, and add more
18992        logical <varname>log_destination</> variable to control log output
18993        location (Magnus)
18994       </para>
18995      </listitem>
18996
18997      <listitem>
18998       <para>
18999        Change server configuration parameter <varname>log_statement</> to take
19000        values <varname>all</>, <varname>mod</>, <varname>ddl</>, or
19001        <varname>none</> to select which queries are logged (Bruce)
19002       </para>
19003       <para>
19004        This allows administrators to log only data definition changes or
19005        only data modification statements.
19006       </para>
19007      </listitem>
19008
19009      <listitem>
19010       <para>
19011        Some logging-related configuration parameters could formerly be adjusted
19012        by ordinary users, but only in the <quote>more verbose</> direction.
19013        They are now treated more strictly: only superusers can set them.
19014        However, a superuser can use <command>ALTER USER</> to provide per-user
19015        settings of these values for non-superusers.  Also, it is now possible
19016        for superusers to set values of superuser-only configuration parameters
19017        via <literal>PGOPTIONS</>.
19018       </para>
19019      </listitem>
19020
19021      <listitem>
19022       <para>
19023        Allow configuration files to be placed outside the data directory (mlw)
19024       </para>
19025       <para>
19026        By default, configuration files are kept in the cluster's top directory.
19027        With this addition, configuration files can be placed outside the
19028        data directory, easing administration.
19029       </para>
19030      </listitem>
19031
19032      <listitem>
19033       <para>
19034        Plan prepared queries only when first executed so constants can be
19035        used for statistics (Oliver Jowett)
19036       </para>
19037       <para>
19038        Prepared statements plan queries once and execute them many
19039        times. While prepared queries avoid the overhead of re-planning
19040        on each use, the quality of the plan suffers from not knowing the exact
19041        parameters to be used in the query.  In this release, planning of
19042        unnamed prepared statements is delayed until the first execution,
19043        and the actual parameter values of that execution are used as
19044        optimization hints.  This allows use of out-of-line parameter passing
19045        without incurring a performance penalty.
19046       </para>
19047      </listitem>
19048
19049      <listitem>
19050       <para>
19051        Allow <command>DECLARE CURSOR</command> to take parameters
19052        (Oliver Jowett)
19053       </para>
19054       <para>
19055        It is now useful to issue <command>DECLARE CURSOR</command> in a
19056        <function>Parse</> message with parameters. The parameter values
19057        sent at <function>Bind</> time will be substituted into the
19058        execution of the cursor's query.
19059       </para>
19060      </listitem>
19061
19062      <listitem>
19063       <para>
19064        Fix hash joins and aggregates of <type>inet</type> and
19065        <type>cidr</type> data types (Tom)
19066       </para>
19067       <para>
19068        Release 7.4 handled hashing of mixed <type>inet</type> and
19069        <type>cidr</type> values incorrectly.  (This bug did not exist
19070        in prior releases because they wouldn't try to hash either
19071        data type.)
19072       </para>
19073      </listitem>
19074
19075      <listitem>
19076       <para>
19077        Make <varname>log_duration</> print only when <varname>log_statement</>
19078        prints the query (Ed L.)
19079       </para>
19080      </listitem>
19081
19082     </itemizedlist>
19083    </sect3>
19084
19085
19086    <sect3>
19087     <title>Query Changes</title>
19088     <itemizedlist>
19089
19090      <listitem>
19091       <para>
19092        Add savepoints (nested transactions) (Alvaro)
19093       </para>
19094      </listitem>
19095
19096      <listitem>
19097       <para>
19098        Unsupported isolation levels are now accepted and promoted to the
19099        nearest supported level (Peter)
19100       </para>
19101       <para>
19102        The SQL specification states that if a database doesn't support a
19103        specific isolation level, it should use the next more restrictive level.
19104        This change complies with that recommendation.
19105       </para>
19106      </listitem>
19107
19108      <listitem>
19109       <para>
19110        Allow <command>BEGIN WORK</command> to specify transaction
19111        isolation levels like <command>START TRANSACTION</command> does
19112        (Bruce)
19113       </para>
19114      </listitem>
19115
19116      <listitem>
19117       <para>
19118        Fix table permission checking for cases in which rules generate
19119        a query type different from the originally submitted query (Tom)
19120       </para>
19121      </listitem>
19122
19123      <listitem>
19124       <para>
19125        Implement dollar quoting to simplify single-quote usage (Andrew, Tom,
19126        David Fetter)
19127       </para>
19128       <para>
19129        In previous releases, because single quotes had to be used to
19130        quote a function's body, the use of single quotes inside the
19131        function text required use of two single quotes or other error-prone
19132        notations. With this release we add the ability to use "dollar
19133        quoting" to quote a block of text.  The ability to use different
19134        quoting delimiters at different nesting levels greatly simplifies
19135        the task of quoting correctly, especially in complex functions.
19136        Dollar quoting can be used anywhere quoted text is needed.
19137       </para>
19138      </listitem>
19139
19140      <listitem>
19141       <para>
19142        Make <literal>CASE val WHEN compval1 THEN ...</> evaluate <literal>val</> only once (Tom)
19143       </para>
19144       <para>
19145        <option>CASE</> no longer evaluates the tested expression multiple
19146        times. This has benefits when the expression is complex or is
19147        volatile.
19148       </para>
19149      </listitem>
19150
19151      <listitem>
19152       <para>
19153        Test <option>HAVING</> before computing target list of an
19154        aggregate query (Tom)
19155       </para>
19156       <para>
19157        Fixes improper failure of cases such as <literal>SELECT SUM(win)/SUM(lose)
19158        ... GROUP BY ... HAVING SUM(lose) &gt; 0</>.  This should work but formerly
19159        could fail with divide-by-zero.
19160       </para>
19161      </listitem>
19162
19163      <listitem>
19164       <para>
19165        Replace <varname>max_expr_depth</> parameter with
19166        <varname>max_stack_depth</> parameter, measured in kilobytes of stack
19167        size (Tom)
19168       </para>
19169       <para>
19170       This gives us a fairly bulletproof defense against crashing due to
19171       runaway recursive functions. Instead of measuring the depth of expression
19172       nesting, we now directly measure the size of the execution stack.
19173       </para>
19174      </listitem>
19175
19176      <listitem>
19177       <para>
19178        Allow arbitrary row expressions (Tom)
19179       </para>
19180       <para>
19181        This release allows SQL expressions to contain arbitrary composite
19182        types, that is, row values. It also allows functions to more easily
19183        take rows as arguments and return row values.
19184       </para>
19185      </listitem>
19186
19187      <listitem>
19188       <para>
19189        Allow <option>LIKE</>/<option>ILIKE</> to be used as the operator
19190        in row and subselect comparisons (Fabien Coelho)
19191       </para>
19192      </listitem>
19193
19194      <listitem>
19195       <para>
19196        Avoid locale-specific case conversion of basic ASCII letters in
19197        identifiers and keywords (Tom)
19198       </para>
19199       <para>
19200        This solves the <quote>Turkish problem</> with mangling of words
19201        containing <literal>I</> and  <literal>i</>.  Folding of characters
19202        outside the 7-bit-ASCII set is still locale-aware.
19203       </para>
19204      </listitem>
19205
19206      <listitem>
19207       <para>
19208        Improve syntax error reporting (Fabien, Tom)
19209       </para>
19210       <para>
19211        Syntax error reports are more useful than before.
19212       </para>
19213      </listitem>
19214
19215      <listitem>
19216       <para>
19217        Change <command>EXECUTE</command> to return a completion tag
19218        matching the executed statement (Kris Jurka)
19219       </para>
19220       <para>
19221        Previous releases return an <command>EXECUTE</command> tag for
19222        any <command>EXECUTE</command> call. In this release, the tag
19223        returned will reflect the command executed.
19224       </para>
19225      </listitem>
19226
19227      <listitem>
19228       <para>
19229        Avoid emitting <option>NATURAL CROSS JOIN</> in rule listings (Tom)
19230       </para>
19231       <para>
19232        Such a clause makes no logical sense, but in some cases the rule
19233        decompiler formerly produced this syntax.
19234       </para>
19235      </listitem>
19236
19237     </itemizedlist>
19238    </sect3>
19239
19240
19241    <sect3>
19242     <title>Object Manipulation Changes</title>
19243     <itemizedlist>
19244
19245      <listitem>
19246       <para>
19247        Add <command>COMMENT ON</> for casts, conversions, languages,
19248        operator classes, and large objects (Christopher)
19249       </para>
19250      </listitem>
19251
19252      <listitem>
19253       <para>
19254        Add new server configuration parameter <varname>default_with_oids</> to
19255        control whether tables are created with <type>OID</>s by default (Neil)
19256       </para>
19257       <para>
19258        This allows administrators to control whether <command>CREATE
19259        TABLE</command> commands create tables with or without <type>OID</>
19260        columns by default.  (Note: the current factory default setting for
19261        <varname>default_with_oids</> is <literal>TRUE</>, but the default
19262        will become <literal>FALSE</> in future releases.)
19263       </para>
19264      </listitem>
19265
19266      <listitem>
19267       <para>
19268        Add <option>WITH</> / <option>WITHOUT OIDS</> clause to
19269        <command>CREATE TABLE AS</command> (Neil)
19270       </para>
19271      </listitem>
19272
19273      <listitem>
19274       <para>
19275        Allow <command>ALTER TABLE DROP COLUMN</> to drop an <type>OID</>
19276        column (<command>ALTER TABLE SET WITHOUT OIDS</> still works)
19277        (Tom)
19278       </para>
19279      </listitem>
19280
19281      <listitem>
19282       <para>
19283        Allow composite types as table columns (Tom)
19284       </para>
19285      </listitem>
19286
19287      <listitem>
19288       <para>
19289        Allow <command>ALTER ... ADD COLUMN</> with defaults and
19290        <option>NOT NULL</> constraints; works per SQL spec (Rod)
19291       </para>
19292       <para>
19293        It is now possible for <option>ADD COLUMN</> to create a column
19294        that is not initially filled with NULLs, but with a specified
19295        default value.
19296       </para>
19297      </listitem>
19298
19299      <listitem>
19300       <para>
19301        Add <command>ALTER COLUMN TYPE</> to change column's type (Rod)
19302       </para>
19303       <para>
19304        It is now possible to alter a column's data type without dropping
19305        and re-adding the column.
19306       </para>
19307      </listitem>
19308
19309      <listitem>
19310       <para>
19311        Allow multiple <command>ALTER</> actions in a single <command>ALTER
19312        TABLE</command> command (Rod)
19313       </para>
19314       <para>
19315        This is particularly useful for <command>ALTER</> commands that
19316        rewrite the table (which include <option>ALTER COLUMN TYPE</> and
19317        <option>ADD COLUMN</> with a default). By grouping
19318        <command>ALTER</> commands together, the table need be rewritten
19319        only once.
19320       </para>
19321      </listitem>
19322
19323      <listitem>
19324       <para>
19325        Allow <command>ALTER TABLE</command> to add <type>SERIAL</type>
19326        columns (Tom)
19327       </para>
19328       <para>
19329        This falls out from the new capability of specifying defaults for new
19330        columns.
19331       </para>
19332      </listitem>
19333
19334      <listitem>
19335       <para>
19336        Allow changing the owners of aggregates, conversions, databases,
19337        functions, operators, operator classes, schemas, types, and tablespaces
19338        (Christopher, Euler Taveira de Oliveira)
19339       </para>
19340       <para>
19341        Previously this required modifying the system tables directly.
19342       </para>
19343      </listitem>
19344
19345      <listitem>
19346       <para>
19347        Allow temporary object creation to be limited to <option>SECURITY
19348        DEFINER</> functions (Sean Chittenden)
19349       </para>
19350      </listitem>
19351
19352      <listitem>
19353       <para>
19354        Add <option>ALTER TABLE ... SET WITHOUT CLUSTER</> (Christopher)
19355       </para>
19356       <para>
19357        Prior to this release, there was no way to clear an auto-cluster
19358        specification except to modify the system tables.
19359       </para>
19360      </listitem>
19361
19362      <listitem>
19363       <para>
19364        Constraint/Index/<type>SERIAL</> names are now
19365        <replaceable>table_column_type</>
19366        with numbers appended to guarantee uniqueness within the schema
19367        (Tom)
19368       </para>
19369       <para>
19370        The SQL specification states that such names should be unique
19371        within a schema.
19372       </para>
19373      </listitem>
19374
19375      <listitem>
19376       <para>
19377        Add <function>pg_get_serial_sequence()</> to return a
19378        <type>SERIAL</> column's sequence name (Christopher)
19379       </para>
19380       <para>
19381        This allows automated scripts to reliably find the <type>SERIAL</>
19382        sequence name.
19383       </para>
19384      </listitem>
19385
19386      <listitem>
19387       <para>
19388        Warn when primary/foreign key data type mismatch requires costly lookup
19389       </para>
19390      </listitem>
19391
19392      <listitem>
19393       <para>
19394        New <command>ALTER INDEX</> command to allow moving of indexes
19395        between tablespaces (Gavin)
19396       </para>
19397      </listitem>
19398
19399      <listitem>
19400       <para>
19401        Make <command>ALTER TABLE OWNER</> change dependent sequence
19402        ownership too (Alvaro)
19403       </para>
19404      </listitem>
19405
19406
19407     </itemizedlist>
19408    </sect3>
19409
19410
19411    <sect3>
19412     <title>Utility Command Changes</title>
19413     <itemizedlist>
19414
19415      <listitem>
19416       <para>
19417        Allow <command>CREATE SCHEMA</command> to create triggers,
19418        indexes, and sequences (Neil)
19419       </para>
19420      </listitem>
19421
19422      <listitem>
19423       <para>
19424        Add <option>ALSO</> keyword to <command>CREATE RULE</command> (Fabien
19425        Coelho)
19426       </para>
19427       <para>
19428        This allows <option>ALSO</> to be added to rule creation to contrast it with
19429        <option>INSTEAD</> rules.
19430       </para>
19431      </listitem>
19432
19433      <listitem>
19434       <para>
19435        Add <option>NOWAIT</> option to <command>LOCK</command> (Tatsuo)
19436       </para>
19437       <para>
19438        This allows the <command>LOCK</command> command to fail if it
19439        would have to wait for the requested lock.
19440       </para>
19441      </listitem>
19442
19443      <listitem>
19444       <para>
19445        Allow <command>COPY</command> to read and write
19446        comma-separated-value (CSV) files (Andrew, Bruce)
19447       </para>
19448      </listitem>
19449
19450      <listitem>
19451       <para>
19452        Generate error if the <command>COPY</command> delimiter and NULL
19453        string conflict (Bruce)
19454       </para>
19455      </listitem>
19456
19457      <listitem>
19458       <para>
19459        <command>GRANT</command>/<command>REVOKE</command> behavior
19460        follows the SQL spec more closely
19461       </para>
19462      </listitem>
19463
19464      <listitem>
19465       <para>
19466        Avoid locking conflict between <command>CREATE INDEX</command>
19467        and <command>CHECKPOINT</command> (Tom)
19468       </para>
19469       <para>
19470        In 7.3 and 7.4, a long-running B-tree index build could block concurrent
19471        <command>CHECKPOINT</>s from completing, thereby causing WAL bloat because the
19472        WAL log could not be recycled.
19473       </para>
19474      </listitem>
19475
19476      <listitem>
19477       <para>
19478        Database-wide <command>ANALYZE</command> does not hold locks
19479        across tables (Tom)
19480       </para>
19481       <para>
19482        This reduces the potential for deadlocks against other backends
19483        that want exclusive locks on tables.  To get the benefit of this
19484        change, do not execute database-wide <command>ANALYZE</command>
19485        inside a transaction block (<command>BEGIN</command> block); it
19486        must be able to commit and start a new transaction for each
19487        table.
19488       </para>
19489      </listitem>
19490
19491      <listitem>
19492       <para>
19493        <command>REINDEX</command> does not exclusively lock the index's
19494        parent table anymore
19495       </para>
19496       <para>
19497        The index itself is still exclusively locked, but readers of the
19498        table can continue if they are not using the particular index
19499        being rebuilt.
19500       </para>
19501      </listitem>
19502
19503      <listitem>
19504       <para>
19505        Erase MD5 user passwords when a user is renamed (Bruce)
19506       </para>
19507       <para>
19508        <productname>PostgreSQL</productname> uses the user name as salt
19509        when encrypting passwords via MD5. When a user's name is changed,
19510        the salt will no longer match the stored MD5 password, so the
19511        stored password becomes useless.  In this release a notice is
19512        generated and the password is cleared.  A new password must then
19513        be assigned if the user is to be able to log in with a password.
19514       </para>
19515      </listitem>
19516
19517      <listitem>
19518       <para>
19519        New <application>pg_ctl</> <option>kill</> option for Windows (Andrew)
19520       </para>
19521       <para>
19522        Windows does not have a <literal>kill</> command to send signals to
19523        backends so this capability was added to <application>pg_ctl</>.
19524       </para>
19525      </listitem>
19526
19527      <listitem>
19528       <para>
19529        Information schema improvements
19530       </para>
19531      </listitem>
19532
19533      <listitem>
19534       <para>
19535        Add <option>--pwfile</> option to
19536        <application>initdb</application> so the initial password can be
19537        set by GUI tools (Magnus)
19538       </para>
19539      </listitem>
19540
19541      <listitem>
19542       <para>
19543        Detect locale/encoding mismatch in
19544        <application>initdb</application> (Peter)
19545       </para>
19546      </listitem>
19547
19548      <listitem>
19549       <para>
19550        Add <option>register</> command to <application>pg_ctl</> to
19551        register Windows operating system service (Dave Page)
19552       </para>
19553      </listitem>
19554
19555     </itemizedlist>
19556    </sect3>
19557
19558
19559    <sect3>
19560     <title>Data Type and Function Changes</title>
19561     <itemizedlist>
19562
19563      <listitem>
19564       <para>
19565        More complete support for composite types (row types)  (Tom)
19566       </para>
19567       <para>
19568        Composite values can be used in many places where only scalar values
19569        worked before.
19570       </para>
19571      </listitem>
19572
19573      <listitem>
19574       <para>
19575        Reject nonrectangular array values as erroneous (Joe)
19576       </para>
19577       <para>
19578        Formerly, <function>array_in</> would silently build a
19579        surprising result.
19580       </para>
19581      </listitem>
19582
19583       <listitem>
19584        <para>
19585         Overflow in integer arithmetic operations is now detected (Tom)
19586        </para>
19587       </listitem>
19588
19589       <listitem>
19590        <para>
19591         The arithmetic operators associated with the single-byte
19592         <type>"char"</> data type have been removed.
19593        </para>
19594        <para>
19595         Formerly, the parser would select these operators in many situations
19596         where an <quote>unable to select an operator</> error would be more
19597         appropriate, such as <literal>null * null</>.  If you actually want
19598         to do arithmetic on a <type>"char"</> column, you can cast it to
19599         integer explicitly.
19600        </para>
19601       </listitem>
19602
19603      <listitem>
19604        <para>
19605         Syntax checking of array input values considerably tightened up (Joe)
19606        </para>
19607       <para>
19608         Junk that was previously allowed in odd places with odd results
19609         now causes an <literal>ERROR</>, for example, non-whitespace
19610         after the closing right brace.
19611        </para>
19612      </listitem>
19613
19614      <listitem>
19615        <para>
19616         Empty-string array element values must now be written as
19617         <literal>""</>, rather than writing nothing (Joe)
19618        </para>
19619       <para>
19620         Formerly, both ways of writing an empty-string element value were
19621         allowed, but now a quoted empty string is required.  The case where
19622         nothing at all appears will probably be considered to be a NULL
19623         element value in some future release.
19624        </para>
19625      </listitem>
19626
19627      <listitem>
19628        <para>
19629         Array element trailing whitespace is now ignored (Joe)
19630        </para>
19631       <para>
19632         Formerly leading whitespace was ignored, but trailing whitespace
19633         between an element value and the delimiter or right brace was
19634         significant.  Now trailing whitespace is also ignored.
19635        </para>
19636      </listitem>
19637
19638      <listitem>
19639       <para>
19640        Emit array values with explicit array bounds when lower bound is not one
19641        (Joe)
19642       </para>
19643      </listitem>
19644
19645      <listitem>
19646       <para>
19647        Accept <literal>YYYY-monthname-DD</> as a date string (Tom)
19648       </para>
19649      </listitem>
19650
19651      <listitem>
19652       <para>
19653        Make <function>netmask</> and <function>hostmask</> functions
19654        return maximum-length mask length (Tom)
19655       </para>
19656      </listitem>
19657
19658      <listitem>
19659       <para>
19660        Change factorial function to return <type>numeric</type> (Gavin)
19661       </para>
19662       <para>
19663        Returning <type>numeric</type> allows the factorial function to
19664        work for a wider range of input values.
19665       </para>
19666      </listitem>
19667
19668      <listitem>
19669       <para>
19670        <function>to_char</>/<function>to_date()</> date conversion
19671        improvements (Kurt Roeckx, Fabien Coelho)
19672       </para>
19673      </listitem>
19674
19675      <listitem>
19676       <para>
19677        Make <function>length()</> disregard trailing spaces in
19678        <type>CHAR(n)</> (Gavin)
19679       </para>
19680       <para>
19681        This change was made to improve consistency: trailing spaces are
19682        semantically insignificant in <type>CHAR(n)</> data, so they
19683        should not be counted by <function>length()</>.
19684       </para>
19685      </listitem>
19686
19687      <listitem>
19688       <para>
19689        Warn about empty string being passed to
19690        <type>OID</>/<type>float4</>/<type>float8</> data types (Neil)
19691       </para>
19692       <para>
19693        8.1 will throw an error instead.
19694       </para>
19695      </listitem>
19696
19697      <listitem>
19698       <para>
19699        Allow leading or trailing whitespace in
19700        <type>int2</>/<type>int4</>/<type>int8</>/<type>float4</>/<type>float8</>
19701        input routines
19702        (Neil)
19703       </para>
19704      </listitem>
19705
19706      <listitem>
19707       <para>
19708        Better support for IEEE <literal>Infinity</> and <literal>NaN</>
19709        values in <type>float4</type>/<type>float8</type> (Neil)
19710       </para>
19711       <para>
19712        These should now work on all platforms that support IEEE-compliant
19713        floating point arithmetic.
19714       </para>
19715      </listitem>
19716
19717      <listitem>
19718       <para>
19719        Add <option>week</> option to <function>date_trunc()</> (Robert Creager)
19720       </para>
19721      </listitem>
19722
19723      <listitem>
19724       <para>
19725        Fix <function>to_char</function> for <literal>1 BC</>
19726        (previously it returned <literal>1 AD</>) (Bruce)
19727       </para>
19728      </listitem>
19729
19730      <listitem>
19731       <para>
19732        Fix <function>date_part(year)</> for BC dates (previously it
19733        returned one less than the correct year) (Bruce)
19734       </para>
19735      </listitem>
19736
19737      <listitem>
19738       <para>
19739        Fix <function>date_part()</> to return the proper millennium and
19740        century (Fabien Coelho)
19741       </para>
19742       <para>
19743        In previous versions, the century and millennium results had a wrong
19744        number and started in the wrong year, as compared to standard
19745        reckoning of such things.
19746       </para>
19747      </listitem>
19748
19749      <listitem>
19750       <para>
19751        Add <function>ceiling()</> as an alias for <function>ceil()</>,
19752        and <function>power()</> as an alias for <function>pow()</> for
19753        standards compliance (Neil)
19754       </para>
19755      </listitem>
19756
19757      <listitem>
19758       <para>
19759        Change <function>ln()</>, <function>log()</>,
19760        <function>power()</>, and <function>sqrt()</> to emit the correct
19761        <literal>SQLSTATE</> error codes for certain error conditions, as
19762        specified by SQL:2003 (Neil)
19763       </para>
19764      </listitem>
19765
19766      <listitem>
19767       <para>
19768        Add <function>width_bucket()</> function as defined by SQL:2003 (Neil)
19769       </para>
19770      </listitem>
19771
19772      <listitem>
19773       <para>
19774        Add <function>generate_series()</> functions to simplify working
19775        with numeric sets (Joe)
19776       </para>
19777      </listitem>
19778
19779      <listitem>
19780       <para>
19781        Fix <function>upper/lower/initcap()</> functions to work with
19782        multibyte encodings (Tom)
19783       </para>
19784      </listitem>
19785
19786      <listitem>
19787       <para>
19788        Add boolean and bitwise integer <option>AND</>/<option>OR</>
19789        aggregates (Fabien Coelho)
19790       </para>
19791      </listitem>
19792
19793      <listitem>
19794       <para>
19795        New session information functions to return network addresses for client
19796        and server (Sean Chittenden)
19797       </para>
19798      </listitem>
19799
19800      <listitem>
19801       <para>
19802        Add function to determine the area of a closed path (Sean Chittenden)
19803       </para>
19804      </listitem>
19805
19806      <listitem>
19807       <para>
19808        Add function to send cancel request to other backends (Magnus)
19809       </para>
19810      </listitem>
19811
19812      <listitem>
19813       <para>
19814        Add <type>interval</> plus <type>datetime</> operators (Tom)
19815       </para>
19816       <para>
19817        The reverse ordering, <type>datetime</> plus <type>interval</>,
19818        was already supported, but both are required by the SQL standard.
19819       </para>
19820      </listitem>
19821
19822      <listitem>
19823       <para>
19824        Casting an integer to <type>BIT(N)</> selects the rightmost N bits
19825        of the integer
19826        (Tom)
19827       </para>
19828       <para>
19829        In prior releases, the leftmost N bits were selected, but this was
19830        deemed unhelpful, not to mention inconsistent with casting from bit
19831        to int.
19832       </para>
19833      </listitem>
19834
19835      <listitem>
19836       <para>
19837        Require <type>CIDR</> values to have all nonmasked bits be zero
19838        (Kevin Brintnall)
19839       </para>
19840      </listitem>
19841
19842     </itemizedlist>
19843    </sect3>
19844
19845
19846    <sect3>
19847     <title>Server-Side Language Changes</title>
19848     <itemizedlist>
19849
19850      <listitem>
19851       <para>
19852        In <literal>READ COMMITTED</> serialization mode, volatile functions
19853        now see the results of concurrent transactions committed up to the
19854        beginning of each statement within the function, rather than up to the
19855        beginning of the interactive command that called the function.
19856       </para>
19857      </listitem>
19858
19859      <listitem>
19860       <para>
19861        Functions declared <literal>STABLE</> or <literal>IMMUTABLE</> always
19862        use the snapshot of the calling query, and therefore do not see the
19863        effects of actions taken after the calling query starts, whether in
19864        their own transaction or other transactions.  Such a function must be
19865        read-only, too, meaning that it cannot use any SQL commands other than
19866        <command>SELECT</>.  There is a considerable performance gain from
19867        declaring a function <literal>STABLE</> or <literal>IMMUTABLE</>
19868        rather than <literal>VOLATILE</>.
19869       </para>
19870      </listitem>
19871
19872      <listitem>
19873       <para>
19874        Nondeferred <option>AFTER</> triggers are now fired immediately
19875        after completion of the triggering query, rather than upon
19876        finishing the current interactive command. This makes a difference
19877        when the triggering query occurred within a function: the trigger
19878        is invoked before the function proceeds to its next operation. For
19879        example, if a function inserts a new row into a table, any
19880        nondeferred foreign key checks occur before proceeding with the
19881        function.
19882       </para>
19883      </listitem>
19884
19885      <listitem>
19886       <para>
19887        Allow function parameters to be declared with names (Dennis Bj&ouml;rklund)
19888       </para>
19889       <para>
19890        This allows better documentation of functions.  Whether the names
19891        actually do anything depends on the specific function language
19892        being used.
19893       </para>
19894      </listitem>
19895
19896      <listitem>
19897       <para>
19898        Allow PL/pgSQL parameter names to be referenced in the function (Dennis Bj&ouml;rklund)
19899       </para>
19900       <para>
19901        This basically creates an automatic alias for each named parameter.
19902       </para>
19903      </listitem>
19904
19905      <listitem>
19906       <para>
19907        Do minimal syntax checking of PL/pgSQL functions at creation time (Tom)
19908       </para>
19909       <para>
19910        This allows us to catch simple syntax errors sooner.
19911       </para>
19912      </listitem>
19913
19914      <listitem>
19915       <para>
19916        More support for composite types (row and record variables) in PL/pgSQL
19917       </para>
19918       <para>
19919        For example, it now works to pass a rowtype variable to another function
19920        as a single variable.
19921       </para>
19922      </listitem>
19923
19924      <listitem>
19925       <para>
19926        Default values for PL/pgSQL variables can now reference previously
19927        declared variables
19928       </para>
19929      </listitem>
19930
19931      <listitem>
19932       <para>
19933        Improve parsing of PL/pgSQL FOR loops (Tom)
19934       </para>
19935       <para>
19936        Parsing is now driven by presence of <literal>".."</> rather than
19937        data type of <option>FOR</> variable. This makes no difference for
19938        correct functions, but should result in more understandable error
19939        messages when a mistake is made.
19940       </para>
19941      </listitem>
19942
19943      <listitem>
19944       <para>
19945        Major overhaul of PL/Perl server-side language (Command Prompt, Andrew Dunstan)
19946       </para>
19947      </listitem>
19948
19949      <listitem>
19950       <para>
19951        In PL/Tcl, SPI commands are now run in subtransactions.  If an error
19952        occurs, the subtransaction is cleaned up and the error is reported
19953        as an ordinary Tcl error, which can be trapped with <literal>catch</>.
19954        Formerly, it was not possible to catch such errors.
19955       </para>
19956      </listitem>
19957
19958      <listitem>
19959       <para>
19960        Accept <command>ELSEIF</> in PL/pgSQL (Neil)
19961       </para>
19962       <para>
19963        Previously PL/pgSQL only allowed <command>ELSIF</>, but many people
19964        are accustomed to spelling this keyword <command>ELSEIF</>.
19965       </para>
19966      </listitem>
19967
19968     </itemizedlist>
19969    </sect3>
19970
19971
19972    <sect3>
19973     <title><application>psql</> Changes</title>
19974     <itemizedlist>
19975
19976      <listitem>
19977       <para>
19978        Improve <application>psql</> information display about database
19979        objects (Christopher)
19980       </para>
19981      </listitem>
19982
19983      <listitem>
19984       <para>
19985        Allow <application>psql</> to display group membership in
19986        <command>\du</> and <command>\dg</> (Markus Bertheau)
19987       </para>
19988      </listitem>
19989
19990      <listitem>
19991       <para>
19992        Prevent <application>psql</> <command>\dn</command> from showing
19993        temporary schemas (Bruce)
19994       </para>
19995      </listitem>
19996
19997      <listitem>
19998       <para>
19999        Allow <application>psql</> to handle tilde user expansion for file
20000        names (Zach Irmen)
20001       </para>
20002      </listitem>
20003
20004      <listitem>
20005       <para>
20006        Allow <application>psql</> to display fancy prompts, including
20007        color, via <application>readline</> (Reece Hart, Chet Ramey)
20008       </para>
20009      </listitem>
20010
20011      <listitem>
20012       <para>
20013        Make <application>psql</> <command>\copy</> match <command>COPY</command> command syntax
20014        fully (Tom)
20015       </para>
20016      </listitem>
20017
20018      <listitem>
20019       <para>
20020        Show the location of syntax errors (Fabien Coelho, Tom)
20021       </para>
20022      </listitem>
20023
20024      <listitem>
20025       <para>
20026        Add <command>CLUSTER</command> information to <application>psql</>
20027        <command>\d</> display
20028        (Bruce)
20029       </para>
20030      </listitem>
20031
20032      <listitem>
20033       <para>
20034        Change <application>psql</> <command>\copy stdin/stdout</> to read
20035        from command input/output (Bruce)
20036       </para>
20037      </listitem>
20038
20039      <listitem>
20040       <para>
20041        Add <option>pstdin</>/<option>pstdout</> to read from
20042        <application>psql</>'s <literal>stdin</>/<literal>stdout</> (Mark
20043        Feit)
20044       </para>
20045      </listitem>
20046
20047      <listitem>
20048       <para>
20049        Add global <application>psql</> configuration file, <filename>psqlrc.sample</filename>
20050        (Bruce)
20051       </para>
20052       <para>
20053        This allows a central file where global <application>psql</> startup commands can
20054        be stored.
20055       </para>
20056      </listitem>
20057
20058      <listitem>
20059       <para>
20060        Have <application>psql</> <command>\d+</> indicate if the table
20061        has an <type>OID</> column (Neil)
20062       </para>
20063      </listitem>
20064
20065      <listitem>
20066       <para>
20067        On Windows, use binary mode in <application>psql</> when reading files so control-Z
20068        is not seen as end-of-file
20069       </para>
20070      </listitem>
20071
20072      <listitem>
20073       <para>
20074        Have <command>\dn+</> show permissions and description for schemas (Dennis
20075        Bj&ouml;rklund)
20076       </para>
20077      </listitem>
20078
20079      <listitem>
20080       <para>
20081        Improve tab completion support (Stefan Kaltenbrunn, Greg Sabino Mullane)
20082       </para>
20083      </listitem>
20084
20085      <listitem>
20086       <para>
20087        Allow boolean settings to be set using upper or lower case (Michael Paesold)
20088       </para>
20089      </listitem>
20090
20091     </itemizedlist>
20092    </sect3>
20093
20094
20095    <sect3>
20096     <title><application>pg_dump</> Changes</title>
20097     <itemizedlist>
20098
20099      <listitem>
20100       <para>
20101        Use dependency information to improve the reliability of
20102        <application>pg_dump</> (Tom)
20103       </para>
20104       <para>
20105        This should solve the longstanding problems with related objects
20106        sometimes being dumped in the wrong order.
20107       </para>
20108      </listitem>
20109
20110      <listitem>
20111       <para>
20112        Have <application>pg_dump</> output objects in alphabetical order if possible (Tom)
20113       </para>
20114       <para>
20115        This should make it easier to identify changes between
20116        dump files.
20117       </para>
20118      </listitem>
20119
20120      <listitem>
20121       <para>
20122        Allow <application>pg_restore</> to ignore some SQL errors (Fabien Coelho)
20123       </para>
20124       <para>
20125        This makes <application>pg_restore</>'s behavior similar to the
20126        results of feeding a <application>pg_dump</> output script to
20127        <application>psql</>. In most cases, ignoring errors and plowing
20128        ahead is the most useful thing to do. Also added was a pg_restore
20129        option to give the old behavior of exiting on an error.
20130       </para>
20131      </listitem>
20132
20133      <listitem>
20134       <para>
20135        <application>pg_restore</> <option>-l</> display now includes
20136        objects' schema names
20137       </para>
20138      </listitem>
20139
20140      <listitem>
20141       <para>
20142        New begin/end markers in <application>pg_dump</> text output (Bruce)
20143       </para>
20144      </listitem>
20145
20146      <listitem>
20147       <para>
20148        Add start/stop times for
20149        <application>pg_dump</>/<application>pg_dumpall</> in verbose mode
20150        (Bruce)
20151       </para>
20152      </listitem>
20153
20154      <listitem>
20155       <para>
20156        Allow most <application>pg_dump</> options in
20157        <application>pg_dumpall</> (Christopher)
20158       </para>
20159      </listitem>
20160
20161      <listitem>
20162       <para>
20163        Have <application>pg_dump</> use <command>ALTER OWNER</> rather
20164        than <command>SET SESSION AUTHORIZATION</> by default
20165        (Christopher)
20166       </para>
20167      </listitem>
20168
20169     </itemizedlist>
20170    </sect3>
20171
20172
20173    <sect3>
20174     <title>libpq Changes</title>
20175     <itemizedlist>
20176
20177      <listitem>
20178       <para>
20179        Make libpq's <option>SIGPIPE</> handling thread-safe (Bruce)
20180       </para>
20181      </listitem>
20182
20183      <listitem>
20184       <para>
20185        Add <function>PQmbdsplen()</> which returns the display length
20186        of a character (Tatsuo)
20187       </para>
20188      </listitem>
20189
20190      <listitem>
20191       <para>
20192        Add thread locking to <application>SSL</> and
20193        <application>Kerberos</> connections (Manfred Spraul)
20194       </para>
20195      </listitem>
20196
20197      <listitem>
20198       <para>
20199        Allow <function>PQoidValue()</>, <function>PQcmdTuples()</>, and
20200        <function>PQoidStatus()</> to work on <command>EXECUTE</command>
20201        commands (Neil)
20202       </para>
20203      </listitem>
20204
20205      <listitem>
20206       <para>
20207        Add <function>PQserverVersion()</> to provide more convenient
20208        access to the server version number (Greg Sabino Mullane)
20209       </para>
20210      </listitem>
20211
20212      <listitem>
20213       <para>
20214        Add <function>PQprepare/PQsendPrepared()</> functions to support
20215        preparing statements without necessarily specifying the data types
20216        of their parameters (Abhijit Menon-Sen)
20217       </para>
20218      </listitem>
20219
20220      <listitem>
20221       <para>
20222        Many ECPG improvements, including <command>SET DESCRIPTOR</> (Michael)
20223       </para>
20224      </listitem>
20225
20226     </itemizedlist>
20227    </sect3>
20228
20229
20230    <sect3>
20231     <title>Source Code Changes</title>
20232     <itemizedlist>
20233
20234      <listitem>
20235       <para>
20236        Allow the database server to run natively on Windows (Claudio, Magnus, Andrew)
20237       </para>
20238      </listitem>
20239
20240      <listitem>
20241       <para>
20242        Shell script commands converted to C versions for Windows support (Andrew)
20243       </para>
20244      </listitem>
20245
20246      <listitem>
20247       <para>
20248        Create an extension makefile framework (Fabien Coelho, Peter)
20249       </para>
20250       <para>
20251        This simplifies the task of building extensions outside the original
20252        source tree.
20253       </para>
20254      </listitem>
20255
20256      <listitem>
20257       <para>
20258        Support relocatable installations (Bruce)
20259       </para>
20260       <para>
20261        Directory paths for installed files (such as the
20262        <filename>/share</> directory) are now computed relative to the
20263        actual location of the executables, so that an installation tree
20264        can be moved to another place without reconfiguring and
20265        rebuilding.
20266       </para>
20267      </listitem>
20268
20269      <listitem>
20270       <para>
20271        Use <option>--with-docdir</> to choose installation location of documentation; also
20272        allow <option>--infodir</> (Peter)
20273       </para>
20274      </listitem>
20275
20276      <listitem>
20277       <para>
20278        Add <option>--without-docdir</> to prevent installation of documentation (Peter)
20279       </para>
20280      </listitem>
20281
20282      <listitem>
20283       <para>
20284        Upgrade to <application>DocBook</> V4.2 SGML (Peter)
20285       </para>
20286      </listitem>
20287
20288      <listitem>
20289       <para>
20290        New <literal>PostgreSQL</> <application>CVS</> tag (Marc)
20291       </para>
20292       <para>
20293        This was done to make it easier for organizations to manage their
20294        own copies of the <productname>PostgreSQL</productname>
20295        <application>CVS</> repository. File version stamps from the master
20296        repository will not get munged by checking into or out of a copied
20297        repository.
20298       </para>
20299      </listitem>
20300
20301      <listitem>
20302       <para>
20303        Clarify locking code (Manfred Koizar)
20304       </para>
20305      </listitem>
20306
20307      <listitem>
20308       <para>
20309        Buffer manager cleanup (Neil)
20310       </para>
20311      </listitem>
20312
20313      <listitem>
20314       <para>
20315        Decouple platform tests from CPU spinlock code (Bruce, Tom)
20316       </para>
20317      </listitem>
20318
20319      <listitem>
20320       <para>
20321        Add inlined test-and-set code on PA-RISC for <application>gcc</>
20322        (ViSolve, Tom)
20323       </para>
20324      </listitem>
20325
20326      <listitem>
20327       <para>
20328        Improve i386 spinlock code (Manfred Spraul)
20329       </para>
20330      </listitem>
20331
20332      <listitem>
20333       <para>
20334        Clean up spinlock assembly code to avoid warnings from newer
20335        <application>gcc</> releases (Tom)
20336       </para>
20337      </listitem>
20338
20339      <listitem>
20340       <para>
20341        Remove JDBC from source tree; now a separate project
20342       </para>
20343      </listitem>
20344
20345      <listitem>
20346       <para>
20347        Remove the libpgtcl client interface; now a separate project
20348       </para>
20349      </listitem>
20350
20351      <listitem>
20352       <para>
20353        More accurately estimate memory and file descriptor usage (Tom)
20354       </para>
20355      </listitem>
20356
20357      <listitem>
20358       <para>
20359        Improvements to the Mac OS X startup scripts (Ray A.)
20360       </para>
20361      </listitem>
20362
20363      <listitem>
20364       <para>
20365        New <function>fsync()</> test program (Bruce)
20366       </para>
20367      </listitem>
20368
20369      <listitem>
20370       <para>
20371        Major documentation improvements (Neil, Peter)
20372       </para>
20373      </listitem>
20374
20375      <listitem>
20376       <para>
20377        Remove <application>pg_encoding</application>; not needed
20378        anymore
20379       </para>
20380      </listitem>
20381
20382      <listitem>
20383       <para>
20384        Remove <application>pg_id</application>; not needed anymore
20385       </para>
20386      </listitem>
20387
20388      <listitem>
20389       <para>
20390        Remove <application>initlocation</application>; not needed
20391        anymore
20392       </para>
20393      </listitem>
20394
20395      <listitem>
20396       <para>
20397        Auto-detect thread flags (no more manual testing) (Bruce)
20398       </para>
20399      </listitem>
20400
20401      <listitem>
20402       <para>
20403        Use Olson's public domain <application>timezone</> library (Magnus)
20404       </para>
20405      </listitem>
20406
20407      <listitem>
20408       <para>
20409        With threading enabled, use thread flags on Unixware for
20410        backend executables too (Bruce)
20411       </para>
20412       <para>
20413        Unixware cannot mix threaded and nonthreaded object files in the
20414        same executable, so everything must be compiled as threaded.
20415       </para>
20416      </listitem>
20417
20418      <listitem>
20419       <para>
20420        <application>psql</> now uses a <application>flex</>-generated
20421        lexical analyzer to process command strings
20422       </para>
20423      </listitem>
20424
20425      <listitem>
20426       <para>
20427        Reimplement the linked list data structure used throughout the
20428        backend (Neil)
20429       </para>
20430       <para>
20431        This improves performance by allowing list append and length
20432        operations to be more efficient.
20433       </para>
20434      </listitem>
20435
20436      <listitem>
20437       <para>
20438        Allow dynamically loaded modules to create their own server configuration
20439        parameters (Thomas Hallgren)
20440       </para>
20441      </listitem>
20442
20443      <listitem>
20444       <para>
20445        New Brazilian version of FAQ (Euler Taveira de Oliveira)
20446       </para>
20447      </listitem>
20448
20449      <listitem>
20450       <para>
20451        Add French FAQ (Guillaume Lelarge)
20452       </para>
20453      </listitem>
20454
20455      <listitem>
20456       <para>
20457        New <application>pgevent</> for Windows logging
20458       </para>
20459      </listitem>
20460
20461      <listitem>
20462       <para>
20463        Make libpq and ECPG build as proper shared libraries on OS X (Tom)
20464       </para>
20465      </listitem>
20466
20467     </itemizedlist>
20468    </sect3>
20469
20470
20471    <sect3>
20472     <title>Contrib Changes</title>
20473     <itemizedlist>
20474
20475      <listitem>
20476       <para>
20477        Overhaul of <filename>contrib/dblink</> (Joe)
20478       </para>
20479      </listitem>
20480
20481      <listitem>
20482       <para>
20483        <filename>contrib/dbmirror</> improvements (Steven Singer)
20484       </para>
20485      </listitem>
20486
20487      <listitem>
20488       <para>
20489        New <filename>contrib/xml2</> (John Gray, Torchbox)
20490       </para>
20491      </listitem>
20492
20493      <listitem>
20494       <para>
20495        Updated <filename>contrib/mysql</filename>
20496       </para>
20497      </listitem>
20498
20499      <listitem>
20500       <para>
20501        New version of <filename>contrib/btree_gist</> (Teodor)
20502       </para>
20503      </listitem>
20504
20505      <listitem>
20506       <para>
20507        New <filename>contrib/trgm</>, trigram matching for
20508        <productname>PostgreSQL</productname> (Teodor)
20509       </para>
20510      </listitem>
20511
20512      <listitem>
20513       <para>
20514        Many <filename>contrib/tsearch2</> improvements (Teodor)
20515       </para>
20516      </listitem>
20517
20518      <listitem>
20519       <para>
20520        Add double metaphone to <filename>contrib/fuzzystrmatch</> (Andrew)
20521       </para>
20522      </listitem>
20523
20524      <listitem>
20525       <para>
20526        Allow <filename>contrib/pg_autovacuum</> to run as a Windows service (Dave Page)
20527       </para>
20528      </listitem>
20529
20530      <listitem>
20531       <para>
20532        Add functions to <filename>contrib/dbsize</> (Andreas Pflug)
20533       </para>
20534      </listitem>
20535
20536      <listitem>
20537       <para>
20538        Removed <filename>contrib/pg_logger</>: obsoleted by integrated logging
20539        subprocess
20540       </para>
20541      </listitem>
20542
20543      <listitem>
20544       <para>
20545        Removed <filename>contrib/rserv</>: obsoleted by various separate projects
20546       </para>
20547      </listitem>
20548
20549     </itemizedlist>
20550    </sect3>
20551
20552   </sect2>
20553  </sect1>
20554
20555  <sect1 id="release-7-4-25">
20556   <title>Release 7.4.25</title>
20557
20558   <note>
20559   <title>Release date</title>
20560   <simpara>2009-03-16</simpara>
20561   </note>
20562
20563   <para>
20564    This release contains a variety of fixes from 7.4.24.
20565    For information about new features in the 7.4 major release, see
20566    <xref linkend="release-7-4">.
20567   </para>
20568
20569   <sect2>
20570    <title>Migration to Version 7.4.25</title>
20571
20572    <para>
20573     A dump/restore is not required for those running 7.4.X.
20574     However, if you are upgrading from a version earlier than 7.4.11,
20575     see the release notes for 7.4.11.
20576    </para>
20577
20578   </sect2>
20579
20580   <sect2>
20581    <title>Changes</title>
20582
20583    <itemizedlist>
20584
20585     <listitem>
20586      <para>
20587       Prevent error recursion crashes when encoding conversion fails (Tom)
20588      </para>
20589
20590      <para>
20591       This change extends fixes made in the last two minor releases for
20592       related failure scenarios.  The previous fixes were narrowly tailored
20593       for the original problem reports, but we have now recognized that
20594       <emphasis>any</> error thrown by an encoding conversion function could
20595       potentially lead to infinite recursion while trying to report the
20596       error.  The solution therefore is to disable translation and encoding
20597       conversion and report the plain-ASCII form of any error message,
20598       if we find we have gotten into a recursive error reporting situation.
20599       (CVE-2009-0922)
20600      </para>
20601     </listitem>
20602
20603     <listitem>
20604      <para>
20605       Disallow <command>CREATE CONVERSION</> with the wrong encodings
20606       for the specified conversion function (Heikki)
20607      </para>
20608
20609      <para>
20610       This prevents one possible scenario for encoding conversion failure.
20611       The previous change is a backstop to guard against other kinds of
20612       failures in the same area.
20613      </para>
20614     </listitem>
20615
20616     <listitem>
20617      <para>
20618       Fix core dump when <function>to_char()</> is given format codes that
20619       are inappropriate for the type of the data argument (Tom)
20620      </para>
20621     </listitem>
20622
20623     <listitem>
20624      <para>
20625       Add <literal>MUST</> (Mauritius Island Summer Time) to the default list
20626       of known timezone abbreviations (Xavier Bugaud)
20627      </para>
20628     </listitem>
20629
20630    </itemizedlist>
20631
20632   </sect2>
20633  </sect1>
20634
20635  <sect1 id="release-7-4-24">
20636   <title>Release 7.4.24</title>
20637
20638   <note>
20639   <title>Release date</title>
20640   <simpara>2009-02-02</simpara>
20641   </note>
20642
20643   <para>
20644    This release contains a variety of fixes from 7.4.23.
20645    For information about new features in the 7.4 major release, see
20646    <xref linkend="release-7-4">.
20647   </para>
20648
20649   <sect2>
20650    <title>Migration to Version 7.4.24</title>
20651
20652    <para>
20653     A dump/restore is not required for those running 7.4.X.
20654     However, if you are upgrading from a version earlier than 7.4.11,
20655     see the release notes for 7.4.11.
20656    </para>
20657
20658   </sect2>
20659
20660   <sect2>
20661    <title>Changes</title>
20662
20663    <itemizedlist>
20664
20665     <listitem>
20666      <para>
20667       Improve handling of URLs in <function>headline()</> function (Teodor)
20668      </para>
20669     </listitem>
20670
20671     <listitem>
20672      <para>
20673       Improve handling of overlength headlines in <function>headline()</>
20674       function (Teodor)
20675      </para>
20676     </listitem>
20677
20678     <listitem>
20679      <para>
20680       Prevent possible Assert failure or misconversion if an encoding
20681       conversion is created with the wrong conversion function for the
20682       specified pair of encodings (Tom, Heikki)
20683      </para>
20684     </listitem>
20685
20686     <listitem>
20687      <para>
20688       Avoid unnecessary locking of small tables in <command>VACUUM</>
20689       (Heikki)
20690      </para>
20691     </listitem>
20692
20693     <listitem>
20694      <para>
20695       Fix uninitialized variables in <filename>contrib/tsearch2</>'s
20696       <function>get_covers()</> function (Teodor)
20697      </para>
20698     </listitem>
20699
20700     <listitem>
20701      <para>
20702       Fix bug in <function>to_char()</>'s handling of <literal>TH</>
20703       format codes (Andreas Scherbaum)
20704      </para>
20705     </listitem>
20706
20707     <listitem>
20708      <para>
20709       Make all documentation reference <literal>pgsql-bugs</> and/or
20710       <literal>pgsql-hackers</> as appropriate, instead of the
20711       now-decommissioned <literal>pgsql-ports</> and <literal>pgsql-patches</>
20712       mailing lists (Tom)
20713      </para>
20714     </listitem>
20715
20716    </itemizedlist>
20717
20718   </sect2>
20719  </sect1>
20720
20721  <sect1 id="release-7-4-23">
20722   <title>Release 7.4.23</title>
20723
20724   <note>
20725   <title>Release date</title>
20726   <simpara>2008-11-03</simpara>
20727   </note>
20728
20729   <para>
20730    This release contains a variety of fixes from 7.4.22.
20731    For information about new features in the 7.4 major release, see
20732    <xref linkend="release-7-4">.
20733   </para>
20734
20735   <sect2>
20736    <title>Migration to Version 7.4.23</title>
20737
20738    <para>
20739     A dump/restore is not required for those running 7.4.X.
20740     However, if you are upgrading from a version earlier than 7.4.11,
20741     see the release notes for 7.4.11.
20742    </para>
20743
20744   </sect2>
20745
20746   <sect2>
20747    <title>Changes</title>
20748
20749    <itemizedlist>
20750
20751     <listitem>
20752      <para>
20753       Fix backend crash when the client encoding cannot represent a localized
20754       error message (Tom)
20755      </para>
20756
20757      <para>
20758       We have addressed similar issues before, but it would still fail if
20759       the <quote>character has no equivalent</> message itself couldn't
20760       be converted.  The fix is to disable localization and send the plain
20761       ASCII error message when we detect such a situation.
20762      </para>
20763     </listitem>
20764
20765     <listitem>
20766      <para>
20767       Fix incorrect tsearch2 headline generation when single query
20768       item matches first word of text (Sushant Sinha)
20769      </para>
20770     </listitem>
20771
20772     <listitem>
20773      <para>
20774       Fix improper display of fractional seconds in interval values when
20775       using a non-ISO datestyle in an <option>--enable-integer-datetimes</>
20776       build (Ron Mayer)
20777      </para>
20778     </listitem>
20779
20780     <listitem>
20781      <para>
20782       Ensure <function>SPI_getvalue</> and <function>SPI_getbinval</>
20783       behave correctly when the passed tuple and tuple descriptor have
20784       different numbers of columns (Tom)
20785      </para>
20786
20787      <para>
20788       This situation is normal when a table has had columns added or removed,
20789       but these two functions didn't handle it properly.
20790       The only likely consequence is an incorrect error indication.
20791      </para>
20792     </listitem>
20793
20794     <listitem>
20795      <para>
20796       Fix <application>ecpg</>'s parsing of <command>CREATE USER</> (Michael)
20797      </para>
20798     </listitem>
20799
20800    </itemizedlist>
20801
20802   </sect2>
20803  </sect1>
20804
20805  <sect1 id="release-7-4-22">
20806   <title>Release 7.4.22</title>
20807
20808   <note>
20809   <title>Release date</title>
20810   <simpara>2008-09-22</simpara>
20811   </note>
20812
20813   <para>
20814    This release contains a variety of fixes from 7.4.21.
20815    For information about new features in the 7.4 major release, see
20816    <xref linkend="release-7-4">.
20817   </para>
20818
20819   <sect2>
20820    <title>Migration to Version 7.4.22</title>
20821
20822    <para>
20823     A dump/restore is not required for those running 7.4.X.
20824     However, if you are upgrading from a version earlier than 7.4.11,
20825     see the release notes for 7.4.11.
20826    </para>
20827
20828   </sect2>
20829
20830   <sect2>
20831    <title>Changes</title>
20832
20833    <itemizedlist>
20834
20835     <listitem>
20836      <para>
20837       Fix datetime input functions to correctly detect integer overflow when
20838       running on a 64-bit platform (Tom)
20839      </para>
20840     </listitem>
20841
20842     <listitem>
20843      <para>
20844       Improve performance of writing very long log messages to syslog (Tom)
20845      </para>
20846     </listitem>
20847
20848     <listitem>
20849      <para>
20850       Fix bug in backwards scanning of a cursor on a <literal>SELECT DISTINCT
20851       ON</> query (Tom)
20852      </para>
20853     </listitem>
20854
20855     <listitem>
20856      <para>
20857       Fix planner to estimate that <literal>GROUP BY</> expressions yielding
20858       boolean results always result in two groups, regardless of the
20859       expressions' contents (Tom)
20860      </para>
20861
20862      <para>
20863       This is very substantially more accurate than the regular <literal>GROUP
20864       BY</> estimate for certain boolean tests like <replaceable>col</>
20865       <literal>IS NULL</>.
20866      </para>
20867     </listitem>
20868
20869     <listitem>
20870      <para>
20871       Improve <application>pg_dump</> and <application>pg_restore</>'s
20872       error reporting after failure to send a SQL command (Tom)
20873      </para>
20874     </listitem>
20875
20876    </itemizedlist>
20877
20878   </sect2>
20879  </sect1>
20880
20881  <sect1 id="release-7-4-21">
20882   <title>Release 7.4.21</title>
20883
20884   <note>
20885   <title>Release date</title>
20886   <simpara>2008-06-12</simpara>
20887   </note>
20888
20889   <para>
20890    This release contains one serious bug fix over 7.4.20.
20891    For information about new features in the 7.4 major release, see
20892    <xref linkend="release-7-4">.
20893   </para>
20894
20895   <sect2>
20896    <title>Migration to Version 7.4.21</title>
20897
20898    <para>
20899     A dump/restore is not required for those running 7.4.X.
20900     However, if you are upgrading from a version earlier than 7.4.11,
20901     see the release notes for 7.4.11.
20902    </para>
20903
20904   </sect2>
20905
20906   <sect2>
20907    <title>Changes</title>
20908
20909    <itemizedlist>
20910
20911     <listitem>
20912      <para>
20913       Make <function>pg_get_ruledef()</> parenthesize negative constants (Tom)
20914      </para>
20915
20916      <para>
20917       Before this fix, a negative constant in a view or rule might be dumped
20918       as, say, <literal>-42::integer</>, which is subtly incorrect: it should
20919       be <literal>(-42)::integer</> due to operator precedence rules.
20920       Usually this would make little difference, but it could interact with
20921       another recent patch to cause
20922       <productname>PostgreSQL</> to reject what had been a valid
20923       <command>SELECT DISTINCT</> view query.  Since this could result in
20924       <application>pg_dump</> output failing to reload, it is being treated
20925       as a high-priority fix.  The only released versions in which dump
20926       output is actually incorrect are 8.3.1 and 8.2.7.
20927      </para>
20928     </listitem>
20929
20930    </itemizedlist>
20931
20932   </sect2>
20933  </sect1>
20934
20935  <sect1 id="release-7-4-20">
20936   <title>Release 7.4.20</title>
20937
20938   <note>
20939   <title>Release date</title>
20940   <simpara>never released</simpara>
20941   </note>
20942
20943   <para>
20944    This release contains a variety of fixes from 7.4.19.
20945    For information about new features in the 7.4 major release, see
20946    <xref linkend="release-7-4">.
20947   </para>
20948
20949   <sect2>
20950    <title>Migration to Version 7.4.20</title>
20951
20952    <para>
20953     A dump/restore is not required for those running 7.4.X.
20954     However, if you are upgrading from a version earlier than 7.4.11,
20955     see the release notes for 7.4.11.
20956    </para>
20957
20958   </sect2>
20959
20960   <sect2>
20961    <title>Changes</title>
20962
20963    <itemizedlist>
20964
20965     <listitem>
20966      <para>
20967       Fix conversions between ISO-8859-5 and other encodings to handle
20968       Cyrillic <quote>Yo</> characters (<literal>e</> and <literal>E</> with
20969       two dots) (Sergey Burladyan)
20970      </para>
20971     </listitem>
20972
20973     <listitem>
20974      <para>
20975       Fix a few datatype input functions
20976       that were allowing unused bytes in their results to contain
20977       uninitialized, unpredictable values (Tom)
20978      </para>
20979
20980      <para>
20981       This could lead to failures in which two apparently identical literal
20982       values were not seen as equal, resulting in the parser complaining
20983       about unmatched <literal>ORDER BY</> and <literal>DISTINCT</>
20984       expressions.
20985      </para>
20986     </listitem>
20987
20988     <listitem>
20989      <para>
20990       Fix a corner case in regular-expression substring matching
20991       (<literal>substring(<replaceable>string</> from
20992       <replaceable>pattern</>)</literal>) (Tom)
20993      </para>
20994
20995      <para>
20996       The problem occurs when there is a match to the pattern overall but
20997       the user has specified a parenthesized subexpression and that
20998       subexpression hasn't got a match.  An example is
20999       <literal>substring('foo' from 'foo(bar)?')</>.
21000       This should return NULL, since <literal>(bar)</> isn't matched, but
21001       it was mistakenly returning the whole-pattern match instead (ie,
21002       <literal>foo</>).
21003      </para>
21004     </listitem>
21005
21006     <listitem>
21007      <para>
21008       Fix incorrect result from <application>ecpg</>'s
21009       <function>PGTYPEStimestamp_sub()</> function (Michael)
21010      </para>
21011     </listitem>
21012
21013     <listitem>
21014      <para>
21015       Fix <literal>DatumGetBool</> macro to not fail with <application>gcc</>
21016       4.3 (Tom)
21017      </para>
21018
21019      <para>
21020       This problem affects <quote>old style</> (V0) C functions that
21021       return boolean.  The fix is already in 8.3, but the need to
21022       back-patch it was not realized at the time.
21023      </para>
21024     </listitem>
21025
21026     <listitem>
21027      <para>
21028       Fix longstanding <command>LISTEN</>/<command>NOTIFY</>
21029       race condition (Tom)
21030      </para>
21031
21032      <para>
21033       In rare cases a session that had just executed a
21034       <command>LISTEN</> might not get a notification, even though
21035       one would be expected because the concurrent transaction executing
21036       <command>NOTIFY</> was observed to commit later.
21037      </para>
21038
21039      <para>
21040       A side effect of the fix is that a transaction that has executed
21041       a not-yet-committed <command>LISTEN</> command will not see any
21042       row in <structname>pg_listener</> for the <command>LISTEN</>,
21043       should it choose to look; formerly it would have.  This behavior
21044       was never documented one way or the other, but it is possible that
21045       some applications depend on the old behavior.
21046      </para>
21047     </listitem>
21048
21049     <listitem>
21050      <para>
21051       Fix display of constant expressions in <literal>ORDER BY</>
21052       and <literal>GROUP BY</> (Tom)
21053      </para>
21054
21055      <para>
21056       An explictly casted constant would be shown incorrectly.  This could
21057       for example lead to corruption of a view definition during
21058       dump and reload.
21059      </para>
21060     </listitem>
21061
21062     <listitem>
21063      <para>
21064       Fix <application>libpq</> to handle NOTICE messages correctly
21065       during COPY OUT (Tom)
21066      </para>
21067
21068      <para>
21069       This failure has only been observed to occur when a user-defined
21070       datatype's output routine issues a NOTICE, but there is no
21071       guarantee it couldn't happen due to other causes.
21072      </para>
21073     </listitem>
21074
21075    </itemizedlist>
21076
21077   </sect2>
21078  </sect1>
21079
21080  <sect1 id="release-7-4-19">
21081   <title>Release 7.4.19</title>
21082
21083   <note>
21084   <title>Release date</title>
21085   <simpara>2008-01-07</simpara>
21086   </note>
21087
21088   <para>
21089    This release contains a variety of fixes from 7.4.18,
21090    including fixes for significant security issues.
21091    For information about new features in the 7.4 major release, see
21092    <xref linkend="release-7-4">.
21093   </para>
21094
21095   <sect2>
21096    <title>Migration to Version 7.4.19</title>
21097
21098    <para>
21099     A dump/restore is not required for those running 7.4.X.  However,
21100     if you are upgrading from a version earlier than 7.4.11, see the release
21101     notes for 7.4.11.
21102    </para>
21103
21104   </sect2>
21105
21106   <sect2>
21107    <title>Changes</title>
21108
21109    <itemizedlist>
21110
21111     <listitem>
21112      <para>
21113       Prevent functions in indexes from executing with the privileges of
21114       the user running <command>VACUUM</>, <command>ANALYZE</>, etc (Tom)
21115      </para>
21116
21117      <para>
21118       Functions used in index expressions and partial-index
21119       predicates are evaluated whenever a new table entry is made.  It has
21120       long been understood that this poses a risk of trojan-horse code
21121       execution if one modifies a table owned by an untrustworthy user.
21122       (Note that triggers, defaults, check constraints, etc. pose the
21123       same type of risk.)  But functions in indexes pose extra danger
21124       because they will be executed by routine maintenance operations
21125       such as <command>VACUUM FULL</>, which are commonly performed
21126       automatically under a superuser account.  For example, a nefarious user
21127       can execute code with superuser privileges by setting up a
21128       trojan-horse index definition and waiting for the next routine vacuum.
21129       The fix arranges for standard maintenance operations
21130       (including <command>VACUUM</>, <command>ANALYZE</>, <command>REINDEX</>,
21131       and <command>CLUSTER</>) to execute as the table owner rather than
21132       the calling user, using the same privilege-switching mechanism already
21133       used for <literal>SECURITY DEFINER</> functions.  To prevent bypassing
21134       this security measure, execution of <command>SET SESSION
21135       AUTHORIZATION</> and <command>SET ROLE</> is now forbidden within a
21136       <literal>SECURITY DEFINER</> context.  (CVE-2007-6600)
21137      </para>
21138     </listitem>
21139
21140     <listitem>
21141      <para>
21142       Repair assorted bugs in the regular-expression package (Tom, Will Drewry)
21143      </para>
21144
21145      <para>
21146       Suitably crafted regular-expression patterns could cause crashes,
21147       infinite or near-infinite looping, and/or massive memory consumption,
21148       all of which pose denial-of-service hazards for applications that
21149       accept regex search patterns from untrustworthy sources.
21150       (CVE-2007-4769, CVE-2007-4772, CVE-2007-6067)
21151      </para>
21152     </listitem>
21153
21154     <listitem>
21155      <para>
21156       Require non-superusers who use <filename>/contrib/dblink</> to use only
21157       password authentication, as a security measure (Joe)
21158      </para>
21159
21160      <para>
21161       The fix that appeared for this in 7.4.18 was incomplete, as it plugged
21162       the hole for only some <filename>dblink</> functions.  (CVE-2007-6601,
21163       CVE-2007-3278)
21164      </para>
21165     </listitem>
21166
21167     <listitem>
21168      <para>
21169       Fix planner failure in some cases of <literal>WHERE false AND var IN
21170       (SELECT ...)</> (Tom)
21171      </para>
21172     </listitem>
21173
21174     <listitem>
21175      <para>
21176       Fix potential crash in <function>translate()</> when using a multibyte
21177       database encoding (Tom)
21178      </para>
21179     </listitem>
21180
21181     <listitem>
21182      <para>
21183       Fix PL/Python to not crash on long exception messages (Alvaro)
21184      </para>
21185     </listitem>
21186
21187     <listitem>
21188      <para>
21189       <application>ecpg</> parser fixes (Michael)
21190      </para>
21191     </listitem>
21192
21193     <listitem>
21194      <para>
21195       Make <filename>contrib/tablefunc</>'s <function>crosstab()</> handle
21196       NULL rowid as a category in its own right, rather than crashing (Joe)
21197      </para>
21198     </listitem>
21199
21200     <listitem>
21201      <para>
21202       Fix <type>tsvector</> and <type>tsquery</> output routines to
21203       escape backslashes correctly (Teodor, Bruce)
21204      </para>
21205     </listitem>
21206
21207     <listitem>
21208      <para>
21209       Fix crash of <function>to_tsvector()</> on huge input strings (Teodor)
21210      </para>
21211     </listitem>
21212
21213     <listitem>
21214      <para>
21215       Require a specific version of <productname>Autoconf</> to be used
21216       when re-generating the <command>configure</> script (Peter)
21217      </para>
21218
21219      <para>
21220       This affects developers and packagers only.  The change was made
21221       to prevent accidental use of untested combinations of
21222       <productname>Autoconf</> and <productname>PostgreSQL</> versions.
21223       You can remove the version check if you really want to use a
21224       different <productname>Autoconf</> version, but it's
21225       your responsibility whether the result works or not.
21226      </para>
21227     </listitem>
21228
21229    </itemizedlist>
21230
21231   </sect2>
21232  </sect1>
21233
21234  <sect1 id="release-7-4-18">
21235   <title>Release 7.4.18</title>
21236
21237   <note>
21238   <title>Release date</title>
21239   <simpara>2007-09-17</simpara>
21240   </note>
21241
21242   <para>
21243    This release contains fixes from 7.4.17.
21244    For information about new features in the 7.4 major release, see
21245    <xref linkend="release-7-4">.
21246   </para>
21247
21248   <sect2>
21249    <title>Migration to Version 7.4.18</title>
21250
21251    <para>
21252     A dump/restore is not required for those running 7.4.X.  However,
21253     if you are upgrading from a version earlier than 7.4.11, see the release
21254     notes for 7.4.11.
21255    </para>
21256
21257   </sect2>
21258
21259   <sect2>
21260    <title>Changes</title>
21261
21262    <itemizedlist>
21263
21264     <listitem>
21265      <para>
21266       Prevent index corruption when a transaction inserts rows and
21267       then aborts close to the end of a concurrent <command>VACUUM</>
21268       on the same table (Tom)
21269      </para>
21270     </listitem>
21271
21272     <listitem>
21273      <para>
21274       Make <command>CREATE DOMAIN ... DEFAULT NULL</> work properly (Tom)
21275      </para>
21276     </listitem>
21277
21278     <listitem>
21279      <para>
21280       Fix excessive logging of <acronym>SSL</> error messages (Tom)
21281      </para>
21282     </listitem>
21283
21284     <listitem>
21285      <para>
21286       Fix crash when <varname>log_min_error_statement</> logging runs out
21287       of memory (Tom)
21288      </para>
21289     </listitem>
21290
21291     <listitem>
21292      <para>
21293       Prevent <command>CLUSTER</> from failing
21294       due to attempting to process temporary tables of other sessions (Alvaro)
21295      </para>
21296     </listitem>
21297
21298     <listitem>
21299      <para>
21300       Require non-superusers who use <filename>/contrib/dblink</> to use only
21301       password authentication, as a security measure (Joe)
21302      </para>
21303     </listitem>
21304
21305    </itemizedlist>
21306
21307   </sect2>
21308  </sect1>
21309
21310  <sect1 id="release-7-4-17">
21311   <title>Release 7.4.17</title>
21312
21313   <note>
21314   <title>Release date</title>
21315   <simpara>2007-04-23</simpara>
21316   </note>
21317
21318   <para>
21319    This release contains fixes from 7.4.16,
21320    including a security fix.
21321    For information about new features in the 7.4 major release, see
21322    <xref linkend="release-7-4">.
21323   </para>
21324
21325   <sect2>
21326    <title>Migration to Version 7.4.17</title>
21327
21328    <para>
21329     A dump/restore is not required for those running 7.4.X.  However,
21330     if you are upgrading from a version earlier than 7.4.11, see the release
21331     notes for 7.4.11.
21332    </para>
21333
21334   </sect2>
21335
21336   <sect2>
21337    <title>Changes</title>
21338
21339    <itemizedlist>
21340
21341     <listitem>
21342     <para>
21343      Support explicit placement of the temporary-table schema within
21344      <varname>search_path</>, and disable searching it for functions
21345      and operators (Tom)
21346     </para>
21347     <para>
21348      This is needed to allow a security-definer function to set a
21349      truly secure value of <varname>search_path</>.  Without it,
21350      an unprivileged SQL user can use temporary objects to execute code
21351      with the privileges of the security-definer function (CVE-2007-2138).
21352      See <command>CREATE FUNCTION</> for more information.
21353     </para>
21354     </listitem>
21355
21356     <listitem>
21357     <para>
21358      <filename>/contrib/tsearch2</> crash fixes (Teodor)
21359     </para>
21360     </listitem>
21361
21362     <listitem>
21363     <para>
21364      Fix potential-data-corruption bug in how <command>VACUUM FULL</> handles
21365      <command>UPDATE</> chains (Tom, Pavan Deolasee)
21366     </para>
21367     </listitem>
21368
21369     <listitem>
21370     <para>
21371      Fix PANIC during enlargement of a hash index (bug introduced in 7.4.15)
21372      (Tom)
21373     </para>
21374     </listitem>
21375
21376    </itemizedlist>
21377
21378   </sect2>
21379  </sect1>
21380
21381  <sect1 id="release-7-4-16">
21382   <title>Release 7.4.16</title>
21383
21384   <note>
21385   <title>Release date</title>
21386   <simpara>2007-02-05</simpara>
21387   </note>
21388
21389   <para>
21390    This release contains a variety of fixes from 7.4.15, including
21391    a security fix.
21392    For information about new features in the 7.4 major release, see
21393    <xref linkend="release-7-4">.
21394   </para>
21395
21396   <sect2>
21397    <title>Migration to Version 7.4.16</title>
21398
21399    <para>
21400     A dump/restore is not required for those running 7.4.X.  However,
21401     if you are upgrading from a version earlier than 7.4.11, see the release
21402     notes for 7.4.11.
21403    </para>
21404
21405   </sect2>
21406
21407   <sect2>
21408    <title>Changes</title>
21409
21410    <itemizedlist>
21411
21412     <listitem>
21413     <para>
21414      Remove security vulnerability that allowed connected users
21415      to read backend memory (Tom)
21416     </para>
21417     <para>
21418      The vulnerability involves suppressing the normal check that a SQL
21419      function returns the data type it's declared to, or changing the
21420      data type of a table column used in a SQL function (CVE-2007-0555).
21421      This error can easily be exploited to cause a backend crash, and in
21422      principle might be used to read database content that the user
21423      should not be able to access.
21424     </para>
21425     </listitem>
21426
21427     <listitem>
21428     <para>
21429      Fix rare bug wherein btree index page splits could fail
21430      due to choosing an infeasible split point (Heikki Linnakangas)
21431     </para>
21432     </listitem>
21433
21434     <listitem>
21435     <para>
21436      Fix for rare Assert() crash triggered by <literal>UNION</> (Tom)
21437     </para>
21438     </listitem>
21439
21440     <listitem>
21441     <para>
21442      Tighten security of multi-byte character processing for UTF8 sequences
21443      over three bytes long (Tom)
21444     </para>
21445     </listitem>
21446
21447    </itemizedlist>
21448
21449   </sect2>
21450  </sect1>
21451
21452  <sect1 id="release-7-4-15">
21453   <title>Release 7.4.15</title>
21454
21455   <note>
21456   <title>Release date</title>
21457   <simpara>2007-01-08</simpara>
21458   </note>
21459
21460   <para>
21461    This release contains a variety of fixes from 7.4.14.
21462    For information about new features in the 7.4 major release, see
21463    <xref linkend="release-7-4">.
21464   </para>
21465
21466   <sect2>
21467    <title>Migration to Version 7.4.15</title>
21468
21469    <para>
21470     A dump/restore is not required for those running 7.4.X.  However,
21471     if you are upgrading from a version earlier than 7.4.11, see the release
21472     notes for 7.4.11.
21473    </para>
21474
21475   </sect2>
21476
21477   <sect2>
21478    <title>Changes</title>
21479
21480    <itemizedlist>
21481
21482     <listitem>
21483      <para>
21484       Improve handling of <function>getaddrinfo()</> on AIX (Tom)
21485      </para>
21486
21487      <para>
21488       This fixes a problem with starting the statistics collector,
21489       among other things.
21490      </para>
21491     </listitem>
21492
21493      <listitem>
21494       <para>
21495        Fix <quote>failed to re-find parent key</> errors in
21496        <command>VACUUM</> (Tom)
21497       </para>
21498      </listitem>
21499
21500      <listitem>
21501       <para>
21502        Fix bugs affecting multi-gigabyte hash indexes (Tom)
21503       </para>
21504      </listitem>
21505
21506     <listitem>
21507      <para>
21508       Fix error when constructing an <literal>ARRAY[]</> made up of multiple
21509       empty elements (Tom)
21510      </para>
21511     </listitem>
21512
21513     <listitem>
21514      <para>
21515       <function>to_number()</> and <function>to_char(numeric)</>
21516       are now <literal>STABLE</>, not <literal>IMMUTABLE</>, for
21517       new <application>initdb</> installs (Tom)
21518      </para>
21519
21520      <para>
21521       This is because <varname>lc_numeric</> can potentially
21522       change the output of these functions.
21523      </para>
21524     </listitem>
21525
21526     <listitem>
21527      <para>
21528       Improve index usage of regular expressions that use parentheses (Tom)
21529      </para>
21530
21531      <para>
21532       This improves <application>psql</> <literal>\d</> performance also.
21533      </para>
21534     </listitem>
21535
21536    </itemizedlist>
21537
21538   </sect2>
21539  </sect1>
21540
21541  <sect1 id="release-7-4-14">
21542   <title>Release 7.4.14</title>
21543
21544   <note>
21545   <title>Release date</title>
21546   <simpara>2006-10-16</simpara>
21547   </note>
21548
21549   <para>
21550    This release contains a variety of fixes from 7.4.13.
21551    For information about new features in the 7.4 major release, see
21552    <xref linkend="release-7-4">.
21553   </para>
21554
21555   <sect2>
21556    <title>Migration to Version 7.4.14</title>
21557
21558    <para>
21559     A dump/restore is not required for those running 7.4.X.  However,
21560     if you are upgrading from a version earlier than 7.4.11, see the release
21561     notes for 7.4.11.
21562    </para>
21563
21564   </sect2>
21565
21566   <sect2>
21567    <title>Changes</title>
21568
21569 <itemizedlist>
21570 <listitem><para>Fix core dump when an untyped literal is taken as
21571 ANYARRAY</para></listitem>
21572 <listitem><para>Fix <function>string_to_array()</> to handle overlapping
21573  matches for the separator string</para>
21574 <para>For example, <literal>string_to_array('123xx456xxx789', 'xx')</>.
21575 </para></listitem>
21576 <listitem><para>Fix corner cases in pattern matching for
21577  <application>psql</>'s <literal>\d</> commands</para></listitem>
21578 <listitem><para>Fix index-corrupting bugs in /contrib/ltree
21579  (Teodor)</para></listitem>
21580 <listitem><para>Fix backslash escaping in /contrib/dbmirror</para></listitem>
21581 <listitem><para>Adjust regression tests for recent changes in US DST laws
21582 </para> </listitem>
21583 </itemizedlist>
21584
21585   </sect2>
21586  </sect1>
21587
21588  <sect1 id="release-7-4-13">
21589   <title>Release 7.4.13</title>
21590
21591   <note>
21592   <title>Release date</title>
21593   <simpara>2006-05-23</simpara>
21594   </note>
21595
21596   <para>
21597    This release contains a variety of fixes from 7.4.12,
21598    including patches for extremely serious security issues.
21599    For information about new features in the 7.4 major release, see
21600    <xref linkend="release-7-4">.
21601   </para>
21602
21603   <sect2>
21604    <title>Migration to Version 7.4.13</title>
21605
21606    <para>
21607     A dump/restore is not required for those running 7.4.X.  However,
21608     if you are upgrading from a version earlier than 7.4.11, see the release
21609     notes for 7.4.11.
21610    </para>
21611
21612    <para>
21613     Full security against the SQL-injection attacks described in
21614     CVE-2006-2313 and CVE-2006-2314 might require changes in application
21615     code.  If you have applications that embed untrustworthy strings
21616     into SQL commands, you should examine them as soon as possible to
21617     ensure that they are using recommended escaping techniques.  In
21618     most cases, applications should be using subroutines provided by
21619     libraries or drivers (such as <application>libpq</>'s
21620     <function>PQescapeStringConn()</>) to perform string escaping,
21621     rather than relying on <foreignphrase>ad hoc</> code to do it.
21622    </para>
21623   </sect2>
21624
21625   <sect2>
21626    <title>Changes</title>
21627
21628 <itemizedlist>
21629 <listitem><para>Change the server to reject invalidly-encoded multibyte
21630 characters in all cases (Tatsuo, Tom)</para>
21631 <para>While <productname>PostgreSQL</> has been moving in this direction for
21632 some time, the checks are now applied uniformly to all encodings and all
21633 textual input, and are now always errors not merely warnings.  This change
21634 defends against SQL-injection attacks of the type described in CVE-2006-2313.
21635 </para></listitem>
21636
21637 <listitem><para>Reject unsafe uses of <literal>\'</> in string literals</para>
21638 <para>As a server-side defense against SQL-injection attacks of the type
21639 described in CVE-2006-2314, the server now only accepts <literal>''</> and not
21640 <literal>\'</> as a representation of ASCII single quote in SQL string
21641 literals.  By default, <literal>\'</> is rejected only when
21642 <varname>client_encoding</> is set to a client-only encoding (SJIS, BIG5, GBK,
21643 GB18030, or UHC), which is the scenario in which SQL injection is possible.
21644 A new configuration parameter <varname>backslash_quote</> is available to
21645 adjust this behavior when needed.  Note that full security against
21646 CVE-2006-2314 might require client-side changes; the purpose of
21647 <varname>backslash_quote</> is in part to make it obvious that insecure
21648 clients are insecure.
21649 </para></listitem>
21650
21651 <listitem><para>Modify <application>libpq</>'s string-escaping routines to be
21652 aware of encoding considerations and
21653 <varname>standard_conforming_strings</></para>
21654 <para>This fixes <application>libpq</>-using applications for the security
21655 issues described in CVE-2006-2313 and CVE-2006-2314, and also future-proofs
21656 them against the planned changeover to SQL-standard string literal syntax.
21657 Applications that use multiple <productname>PostgreSQL</> connections
21658 concurrently should migrate to <function>PQescapeStringConn()</> and
21659 <function>PQescapeByteaConn()</> to ensure that escaping is done correctly
21660 for the settings in use in each database connection.  Applications that
21661 do string escaping <quote>by hand</> should be modified to rely on library
21662 routines instead.
21663 </para></listitem>
21664
21665 <listitem><para>Fix some incorrect encoding conversion functions</para>
21666 <para><function>win1251_to_iso</>, <function>alt_to_iso</>,
21667 <function>euc_tw_to_big5</>, <function>euc_tw_to_mic</>,
21668 <function>mic_to_euc_tw</> were all broken to varying
21669 extents.
21670 </para></listitem>
21671
21672 <listitem><para>Clean up stray remaining uses of <literal>\'</> in strings
21673 (Bruce, Jan)</para></listitem>
21674
21675 <listitem><para>Fix bug that sometimes caused OR'd index scans to
21676 miss rows they should have returned</para></listitem>
21677
21678 <listitem><para>Fix WAL replay for case where a btree index has been
21679 truncated</para></listitem>
21680
21681 <listitem><para>Fix <literal>SIMILAR TO</> for patterns involving
21682 <literal>|</> (Tom)</para></listitem>
21683
21684 <listitem><para>Fix server to use custom DH SSL parameters correctly (Michael
21685 Fuhr)</para></listitem>
21686
21687 <listitem><para>Fix for Bonjour on Intel Macs (Ashley Clark)</para></listitem>
21688
21689 <listitem><para>Fix various minor memory leaks</para></listitem>
21690 </itemizedlist>
21691
21692   </sect2>
21693  </sect1>
21694
21695  <sect1 id="release-7-4-12">
21696   <title>Release 7.4.12</title>
21697
21698   <note>
21699   <title>Release date</title>
21700   <simpara>2006-02-14</simpara>
21701   </note>
21702
21703   <para>
21704    This release contains a variety of fixes from 7.4.11.
21705    For information about new features in the 7.4 major release, see
21706    <xref linkend="release-7-4">.
21707   </para>
21708
21709   <sect2>
21710    <title>Migration to Version 7.4.12</title>
21711
21712    <para>
21713     A dump/restore is not required for those running 7.4.X.  However,
21714     if you are upgrading from a version earlier than 7.4.11, see the release
21715     notes for 7.4.11.
21716    </para>
21717   </sect2>
21718
21719   <sect2>
21720    <title>Changes</title>
21721
21722 <itemizedlist>
21723
21724 <listitem><para>Fix potential crash in <command>SET
21725 SESSION AUTHORIZATION</> (CVE-2006-0553)</para>
21726 <para>An unprivileged user could crash the server process, resulting in
21727 momentary denial of service to other users, if the server has been compiled
21728 with Asserts enabled (which is not the default).
21729 Thanks to Akio Ishida for reporting this problem.
21730 </para></listitem>
21731
21732 <listitem><para>Fix bug with row visibility logic in self-inserted
21733 rows (Tom)</para>
21734 <para>Under rare circumstances a row inserted by the current command
21735 could be seen as already valid, when it should not be.  Repairs bug
21736 created in 7.4.9 and 7.3.11 releases.
21737 </para></listitem>
21738
21739 <listitem><para>Fix race condition that could lead to <quote>file already
21740 exists</> errors during pg_clog file creation
21741 (Tom)</para></listitem>
21742
21743 <listitem><para>Properly check <literal>DOMAIN</> constraints for
21744 <literal>UNKNOWN</> parameters in prepared statements
21745 (Neil)</para></listitem>
21746
21747 <listitem><para>Fix to allow restoring dumps that have cross-schema
21748 references to custom operators (Tom)</para></listitem>
21749
21750 <listitem><para>Portability fix for testing presence of <function>finite</>
21751 and <function>isinf</> during configure (Tom)</para></listitem>
21752
21753 </itemizedlist>
21754
21755   </sect2>
21756  </sect1>
21757
21758  <sect1 id="release-7-4-11">
21759   <title>Release 7.4.11</title>
21760
21761   <note>
21762   <title>Release date</title>
21763   <simpara>2006-01-09</simpara>
21764   </note>
21765
21766   <para>
21767    This release contains a variety of fixes from 7.4.10.
21768    For information about new features in the 7.4 major release, see
21769    <xref linkend="release-7-4">.
21770   </para>
21771
21772   <sect2>
21773    <title>Migration to Version 7.4.11</title>
21774
21775    <para>
21776     A dump/restore is not required for those running 7.4.X.  However,
21777     if you are upgrading from a version earlier than 7.4.8, see the release
21778     notes for 7.4.8.
21779     Also, you might need to <command>REINDEX</> indexes on textual
21780     columns after updating, if you are affected by the locale or
21781     <application>plperl</> issues described below.
21782    </para>
21783   </sect2>
21784
21785   <sect2>
21786    <title>Changes</title>
21787
21788 <itemizedlist>
21789
21790 <listitem><para>Fix for protocol-level Describe messages issued
21791 outside a transaction or in a failed transaction (Tom)</para></listitem>
21792
21793 <listitem><para>Fix character string comparison for locales that consider
21794 different character combinations as equal, such as Hungarian (Tom)</para>
21795 <para>This might require <command>REINDEX</> to fix existing indexes on
21796 textual columns.</para></listitem>
21797
21798 <listitem><para>Set locale environment variables during postmaster startup
21799 to ensure that <application>plperl</> won't change the locale later</para>
21800 <para>This fixes a problem that occurred if the <application>postmaster</> was
21801 started with environment variables specifying a different locale than what
21802 <application>initdb</> had been told.  Under these conditions, any use of
21803 <application>plperl</> was likely to lead to corrupt indexes.  You might need
21804 <command>REINDEX</> to fix existing indexes on
21805 textual columns if this has happened to you.</para></listitem>
21806
21807 <listitem><para>Fix longstanding bug in strpos() and regular expression
21808 handling in certain rarely used Asian multi-byte character sets (Tatsuo)
21809 </para></listitem>
21810
21811 <listitem><para>Fix bug in <filename>/contrib/pgcrypto</> gen_salt,
21812 which caused it not to use all available salt space for MD5 and
21813 XDES algorithms (Marko Kreen, Solar Designer)</para>
21814 <para>Salts for Blowfish and standard DES are unaffected.</para></listitem>
21815
21816 <listitem><para>Fix <filename>/contrib/dblink</> to throw an error,
21817 rather than crashing, when the number of columns specified is different from
21818 what's actually returned by the query (Joe)</para></listitem>
21819
21820 </itemizedlist>
21821
21822   </sect2>
21823  </sect1>
21824
21825  <sect1 id="release-7-4-10">
21826   <title>Release 7.4.10</title>
21827
21828   <note>
21829   <title>Release date</title>
21830   <simpara>2005-12-12</simpara>
21831   </note>
21832
21833   <para>
21834    This release contains a variety of fixes from 7.4.9.
21835    For information about new features in the 7.4 major release, see
21836    <xref linkend="release-7-4">.
21837   </para>
21838
21839   <sect2>
21840    <title>Migration to Version 7.4.10</title>
21841
21842    <para>
21843     A dump/restore is not required for those running 7.4.X.  However,
21844     if you are upgrading from a version earlier than 7.4.8, see the release
21845     notes for 7.4.8.
21846    </para>
21847   </sect2>
21848
21849   <sect2>
21850    <title>Changes</title>
21851
21852 <itemizedlist>
21853
21854 <listitem><para>Fix race condition in transaction log management</para>
21855 <para>There was a narrow window in which an I/O operation could be initiated
21856 for the wrong page, leading to an Assert failure or data
21857 corruption.</para>
21858 </listitem>
21859
21860 <listitem><para>Prevent failure if client sends Bind protocol message
21861 when current transaction is already aborted</para></listitem>
21862
21863 <listitem><para><filename>/contrib/ltree</> fixes (Teodor)</para></listitem>
21864
21865 <listitem><para>AIX and HPUX compile fixes (Tom)</para></listitem>
21866
21867 <listitem><para>Fix longstanding planning error for outer joins</para>
21868 <para>This bug sometimes caused a bogus error <quote>RIGHT JOIN is
21869 only supported with merge-joinable join conditions</>.</para></listitem>
21870
21871 <listitem><para>Prevent core dump in <application>pg_autovacuum</> when a
21872 table has been dropped</para></listitem>
21873 </itemizedlist>
21874
21875   </sect2>
21876  </sect1>
21877
21878  <sect1 id="release-7-4-9">
21879   <title>Release 7.4.9</title>
21880
21881   <note>
21882   <title>Release date</title>
21883   <simpara>2005-10-04</simpara>
21884   </note>
21885
21886   <para>
21887    This release contains a variety of fixes from 7.4.8.
21888    For information about new features in the 7.4 major release, see
21889    <xref linkend="release-7-4">.
21890   </para>
21891
21892   <sect2>
21893    <title>Migration to Version 7.4.9</title>
21894
21895    <para>
21896     A dump/restore is not required for those running 7.4.X.  However,
21897     if you are upgrading from a version earlier than 7.4.8, see the release
21898     notes for 7.4.8.
21899    </para>
21900   </sect2>
21901
21902   <sect2>
21903    <title>Changes</title>
21904
21905 <itemizedlist>
21906 <listitem><para>Fix error that allowed <command>VACUUM</> to remove
21907 <literal>ctid</> chains too soon, and add more checking in code that follows
21908 <literal>ctid</> links</para>
21909 <para>This fixes a long-standing problem that could cause crashes in very rare
21910 circumstances.</para></listitem>
21911 <listitem><para>Fix <type>CHAR()</> to properly pad spaces to the specified
21912 length when using a multiple-byte character set (Yoshiyuki Asaba)</para>
21913 <para>In prior releases, the padding of <type>CHAR()</> was incorrect
21914 because it only padded to the specified number of bytes without
21915 considering how many characters were stored.</para></listitem>
21916 <listitem><para>Fix the sense of the test for read-only transaction
21917 in <command>COPY</></para>
21918 <para>The code formerly prohibited <command>COPY TO</>, where it should
21919 prohibit <command>COPY FROM</>.
21920 </para></listitem>
21921 <listitem><para>Fix planning problem with outer-join ON clauses that reference
21922 only the inner-side relation</para></listitem>
21923 <listitem><para>Further fixes for <literal>x FULL JOIN y ON true</> corner
21924 cases</para></listitem>
21925 <listitem><para>Make <function>array_in</> and <function>array_recv</> more
21926 paranoid about validating their OID parameter</para></listitem>
21927 <listitem><para>Fix missing rows in queries like <literal>UPDATE a=... WHERE
21928 a...</> with GiST index on column <literal>a</></para></listitem>
21929 <listitem><para>Improve robustness of datetime parsing</para></listitem>
21930 <listitem><para>Improve checking for partially-written WAL
21931 pages</para></listitem>
21932 <listitem><para>Improve robustness of signal handling when SSL is
21933 enabled</para></listitem>
21934 <listitem><para>Don't try to open more than <literal>max_files_per_process</>
21935 files during postmaster startup</para></listitem>
21936 <listitem><para>Various memory leakage fixes</para></listitem>
21937 <listitem><para>Various portability improvements</para></listitem>
21938 <listitem><para>Fix PL/PgSQL to handle <literal>var := var</> correctly when
21939 the variable is of pass-by-reference type</para></listitem>
21940 <listitem><para>Update <filename>contrib/tsearch2</> to use current Snowball
21941 code</para></listitem>
21942 </itemizedlist>
21943
21944   </sect2>
21945  </sect1>
21946
21947  <sect1 id="release-7-4-8">
21948   <title>Release 7.4.8</title>
21949
21950   <note>
21951   <title>Release date</title>
21952   <simpara>2005-05-09</simpara>
21953   </note>
21954
21955   <para>
21956    This release contains a variety of fixes from 7.4.7, including several
21957    security-related issues.
21958    For information about new features in the 7.4 major release, see
21959    <xref linkend="release-7-4">.
21960   </para>
21961
21962   <sect2>
21963    <title>Migration to Version 7.4.8</title>
21964
21965    <para>
21966     A dump/restore is not required for those running 7.4.X.  However,
21967     it is one possible way of handling two significant security problems
21968     that have been found in the initial contents of 7.4.X system
21969     catalogs.  A dump/initdb/reload sequence using 7.4.8's initdb will
21970     automatically correct these problems.
21971    </para>
21972
21973    <para>
21974     The larger security problem is that the built-in character set encoding
21975     conversion functions can be invoked from SQL commands by unprivileged
21976     users, but the functions were not designed for such use and are not
21977     secure against malicious choices of arguments.  The fix involves changing
21978     the declared parameter list of these functions so that they can no longer
21979     be invoked from SQL commands.  (This does not affect their normal use
21980     by the encoding conversion machinery.)
21981    </para>
21982
21983    <para>
21984     The lesser problem is that the <filename>contrib/tsearch2</> module
21985     creates several functions that are misdeclared to return
21986     <type>internal</> when they do not accept <type>internal</> arguments.
21987     This breaks type safety for all functions using <type>internal</>
21988     arguments.
21989    </para>
21990
21991    <para>
21992     It is strongly recommended that all installations repair these errors,
21993     either by initdb or by following the manual repair procedures given
21994     below.  The errors at least allow unprivileged database users to crash
21995     their server process, and might allow unprivileged users to gain the
21996     privileges of a database superuser.
21997    </para>
21998
21999    <para>
22000     If you wish not to do an initdb, perform the following procedures instead.
22001     As the database superuser, do:
22002
22003 <programlisting>
22004 BEGIN;
22005 UPDATE pg_proc SET proargtypes[3] = 'internal'::regtype
22006 WHERE pronamespace = 11 AND pronargs = 5
22007      AND proargtypes[2] = 'cstring'::regtype;
22008 -- The command should report having updated 90 rows;
22009 -- if not, rollback and investigate instead of committing!
22010 COMMIT;
22011 </programlisting>
22012
22013     Next, if you have installed <filename>contrib/tsearch2</>, do:
22014
22015 <programlisting>
22016 BEGIN;
22017 UPDATE pg_proc SET proargtypes[0] = 'internal'::regtype
22018 WHERE oid IN (
22019    'dex_init(text)'::regprocedure,
22020    'snb_en_init(text)'::regprocedure,
22021    'snb_ru_init(text)'::regprocedure,
22022    'spell_init(text)'::regprocedure,
22023    'syn_init(text)'::regprocedure
22024 );
22025 -- The command should report having updated 5 rows;
22026 -- if not, rollback and investigate instead of committing!
22027 COMMIT;
22028 </programlisting>
22029
22030     If this command fails with a message like <quote>function
22031     "dex_init(text)" does not exist</>, then either <filename>tsearch2</>
22032     is not installed in this database, or you already did the update.
22033    </para>
22034
22035    <para>
22036     The above procedures must be carried out in <emphasis>each</> database
22037     of an installation, including <literal>template1</>, and ideally
22038     including <literal>template0</> as well.  If you do not fix the
22039     template databases then any subsequently created databases will contain
22040     the same errors.  <literal>template1</> can be fixed in the same way
22041     as any other database, but fixing <literal>template0</> requires
22042     additional steps.  First, from any database issue:
22043 <programlisting>
22044 UPDATE pg_database SET datallowconn = true WHERE datname = 'template0';
22045 </programlisting>
22046      Next connect to <literal>template0</> and perform the above repair
22047      procedures.  Finally, do:
22048 <programlisting>
22049 -- re-freeze template0:
22050 VACUUM FREEZE;
22051 -- and protect it against future alterations:
22052 UPDATE pg_database SET datallowconn = false WHERE datname = 'template0';
22053 </programlisting>
22054    </para>
22055   </sect2>
22056
22057   <sect2>
22058    <title>Changes</title>
22059
22060 <itemizedlist>
22061 <listitem><para>Change encoding function signature to prevent
22062 misuse</para></listitem>
22063 <listitem><para>Change <filename>contrib/tsearch2</> to avoid unsafe use of
22064 <type>INTERNAL</> function results</para></listitem>
22065 <listitem><para>Repair ancient race condition that allowed a transaction to be
22066 seen as committed for some purposes (eg SELECT FOR UPDATE) slightly sooner
22067 than for other purposes</para>
22068 <para>This is an extremely serious bug since it could lead to apparent
22069 data inconsistencies being briefly visible to applications.</para></listitem>
22070 <listitem><para>Repair race condition between relation extension and
22071 VACUUM</para>
22072 <para>This could theoretically have caused loss of a page's worth of
22073 freshly-inserted data, although the scenario seems of very low probability.
22074 There are no known cases of it having caused more than an Assert failure.
22075 </para></listitem>
22076 <listitem><para>Fix comparisons of <type>TIME WITH TIME ZONE</> values</para>
22077 <para>
22078 The comparison code was wrong in the case where the
22079 <literal>--enable-integer-datetimes</> configuration switch had been used.
22080 NOTE: if you have an index on a <type>TIME WITH TIME ZONE</> column,
22081 it will need to be <command>REINDEX</>ed after installing this update, because
22082 the fix corrects the sort order of column values.
22083 </para></listitem>
22084 <listitem><para>Fix <function>EXTRACT(EPOCH)</> for
22085 <type>TIME WITH TIME ZONE</> values</para></listitem>
22086 <listitem><para>Fix mis-display of negative fractional seconds in
22087 <type>INTERVAL</> values</para>
22088 <para>
22089 This error only occurred when the
22090 <literal>--enable-integer-datetimes</> configuration switch had been used.
22091 </para></listitem>
22092 <listitem><para>Ensure operations done during backend shutdown are counted by
22093 statistics collector</para>
22094 <para>
22095 This is expected to resolve reports of <application>pg_autovacuum</>
22096 not vacuuming the system catalogs often enough &mdash; it was not being
22097 told about catalog deletions caused by temporary table removal during
22098 backend exit.
22099 </para></listitem>
22100 <listitem><para>Additional buffer overrun checks in plpgsql
22101 (Neil)</para></listitem>
22102 <listitem><para>Fix pg_dump to dump trigger names containing <literal>%</>
22103 correctly (Neil)</para></listitem>
22104 <listitem><para>Fix <filename>contrib/pgcrypto</> for newer OpenSSL builds
22105 (Marko Kreen)</para></listitem>
22106 <listitem><para>Still more 64-bit fixes for
22107 <filename>contrib/intagg</></para></listitem>
22108 <listitem><para>Prevent incorrect optimization of functions returning
22109 <type>RECORD</></para></listitem>
22110 <listitem><para>Prevent <function>to_char(interval)</> from dumping core for
22111 month-related formats</para></listitem>
22112 <listitem><para>Prevent crash on <literal>COALESCE(NULL,NULL)</></para></listitem>
22113 <listitem><para>Fix <function>array_map</> to call PL functions correctly</para></listitem>
22114 <listitem><para>Fix permission checking in <command>ALTER DATABASE RENAME</></para></listitem>
22115 <listitem><para>Fix <command>ALTER LANGUAGE RENAME</></para></listitem>
22116 <listitem><para>Make <function>RemoveFromWaitQueue</> clean up after itself</para>
22117 <para>
22118 This fixes a lock management error that would only be visible if a transaction
22119 was kicked out of a wait for a lock (typically by query cancel) and then the
22120 holder of the lock released it within a very narrow window.
22121 </para></listitem>
22122 <listitem><para>Fix problem with untyped parameter appearing in
22123 <command>INSERT ... SELECT</></para></listitem>
22124 <listitem><para>Fix <command>CLUSTER</> failure after
22125 <command>ALTER TABLE SET WITHOUT OIDS</></para></listitem>
22126 </itemizedlist>
22127
22128   </sect2>
22129  </sect1>
22130
22131  <sect1 id="release-7-4-7">
22132   <title>Release 7.4.7</title>
22133
22134   <note>
22135   <title>Release date</title>
22136   <simpara>2005-01-31</simpara>
22137   </note>
22138
22139   <para>
22140    This release contains a variety of fixes from 7.4.6, including several
22141    security-related issues.
22142    For information about new features in the 7.4 major release, see
22143    <xref linkend="release-7-4">.
22144   </para>
22145
22146   <sect2>
22147    <title>Migration to Version 7.4.7</title>
22148
22149    <para>
22150     A dump/restore is not required for those running 7.4.X.
22151    </para>
22152   </sect2>
22153
22154   <sect2>
22155    <title>Changes</title>
22156
22157 <itemizedlist>
22158 <listitem><para>Disallow <command>LOAD</> to non-superusers</para>
22159 <para>
22160 On platforms that will automatically execute initialization functions of a
22161 shared library (this includes at least Windows and ELF-based Unixen),
22162 <command>LOAD</> can be used to make the server execute arbitrary code.
22163 Thanks to NGS Software for reporting this.</para></listitem>
22164 <listitem><para>Check that creator of an aggregate function has the right to
22165 execute the specified transition functions</para>
22166 <para>
22167 This oversight made it possible to bypass denial of EXECUTE
22168 permission on a function.</para></listitem>
22169 <listitem><para>Fix security and 64-bit issues in
22170 contrib/intagg</para></listitem>
22171 <listitem><para>Add needed STRICT marking to some contrib functions (Kris
22172 Jurka)</para></listitem>
22173 <listitem><para>Avoid buffer overrun when plpgsql cursor declaration has too
22174 many parameters (Neil)</para></listitem>
22175 <listitem><para>Fix planning error for FULL and RIGHT outer joins</para>
22176 <para>
22177 The result of the join was mistakenly supposed to be sorted the same as the
22178 left input.  This could not only deliver mis-sorted output to the user, but
22179 in case of nested merge joins could give outright wrong answers.
22180 </para></listitem>
22181 <listitem><para>Fix plperl for quote marks in tuple fields</para></listitem>
22182 <listitem><para>Fix display of negative intervals in SQL and GERMAN
22183 datestyles</para></listitem>
22184 <listitem><para>Make age(timestamptz) do calculation in local timezone not
22185 GMT</para></listitem>
22186 </itemizedlist>
22187
22188   </sect2>
22189  </sect1>
22190
22191  <sect1 id="release-7-4-6">
22192   <title>Release 7.4.6</title>
22193
22194   <note>
22195   <title>Release date</title>
22196   <simpara>2004-10-22</simpara>
22197   </note>
22198
22199   <para>
22200    This release contains a variety of fixes from 7.4.5.
22201    For information about new features in the 7.4 major release, see
22202    <xref linkend="release-7-4">.
22203   </para>
22204
22205
22206   <sect2>
22207    <title>Migration to Version 7.4.6</title>
22208
22209    <para>
22210     A dump/restore is not required for those running 7.4.X.
22211    </para>
22212   </sect2>
22213
22214   <sect2>
22215    <title>Changes</title>
22216
22217 <itemizedlist>
22218 <listitem><para>Repair possible failure to update hint bits on disk</para>
22219 <para>
22220 Under rare circumstances this oversight could lead to
22221 <quote>could not access transaction status</> failures, which qualifies
22222 it as a potential-data-loss bug.
22223 </para></listitem>
22224 <listitem><para>Ensure that hashed outer join does not miss tuples</para>
22225 <para>
22226 Very large left joins using a hash join plan could fail to output unmatched
22227 left-side rows given just the right data distribution.
22228 </para></listitem>
22229 <listitem><para>Disallow running <application>pg_ctl</> as root</para>
22230 <para>
22231 This is to guard against any possible security issues.
22232 </para></listitem>
22233 <listitem><para>Avoid using temp files in <filename>/tmp</> in <command>make_oidjoins_check</command></para>
22234 <para>
22235 This has been reported as a security issue, though it's hardly worthy of
22236 concern since there is no reason for non-developers to use this script anyway.
22237 </para></listitem>
22238 <listitem><para>Prevent forced backend shutdown from re-emitting prior command
22239 result</para>
22240 <para>
22241 In rare cases, a client might think that its last command had succeeded when
22242 it really had been aborted by forced database shutdown.
22243 </para></listitem>
22244 <listitem><para>Repair bug in <function>pg_stat_get_backend_idset</function></para>
22245 <para>
22246 This could lead to misbehavior in some of the system-statistics views.
22247 </para></listitem>
22248 <listitem><para>Fix small memory leak in postmaster</para></listitem>
22249 <listitem><para>Fix <quote>expected both swapped tables to have TOAST
22250 tables</> bug</para>
22251 <para>
22252 This could arise in cases such as CLUSTER after ALTER TABLE DROP COLUMN.
22253 </para></listitem>
22254 <listitem><para>Prevent <literal>pg_ctl restart</> from adding <literal>-D</> multiple times</para></listitem>
22255 <listitem><para>Fix problem with NULL values in GiST indexes</para></listitem>
22256 <listitem><para><literal>::</> is no longer interpreted as a variable in an
22257 ECPG prepare statement</para></listitem>
22258 </itemizedlist>
22259
22260   </sect2>
22261  </sect1>
22262
22263  <sect1 id="release-7-4-5">
22264   <title>Release 7.4.5</title>
22265
22266   <note>
22267   <title>Release date</title>
22268   <simpara>2004-08-18</simpara>
22269   </note>
22270
22271   <para>
22272    This release contains one serious bug fix over 7.4.4.
22273    For information about new features in the 7.4 major release, see
22274    <xref linkend="release-7-4">.
22275   </para>
22276
22277
22278   <sect2>
22279    <title>Migration to Version 7.4.5</title>
22280
22281    <para>
22282     A dump/restore is not required for those running 7.4.X.
22283    </para>
22284   </sect2>
22285
22286   <sect2>
22287    <title>Changes</title>
22288
22289 <itemizedlist>
22290 <listitem><para>Repair possible crash during concurrent B-tree index insertions</para>
22291 <para>
22292 This patch fixes a rare case in which concurrent insertions into a B-tree index
22293 could result in a server panic.  No permanent damage would result, but it's
22294 still worth a re-release.  The bug does not exist in pre-7.4 releases.
22295 </para></listitem>
22296 </itemizedlist>
22297
22298   </sect2>
22299  </sect1>
22300
22301  <sect1 id="release-7-4-4">
22302   <title>Release 7.4.4</title>
22303
22304   <note>
22305   <title>Release date</title>
22306   <simpara>2004-08-16</simpara>
22307   </note>
22308
22309   <para>
22310    This release contains a variety of fixes from 7.4.3.
22311    For information about new features in the 7.4 major release, see
22312    <xref linkend="release-7-4">.
22313   </para>
22314
22315
22316   <sect2>
22317    <title>Migration to Version 7.4.4</title>
22318
22319    <para>
22320     A dump/restore is not required for those running 7.4.X.
22321    </para>
22322   </sect2>
22323
22324   <sect2>
22325    <title>Changes</title>
22326
22327 <itemizedlist>
22328 <listitem><para>Prevent possible loss of committed transactions during crash</para>
22329 <para>
22330 Due to insufficient interlocking between transaction commit and checkpointing,
22331 it was possible for transactions committed just before the most recent
22332 checkpoint to be lost, in whole or in part, following a database crash and
22333 restart.  This is a serious bug that has existed
22334 since <productname>PostgreSQL</productname> 7.1.
22335 </para></listitem>
22336 <listitem><para>Check HAVING restriction before evaluating result list of an
22337 aggregate plan</para></listitem>
22338 <listitem><para>Avoid crash when session's current user ID is deleted</para></listitem>
22339 <listitem><para>Fix hashed crosstab for zero-rows case (Joe)</para></listitem>
22340 <listitem><para>Force cache update after renaming a column in a foreign key</para></listitem>
22341 <listitem><para>Pretty-print UNION queries correctly</para></listitem>
22342 <listitem><para>Make psql handle <literal>\r\n</> newlines properly in COPY IN</para></listitem>
22343 <listitem><para><application>pg_dump</> handled ACLs with grant options incorrectly</para></listitem>
22344 <listitem><para>Fix thread support for OS X and Solaris</para></listitem>
22345 <listitem><para>Updated JDBC driver (build 215) with various fixes</para></listitem>
22346 <listitem><para>ECPG fixes</para></listitem>
22347 <listitem><para>Translation updates (various contributors)</para></listitem>
22348 </itemizedlist>
22349
22350   </sect2>
22351  </sect1>
22352
22353  <sect1 id="release-7-4-3">
22354   <title>Release 7.4.3</title>
22355
22356   <note>
22357   <title>Release date</title>
22358   <simpara>2004-06-14</simpara>
22359   </note>
22360
22361   <para>
22362    This release contains a variety of fixes from 7.4.2.
22363    For information about new features in the 7.4 major release, see
22364    <xref linkend="release-7-4">.
22365   </para>
22366
22367
22368   <sect2>
22369    <title>Migration to Version 7.4.3</title>
22370
22371    <para>
22372     A dump/restore is not required for those running 7.4.X.
22373    </para>
22374   </sect2>
22375
22376   <sect2>
22377    <title>Changes</title>
22378
22379 <itemizedlist>
22380 <listitem><para>Fix temporary memory leak when using non-hashed aggregates (Tom)</para></listitem>
22381 <listitem><para>ECPG fixes, including some for Informix compatibility (Michael)</para></listitem>
22382 <listitem><para>Fixes for compiling with thread-safety, particularly Solaris (Bruce)</para></listitem>
22383 <listitem><para>Fix error in COPY IN termination when using the old network protocol (ljb)</para></listitem>
22384 <listitem><para>Several important fixes in pg_autovacuum, including fixes for
22385 large tables, unsigned oids, stability, temp tables, and debug mode
22386 (Matthew T. O'Connor)</para></listitem>
22387 <listitem><para>Fix problem with reading tar-format dumps on NetBSD and BSD/OS (Bruce)</para></listitem>
22388 <listitem><para>Several JDBC fixes</para></listitem>
22389 <listitem><para>Fix ALTER SEQUENCE RESTART where last_value equals the restart value (Tom)</para></listitem>
22390 <listitem><para>Repair failure to recalculate nested sub-selects (Tom)</para></listitem>
22391 <listitem><para>Fix problems with non-constant expressions in LIMIT/OFFSET</para></listitem>
22392 <listitem><para>Support FULL JOIN with no join clause, such as X FULL JOIN Y ON TRUE (Tom)</para></listitem>
22393 <listitem><para>Fix another zero-column table bug (Tom)</para></listitem>
22394 <listitem><para>Improve handling of non-qualified identifiers in GROUP BY clauses in sub-selects (Tom)</para>
22395 <para>
22396 Select-list aliases within the sub-select will now take precedence over
22397 names from outer query levels.
22398 </para></listitem>
22399 <listitem><para>Do not generate <quote>NATURAL CROSS JOIN</> when decompiling rules (Tom)</para></listitem>
22400 <listitem><para>Add checks for invalid field length in binary COPY (Tom)</para>
22401 <para>
22402  This fixes a difficult-to-exploit security hole.
22403 </para></listitem>
22404 <listitem><para>Avoid locking conflict between <command>ANALYZE</command> and <command>LISTEN</command>/<command>NOTIFY</command></para></listitem>
22405 <listitem><para>Numerous translation updates (various contributors)</para></listitem>
22406 </itemizedlist>
22407
22408   </sect2>
22409  </sect1>
22410
22411  <sect1 id="release-7-4-2">
22412   <title>Release 7.4.2</title>
22413
22414   <note>
22415   <title>Release date</title>
22416   <simpara>2004-03-08</simpara>
22417   </note>
22418
22419   <para>
22420    This release contains a variety of fixes from 7.4.1.
22421    For information about new features in the 7.4 major release, see
22422    <xref linkend="release-7-4">.
22423   </para>
22424
22425
22426   <sect2>
22427    <title>Migration to Version 7.4.2</title>
22428
22429    <para>
22430     A dump/restore is not required for those running 7.4.X.  However,
22431     it might be advisable as the easiest method of incorporating fixes for
22432     two errors that have been found in the initial contents of 7.4.X system
22433     catalogs.  A dump/initdb/reload sequence using 7.4.2's initdb will
22434     automatically correct these problems.
22435    </para>
22436
22437    <para>
22438     The more severe of the two errors is that data type <type>anyarray</>
22439     has the wrong alignment label; this is a problem because the
22440     <structname>pg_statistic</> system catalog uses <type>anyarray</>
22441     columns.  The mislabeling can cause planner misestimations and even
22442     crashes when planning queries that involve <literal>WHERE</> clauses on
22443     double-aligned columns (such as <type>float8</> and <type>timestamp</>).
22444     It is strongly recommended that all installations repair this error,
22445     either by initdb or by following the manual repair procedure given
22446     below.
22447    </para>
22448
22449    <para>
22450     The lesser error is that the system view <structname>pg_settings</>
22451     ought to be marked as having public update access, to allow
22452     <literal>UPDATE pg_settings</> to be used as a substitute for
22453     <command>SET</>.  This can also be fixed either by initdb or manually,
22454     but it is not necessary to fix unless you want to use <literal>UPDATE
22455     pg_settings</>.
22456    </para>
22457
22458    <para>
22459     If you wish not to do an initdb, the following procedure will work
22460     for fixing <structname>pg_statistic</>.  As the database superuser,
22461     do:
22462
22463 <programlisting>
22464 -- clear out old data in pg_statistic:
22465 DELETE FROM pg_statistic;
22466 VACUUM pg_statistic;
22467 -- this should update 1 row:
22468 UPDATE pg_type SET typalign = 'd' WHERE oid = 2277;
22469 -- this should update 6 rows:
22470 UPDATE pg_attribute SET attalign = 'd' WHERE atttypid = 2277;
22471 --
22472 -- At this point you MUST start a fresh backend to avoid a crash!
22473 --
22474 -- repopulate pg_statistic:
22475 ANALYZE;
22476 </programlisting>
22477
22478     This can be done in a live database, but beware that all backends
22479     running in the altered database must be restarted before it is safe to
22480     repopulate <structname>pg_statistic</>.
22481    </para>
22482
22483    <para>
22484     To repair the <structname>pg_settings</> error, simply do:
22485 <programlisting>
22486 GRANT SELECT, UPDATE ON pg_settings TO PUBLIC;
22487 </programlisting>
22488    </para>
22489
22490    <para>
22491     The above procedures must be carried out in <emphasis>each</> database
22492     of an installation, including <literal>template1</>, and ideally
22493     including <literal>template0</> as well.  If you do not fix the
22494     template databases then any subsequently created databases will contain
22495     the same errors.  <literal>template1</> can be fixed in the same way
22496     as any other database, but fixing <literal>template0</> requires
22497     additional steps.  First, from any database issue:
22498 <programlisting>
22499 UPDATE pg_database SET datallowconn = true WHERE datname = 'template0';
22500 </programlisting>
22501      Next connect to <literal>template0</> and perform the above repair
22502      procedures.  Finally, do:
22503 <programlisting>
22504 -- re-freeze template0:
22505 VACUUM FREEZE;
22506 -- and protect it against future alterations:
22507 UPDATE pg_database SET datallowconn = false WHERE datname = 'template0';
22508 </programlisting>
22509    </para>
22510   </sect2>
22511
22512   <sect2>
22513    <title>Changes</title>
22514
22515 <para>
22516    Release 7.4.2 incorporates all the fixes included in release 7.3.6,
22517    plus the following fixes:
22518 </para>
22519
22520 <itemizedlist>
22521 <listitem><para>Fix <structname>pg_statistics</> alignment bug that could crash optimizer</para>
22522 <para>See above for details about this problem.</para></listitem>
22523 <listitem><para>Allow non-super users to update <structname>pg_settings</></para></listitem>
22524 <listitem><para>Fix several optimizer bugs, most of which led to
22525 <quote>variable not found in subplan target lists</> errors</para></listitem>
22526 <listitem><para>Avoid out-of-memory failure during startup of large multiple
22527 index scan</para></listitem>
22528 <listitem><para>Fix multibyte problem that could lead to <quote>out of
22529 memory</> error during <command>COPY IN</></para></listitem>
22530 <listitem><para>Fix problems with <command>SELECT INTO</> / <command>CREATE
22531 TABLE AS</> from tables without OIDs</para></listitem>
22532 <listitem><para>Fix problems with <filename>alter_table</> regression test
22533 during parallel testing</para></listitem>
22534 <listitem><para>Fix problems with hitting open file limit, especially on OS X (Tom)</para></listitem>
22535 <listitem><para>Partial fix for Turkish-locale issues</para>
22536 <para>initdb will succeed now in Turkish locale, but there are still some
22537 inconveniences associated with the <literal>i/I</> problem.</para></listitem>
22538 <listitem><para>Make pg_dump set client encoding on restore</para></listitem>
22539 <listitem><para>Other minor pg_dump fixes</para></listitem>
22540 <listitem><para>Allow ecpg to again use C keywords as column names (Michael)</para></listitem>
22541 <listitem><para>Added ecpg <literal>WHENEVER NOT_FOUND</> to
22542 <literal>SELECT/INSERT/UPDATE/DELETE</> (Michael)</para></listitem>
22543 <listitem><para>Fix ecpg crash for queries calling set-returning functions (Michael)</para></listitem>
22544 <listitem><para>Various other ecpg fixes (Michael)</para></listitem>
22545 <listitem><para>Fixes for Borland compiler</para></listitem>
22546 <listitem><para>Thread build improvements (Bruce)</para></listitem>
22547 <listitem><para>Various other build fixes</para></listitem>
22548 <listitem><para>Various JDBC fixes</para></listitem>
22549 </itemizedlist>
22550
22551   </sect2>
22552  </sect1>
22553
22554  <sect1 id="release-7-4-1">
22555   <title>Release 7.4.1</title>
22556
22557   <note>
22558   <title>Release date</title>
22559   <simpara>2003-12-22</simpara>
22560   </note>
22561
22562   <para>
22563    This release contains a variety of fixes from 7.4.
22564    For information about new features in the 7.4 major release, see
22565    <xref linkend="release-7-4">.
22566   </para>
22567
22568
22569   <sect2>
22570    <title>Migration to Version 7.4.1</title>
22571
22572    <para>
22573     A dump/restore is <emphasis>not</emphasis> required for those
22574     running 7.4.
22575    </para>
22576
22577    <para>
22578     If you want to install the fixes in the information schema
22579     you need to reload it into the database.
22580     This is either accomplished by initializing a new cluster
22581     by running <command>initdb</command>, or by running the following
22582     sequence of SQL commands in each database (ideally including
22583     <literal>template1</literal>) as a superuser in
22584     <application>psql</application>, after installing the new release:
22585 <programlisting>
22586 DROP SCHEMA information_schema CASCADE;
22587 \i /usr/local/pgsql/share/information_schema.sql
22588 </programlisting>
22589     Substitute your installation path in the second command.
22590    </para>
22591
22592   </sect2>
22593
22594   <sect2>
22595    <title>Changes</title>
22596
22597 <itemizedlist>
22598 <listitem><para>Fixed bug in <command>CREATE SCHEMA</command> parsing in ECPG (Michael)</para></listitem>
22599 <listitem><para>Fix compile error when <option>--enable-thread-safety</option> and <option>--with-perl</option> are used together (Peter)</para></listitem>
22600 <listitem><para>Fix for subqueries that used hash joins (Tom)</para>
22601 <para>
22602    Certain subqueries that used hash joins would crash because of
22603    improperly shared structures.
22604 </para></listitem>
22605 <listitem><para>Fix free space map compaction bug (Tom)</para>
22606 <para>
22607    This fixes a bug where compaction of the free space map could lead
22608    to a database server shutdown.
22609 </para>
22610 </listitem>
22611 <listitem><para>Fix for Borland compiler build of libpq (Bruce)</para></listitem>
22612 <listitem><para>Fix <function>netmask()</function> and <function>hostmask()</function> to return the maximum-length masklen (Tom)</para>
22613 <para>
22614    Fix these functions to return values consistent with pre-7.4
22615    releases.
22616 </para>
22617 </listitem>
22618 <listitem><para>Several <filename>contrib/pg_autovacuum</filename> fixes</para>
22619 <para>
22620    Fixes include improper variable initialization, missing vacuum after
22621    <command>TRUNCATE</command>, and duration computation overflow for long vacuums.
22622 </para>
22623 </listitem>
22624 <listitem><para>Allow compile of <filename>contrib/cube</filename> under Cygwin (Jason Tishler)</para></listitem>
22625 <listitem><para>Fix Solaris use of password file when no passwords are defined (Tom)</para>
22626 <para>
22627    Fix crash on Solaris caused by use of any type of password
22628    authentication when no passwords were defined.
22629 </para>
22630 </listitem>
22631 <listitem><para>JDBC fix for thread problems, other fixes</para></listitem>
22632 <listitem><para>Fix for <type>bytea</type> index lookups (Joe)</para></listitem>
22633 <listitem><para>Fix information schema for bit data types (Peter)</para></listitem>
22634 <listitem><para>Force zero_damaged_pages to be on during recovery from WAL</para></listitem>
22635 <listitem><para>Prevent some obscure cases of <quote>variable not in subplan target lists</quote></para></listitem>
22636 <listitem><para>Make <function>PQescapeBytea</function> and <function>byteaout</function> consistent with each other (Joe)</para></listitem>
22637 <listitem><para>Escape <type>bytea</type> output for bytes &gt; 0x7e(Joe)</para>
22638 <para>
22639  If different client encodings are used for <type>bytea</type> output and input, it
22640  is possible for <type>bytea</type> values to be corrupted by the differing
22641  encodings.  This fix escapes all bytes that might be affected.
22642 </para>
22643 </listitem>
22644 <listitem><para>Added missing <function>SPI_finish()</function> calls to dblink's <function>get_tuple_of_interest()</function> (Joe)</para></listitem>
22645 <listitem><para>New Czech FAQ</para></listitem>
22646 <listitem><para>Fix information schema view <literal>constraint_column_usage</literal> for foreign keys (Peter)</para></listitem>
22647 <listitem><para>ECPG fixes (Michael)</para></listitem>
22648 <listitem><para>Fix bug with multiple <literal>IN</literal> subqueries and joins in the subqueries (Tom)</para></listitem>
22649 <listitem><para>Allow <literal>COUNT('x')</literal> to work (Tom)</para></listitem>
22650 <listitem><para>Install ECPG include files for Informix compatibility into separate directory (Peter)</para>
22651 <para>
22652  Some names of ECPG include files for Informix compatibility conflicted with operating system include files.
22653  By installing them in their own directory, name conflicts have been reduced.
22654 </para>
22655 </listitem>
22656 <listitem><para>Fix SSL memory leak (Neil)</para>
22657 <para>
22658  This release fixes a bug in 7.4 where SSL didn't free all memory it allocated.
22659 </para>
22660 </listitem>
22661 <listitem><para>Prevent <filename>pg_service.conf</filename> from using service name as default dbname (Bruce)</para></listitem>
22662 <listitem><para>Fix local ident authentication on FreeBSD (Tom)</para></listitem>
22663 </itemizedlist>
22664
22665  </sect2>
22666 </sect1>
22667
22668 <sect1 id="release-7-4">
22669  <title>Release 7.4</title>
22670
22671  <note>
22672   <title>Release date</title>
22673   <simpara>2003-11-17</simpara>
22674  </note>
22675
22676  <sect2>
22677   <title>Overview</title>
22678
22679   <para>
22680    Major changes in this release:
22681   </para>
22682
22683   <variablelist>
22684    <varlistentry>
22685     <term>
22686      <literal>IN</literal> / <literal>NOT IN</literal> subqueries are
22687      now much more efficient
22688     </term>
22689
22690     <listitem>
22691      <para>
22692       In previous releases, <literal>IN</literal>/<literal>NOT
22693       IN</literal> subqueries were joined to the upper query by
22694       sequentially scanning the subquery looking for a match.  The
22695       7.4 code uses the same sophisticated techniques used by
22696       ordinary joins and so is much faster.  An
22697       <literal>IN</literal> will now usually be as fast as or faster
22698       than an equivalent <literal>EXISTS</literal> subquery; this
22699       reverses the conventional wisdom that applied to previous
22700       releases.
22701      </para>
22702     </listitem>
22703    </varlistentry>
22704
22705    <varlistentry>
22706     <term>
22707      Improved <literal>GROUP BY</literal> processing by using hash buckets
22708     </term>
22709
22710     <listitem>
22711      <para>
22712       In previous releases, rows to be grouped had to be sorted
22713       first.  The 7.4 code can do <literal>GROUP BY</literal>
22714       without sorting, by accumulating results into a hash table
22715       with one entry per group.  It will still use the sort
22716       technique, however, if the hash table is estimated to be too
22717       large to fit in <varname>sort_mem</>.
22718      </para>
22719     </listitem>
22720    </varlistentry>
22721
22722    <varlistentry>
22723     <term>
22724      New multikey hash join capability
22725     </term>
22726
22727     <listitem>
22728      <para>
22729       In previous releases, hash joins could only occur on single
22730       keys.  This release allows multicolumn hash joins.
22731      </para>
22732     </listitem>
22733    </varlistentry>
22734
22735    <varlistentry>
22736     <term>
22737      Queries using the explicit <literal>JOIN</literal> syntax are
22738      now better optimized
22739     </term>
22740
22741     <listitem>
22742      <para>
22743       Prior releases evaluated queries using the explicit
22744       <literal>JOIN</literal> syntax only in the order implied by
22745       the syntax. 7.4 allows full optimization of these queries,
22746       meaning the optimizer considers all possible join orderings
22747       and chooses the most efficient.  Outer joins, however, must
22748       still follow the declared ordering.
22749      </para>
22750     </listitem>
22751    </varlistentry>
22752
22753    <varlistentry>
22754     <term>
22755      Faster and more powerful regular expression code
22756     </term>
22757
22758     <listitem>
22759      <para>
22760       The entire regular expression module has been replaced with a
22761       new version by Henry Spencer, originally written for Tcl.  The
22762       code greatly improves performance and supports several flavors
22763       of regular expressions.
22764      </para>
22765     </listitem>
22766    </varlistentry>
22767
22768    <varlistentry>
22769     <term>
22770      Function-inlining for simple SQL functions
22771     </term>
22772
22773     <listitem>
22774      <para>
22775       Simple SQL functions can now be inlined by including their SQL
22776       in the main query.  This improves performance by eliminating
22777       per-call overhead.  That means simple SQL functions now
22778       behave like macros.
22779      </para>
22780     </listitem>
22781    </varlistentry>
22782
22783    <varlistentry>
22784     <term>
22785      Full support for IPv6 connections and IPv6 address data types
22786     </term>
22787
22788     <listitem>
22789      <para>
22790       Previous releases allowed only IPv4 connections, and the IP
22791       data types only supported IPv4 addresses. This release adds
22792       full IPv6 support in both of these areas.
22793      </para>
22794     </listitem>
22795    </varlistentry>
22796
22797    <varlistentry>
22798     <term>
22799      Major improvements in SSL performance and reliability
22800     </term>
22801
22802     <listitem>
22803      <para>
22804       Several people very familiar with the SSL API have overhauled
22805       our SSL code to improve SSL key negotiation and error
22806       recovery.
22807      </para>
22808     </listitem>
22809    </varlistentry>
22810
22811    <varlistentry>
22812     <term>
22813      Make free space map efficiently reuse empty index pages,
22814      and other free space management improvements
22815     </term>
22816
22817     <listitem>
22818      <para>
22819       In previous releases, B-tree index pages that were left empty
22820       because of deleted rows could only be reused by rows with
22821       index values similar to the rows originally indexed on that
22822       page. In 7.4, <command>VACUUM</command> records empty index
22823       pages and allows them to be reused for any future index rows.
22824      </para>
22825     </listitem>
22826    </varlistentry>
22827
22828    <varlistentry>
22829     <term>
22830      SQL-standard information schema
22831     </term>
22832
22833     <listitem>
22834      <para>
22835       The information schema provides a standardized and stable way
22836       to access information about the schema objects defined in a
22837       database.
22838      </para>
22839     </listitem>
22840    </varlistentry>
22841
22842    <varlistentry>
22843     <term>
22844      Cursors conform more closely to the SQL standard
22845     </term>
22846
22847     <listitem>
22848      <para>
22849       The commands <command>FETCH</command> and
22850       <command>MOVE</command> have been overhauled to conform more
22851       closely to the SQL standard.
22852      </para>
22853     </listitem>
22854    </varlistentry>
22855
22856    <varlistentry>
22857     <term>
22858      Cursors can exist outside transactions
22859     </term>
22860
22861     <listitem>
22862      <para>
22863       These cursors are also called holdable cursors.
22864      </para>
22865     </listitem>
22866    </varlistentry>
22867
22868    <varlistentry>
22869     <term>
22870      New client-to-server protocol
22871     </term>
22872
22873     <listitem>
22874      <para>
22875       The new protocol adds error codes, more status information,
22876       faster startup, better support for binary data transmission,
22877       parameter values separated from SQL commands, prepared
22878       statements available at the protocol level, and cleaner
22879       recovery from <command>COPY</command> failures.  The older
22880       protocol is still supported by both server and clients.
22881      </para>
22882     </listitem>
22883    </varlistentry>
22884
22885    <varlistentry>
22886     <term>
22887      <application>libpq</application> and
22888      <application>ECPG</application> applications are now fully
22889      thread-safe
22890     </term>
22891
22892     <listitem>
22893      <para>
22894       While previous <application>libpq</application> releases
22895       already supported threads, this release improves thread safety
22896       by fixing some non-thread-safe code that was used during
22897       database connection startup.  The <command>configure</command>
22898       option <option>--enable-thread-safety</option> must be used to
22899       enable this feature.
22900      </para>
22901     </listitem>
22902    </varlistentry>
22903
22904    <varlistentry>
22905     <term>
22906      New version of full-text indexing
22907     </term>
22908
22909     <listitem>
22910      <para>
22911       A new full-text indexing suite is available in
22912       <filename>contrib/tsearch2</filename>.
22913      </para>
22914     </listitem>
22915    </varlistentry>
22916
22917    <varlistentry>
22918     <term>
22919      New autovacuum tool
22920     </term>
22921
22922     <listitem>
22923      <para>
22924       The new autovacuum tool in
22925       <filename>contrib/autovacuum</filename> monitors the database
22926       statistics tables for
22927       <command>INSERT</command>/<command>UPDATE</command>/<command>DELETE</command>
22928       activity and automatically vacuums tables when needed.
22929      </para>
22930     </listitem>
22931    </varlistentry>
22932
22933    <varlistentry>
22934     <term>
22935      Array handling has been improved and moved into the server core
22936     </term>
22937
22938     <listitem>
22939      <para>
22940       Many array limitations have been removed, and arrays behave
22941       more like fully-supported data types.
22942      </para>
22943     </listitem>
22944    </varlistentry>
22945
22946   </variablelist>
22947  </sect2>
22948
22949  <sect2>
22950   <title>Migration to Version 7.4</title>
22951
22952   <para>
22953    A dump/restore using <application>pg_dump</application> is
22954    required for those wishing to migrate data from any previous
22955    release.
22956   </para>
22957
22958   <para>
22959    Observe the following incompatibilities:
22960   </para>
22961
22962   <itemizedlist>
22963    <listitem>
22964     <para>
22965      The server-side autocommit setting was removed and
22966      reimplemented in client applications and languages.
22967      Server-side autocommit was causing too many problems with
22968      languages and applications that wanted to control their own
22969      autocommit behavior, so autocommit was removed from the server
22970      and added to individual client APIs as appropriate.
22971     </para>
22972    </listitem>
22973
22974    <listitem>
22975     <para>
22976      Error message wording has changed substantially in this
22977      release.  Significant effort was invested to make the messages
22978      more consistent and user-oriented.  If your applications try to
22979      detect different error conditions by parsing the error message,
22980      you are strongly encouraged to use the new error code facility instead.
22981     </para>
22982    </listitem>
22983
22984    <listitem>
22985     <para>
22986      Inner joins using the explicit <literal>JOIN</literal> syntax
22987      might behave differently because they are now better
22988      optimized.
22989     </para>
22990    </listitem>
22991
22992    <listitem>
22993     <para>
22994      A number of server configuration parameters have been renamed
22995      for clarity, primarily those related to
22996      logging.
22997     </para>
22998    </listitem>
22999
23000    <listitem>
23001     <para>
23002      <literal>FETCH 0</literal> or <literal>MOVE 0</literal> now
23003      does nothing.  In prior releases, <literal>FETCH 0</literal>
23004      would fetch all remaining rows, and <literal>MOVE 0</literal>
23005      would move to the end of the cursor.
23006     </para>
23007    </listitem>
23008
23009    <listitem>
23010     <para>
23011      <command>FETCH</command> and <command>MOVE</command> now return
23012      the actual number of rows fetched/moved, or zero if at the
23013      beginning/end of the cursor.  Prior releases would return the
23014      row count passed to the command, not the number of rows
23015      actually fetched or moved.
23016     </para>
23017    </listitem>
23018
23019    <listitem>
23020     <para>
23021      <command>COPY</command> now can process files that use
23022      carriage-return or carriage-return/line-feed end-of-line
23023      sequences. Literal carriage-returns and line-feeds are no
23024      longer accepted in data values; use <literal>\r</literal> and
23025      <literal>\n</literal> instead.
23026     </para>
23027    </listitem>
23028
23029    <listitem>
23030     <para>
23031      Trailing spaces are now trimmed when converting from type
23032      <type>char(<replaceable>n</>)</type> to
23033      <type>varchar(<replaceable>n</>)</type> or <type>text</type>.
23034      This is what most people always expected to happen anyway.
23035     </para>
23036    </listitem>
23037
23038    <listitem>
23039     <para>
23040      The data type <type>float(<replaceable>p</>)</type> now
23041      measures <replaceable>p</> in binary digits, not decimal
23042      digits.  The new behavior follows the SQL standard.
23043     </para>
23044    </listitem>
23045
23046    <listitem>
23047     <para>
23048      Ambiguous date values now must match the ordering specified by
23049      the <varname>datestyle</varname> setting.  In prior releases, a
23050      date specification of <literal>10/20/03</> was interpreted as a
23051      date in October even if <varname>datestyle</> specified that
23052      the day should be first.  7.4 will throw an error if a date
23053      specification is invalid for the current setting of
23054      <varname>datestyle</>.
23055     </para>
23056    </listitem>
23057
23058    <listitem>
23059     <para>
23060      The functions <function>oidrand</function>,
23061      <function>oidsrand</function>, and
23062      <function>userfntest</function> have been removed.  These
23063      functions were determined to be no longer useful.
23064     </para>
23065    </listitem>
23066
23067    <listitem>
23068     <para>
23069      String literals specifying time-varying date/time values, such
23070      as <literal>'now'</literal> or <literal>'today'</literal> will
23071      no longer work as expected in column default expressions; they
23072      now cause the time of the table creation to be the default, not
23073      the time of the insertion.  Functions such as
23074      <function>now()</>, <function>current_timestamp</>, or
23075      <function>current_date</function> should be used instead.
23076     </para>
23077
23078     <para>
23079      In previous releases, there was special code so that strings
23080      such as <literal>'now'</literal> were interpreted at
23081      <command>INSERT</> time and not at table creation time, but
23082      this work around didn't cover all cases.  Release 7.4 now
23083      requires that defaults be defined properly using functions such
23084      as <function>now()</> or <function>current_timestamp</>. These
23085      will work in all situations.
23086     </para>
23087    </listitem>
23088
23089    <listitem>
23090     <para>
23091      The dollar sign (<literal>$</>) is no longer allowed in
23092      operator names.  It can instead be a non-first character in
23093      identifiers.  This was done to improve compatibility with other
23094      database systems, and to avoid syntax problems when parameter
23095      placeholders (<literal>$<replaceable>n</></>) are written
23096      adjacent to operators.
23097     </para>
23098    </listitem>
23099
23100   </itemizedlist>
23101  </sect2>
23102
23103  <sect2>
23104   <title>Changes</title>
23105
23106   <para>
23107    Below you will find a detailed account of the changes between
23108    release 7.4 and the previous major release.
23109   </para>
23110
23111  <sect3>
23112   <title>Server Operation Changes</title>
23113
23114   <itemizedlist>
23115    <listitem>
23116     <para>
23117      Allow IPv6 server connections (Nigel Kukard, Johan Jordaan,
23118      Bruce, Tom, Kurt Roeckx, Andrew Dunstan)
23119     </para>
23120    </listitem>
23121
23122    <listitem>
23123     <para>
23124      Fix SSL to handle errors cleanly (Nathan Mueller)
23125     </para>
23126     <para>
23127      In prior releases, certain SSL API error reports were not
23128      handled correctly.  This release fixes those problems.
23129     </para>
23130    </listitem>
23131
23132    <listitem>
23133     <para>
23134      SSL protocol security and performance improvements (Sean Chittenden)
23135     </para>
23136     <para>
23137      SSL key renegotiation was happening too frequently, causing poor
23138      SSL performance.  Also, initial key handling was improved.
23139     </para>
23140    </listitem>
23141
23142    <listitem>
23143     <para>
23144      Print lock information when a deadlock is detected (Tom)
23145     </para>
23146     <para>
23147      This allows easier debugging of deadlock situations.
23148     </para>
23149    </listitem>
23150
23151    <listitem>
23152     <para>
23153      Update <filename>/tmp</filename> socket modification times
23154      regularly to avoid their removal (Tom)
23155     </para>
23156     <para>
23157      This should help prevent <filename>/tmp</filename> directory
23158      cleaner administration scripts from removing server socket
23159      files.
23160     </para>
23161    </listitem>
23162
23163    <listitem><para>Enable PAM for Mac OS X (Aaron Hillegass)</para></listitem>
23164
23165    <listitem>
23166     <para>Make B-tree indexes fully WAL-safe (Tom)</para>
23167     <para>
23168      In prior releases, under certain rare cases, a server crash
23169      could cause B-tree indexes to become corrupt. This release
23170      removes those last few rare cases.
23171     </para>
23172    </listitem>
23173
23174    <listitem><para>Allow B-tree index compaction and empty page reuse (Tom)</para></listitem>
23175
23176    <listitem>
23177     <para>
23178      Fix inconsistent index lookups during split of first root page (Tom)
23179     </para>
23180     <para>
23181      In prior releases, when a single-page index split into two
23182      pages, there was a brief period when another database session
23183      could miss seeing an index entry.  This release fixes that rare
23184      failure case.
23185     </para>
23186    </listitem>
23187
23188    <listitem><para>Improve free space map allocation logic (Tom)</para></listitem>
23189
23190    <listitem>
23191     <para>Preserve free space information between server restarts (Tom)</para>
23192     <para>
23193      In prior releases, the free space map was not saved when the
23194      postmaster was stopped, so newly started servers had no free
23195      space information. This release saves the free space map, and
23196      reloads it when the server is restarted.
23197     </para>
23198    </listitem>
23199
23200    <listitem><para>Add start time to <literal>pg_stat_activity</literal> (Neil)</para></listitem>
23201    <listitem><para>New code to detect corrupt disk pages; erase with <varname>zero_damaged_pages</varname> (Tom)</para></listitem>
23202    <listitem><para>New client/server protocol: faster, no username length limit, allow clean exit from <command>COPY</command> (Tom)</para></listitem>
23203    <listitem><para>Add transaction status, table ID, column ID to client/server protocol (Tom)</para></listitem>
23204    <listitem><para>Add binary I/O to client/server protocol (Tom)</para></listitem>
23205    <listitem><para>Remove autocommit server setting; move to client applications (Tom)</para></listitem>
23206    <listitem><para>New error message wording, error codes, and three levels of error detail (Tom, Joe, Peter)</para></listitem>
23207   </itemizedlist>
23208  </sect3>
23209
23210  <sect3>
23211   <title>Performance Improvements</title>
23212
23213   <itemizedlist>
23214    <listitem><para>Add hashing for <literal>GROUP BY</literal> aggregates (Tom)</para></listitem>
23215    <listitem><para>Make nested-loop joins be smarter about multicolumn indexes (Tom)</para></listitem>
23216    <listitem><para>Allow multikey hash joins (Tom)</para></listitem>
23217    <listitem><para>Improve constant folding (Tom)</para></listitem>
23218    <listitem><para>Add ability to inline simple SQL functions (Tom)</para></listitem>
23219
23220    <listitem>
23221     <para>Reduce memory usage for queries using complex functions (Tom)</para>
23222     <para>
23223      In prior releases, functions returning allocated memory would
23224      not free it until the query completed. This release allows the
23225      freeing of function-allocated memory when the function call
23226      completes, reducing the total memory used by functions.
23227     </para>
23228    </listitem>
23229
23230    <listitem>
23231     <para>Improve GEQO optimizer performance (Tom)</para>
23232     <para>
23233      This release fixes several inefficiencies in the way the GEQO optimizer
23234      manages potential query paths.
23235     </para>
23236    </listitem>
23237
23238    <listitem>
23239     <para>
23240      Allow <literal>IN</>/<literal>NOT IN</> to be handled via hash
23241      tables (Tom)
23242     </para>
23243    </listitem>
23244
23245    <listitem>
23246     <para>
23247      Improve <literal>NOT IN (<replaceable>subquery</>)</literal>
23248      performance (Tom)
23249     </para>
23250    </listitem>
23251
23252    <listitem>
23253     <para>
23254      Allow most <literal>IN</literal> subqueries to be processed as
23255      joins (Tom)
23256     </para>
23257    </listitem>
23258
23259    <listitem>
23260     <para>
23261      Pattern matching operations can use indexes regardless of
23262      locale (Peter)
23263     </para>
23264     <para>
23265      There is no way for non-ASCII locales to use the standard
23266      indexes for <literal>LIKE</literal> comparisons. This release
23267      adds a way to create a special index for
23268      <literal>LIKE</literal>.
23269     </para>
23270    </listitem>
23271
23272    <listitem>
23273     <para>Allow the postmaster to preload libraries using <varname>preload_libraries</varname> (Joe)</para>
23274     <para>
23275      For shared libraries that require a long time to load, this
23276      option is available so the library can be preloaded in the
23277      postmaster and inherited by all database sessions.
23278     </para>
23279    </listitem>
23280
23281    <listitem>
23282     <para>
23283      Improve optimizer cost computations, particularly for subqueries (Tom)
23284     </para>
23285    </listitem>
23286
23287    <listitem>
23288     <para>
23289      Avoid sort when subquery <literal>ORDER BY</literal> matches upper query (Tom)
23290     </para>
23291    </listitem>
23292
23293    <listitem>
23294     <para>
23295      Deduce that <literal>WHERE a.x = b.y AND b.y = 42</literal> also
23296      means <literal>a.x = 42</literal> (Tom)
23297     </para>
23298    </listitem>
23299
23300    <listitem>
23301     <para>
23302      Allow hash/merge joins on complex joins (Tom)
23303     </para>
23304    </listitem>
23305
23306    <listitem>
23307     <para>
23308      Allow hash joins for more data types (Tom)
23309     </para>
23310    </listitem>
23311
23312    <listitem>
23313     <para>
23314      Allow join optimization of explicit inner joins, disable with
23315      <varname>join_collapse_limit</varname> (Tom)
23316     </para>
23317    </listitem>
23318
23319    <listitem>
23320     <para>
23321      Add parameter <varname>from_collapse_limit</varname> to control
23322      conversion of subqueries to joins (Tom)
23323     </para>
23324    </listitem>
23325
23326    <listitem>
23327     <para>
23328      Use faster and more powerful regular expression code from Tcl
23329      (Henry Spencer, Tom)
23330     </para>
23331    </listitem>
23332
23333    <listitem>
23334     <para>
23335      Use bit-mapped relation sets in the optimizer (Tom)
23336     </para>
23337    </listitem>
23338
23339    <listitem>
23340     <para>Improve connection startup time (Tom)</para>
23341     <para>
23342      The new client/server protocol requires fewer network packets to
23343      start a database session.
23344     </para>
23345    </listitem>
23346
23347    <listitem>
23348     <para>
23349      Improve trigger/constraint performance (Stephan)
23350     </para>
23351    </listitem>
23352
23353    <listitem>
23354     <para>
23355      Improve speed of <literal>col IN (const, const, const, ...)</literal> (Tom)
23356     </para>
23357    </listitem>
23358
23359    <listitem>
23360     <para>
23361      Fix hash indexes which were broken in rare cases (Tom)
23362     </para>
23363    </listitem>
23364
23365    <listitem><para>Improve hash index concurrency and speed (Tom)</para>
23366     <para>
23367      Prior releases suffered from poor hash index performance,
23368      particularly for high concurrency situations. This release fixes
23369      that, and the development group is interested in reports
23370      comparing B-tree and hash index performance.
23371     </para>
23372    </listitem>
23373
23374    <listitem>
23375     <para>Align shared buffers on 32-byte boundary for copy speed improvement (Manfred Spraul)</para>
23376     <para>
23377      Certain CPU's perform faster data copies when addresses are
23378      32-byte aligned.
23379     </para>
23380    </listitem>
23381
23382    <listitem>
23383     <para>Data type <type>numeric</type> reimplemented for better performance (Tom)</para>
23384     <para>
23385      <type>numeric</type> used to be stored in base 100. The new code
23386      uses base 10000, for significantly better performance.
23387     </para>
23388    </listitem>
23389   </itemizedlist>
23390  </sect3>
23391
23392  <sect3>
23393   <title>Server Configuration Changes</title>
23394
23395   <itemizedlist>
23396    <listitem>
23397     <para>Rename server parameter <varname>server_min_messages</> to <varname>log_min_messages</> (Bruce)</para>
23398     <para>
23399      This was done so most parameters that control the server logs
23400      begin with <literal>log_</>.
23401     </para>
23402    </listitem>
23403
23404    <listitem><para>Rename <varname>show_*_stats</> to <varname>log_*_stats</> (Bruce)</para></listitem>
23405    <listitem><para>Rename <varname>show_source_port</> to <varname>log_source_port</> (Bruce)</para></listitem>
23406    <listitem><para>Rename <varname>hostname_lookup</> to <varname>log_hostname</> (Bruce)</para></listitem>
23407
23408    <listitem>
23409     <para>Add <varname>checkpoint_warning</> to warn of excessive checkpointing (Bruce)</para>
23410     <para>
23411      In prior releases, it was difficult to determine if checkpoint
23412      was happening too frequently. This feature adds a warning to the
23413      server logs when excessive checkpointing happens.
23414     </para>
23415    </listitem>
23416
23417    <listitem><para>New read-only server parameters for localization (Tom)</para></listitem>
23418
23419    <listitem>
23420     <para>
23421      Change debug server log messages to output as <literal>DEBUG</>
23422      rather than <literal>LOG</> (Bruce)
23423     </para>
23424    </listitem>
23425
23426    <listitem>
23427     <para>Prevent server log variables from being turned off by non-superusers (Bruce)</para>
23428     <para>
23429      This is a security feature so non-superusers cannot disable
23430      logging that was enabled by the administrator.
23431     </para>
23432    </listitem>
23433
23434    <listitem>
23435     <para>
23436      <varname>log_min_messages</>/<varname>client_min_messages</> now
23437      controls <varname>debug_*</> output (Bruce)
23438     </para>
23439     <para>
23440      This centralizes client debug information so all debug output
23441      can be sent to either the client or server logs.
23442     </para>
23443    </listitem>
23444
23445    <listitem>
23446     <para>Add Mac OS X Rendezvous server support (Chris Campbell)</para>
23447     <para>
23448      This allows Mac OS X hosts to query the network for available
23449      <productname>PostgreSQL</productname> servers.
23450     </para>
23451    </listitem>
23452
23453    <listitem>
23454     <para>
23455      Add ability to print only slow statements using
23456      <varname>log_min_duration_statement</varname>
23457      (Christopher)
23458     </para>
23459     <para>
23460      This is an often requested debugging feature that allows
23461      administrators to see only slow queries in their server logs.
23462     </para>
23463    </listitem>
23464
23465    <listitem>
23466     <para>Allow <filename>pg_hba.conf</filename> to accept netmasks in CIDR format (Andrew Dunstan)</para>
23467     <para>
23468      This allows administrators to merge the host IP address and
23469      netmask fields into a single CIDR field in <filename>pg_hba.conf</filename>.
23470     </para>
23471    </listitem>
23472
23473    <listitem><para>New read-only parameter <varname>is_superuser</varname> (Tom)</para></listitem>
23474
23475    <listitem>
23476     <para>New parameter <varname>log_error_verbosity</varname> to control error detail (Tom)</para>
23477     <para>
23478      This works with the new error reporting feature to supply
23479      additional error information like hints, file names and line
23480      numbers.
23481     </para>
23482    </listitem>
23483
23484    <listitem>
23485     <para><literal>postgres --describe-config</literal> now dumps server config variables (Aizaz Ahmed, Peter)</para>
23486     <para>
23487      This option is useful for administration tools that need to know
23488      the configuration variable names and their minimums, maximums,
23489      defaults, and descriptions.
23490     </para>
23491    </listitem>
23492
23493    <listitem>
23494     <para>
23495      Add new columns in <literal>pg_settings</literal>:
23496      <literal>context</>, <literal>type</>, <literal>source</>,
23497      <literal>min_val</>, <literal>max_val</> (Joe)
23498     </para>
23499    </listitem>
23500
23501    <listitem>
23502     <para>
23503      Make default <varname>shared_buffers</> 1000 and
23504      <varname>max_connections</> 100, if possible (Tom)
23505     </para>
23506     <para>
23507      Prior versions defaulted to 64 shared buffers so <productname>PostgreSQL</productname>
23508      would start on even very old systems. This release tests the
23509      amount of shared memory allowed by the platform and selects more
23510      reasonable default values if possible.  Of course, users are
23511      still encouraged to evaluate their resource load and size
23512      <varname>shared_buffers</varname> accordingly.
23513     </para>
23514    </listitem>
23515
23516    <listitem>
23517     <para>
23518      New <filename>pg_hba.conf</filename> record type
23519      <literal>hostnossl</> to prevent SSL connections (Jon
23520      Jensen)
23521     </para>
23522     <para>
23523      In prior releases, there was no way to prevent SSL connections
23524      if both the client and server supported SSL. This option allows
23525      that capability.
23526     </para>
23527    </listitem>
23528
23529    <listitem>
23530     <para>
23531      Remove parameter <varname>geqo_random_seed</varname>
23532      (Tom)
23533     </para>
23534    </listitem>
23535
23536    <listitem>
23537     <para>
23538      Add server parameter <varname>regex_flavor</varname> to control regular expression processing (Tom)
23539     </para>
23540    </listitem>
23541
23542    <listitem>
23543     <para>
23544      Make <command>pg_ctl</command> better handle nonstandard ports (Greg)
23545     </para>
23546    </listitem>
23547   </itemizedlist>
23548  </sect3>
23549
23550  <sect3>
23551   <title>Query Changes</title>
23552
23553   <itemizedlist>
23554    <listitem><para>New SQL-standard information schema (Peter)</para></listitem>
23555    <listitem><para>Add read-only transactions (Peter)</para></listitem>
23556    <listitem><para>Print key name and value in foreign-key violation messages (Dmitry Tkach)</para></listitem>
23557
23558    <listitem>
23559     <para>Allow users to see their own queries in <literal>pg_stat_activity</literal> (Kevin Brown)</para>
23560     <para>
23561      In prior releases, only the superuser could see query strings
23562      using <literal>pg_stat_activity</literal>. Now ordinary users
23563      can see their own query strings.
23564     </para>
23565    </listitem>
23566
23567    <listitem>
23568     <para>Fix aggregates in subqueries to match SQL standard (Tom)</para>
23569     <para>
23570      The SQL standard says that an aggregate function appearing
23571      within a nested subquery belongs to the outer query if its
23572      argument contains only outer-query variables.  Prior
23573      <productname>PostgreSQL</productname> releases did not handle
23574      this fine point correctly.
23575     </para>
23576    </listitem>
23577
23578    <listitem>
23579     <para>Add option to prevent auto-addition of tables referenced in query (Nigel J. Andrews)</para>
23580     <para>
23581      By default, tables mentioned in the query are automatically
23582      added to the <literal>FROM</> clause if they are not already
23583      there.  This is compatible with historic
23584      <productname>POSTGRES</productname> behavior but is contrary to
23585      the SQL standard.  This option allows selecting
23586      standard-compatible behavior.
23587     </para>
23588    </listitem>
23589
23590    <listitem>
23591     <para>Allow <literal>UPDATE ... SET col = DEFAULT</literal> (Rod)</para>
23592     <para>
23593      This allows <command>UPDATE</command> to set a column to its
23594      declared default value.
23595     </para>
23596    </listitem>
23597
23598    <listitem>
23599     <para>Allow expressions to be used in <literal>LIMIT</>/<literal>OFFSET</> (Tom)</para>
23600     <para>
23601      In prior releases, <literal>LIMIT</>/<literal>OFFSET</> could
23602      only use constants, not expressions.
23603     </para>
23604    </listitem>
23605
23606    <listitem>
23607     <para>Implement <literal>CREATE TABLE AS EXECUTE</literal> (Neil, Peter)</para>
23608    </listitem>
23609   </itemizedlist>
23610  </sect3>
23611
23612  <sect3>
23613   <title>Object Manipulation Changes</title>
23614
23615   <itemizedlist>
23616    <listitem>
23617     <para>Make <command>CREATE SEQUENCE</command> grammar more conforming to SQL:2003 (Neil)</para>
23618    </listitem>
23619
23620    <listitem>
23621     <para>Add statement-level triggers (Neil)</para>
23622     <para>
23623      While this allows a trigger to fire at the end of a statement,
23624      it does not allow the trigger to access all rows modified by the
23625      statement.  This capability is planned for a future release.
23626     </para>
23627    </listitem>
23628
23629    <listitem>
23630     <para>Add check constraints for domains (Rod)</para>
23631     <para>
23632      This greatly increases the usefulness of domains by allowing
23633      them to use check constraints.
23634     </para>
23635    </listitem>
23636
23637    <listitem>
23638     <para>Add <command>ALTER DOMAIN</command> (Rod)</para>
23639     <para>
23640      This allows manipulation of existing domains.
23641     </para>
23642    </listitem>
23643
23644    <listitem>
23645     <para>Fix several zero-column table bugs (Tom)</para>
23646     <para>
23647      <productname>PostgreSQL</productname> supports zero-column tables. This fixes various bugs
23648      that occur when using such tables.
23649     </para>
23650    </listitem>
23651
23652    <listitem>
23653     <para>Have <literal>ALTER TABLE ... ADD PRIMARY KEY</literal> add not-null constraint (Rod)</para>
23654     <para>
23655      In prior releases, <literal>ALTER TABLE ... ADD
23656      PRIMARY</literal> would add a unique index, but not a not-null
23657      constraint.  That is fixed in this release.
23658     </para>
23659    </listitem>
23660
23661    <listitem><para>Add <literal>ALTER TABLE ... WITHOUT OIDS</literal> (Rod)</para>
23662     <para>
23663      This allows control over whether new and updated rows will have
23664      an OID column.  This is most useful for saving storage space.
23665     </para>
23666    </listitem>
23667
23668    <listitem>
23669     <para>
23670      Add <literal>ALTER SEQUENCE</literal> to modify minimum, maximum,
23671      increment, cache, cycle values (Rod)
23672     </para>
23673    </listitem>
23674
23675    <listitem>
23676     <para>Add <literal>ALTER TABLE ... CLUSTER ON</literal> (Alvaro Herrera)</para>
23677     <para>
23678      This command is used by <command>pg_dump</command> to record the
23679      cluster column for each table previously clustered. This
23680      information is used by database-wide cluster to cluster all
23681      previously clustered tables.
23682     </para>
23683    </listitem>
23684
23685    <listitem><para>Improve automatic type casting for domains (Rod, Tom)</para></listitem>
23686    <listitem><para>Allow dollar signs in identifiers, except as first character (Tom)</para></listitem>
23687    <listitem><para>Disallow dollar signs in operator names, so <literal>x=$1</> works (Tom)</para></listitem>
23688
23689    <listitem>
23690     <para>
23691      Allow copying table schema using <literal>LIKE
23692      <replaceable>subtable</replaceable></literal>, also SQL:2003
23693      feature <literal>INCLUDING DEFAULTS</literal> (Rod)
23694     </para>
23695    </listitem>
23696
23697    <listitem>
23698     <para>
23699      Add <literal>WITH GRANT OPTION</literal> clause to
23700      <command>GRANT</command> (Peter)
23701     </para>
23702     <para>
23703      This enabled <command>GRANT</command> to give other users the
23704      ability to grant privileges on a object.
23705     </para>
23706    </listitem>
23707   </itemizedlist>
23708  </sect3>
23709
23710  <sect3>
23711   <title>Utility Command Changes</title>
23712
23713   <itemizedlist>
23714    <listitem>
23715     <para>Add <literal>ON COMMIT</literal> clause to <command>CREATE TABLE</command> for temporary tables (Gavin)</para>
23716     <para>
23717      This adds the ability for a table to be dropped or all rows
23718      deleted on transaction commit.
23719     </para>
23720    </listitem>
23721
23722    <listitem>
23723     <para>Allow cursors outside transactions using <literal>WITH HOLD</literal> (Neil)</para>
23724     <para>
23725      In previous releases, cursors were removed at the end of the
23726      transaction that created them. Cursors can now be created with
23727      the <literal>WITH HOLD</literal> option, which allows them to
23728      continue to be accessed after the creating transaction has
23729      committed.
23730     </para>
23731    </listitem>
23732
23733    <listitem>
23734     <para><literal>FETCH 0</literal> and <literal>MOVE 0 </literal> now do nothing (Bruce)</para>
23735     <para>
23736      In previous releases, <literal>FETCH 0</literal> fetched all
23737      remaining rows, and <literal>MOVE 0</literal> moved to the end
23738      of the cursor.
23739     </para>
23740    </listitem>
23741
23742    <listitem>
23743     <para>
23744      Cause <command>FETCH</command> and <command>MOVE</command> to
23745      return the number of rows fetched/moved, or zero if at the
23746      beginning/end of cursor, per SQL standard (Bruce)
23747     </para>
23748     <para>
23749      In prior releases, the row count returned by
23750      <command>FETCH</command> and <command>MOVE</command> did not
23751      accurately reflect the number of rows processed.
23752     </para>
23753    </listitem>
23754
23755    <listitem>
23756     <para>Properly handle <literal>SCROLL</literal> with cursors, or
23757     report an error (Neil)</para>
23758     <para>
23759      Allowing random access (both forward and backward scrolling) to
23760      some kinds of queries cannot be done without some additional
23761      work. If <literal>SCROLL</literal> is specified when the cursor
23762      is created, this additional work will be performed. Furthermore,
23763      if the cursor has been created with <literal>NO SCROLL</literal>,
23764      no random access is allowed.
23765     </para>
23766    </listitem>
23767
23768    <listitem>
23769     <para>
23770      Implement SQL-compatible options <literal>FIRST</>,
23771      <literal>LAST</>, <literal>ABSOLUTE <replaceable>n</></>,
23772      <literal>RELATIVE <replaceable>n</></> for
23773      <command>FETCH</command> and <command>MOVE</command> (Tom)
23774     </para>
23775    </listitem>
23776
23777    <listitem>
23778     <para>Allow <command>EXPLAIN</command> on <command>DECLARE CURSOR</command> (Tom)</para>
23779    </listitem>
23780
23781    <listitem>
23782     <para>Allow <command>CLUSTER</command> to use index marked as pre-clustered by default (Alvaro Herrera)</para>
23783    </listitem>
23784
23785    <listitem>
23786     <para>Allow <command>CLUSTER</command> to cluster all tables (Alvaro Herrera)</para>
23787     <para>
23788      This allows all previously clustered tables in a database to be
23789      reclustered with a single command.
23790     </para>
23791    </listitem>
23792
23793    <listitem><para>Prevent <command>CLUSTER</command> on partial indexes (Tom)</para></listitem>
23794
23795    <listitem><para>Allow DOS and Mac line-endings in <command>COPY</> files (Bruce)</para></listitem>
23796
23797    <listitem>
23798     <para>
23799      Disallow literal carriage return as a data value,
23800      backslash-carriage-return and <literal>\r</> are still allowed
23801      (Bruce)
23802     </para>
23803    </listitem>
23804
23805    <listitem>
23806     <para><command>COPY</> changes (binary, <literal>\.</>) (Tom)</para>
23807    </listitem>
23808
23809    <listitem>
23810     <para>Recover from <command>COPY</command> failure cleanly (Tom)</para>
23811    </listitem>
23812
23813    <listitem>
23814     <para>Prevent possible memory leaks in <command>COPY</command> (Tom)</para>
23815    </listitem>
23816
23817    <listitem>
23818     <para>Make <command>TRUNCATE</command> transaction-safe (Rod)</para>
23819     <para>
23820      <command>TRUNCATE</command> can now be used inside a
23821      transaction. If the transaction aborts, the changes made by the
23822      <command>TRUNCATE</command> are automatically rolled back.
23823     </para>
23824    </listitem>
23825
23826    <listitem>
23827     <para>
23828      Allow prepare/bind of utility commands like
23829      <command>FETCH</command> and <command>EXPLAIN</command> (Tom)
23830     </para>
23831    </listitem>
23832
23833    <listitem>
23834     <para>Add <command>EXPLAIN EXECUTE</command> (Neil)</para>
23835    </listitem>
23836
23837    <listitem>
23838     <para>Improve <command>VACUUM</command> performance on indexes by reducing WAL traffic (Tom)</para>
23839    </listitem>
23840
23841    <listitem>
23842     <para>Functional indexes have been generalized into indexes on expressions (Tom)</para>
23843     <para>
23844      In prior releases, functional indexes only supported a simple
23845      function applied to one or more column names.  This release
23846      allows any type of scalar expression.
23847     </para>
23848    </listitem>
23849
23850    <listitem>
23851     <para>
23852      Have <command>SHOW TRANSACTION ISOLATION</command> match input
23853      to <command>SET TRANSACTION ISOLATION</command>
23854      (Tom)
23855     </para>
23856    </listitem>
23857
23858    <listitem>
23859     <para>
23860       Have <command>COMMENT ON DATABASE</command> on nonlocal
23861       database generate a warning, rather than an error (Rod)
23862      </para>
23863
23864     <para>
23865      Database comments are stored in database-local tables so
23866      comments on a database have to be stored in each database.
23867     </para>
23868    </listitem>
23869
23870    <listitem>
23871     <para>
23872      Improve reliability of <command>LISTEN</>/<command>NOTIFY</> (Tom)
23873     </para>
23874    </listitem>
23875
23876    <listitem>
23877     <para>Allow <command>REINDEX</command> to reliably reindex nonshared system catalog indexes (Tom)</para>
23878     <para>
23879      This allows system tables to be reindexed without the
23880      requirement of a standalone session, which was necessary in
23881      previous releases. The only tables that now require a standalone
23882      session for reindexing are the global system tables
23883      <literal>pg_database</>, <literal>pg_shadow</>, and
23884      <literal>pg_group</>.
23885     </para>
23886    </listitem>
23887   </itemizedlist>
23888  </sect3>
23889
23890  <sect3>
23891   <title>Data Type and Function Changes</title>
23892
23893   <itemizedlist>
23894    <listitem>
23895     <para>
23896      New server parameter <varname>extra_float_digits</varname> to
23897      control precision display of floating-point numbers (Pedro
23898      Ferreira, Tom)
23899     </para>
23900     <para>
23901      This controls output precision which was causing regression
23902      testing problems.
23903     </para>
23904    </listitem>
23905
23906    <listitem><para>Allow <literal>+1300</literal> as a numeric time-zone specifier, for FJST (Tom)</para></listitem>
23907
23908    <listitem>
23909     <para>
23910      Remove rarely used functions <function>oidrand</>,
23911      <function>oidsrand</>, and <function>userfntest</> functions
23912      (Neil)
23913     </para>
23914    </listitem>
23915
23916    <listitem>
23917     <para>Add <function>md5()</> function to main server, already in <filename>contrib/pgcrypto</filename> (Joe)</para>
23918     <para>
23919      An MD5 function was frequently requested. For more complex
23920      encryption capabilities, use
23921      <filename>contrib/pgcrypto</filename>.
23922     </para>
23923    </listitem>
23924
23925    <listitem><para>Increase date range of <type>timestamp</type> (John Cochran)</para></listitem>
23926
23927    <listitem>
23928     <para>
23929      Change <literal>EXTRACT(EPOCH FROM timestamp)</literal> so
23930      <type>timestamp without time zone</type> is assumed to be in
23931      local time, not GMT (Tom)
23932     </para>
23933    </listitem>
23934
23935    <listitem><para>Trap division by zero in case the operating system doesn't prevent it (Tom)</para></listitem>
23936    <listitem><para>Change the <type>numeric</type> data type internally to base 10000 (Tom)</para></listitem>
23937    <listitem><para>New <function>hostmask()</function> function (Greg Wickham)</para></listitem>
23938    <listitem><para>Fixes for <function>to_char()</function> and <function>to_timestamp()</function> (Karel)</para></listitem>
23939
23940    <listitem>
23941     <para>
23942      Allow functions that can take any argument data type and return
23943      any data type, using <type>anyelement</type> and
23944      <type>anyarray</type> (Joe)
23945     </para>
23946     <para>
23947      This allows the creation of functions that can work with any
23948      data type.
23949     </para>
23950    </listitem>
23951
23952    <listitem>
23953     <para>
23954      Arrays can now be specified as <literal>ARRAY[1,2,3]</literal>,
23955      <literal>ARRAY[['a','b'],['c','d']]</literal>, or
23956      <literal>ARRAY[ARRAY[ARRAY[2]]]</literal> (Joe)
23957     </para>
23958    </listitem>
23959
23960    <listitem>
23961     <para>
23962      Allow proper comparisons for arrays, including <literal>ORDER
23963      BY</literal> and <literal>DISTINCT</literal> support
23964      (Joe)
23965     </para>
23966    </listitem>
23967
23968    <listitem><para>Allow indexes on array columns (Joe)</para></listitem>
23969    <listitem><para>Allow array concatenation with <literal>||</literal> (Joe)</para></listitem>
23970
23971    <listitem>
23972     <para>
23973      Allow <literal>WHERE</literal> qualification
23974      <literal><replaceable>expr</> <replaceable>op</> ANY/SOME/ALL
23975      (<replaceable>array_expr</>)</literal> (Joe)
23976     </para>
23977     <para>
23978      This allows arrays to behave like a list of values, for purposes
23979      like <literal>SELECT * FROM tab WHERE col IN
23980      (array_val)</literal>.
23981     </para>
23982    </listitem>
23983
23984    <listitem>
23985     <para>
23986      New array functions <function>array_append</>,
23987      <function>array_cat</>, <function>array_lower</>,
23988      <function>array_prepend</>, <function>array_to_string</>,
23989      <function>array_upper</>, <function>string_to_array</> (Joe)
23990     </para>
23991    </listitem>
23992
23993    <listitem><para>Allow user defined aggregates to use polymorphic functions (Joe)</para></listitem>
23994    <listitem><para>Allow assignments to empty arrays (Joe)</para></listitem>
23995
23996    <listitem>
23997     <para>
23998      Allow 60 in seconds fields of <type>time</type>,
23999      <type>timestamp</type>, and <type>interval</type> input values
24000      (Tom)
24001     </para>
24002     <para>
24003      Sixty-second values are needed for leap seconds.
24004     </para>
24005    </listitem>
24006
24007    <listitem><para>Allow <type>cidr</type> data type to be cast to <type>text</type> (Tom)</para></listitem>
24008
24009    <listitem><para>Disallow invalid time zone names in SET TIMEZONE</para></listitem>
24010
24011    <listitem>
24012     <para>
24013      Trim trailing spaces when <type>char</type> is cast to
24014      <type>varchar</> or <type>text</> (Tom)
24015     </para>
24016    </listitem>
24017
24018    <listitem>
24019     <para>
24020      Make <type>float(<replaceable>p</>)</> measure the precision
24021      <replaceable>p</> in binary digits, not decimal digits
24022      (Tom)
24023     </para>
24024    </listitem>
24025
24026    <listitem>
24027     <para>Add IPv6 support to the <type>inet</type> and <type>cidr</type> data types (Michael Graff)</para>
24028    </listitem>
24029
24030    <listitem>
24031     <para>Add <function>family()</function> function to report whether address is IPv4 or IPv6 (Michael Graff)</para>
24032    </listitem>
24033
24034    <listitem>
24035     <para>
24036      Have <literal>SHOW datestyle</literal> generate output similar
24037      to that used by <literal>SET datestyle</literal> (Tom)
24038     </para>
24039    </listitem>
24040
24041    <listitem>
24042     <para>
24043      Make <literal>EXTRACT(TIMEZONE)</literal> and <literal>SET/SHOW
24044      TIME ZONE</literal> follow the SQL convention for the sign of
24045      time zone offsets, i.e., positive is east from UTC (Tom)
24046     </para>
24047    </listitem>
24048
24049    <listitem>
24050     <para>Fix <literal>date_trunc('quarter', ...)</literal> (Böjthe Zoltán)</para>
24051     <para>
24052      Prior releases returned an incorrect value for this function call.
24053     </para>
24054    </listitem>
24055
24056    <listitem>
24057     <para>Make <function>initcap()</function> more compatible with Oracle (Mike Nolan)</para>
24058     <para>
24059      <function>initcap()</function> now uppercases a letter appearing
24060      after any non-alphanumeric character, rather than only after
24061      whitespace.
24062     </para>
24063    </listitem>
24064
24065    <listitem>
24066     <para>Allow only <varname>datestyle</varname> field order for date values not in ISO-8601 format (Greg)</para>
24067    </listitem>
24068
24069    <listitem>
24070     <para>
24071      Add new <varname>datestyle</varname> values <literal>MDY</>,
24072      <literal>DMY</>, and <literal>YMD</> to set input field order;
24073      honor <literal>US</> and <literal>European</> for backward
24074      compatibility (Tom)
24075     </para>
24076    </listitem>
24077
24078    <listitem>
24079     <para>
24080      String literals like <literal>'now'</literal> or
24081      <literal>'today'</literal> will no longer work as a column
24082      default. Use functions such as <function>now()</function>,
24083      <function>current_timestamp</function> instead.  (change
24084      required for prepared statements) (Tom)
24085     </para>
24086    </listitem>
24087
24088    <listitem>
24089     <para>Treat NaN as larger than any other value in <function>min()</>/<function>max()</> (Tom)</para>
24090     <para>
24091      NaN was already sorted after ordinary numeric values for most
24092      purposes, but <function>min()</> and <function>max()</> didn't
24093      get this right.
24094     </para>
24095    </listitem>
24096
24097    <listitem>
24098     <para>Prevent interval from suppressing <literal>:00</literal>
24099     seconds display</para>
24100    </listitem>
24101
24102    <listitem>
24103     <para>
24104      New functions <function>pg_get_triggerdef(prettyprint)</function>
24105      and <function>pg_conversion_is_visible()</function> (Christopher)
24106     </para>
24107    </listitem>
24108
24109    <listitem>
24110     <para>Allow time to be specified as <literal>040506</> or <literal>0405</> (Tom)</para>
24111    </listitem>
24112
24113    <listitem>
24114     <para>
24115      Input date order must now be <literal>YYYY-MM-DD</literal> (with 4-digit year) or
24116      match <varname>datestyle</varname>
24117     </para>
24118    </listitem>
24119
24120    <listitem>
24121     <para>
24122      Make <function>pg_get_constraintdef</function> support
24123      unique, primary-key, and check constraints (Christopher)
24124     </para>
24125    </listitem>
24126   </itemizedlist>
24127  </sect3>
24128
24129  <sect3>
24130   <title>Server-Side Language Changes</title>
24131
24132   <itemizedlist>
24133    <listitem>
24134     <para>
24135      Prevent PL/pgSQL crash when <literal>RETURN NEXT</literal> is
24136      used on a zero-row record variable (Tom)
24137     </para>
24138    </listitem>
24139
24140    <listitem>
24141     <para>
24142      Make PL/Python's <function>spi_execute</function> interface
24143      handle null values properly (Andrew Bosma)
24144     </para>
24145    </listitem>
24146
24147    <listitem>
24148     <para>Allow PL/pgSQL to declare variables of composite types without <literal>%ROWTYPE</literal> (Tom)</para>
24149    </listitem>
24150
24151    <listitem>
24152     <para>Fix PL/Python's <function>_quote()</function> function to handle big integers</para>
24153    </listitem>
24154
24155    <listitem>
24156     <para>Make PL/Python an untrusted language, now called <literal>plpythonu</literal> (Kevin Jacobs, Tom)</para>
24157     <para>
24158      The Python language no longer supports a restricted execution
24159      environment, so the trusted version of PL/Python was removed. If
24160      this situation changes, a version of PL/Python that can be used
24161      by non-superusers will be readded.
24162     </para>
24163    </listitem>
24164
24165    <listitem>
24166     <para>Allow polymorphic PL/pgSQL functions (Joe, Tom)</para>
24167    </listitem>
24168
24169    <listitem>
24170     <para>Allow polymorphic SQL functions (Joe)</para>
24171    </listitem>
24172
24173    <listitem>
24174     <para>
24175      Improved compiled function caching mechanism in PL/pgSQL with
24176      full support for polymorphism (Joe)
24177     </para>
24178    </listitem>
24179
24180    <listitem>
24181     <para>
24182      Add new parameter <literal>$0</> in PL/pgSQL representing the
24183      function's actual return type (Joe)
24184     </para>
24185    </listitem>
24186
24187    <listitem>
24188     <para>
24189      Allow PL/Tcl and PL/Python to use the same trigger on multiple tables (Tom)
24190     </para>
24191    </listitem>
24192
24193    <listitem>
24194     <para>
24195      Fixed PL/Tcl's <function>spi_prepare</function> to accept fully
24196      qualified type names in the parameter type list
24197      (Jan)
24198     </para>
24199    </listitem>
24200   </itemizedlist>
24201  </sect3>
24202
24203  <sect3>
24204   <title>psql Changes</title>
24205
24206   <itemizedlist>
24207    <listitem>
24208     <para>Add <literal>\pset pager always</literal> to always use pager (Greg)</para>
24209     <para>
24210      This forces the pager to be used even if the number of rows is
24211      less than the screen height.  This is valuable for rows that
24212      wrap across several screen rows.
24213     </para>
24214    </listitem>
24215
24216    <listitem><para>Improve tab completion (Rod, Ross Reedstrom, Ian Barwick)</para></listitem>
24217    <listitem><para>Reorder <literal>\?</> help into groupings (Harald Armin Massa, Bruce)</para></listitem>
24218    <listitem><para>Add backslash commands for listing schemas, casts, and conversions (Christopher)</para></listitem>
24219
24220    <listitem>
24221     <para>
24222      <command>\encoding</> now changes based on the server parameter
24223      <varname>client_encoding</varname> (Tom)
24224     </para>
24225     <para>
24226      In previous versions, <command>\encoding</command> was not aware
24227      of encoding changes made using <literal>SET
24228      client_encoding</literal>.
24229     </para>
24230    </listitem>
24231
24232    <listitem>
24233     <para>Save editor buffer into readline history (Ross)</para>
24234     <para>
24235      When <command>\e</> is used to edit a query, the result is saved
24236      in the readline history for retrieval using the up arrow.
24237     </para>
24238    </listitem>
24239
24240    <listitem><para>Improve <command>\d</command> display (Christopher)</para></listitem>
24241    <listitem><para>Enhance HTML mode to be more standards-conforming (Greg)</para></listitem>
24242
24243    <listitem>
24244     <para>New <command>\set AUTOCOMMIT off</command> capability (Tom)</para>
24245     <para>
24246      This takes the place of the removed server parameter <varname>autocommit</varname>.
24247     </para>
24248    </listitem>
24249
24250    <listitem>
24251     <para>New <command>\set VERBOSITY</command> to control error detail (Tom)</para>
24252     <para>
24253      This controls the new error reporting details.
24254     </para>
24255    </listitem>
24256
24257    <listitem><para>New prompt escape sequence <literal>%x</literal> to show transaction status (Tom)</para></listitem>
24258    <listitem><para>Long options for <application>psql</application> are now available on all platforms</para></listitem>
24259   </itemizedlist>
24260  </sect3>
24261
24262  <sect3>
24263   <title>pg_dump Changes</title>
24264
24265   <itemizedlist>
24266    <listitem><para>Multiple pg_dump fixes, including tar format and large objects</para></listitem>
24267    <listitem><para>Allow pg_dump to dump specific schemas (Neil)</para></listitem>
24268
24269    <listitem>
24270     <para>Make pg_dump preserve column storage characteristics (Christopher)</para>
24271     <para>
24272      This preserves <literal>ALTER TABLE ... SET STORAGE</literal> information.
24273     </para>
24274    </listitem>
24275
24276    <listitem><para>Make pg_dump preserve <command>CLUSTER</command> characteristics (Christopher)</para></listitem>
24277
24278    <listitem>
24279     <para>
24280      Have pg_dumpall use <command>GRANT</>/<command>REVOKE</> to dump database-level privileges (Tom)
24281     </para>
24282    </listitem>
24283
24284    <listitem>
24285     <para>
24286      Allow pg_dumpall to support the options <option>-a</>,
24287      <option>-s</>, <option>-x</> of pg_dump (Tom)
24288     </para>
24289    </listitem>
24290
24291    <listitem><para>Prevent pg_dump from lowercasing identifiers specified on the command line (Tom)</para></listitem>
24292
24293    <listitem>
24294     <para>
24295      pg_dump options <option>--use-set-session-authorization</option>
24296      and <option>--no-reconnect</option> now do nothing, all dumps
24297      use <command>SET SESSION AUTHORIZATION</command>
24298     </para>
24299     <para>
24300      pg_dump no longer reconnects to switch users, but instead always
24301      uses <command>SET SESSION AUTHORIZATION</command>. This will
24302      reduce password prompting during restores.
24303     </para>
24304    </listitem>
24305
24306    <listitem>
24307     <para>Long options for <application>pg_dump</application> are now available on all platforms</para>
24308     <para>
24309      <productname>PostgreSQL</productname> now includes its own
24310      long-option processing routines.
24311     </para>
24312    </listitem>
24313   </itemizedlist>
24314  </sect3>
24315
24316  <sect3>
24317   <title>libpq Changes</title>
24318
24319   <itemizedlist>
24320    <listitem>
24321     <para>
24322      Add function <function>PQfreemem</function> for freeing memory on
24323      Windows, suggested for <command>NOTIFY</command> (Bruce)
24324     </para>
24325     <para>
24326      Windows requires that memory allocated in a library be freed by
24327      a function in the same library, hence
24328      <function>free()</function> doesn't work for freeing memory
24329      allocated by libpq. <function>PQfreemem</function> is the proper
24330      way to free libpq memory, especially on Windows, and is
24331      recommended for other platforms as well.
24332     </para>
24333    </listitem>
24334
24335    <listitem>
24336     <para>Document service capability, and add sample file (Bruce)</para>
24337     <para>
24338      This allows clients to look up connection information in a
24339      central file on the client machine.
24340     </para>
24341    </listitem>
24342
24343    <listitem>
24344     <para>
24345      Make <function>PQsetdbLogin</function> have the same defaults as
24346      <function>PQconnectdb</function> (Tom)
24347     </para>
24348    </listitem>
24349
24350    <listitem><para>Allow libpq to cleanly fail when result sets are too large (Tom)</para></listitem>
24351
24352    <listitem>
24353     <para>
24354      Improve performance of function <function>PQunescapeBytea</function> (Ben Lamb)
24355     </para>
24356    </listitem>
24357
24358    <listitem>
24359     <para>
24360      Allow thread-safe libpq with <filename>configure</filename>
24361      option <option>--enable-thread-safety</option> (Lee Kindness,
24362      Philip Yarra)
24363     </para>
24364    </listitem>
24365
24366    <listitem>
24367     <para>
24368      Allow function <function>pqInternalNotice</function> to accept a
24369      format string and arguments instead of just a preformatted
24370      message (Tom, Sean Chittenden)
24371     </para>
24372    </listitem>
24373
24374    <listitem>
24375     <para>
24376      Control SSL negotiation with <literal>sslmode</literal> values
24377      <literal>disable</literal>, <literal>allow</literal>,
24378      <literal>prefer</literal>, and <literal>require</literal> (Jon
24379      Jensen)
24380     </para>
24381    </listitem>
24382
24383    <listitem>
24384     <para>Allow new error codes and levels of text (Tom)</para>
24385    </listitem>
24386
24387    <listitem>
24388     <para>Allow access to the underlying table and column of a query result (Tom)</para>
24389     <para>
24390      This is helpful for query-builder applications that want to know
24391      the underlying table and column names associated with a specific
24392      result set.
24393     </para>
24394    </listitem>
24395
24396    <listitem><para>Allow access to the current transaction status (Tom)</para></listitem>
24397    <listitem><para>Add ability to pass binary data directly to the server (Tom)</para></listitem>
24398
24399    <listitem>
24400     <para>
24401      Add function <function>PQexecPrepared</function> and
24402      <function>PQsendQueryPrepared</function> functions which perform
24403      bind/execute of previously prepared statements (Tom)
24404      </para>
24405     </listitem>
24406   </itemizedlist>
24407  </sect3>
24408
24409  <sect3>
24410   <title>JDBC Changes</title>
24411
24412   <itemizedlist>
24413    <listitem><para>Allow <function>setNull</function> on updateable result sets</para></listitem>
24414    <listitem><para>Allow <function>executeBatch</function> on a prepared statement (Barry)</para></listitem>
24415    <listitem><para>Support SSL connections (Barry)</para></listitem>
24416    <listitem><para>Handle schema names in result sets (Paul Sorenson)</para></listitem>
24417    <listitem><para>Add refcursor support (Nic Ferrier)</para></listitem>
24418   </itemizedlist>
24419  </sect3>
24420
24421  <sect3>
24422   <title>Miscellaneous Interface Changes</title>
24423
24424   <itemizedlist>
24425    <listitem>
24426     <para>Prevent possible memory leak or core dump during libpgtcl shutdown (Tom)</para>
24427    </listitem>
24428    <listitem>
24429     <para>Add Informix compatibility to ECPG (Michael)</para>
24430     <para>
24431      This allows ECPG to process embedded C programs that were
24432      written using certain Informix extensions.
24433     </para>
24434    </listitem>
24435
24436    <listitem>
24437     <para>Add type <type>decimal</type> to ECPG that is fixed length, for Informix (Michael)</para>
24438    </listitem>
24439
24440    <listitem>
24441     <para>
24442      Allow thread-safe embedded SQL programs with
24443      <filename>configure</filename> option
24444      <option>--enable-thread-safety</option> (Lee Kindness, Bruce)
24445     </para>
24446     <para>
24447      This allows multiple threads to access the database at the same
24448      time.
24449     </para>
24450    </listitem>
24451
24452    <listitem>
24453     <para>Moved Python client PyGreSQL to <ulink url="http://www.pygresql.org"></ulink> (Marc)</para>
24454    </listitem>
24455   </itemizedlist>
24456  </sect3>
24457
24458  <sect3>
24459   <title>Source Code Changes</title>
24460
24461   <itemizedlist>
24462    <listitem><para>Prevent need for separate platform geometry regression result files (Tom)</para></listitem>
24463    <listitem><para>Improved PPC locking primitive (Reinhard Max)</para></listitem>
24464    <listitem><para>New function <function>palloc0</function> to allocate and clear memory (Bruce)</para></listitem>
24465    <listitem><para>Fix locking code for s390x CPU (64-bit) (Tom)</para></listitem>
24466    <listitem><para>Allow OpenBSD to use local ident credentials (William Ahern)</para></listitem>
24467    <listitem><para>Make query plan trees read-only to executor (Tom)</para></listitem>
24468    <listitem><para>Add Darwin startup scripts (David Wheeler)</para></listitem>
24469    <listitem><para>Allow libpq to compile with Borland C++ compiler (Lester Godwin, Karl Waclawek)</para></listitem>
24470    <listitem><para>Use our own version of <function>getopt_long()</function> if needed (Peter)</para></listitem>
24471    <listitem><para>Convert administration scripts to C (Peter)</para></listitem>
24472    <listitem><para> Bison &gt;= 1.85 is now required to build the <productname>PostgreSQL</> grammar, if building from CVS</para></listitem>
24473    <listitem><para>Merge documentation into one book (Peter)</para></listitem>
24474    <listitem><para>Add Windows compatibility functions (Bruce)</para></listitem>
24475    <listitem><para>Allow client interfaces to compile under MinGW (Bruce)</para></listitem>
24476    <listitem><para>New <function>ereport()</function> function for error reporting (Tom)</para></listitem>
24477    <listitem><para>Support Intel compiler on Linux (Peter)</para></listitem>
24478    <listitem><para>Improve Linux startup scripts (Slawomir Sudnik, Darko Prenosil)</para></listitem>
24479    <listitem><para>Add support for AMD Opteron and Itanium (Jeffrey W. Baker, Bruce)</para></listitem>
24480    <listitem>
24481     <para>Remove <option>--enable-recode</option> option from <command>configure</command></para>
24482     <para>
24483      This was no longer needed now that we have <command>CREATE CONVERSION</command>.
24484     </para>
24485    </listitem>
24486    <listitem>
24487     <para>Generate a compile error if spinlock code is not found (Bruce)</para>
24488     <para>
24489      Platforms without spinlock code will now fail to compile, rather
24490      than silently using semaphores. This failure can be disabled
24491      with a new <command>configure</command> option.
24492     </para>
24493    </listitem>
24494   </itemizedlist>
24495  </sect3>
24496
24497  <sect3>
24498   <title>Contrib Changes</title>
24499
24500   <itemizedlist>
24501    <listitem><para>Change dbmirror license to BSD</para></listitem>
24502    <listitem><para>Improve earthdistance (Bruno Wolff III)</para></listitem>
24503    <listitem><para>Portability improvements to pgcrypto (Marko Kreen)</para></listitem>
24504    <listitem><para>Prevent crash in xml (John Gray, Michael Richards)</para></listitem>
24505    <listitem><para>Update oracle</para></listitem>
24506    <listitem><para>Update mysql</para></listitem>
24507    <listitem><para>Update cube (Bruno Wolff III)</para></listitem>
24508    <listitem><para>Update earthdistance to use cube (Bruno Wolff III)</para></listitem>
24509    <listitem><para>Update btree_gist (Oleg)</para></listitem>
24510    <listitem><para>New tsearch2 full-text search module (Oleg, Teodor)</para></listitem>
24511    <listitem><para>Add hash-based crosstab function to tablefuncs (Joe)</para></listitem>
24512    <listitem><para>Add serial column to order <function>connectby()</> siblings in tablefuncs (Nabil Sayegh,Joe)</para></listitem>
24513    <listitem><para>Add named persistent connections to dblink (Shridhar Daithanka)</para></listitem>
24514    <listitem><para>New pg_autovacuum allows automatic <command>VACUUM</command> (Matthew T. O'Connor)</para></listitem>
24515    <listitem><para>Make pgbench honor environment variables <envar>PGHOST</>, <envar>PGPORT</>, <envar>PGUSER</> (Tatsuo)</para></listitem>
24516    <listitem><para>Improve intarray (Teodor Sigaev)</para></listitem>
24517    <listitem><para>Improve pgstattuple (Rod)</para></listitem>
24518    <listitem><para>Fix bug in <function>metaphone()</function> in fuzzystrmatch</para></listitem>
24519    <listitem><para>Improve adddepend (Rod)</para></listitem>
24520    <listitem><para>Update spi/timetravel (Böjthe Zoltán)</para></listitem>
24521    <listitem><para>Fix dbase <option>-s</> option and improve non-ASCII handling (Thomas Behr, Márcio Smiderle)</para></listitem>
24522    <listitem><para>Remove array module because features now included by default (Joe)</para></listitem>
24523   </itemizedlist>
24524  </sect3>
24525  </sect2>
24526 </sect1>
24527
24528  <sect1 id="release-7-3-21">
24529   <title>Release 7.3.21</title>
24530
24531   <note>
24532   <title>Release date</title>
24533   <simpara>2008-01-07</simpara>
24534   </note>
24535
24536   <para>
24537    This release contains a variety of fixes from 7.3.20,
24538    including fixes for significant security issues.
24539   </para>
24540
24541   <para>
24542    This is expected to be the last <productname>PostgreSQL</> release
24543    in the 7.3.X series.  Users are encouraged to update to a newer
24544    release branch soon.
24545   </para>
24546
24547   <sect2>
24548    <title>Migration to Version 7.3.21</title>
24549
24550    <para>
24551     A dump/restore is not required for those running 7.3.X.  However,
24552     if you are upgrading from a version earlier than 7.3.13, see the release
24553     notes for 7.3.13.
24554    </para>
24555
24556   </sect2>
24557
24558   <sect2>
24559    <title>Changes</title>
24560
24561    <itemizedlist>
24562
24563     <listitem>
24564      <para>
24565       Prevent functions in indexes from executing with the privileges of
24566       the user running <command>VACUUM</>, <command>ANALYZE</>, etc (Tom)
24567      </para>
24568
24569      <para>
24570       Functions used in index expressions and partial-index
24571       predicates are evaluated whenever a new table entry is made.  It has
24572       long been understood that this poses a risk of trojan-horse code
24573       execution if one modifies a table owned by an untrustworthy user.
24574       (Note that triggers, defaults, check constraints, etc. pose the
24575       same type of risk.)  But functions in indexes pose extra danger
24576       because they will be executed by routine maintenance operations
24577       such as <command>VACUUM FULL</>, which are commonly performed
24578       automatically under a superuser account.  For example, a nefarious user
24579       can execute code with superuser privileges by setting up a
24580       trojan-horse index definition and waiting for the next routine vacuum.
24581       The fix arranges for standard maintenance operations
24582       (including <command>VACUUM</>, <command>ANALYZE</>, <command>REINDEX</>,
24583       and <command>CLUSTER</>) to execute as the table owner rather than
24584       the calling user, using the same privilege-switching mechanism already
24585       used for <literal>SECURITY DEFINER</> functions.  To prevent bypassing
24586       this security measure, execution of <command>SET SESSION
24587       AUTHORIZATION</> and <command>SET ROLE</> is now forbidden within a
24588       <literal>SECURITY DEFINER</> context.  (CVE-2007-6600)
24589      </para>
24590     </listitem>
24591
24592     <listitem>
24593      <para>
24594       Require non-superusers who use <filename>/contrib/dblink</> to use only
24595       password authentication, as a security measure (Joe)
24596      </para>
24597
24598      <para>
24599       The fix that appeared for this in 7.3.20 was incomplete, as it plugged
24600       the hole for only some <filename>dblink</> functions.  (CVE-2007-6601,
24601       CVE-2007-3278)
24602      </para>
24603     </listitem>
24604
24605     <listitem>
24606      <para>
24607       Fix potential crash in <function>translate()</> when using a multibyte
24608       database encoding (Tom)
24609      </para>
24610     </listitem>
24611
24612     <listitem>
24613      <para>
24614       Make <filename>contrib/tablefunc</>'s <function>crosstab()</> handle
24615       NULL rowid as a category in its own right, rather than crashing (Joe)
24616      </para>
24617     </listitem>
24618
24619     <listitem>
24620      <para>
24621       Require a specific version of <productname>Autoconf</> to be used
24622       when re-generating the <command>configure</> script (Peter)
24623      </para>
24624
24625      <para>
24626       This affects developers and packagers only.  The change was made
24627       to prevent accidental use of untested combinations of
24628       <productname>Autoconf</> and <productname>PostgreSQL</> versions.
24629       You can remove the version check if you really want to use a
24630       different <productname>Autoconf</> version, but it's
24631       your responsibility whether the result works or not.
24632      </para>
24633     </listitem>
24634
24635    </itemizedlist>
24636
24637   </sect2>
24638  </sect1>
24639
24640  <sect1 id="release-7-3-20">
24641   <title>Release 7.3.20</title>
24642
24643   <note>
24644   <title>Release date</title>
24645   <simpara>2007-09-17</simpara>
24646   </note>
24647
24648   <para>
24649    This release contains fixes from 7.3.19.
24650   </para>
24651
24652   <sect2>
24653    <title>Migration to Version 7.3.20</title>
24654
24655    <para>
24656     A dump/restore is not required for those running 7.3.X.  However,
24657     if you are upgrading from a version earlier than 7.3.13, see the release
24658     notes for 7.3.13.
24659    </para>
24660
24661   </sect2>
24662
24663   <sect2>
24664    <title>Changes</title>
24665
24666    <itemizedlist>
24667
24668     <listitem>
24669      <para>
24670       Prevent index corruption when a transaction inserts rows and
24671       then aborts close to the end of a concurrent <command>VACUUM</>
24672       on the same table (Tom)
24673      </para>
24674     </listitem>
24675
24676     <listitem>
24677      <para>
24678       Make <command>CREATE DOMAIN ... DEFAULT NULL</> work properly (Tom)
24679      </para>
24680     </listitem>
24681
24682     <listitem>
24683      <para>
24684       Fix crash when <varname>log_min_error_statement</> logging runs out
24685       of memory (Tom)
24686      </para>
24687     </listitem>
24688
24689     <listitem>
24690      <para>
24691       Require non-superusers who use <filename>/contrib/dblink</> to use only
24692       password authentication, as a security measure (Joe)
24693      </para>
24694     </listitem>
24695
24696    </itemizedlist>
24697
24698   </sect2>
24699  </sect1>
24700
24701  <sect1 id="release-7-3-19">
24702   <title>Release 7.3.19</title>
24703
24704   <note>
24705   <title>Release date</title>
24706   <simpara>2007-04-23</simpara>
24707   </note>
24708
24709   <para>
24710    This release contains fixes from 7.3.18,
24711    including a security fix.
24712   </para>
24713
24714   <sect2>
24715    <title>Migration to Version 7.3.19</title>
24716
24717    <para>
24718     A dump/restore is not required for those running 7.3.X.  However,
24719     if you are upgrading from a version earlier than 7.3.13, see the release
24720     notes for 7.3.13.
24721    </para>
24722
24723   </sect2>
24724
24725   <sect2>
24726    <title>Changes</title>
24727
24728    <itemizedlist>
24729
24730     <listitem>
24731     <para>
24732      Support explicit placement of the temporary-table schema within
24733      <varname>search_path</>, and disable searching it for functions
24734      and operators (Tom)
24735     </para>
24736     <para>
24737      This is needed to allow a security-definer function to set a
24738      truly secure value of <varname>search_path</>.  Without it,
24739      an unprivileged SQL user can use temporary objects to execute code
24740      with the privileges of the security-definer function (CVE-2007-2138).
24741      See <command>CREATE FUNCTION</> for more information.
24742     </para>
24743     </listitem>
24744
24745     <listitem>
24746     <para>
24747      Fix potential-data-corruption bug in how <command>VACUUM FULL</> handles
24748      <command>UPDATE</> chains (Tom, Pavan Deolasee)
24749     </para>
24750     </listitem>
24751
24752    </itemizedlist>
24753
24754   </sect2>
24755  </sect1>
24756
24757  <sect1 id="release-7-3-18">
24758   <title>Release 7.3.18</title>
24759
24760   <note>
24761   <title>Release date</title>
24762   <simpara>2007-02-05</simpara>
24763   </note>
24764
24765   <para>
24766    This release contains a variety of fixes from 7.3.17, including
24767    a security fix.
24768   </para>
24769
24770   <sect2>
24771    <title>Migration to Version 7.3.18</title>
24772
24773    <para>
24774     A dump/restore is not required for those running 7.3.X.  However,
24775     if you are upgrading from a version earlier than 7.3.13, see the release
24776     notes for 7.3.13.
24777    </para>
24778
24779   </sect2>
24780
24781   <sect2>
24782    <title>Changes</title>
24783
24784    <itemizedlist>
24785
24786     <listitem>
24787     <para>
24788      Remove security vulnerability that allowed connected users
24789      to read backend memory (Tom)
24790     </para>
24791     <para>
24792      The vulnerability involves changing the
24793      data type of a table column used in a SQL function (CVE-2007-0555).
24794      This error can easily be exploited to cause a backend crash, and in
24795      principle might be used to read database content that the user
24796      should not be able to access.
24797     </para>
24798     </listitem>
24799
24800     <listitem>
24801     <para>
24802      Fix rare bug wherein btree index page splits could fail
24803      due to choosing an infeasible split point (Heikki Linnakangas)
24804     </para>
24805     </listitem>
24806
24807     <listitem>
24808     <para>
24809      Tighten security of multi-byte character processing for UTF8 sequences
24810      over three bytes long (Tom)
24811     </para>
24812     </listitem>
24813
24814    </itemizedlist>
24815
24816   </sect2>
24817  </sect1>
24818
24819  <sect1 id="release-7-3-17">
24820   <title>Release 7.3.17</title>
24821
24822   <note>
24823   <title>Release date</title>
24824   <simpara>2007-01-08</simpara>
24825   </note>
24826
24827   <para>
24828    This release contains a variety of fixes from 7.3.16.
24829   </para>
24830
24831   <sect2>
24832    <title>Migration to Version 7.3.17</title>
24833
24834    <para>
24835     A dump/restore is not required for those running 7.3.X.  However,
24836     if you are upgrading from a version earlier than 7.3.13, see the release
24837     notes for 7.3.13.
24838    </para>
24839
24840   </sect2>
24841
24842   <sect2>
24843    <title>Changes</title>
24844
24845    <itemizedlist>
24846
24847     <listitem>
24848      <para>
24849       <function>to_number()</> and <function>to_char(numeric)</>
24850       are now <literal>STABLE</>, not <literal>IMMUTABLE</>, for
24851       new <application>initdb</> installs (Tom)
24852      </para>
24853
24854      <para>
24855       This is because <varname>lc_numeric</> can potentially
24856       change the output of these functions.
24857      </para>
24858     </listitem>
24859
24860     <listitem>
24861      <para>
24862       Improve index usage of regular expressions that use parentheses (Tom)
24863      </para>
24864
24865      <para>
24866       This improves <application>psql</> <literal>\d</> performance also.
24867      </para>
24868     </listitem>
24869
24870    </itemizedlist>
24871
24872   </sect2>
24873  </sect1>
24874
24875  <sect1 id="release-7-3-16">
24876   <title>Release 7.3.16</title>
24877
24878   <note>
24879   <title>Release date</title>
24880   <simpara>2006-10-16</simpara>
24881   </note>
24882
24883   <para>
24884    This release contains a variety of fixes from 7.3.15.
24885   </para>
24886
24887   <sect2>
24888    <title>Migration to Version 7.3.16</title>
24889
24890    <para>
24891     A dump/restore is not required for those running 7.3.X.  However,
24892     if you are upgrading from a version earlier than 7.3.13, see the release
24893     notes for 7.3.13.
24894    </para>
24895
24896   </sect2>
24897
24898   <sect2>
24899    <title>Changes</title>
24900
24901 <itemizedlist>
24902 <listitem><para>Fix corner cases in pattern matching for
24903  <application>psql</>'s <literal>\d</> commands</para></listitem>
24904 <listitem><para>Fix index-corrupting bugs in /contrib/ltree
24905  (Teodor)</para></listitem>
24906 <listitem><para>Back-port 7.4 spinlock code to improve performance and support
24907 64-bit architectures better</para> </listitem>
24908 <listitem><para>Fix SSL-related memory leak in libpq</para> </listitem>
24909 <listitem><para>Fix backslash escaping in /contrib/dbmirror</para></listitem>
24910 <listitem><para>Adjust regression tests for recent changes in US DST laws
24911 </para> </listitem>
24912 </itemizedlist>
24913
24914   </sect2>
24915  </sect1>
24916
24917  <sect1 id="release-7-3-15">
24918   <title>Release 7.3.15</title>
24919
24920   <note>
24921   <title>Release date</title>
24922   <simpara>2006-05-23</simpara>
24923   </note>
24924
24925   <para>
24926    This release contains a variety of fixes from 7.3.14,
24927    including patches for extremely serious security issues.
24928   </para>
24929
24930   <sect2>
24931    <title>Migration to Version 7.3.15</title>
24932
24933    <para>
24934     A dump/restore is not required for those running 7.3.X.  However,
24935     if you are upgrading from a version earlier than 7.3.13, see the release
24936     notes for 7.3.13.
24937    </para>
24938
24939    <para>
24940     Full security against the SQL-injection attacks described in
24941     CVE-2006-2313 and CVE-2006-2314 might require changes in application
24942     code.  If you have applications that embed untrustworthy strings
24943     into SQL commands, you should examine them as soon as possible to
24944     ensure that they are using recommended escaping techniques.  In
24945     most cases, applications should be using subroutines provided by
24946     libraries or drivers (such as <application>libpq</>'s
24947     <function>PQescapeStringConn()</>) to perform string escaping,
24948     rather than relying on <foreignphrase>ad hoc</> code to do it.
24949    </para>
24950   </sect2>
24951
24952   <sect2>
24953    <title>Changes</title>
24954
24955 <itemizedlist>
24956 <listitem><para>Change the server to reject invalidly-encoded multibyte
24957 characters in all cases (Tatsuo, Tom)</para>
24958 <para>While <productname>PostgreSQL</> has been moving in this direction for
24959 some time, the checks are now applied uniformly to all encodings and all
24960 textual input, and are now always errors not merely warnings.  This change
24961 defends against SQL-injection attacks of the type described in CVE-2006-2313.
24962 </para></listitem>
24963
24964 <listitem><para>Reject unsafe uses of <literal>\'</> in string literals</para>
24965 <para>As a server-side defense against SQL-injection attacks of the type
24966 described in CVE-2006-2314, the server now only accepts <literal>''</> and not
24967 <literal>\'</> as a representation of ASCII single quote in SQL string
24968 literals.  By default, <literal>\'</> is rejected only when
24969 <varname>client_encoding</> is set to a client-only encoding (SJIS, BIG5, GBK,
24970 GB18030, or UHC), which is the scenario in which SQL injection is possible.
24971 A new configuration parameter <varname>backslash_quote</> is available to
24972 adjust this behavior when needed.  Note that full security against
24973 CVE-2006-2314 might require client-side changes; the purpose of
24974 <varname>backslash_quote</> is in part to make it obvious that insecure
24975 clients are insecure.
24976 </para></listitem>
24977
24978 <listitem><para>Modify <application>libpq</>'s string-escaping routines to be
24979 aware of encoding considerations</para>
24980 <para>This fixes <application>libpq</>-using applications for the security
24981 issues described in CVE-2006-2313 and CVE-2006-2314.
24982 Applications that use multiple <productname>PostgreSQL</> connections
24983 concurrently should migrate to <function>PQescapeStringConn()</> and
24984 <function>PQescapeByteaConn()</> to ensure that escaping is done correctly
24985 for the settings in use in each database connection.  Applications that
24986 do string escaping <quote>by hand</> should be modified to rely on library
24987 routines instead.
24988 </para></listitem>
24989
24990 <listitem><para>Fix some incorrect encoding conversion functions</para>
24991 <para><function>win1251_to_iso</>, <function>alt_to_iso</>,
24992 <function>euc_tw_to_big5</>, <function>euc_tw_to_mic</>,
24993 <function>mic_to_euc_tw</> were all broken to varying
24994 extents.
24995 </para></listitem>
24996
24997 <listitem><para>Clean up stray remaining uses of <literal>\'</> in strings
24998 (Bruce, Jan)</para></listitem>
24999
25000 <listitem><para>Fix server to use custom DH SSL parameters correctly (Michael
25001 Fuhr)</para></listitem>
25002
25003 <listitem><para>Fix various minor memory leaks</para></listitem>
25004 </itemizedlist>
25005
25006   </sect2>
25007  </sect1>
25008
25009  <sect1 id="release-7-3-14">
25010   <title>Release 7.3.14</title>
25011
25012   <note>
25013   <title>Release date</title>
25014   <simpara>2006-02-14</simpara>
25015   </note>
25016
25017   <para>
25018    This release contains a variety of fixes from 7.3.13.
25019   </para>
25020
25021   <sect2>
25022    <title>Migration to Version 7.3.14</title>
25023
25024    <para>
25025     A dump/restore is not required for those running 7.3.X.  However,
25026     if you are upgrading from a version earlier than 7.3.13, see the release
25027     notes for 7.3.13.
25028    </para>
25029   </sect2>
25030
25031   <sect2>
25032    <title>Changes</title>
25033
25034 <itemizedlist>
25035
25036 <listitem><para>Fix potential crash in <command>SET
25037 SESSION AUTHORIZATION</> (CVE-2006-0553)</para>
25038 <para>An unprivileged user could crash the server process, resulting in
25039 momentary denial of service to other users, if the server has been compiled
25040 with Asserts enabled (which is not the default).
25041 Thanks to Akio Ishida for reporting this problem.
25042 </para></listitem>
25043
25044 <listitem><para>Fix bug with row visibility logic in self-inserted
25045 rows (Tom)</para>
25046 <para>Under rare circumstances a row inserted by the current command
25047 could be seen as already valid, when it should not be.  Repairs bug
25048 created in 7.3.11 release.
25049 </para></listitem>
25050
25051 <listitem><para>Fix race condition that could lead to <quote>file already
25052 exists</> errors during pg_clog file creation
25053 (Tom)</para></listitem>
25054
25055 <listitem><para>Fix to allow restoring dumps that have cross-schema
25056 references to custom operators (Tom)</para></listitem>
25057
25058 <listitem><para>Portability fix for testing presence of <function>finite</>
25059 and <function>isinf</> during configure (Tom)</para></listitem>
25060
25061 </itemizedlist>
25062
25063   </sect2>
25064  </sect1>
25065
25066  <sect1 id="release-7-3-13">
25067   <title>Release 7.3.13</title>
25068
25069   <note>
25070   <title>Release date</title>
25071   <simpara>2006-01-09</simpara>
25072   </note>
25073
25074   <para>
25075    This release contains a variety of fixes from 7.3.12.
25076   </para>
25077
25078   <sect2>
25079    <title>Migration to Version 7.3.13</title>
25080
25081    <para>
25082     A dump/restore is not required for those running 7.3.X.  However,
25083     if you are upgrading from a version earlier than 7.3.10, see the release
25084     notes for 7.3.10.
25085     Also, you might need to <command>REINDEX</> indexes on textual
25086     columns after updating, if you are affected by the locale or
25087     <application>plperl</> issues described below.
25088    </para>
25089   </sect2>
25090
25091   <sect2>
25092    <title>Changes</title>
25093
25094 <itemizedlist>
25095
25096 <listitem><para>Fix character string comparison for locales that consider
25097 different character combinations as equal, such as Hungarian (Tom)</para>
25098 <para>This might require <command>REINDEX</> to fix existing indexes on
25099 textual columns.</para></listitem>
25100
25101 <listitem><para>Set locale environment variables during postmaster startup
25102 to ensure that <application>plperl</> won't change the locale later</para>
25103 <para>This fixes a problem that occurred if the <application>postmaster</> was
25104 started with environment variables specifying a different locale than what
25105 <application>initdb</> had been told.  Under these conditions, any use of
25106 <application>plperl</> was likely to lead to corrupt indexes.  You might need
25107 <command>REINDEX</> to fix existing indexes on
25108 textual columns if this has happened to you.</para></listitem>
25109
25110 <listitem><para>Fix longstanding bug in strpos() and regular expression
25111 handling in certain rarely used Asian multi-byte character sets (Tatsuo)
25112 </para></listitem>
25113
25114 <listitem><para>Fix bug in <filename>/contrib/pgcrypto</> gen_salt,
25115 which caused it not to use all available salt space for MD5 and
25116 XDES algorithms (Marko Kreen, Solar Designer)</para>
25117 <para>Salts for Blowfish and standard DES are unaffected.</para></listitem>
25118
25119 <listitem><para>Fix <filename>/contrib/dblink</> to throw an error,
25120 rather than crashing, when the number of columns specified is different from
25121 what's actually returned by the query (Joe)</para></listitem>
25122
25123 </itemizedlist>
25124
25125   </sect2>
25126  </sect1>
25127
25128  <sect1 id="release-7-3-12">
25129   <title>Release 7.3.12</title>
25130
25131   <note>
25132   <title>Release date</title>
25133   <simpara>2005-12-12</simpara>
25134   </note>
25135
25136   <para>
25137    This release contains a variety of fixes from 7.3.11.
25138   </para>
25139
25140   <sect2>
25141    <title>Migration to Version 7.3.12</title>
25142
25143    <para>
25144     A dump/restore is not required for those running 7.3.X.  However,
25145     if you are upgrading from a version earlier than 7.3.10, see the release
25146     notes for 7.3.10.
25147    </para>
25148   </sect2>
25149
25150   <sect2>
25151    <title>Changes</title>
25152
25153 <itemizedlist>
25154
25155 <listitem><para>Fix race condition in transaction log management</para>
25156 <para>There was a narrow window in which an I/O operation could be initiated
25157 for the wrong page, leading to an Assert failure or data
25158 corruption.</para>
25159 </listitem>
25160
25161 <listitem><para><filename>/contrib/ltree</> fixes (Teodor)</para></listitem>
25162
25163 <listitem><para>Fix longstanding planning error for outer joins</para>
25164 <para>This bug sometimes caused a bogus error <quote>RIGHT JOIN is
25165 only supported with merge-joinable join conditions</>.</para></listitem>
25166
25167 <listitem><para>Prevent core dump in <application>pg_autovacuum</> when a
25168 table has been dropped</para></listitem>
25169
25170 </itemizedlist>
25171
25172   </sect2>
25173  </sect1>
25174
25175  <sect1 id="release-7-3-11">
25176   <title>Release 7.3.11</title>
25177
25178   <note>
25179   <title>Release date</title>
25180   <simpara>2005-10-04</simpara>
25181   </note>
25182
25183   <para>
25184    This release contains a variety of fixes from 7.3.10.
25185   </para>
25186
25187   <sect2>
25188    <title>Migration to Version 7.3.11</title>
25189
25190    <para>
25191     A dump/restore is not required for those running 7.3.X.  However,
25192     if you are upgrading from a version earlier than 7.3.10, see the release
25193     notes for 7.3.10.
25194    </para>
25195   </sect2>
25196
25197   <sect2>
25198    <title>Changes</title>
25199
25200 <itemizedlist>
25201 <listitem><para>Fix error that allowed <command>VACUUM</> to remove
25202 <literal>ctid</> chains too soon, and add more checking in code that follows
25203 <literal>ctid</> links</para>
25204 <para>This fixes a long-standing problem that could cause crashes in very rare
25205 circumstances.</para></listitem>
25206 <listitem><para>Fix <type>CHAR()</> to properly pad spaces to the specified
25207 length when using a multiple-byte character set (Yoshiyuki Asaba)</para>
25208 <para>In prior releases, the padding of <type>CHAR()</> was incorrect
25209 because it only padded to the specified number of bytes without
25210 considering how many characters were stored.</para></listitem>
25211 <listitem><para>Fix missing rows in queries like <literal>UPDATE a=... WHERE
25212 a...</> with GiST index on column <literal>a</></para></listitem>
25213 <listitem><para>Improve checking for partially-written WAL
25214 pages</para></listitem>
25215 <listitem><para>Improve robustness of signal handling when SSL is
25216 enabled</para></listitem>
25217 <listitem><para>Various memory leakage fixes</para></listitem>
25218 <listitem><para>Various portability improvements</para></listitem>
25219 <listitem><para>Fix PL/PgSQL to handle <literal>var := var</> correctly when
25220 the variable is of pass-by-reference type</para></listitem>
25221 </itemizedlist>
25222
25223   </sect2>
25224  </sect1>
25225
25226  <sect1 id="release-7-3-10">
25227   <title>Release 7.3.10</title>
25228
25229   <note>
25230   <title>Release date</title>
25231   <simpara>2005-05-09</simpara>
25232   </note>
25233
25234   <para>
25235    This release contains a variety of fixes from 7.3.9, including several
25236    security-related issues.
25237   </para>
25238
25239   <sect2>
25240    <title>Migration to Version 7.3.10</title>
25241
25242    <para>
25243     A dump/restore is not required for those running 7.3.X.  However,
25244     it is one possible way of handling a significant security problem
25245     that has been found in the initial contents of 7.3.X system
25246     catalogs.  A dump/initdb/reload sequence using 7.3.10's initdb will
25247     automatically correct this problem.
25248    </para>
25249
25250    <para>
25251     The security problem is that the built-in character set encoding
25252     conversion functions can be invoked from SQL commands by unprivileged
25253     users, but the functions were not designed for such use and are not
25254     secure against malicious choices of arguments.  The fix involves changing
25255     the declared parameter list of these functions so that they can no longer
25256     be invoked from SQL commands.  (This does not affect their normal use
25257     by the encoding conversion machinery.)
25258     It is strongly recommended that all installations repair this error,
25259     either by initdb or by following the manual repair procedure given
25260     below.  The error at least allows unprivileged database users to crash
25261     their server process, and might allow unprivileged users to gain the
25262     privileges of a database superuser.
25263    </para>
25264
25265    <para>
25266     If you wish not to do an initdb, perform the following procedure instead.
25267     As the database superuser, do:
25268
25269 <programlisting>
25270 BEGIN;
25271 UPDATE pg_proc SET proargtypes[3] = 'internal'::regtype
25272 WHERE pronamespace = 11 AND pronargs = 5
25273      AND proargtypes[2] = 'cstring'::regtype;
25274 -- The command should report having updated 90 rows;
25275 -- if not, rollback and investigate instead of committing!
25276 COMMIT;
25277 </programlisting>
25278    </para>
25279
25280    <para>
25281     The above procedure must be carried out in <emphasis>each</> database
25282     of an installation, including <literal>template1</>, and ideally
25283     including <literal>template0</> as well.  If you do not fix the
25284     template databases then any subsequently created databases will contain
25285     the same error.  <literal>template1</> can be fixed in the same way
25286     as any other database, but fixing <literal>template0</> requires
25287     additional steps.  First, from any database issue:
25288 <programlisting>
25289 UPDATE pg_database SET datallowconn = true WHERE datname = 'template0';
25290 </programlisting>
25291      Next connect to <literal>template0</> and perform the above repair
25292      procedure.  Finally, do:
25293 <programlisting>
25294 -- re-freeze template0:
25295 VACUUM FREEZE;
25296 -- and protect it against future alterations:
25297 UPDATE pg_database SET datallowconn = false WHERE datname = 'template0';
25298 </programlisting>
25299    </para>
25300   </sect2>
25301
25302   <sect2>
25303    <title>Changes</title>
25304
25305 <itemizedlist>
25306 <listitem><para>Change encoding function signature to prevent
25307 misuse</para></listitem>
25308 <listitem><para>Repair ancient race condition that allowed a transaction to be
25309 seen as committed for some purposes (eg SELECT FOR UPDATE) slightly sooner
25310 than for other purposes</para>
25311 <para>This is an extremely serious bug since it could lead to apparent
25312 data inconsistencies being briefly visible to applications.</para></listitem>
25313 <listitem><para>Repair race condition between relation extension and
25314 VACUUM</para>
25315 <para>This could theoretically have caused loss of a page's worth of
25316 freshly-inserted data, although the scenario seems of very low probability.
25317 There are no known cases of it having caused more than an Assert failure.
25318 </para></listitem>
25319 <listitem><para>Fix comparisons of <type>TIME WITH TIME ZONE</> values</para>
25320 <para>
25321 The comparison code was wrong in the case where the
25322 <literal>--enable-integer-datetimes</> configuration switch had been used.
25323 NOTE: if you have an index on a <type>TIME WITH TIME ZONE</> column,
25324 it will need to be <command>REINDEX</>ed after installing this update, because
25325 the fix corrects the sort order of column values.
25326 </para></listitem>
25327 <listitem><para>Fix <function>EXTRACT(EPOCH)</> for
25328 <type>TIME WITH TIME ZONE</> values</para></listitem>
25329 <listitem><para>Fix mis-display of negative fractional seconds in
25330 <type>INTERVAL</> values</para>
25331 <para>
25332 This error only occurred when the
25333 <literal>--enable-integer-datetimes</> configuration switch had been used.
25334 </para></listitem>
25335 <listitem><para>Additional buffer overrun checks in plpgsql
25336 (Neil)</para></listitem>
25337 <listitem><para>Fix pg_dump to dump trigger names containing <literal>%</>
25338 correctly (Neil)</para></listitem>
25339 <listitem><para>Prevent <function>to_char(interval)</> from dumping core for
25340 month-related formats</para></listitem>
25341 <listitem><para>Fix <filename>contrib/pgcrypto</> for newer OpenSSL builds
25342 (Marko Kreen)</para></listitem>
25343 <listitem><para>Still more 64-bit fixes for
25344 <filename>contrib/intagg</></para></listitem>
25345 <listitem><para>Prevent incorrect optimization of functions returning
25346 <type>RECORD</></para></listitem>
25347 </itemizedlist>
25348
25349  </sect2>
25350 </sect1>
25351
25352  <sect1 id="release-7-3-9">
25353   <title>Release 7.3.9</title>
25354
25355   <note>
25356   <title>Release date</title>
25357   <simpara>2005-01-31</simpara>
25358   </note>
25359
25360   <para>
25361    This release contains a variety of fixes from 7.3.8, including several
25362    security-related issues.
25363   </para>
25364
25365   <sect2>
25366    <title>Migration to Version 7.3.9</title>
25367
25368    <para>
25369     A dump/restore is not required for those running 7.3.X.
25370    </para>
25371   </sect2>
25372
25373   <sect2>
25374    <title>Changes</title>
25375
25376 <itemizedlist>
25377 <listitem><para>Disallow <command>LOAD</> to non-superusers</para>
25378 <para>
25379 On platforms that will automatically execute initialization functions of a
25380 shared library (this includes at least Windows and ELF-based Unixen),
25381 <command>LOAD</> can be used to make the server execute arbitrary code.
25382 Thanks to NGS Software for reporting this.</para></listitem>
25383 <listitem><para>Check that creator of an aggregate function has the right to
25384 execute the specified transition functions</para>
25385 <para>
25386 This oversight made it possible to bypass denial of EXECUTE
25387 permission on a function.</para></listitem>
25388 <listitem><para>Fix security and 64-bit issues in
25389 contrib/intagg</para></listitem>
25390 <listitem><para>Add needed STRICT marking to some contrib functions (Kris
25391 Jurka)</para></listitem>
25392 <listitem><para>Avoid buffer overrun when plpgsql cursor declaration has too
25393 many parameters (Neil)</para></listitem>
25394 <listitem><para>Fix planning error for FULL and RIGHT outer joins</para>
25395 <para>
25396 The result of the join was mistakenly supposed to be sorted the same as the
25397 left input.  This could not only deliver mis-sorted output to the user, but
25398 in case of nested merge joins could give outright wrong answers.
25399 </para></listitem>
25400 <listitem><para>Fix plperl for quote marks in tuple fields</para></listitem>
25401 <listitem><para>Fix display of negative intervals in SQL and GERMAN
25402 datestyles</para></listitem>
25403 </itemizedlist>
25404
25405  </sect2>
25406 </sect1>
25407
25408  <sect1 id="release-7-3-8">
25409   <title>Release 7.3.8</title>
25410
25411   <note>
25412   <title>Release date</title>
25413   <simpara>2004-10-22</simpara>
25414   </note>
25415
25416   <para>
25417    This release contains a variety of fixes from 7.3.7.
25418   </para>
25419
25420
25421   <sect2>
25422    <title>Migration to Version 7.3.8</title>
25423
25424    <para>
25425     A dump/restore is not required for those running 7.3.X.
25426    </para>
25427   </sect2>
25428
25429   <sect2>
25430    <title>Changes</title>
25431
25432 <itemizedlist>
25433 <listitem><para>Repair possible failure to update hint bits on disk</para>
25434 <para>
25435 Under rare circumstances this oversight could lead to
25436 <quote>could not access transaction status</> failures, which qualifies
25437 it as a potential-data-loss bug.
25438 </para></listitem>
25439 <listitem><para>Ensure that hashed outer join does not miss tuples</para>
25440 <para>
25441 Very large left joins using a hash join plan could fail to output unmatched
25442 left-side rows given just the right data distribution.
25443 </para></listitem>
25444 <listitem><para>Disallow running pg_ctl as root</para>
25445 <para>
25446 This is to guard against any possible security issues.
25447 </para></listitem>
25448 <listitem><para>Avoid using temp files in /tmp in make_oidjoins_check</para>
25449 <para>
25450 This has been reported as a security issue, though it's hardly worthy of
25451 concern since there is no reason for non-developers to use this script anyway.
25452 </para></listitem>
25453 </itemizedlist>
25454
25455  </sect2>
25456 </sect1>
25457
25458  <sect1 id="release-7-3-7">
25459   <title>Release 7.3.7</title>
25460
25461   <note>
25462   <title>Release date</title>
25463   <simpara>2004-08-16</simpara>
25464   </note>
25465
25466   <para>
25467    This release contains one critical fix over 7.3.6, and some minor items.
25468   </para>
25469
25470
25471   <sect2>
25472    <title>Migration to Version 7.3.7</title>
25473
25474    <para>
25475     A dump/restore is not required for those running 7.3.X.
25476    </para>
25477   </sect2>
25478
25479   <sect2>
25480    <title>Changes</title>
25481
25482 <itemizedlist>
25483 <listitem><para>Prevent possible loss of committed transactions during crash</para>
25484 <para>
25485 Due to insufficient interlocking between transaction commit and checkpointing,
25486 it was possible for transactions committed just before the most recent
25487 checkpoint to be lost, in whole or in part, following a database crash and
25488 restart.  This is a serious bug that has existed
25489 since <productname>PostgreSQL</productname> 7.1.
25490 </para></listitem>
25491 <listitem><para>Remove asymmetrical word processing in tsearch (Teodor)</para></listitem>
25492 <listitem><para>Properly schema-qualify function names when pg_dump'ing a CAST</para></listitem>
25493 </itemizedlist>
25494
25495  </sect2>
25496 </sect1>
25497
25498  <sect1 id="release-7-3-6">
25499   <title>Release 7.3.6</title>
25500
25501   <note>
25502   <title>Release date</title>
25503   <simpara>2004-03-02</simpara>
25504   </note>
25505
25506   <para>
25507    This release contains a variety of fixes from 7.3.5.
25508   </para>
25509
25510
25511   <sect2>
25512    <title>Migration to Version 7.3.6</title>
25513
25514    <para>
25515     A dump/restore is <emphasis>not</emphasis> required for those
25516     running 7.3.*.
25517    </para>
25518
25519   </sect2>
25520
25521   <sect2>
25522    <title>Changes</title>
25523
25524 <itemizedlist>
25525 <listitem><para>Revert erroneous changes in rule permissions checking</para>
25526 <para>A patch applied in 7.3.3 to fix a corner case in rule permissions checks
25527 turns out to have disabled rule-related permissions checks in many
25528 not-so-corner cases.  This would for example allow users to insert into views
25529 they weren't supposed to have permission to insert into.  We have therefore
25530 reverted the 7.3.3 patch.  The original bug will be fixed in 8.0.
25531 </para></listitem>
25532 <listitem><para>Repair incorrect order of operations in
25533 GetNewTransactionId()</para>
25534 <para>
25535 This bug could result in failure under out-of-disk-space conditions, including
25536 inability to restart even after disk space is freed.
25537 </para></listitem>
25538 <listitem><para>Ensure configure selects -fno-strict-aliasing even when
25539 an external value for CFLAGS is supplied</para>
25540 <para>
25541 On some platforms, building with -fstrict-aliasing causes bugs.
25542 </para></listitem>
25543 <listitem><para>Make pg_restore handle 64-bit off_t correctly</para>
25544 <para>
25545 This bug prevented proper restoration from archive files exceeding 4 GB.
25546 </para></listitem>
25547 <listitem><para>Make contrib/dblink not assume that local and remote type OIDs
25548 match (Joe)</para></listitem>
25549 <listitem><para>Quote connectby()'s start_with argument properly (Joe)</para></listitem>
25550 <listitem><para>Don't crash when a rowtype argument to a plpgsql function is
25551 NULL</para></listitem>
25552 <listitem><para>Avoid generating invalid character encoding sequences in
25553 corner cases when planning LIKE operations</para></listitem>
25554 <listitem><para>Ensure text_position() cannot scan past end of source string
25555 in multibyte cases (Korea PostgreSQL Users' Group)</para></listitem>
25556 <listitem><para>Fix index optimization and selectivity estimates for LIKE
25557 operations on bytea columns (Joe)</para></listitem>
25558 </itemizedlist>
25559
25560  </sect2>
25561 </sect1>
25562
25563  <sect1 id="release-7-3-5">
25564   <title>Release 7.3.5</title>
25565
25566   <note>
25567   <title>Release date</title>
25568   <simpara>2003-12-03</simpara>
25569   </note>
25570
25571   <para>
25572    This has a variety of fixes from 7.3.4.
25573   </para>
25574
25575
25576   <sect2>
25577    <title>Migration to Version 7.3.5</title>
25578
25579    <para>
25580     A dump/restore is <emphasis>not</emphasis> required for those
25581     running 7.3.*.
25582    </para>
25583   </sect2>
25584
25585   <sect2>
25586    <title>Changes</title>
25587
25588 <itemizedlist>
25589 <listitem><para>Force zero_damaged_pages to be on during recovery from WAL</para></listitem>
25590 <listitem><para>Prevent some obscure cases of <quote>variable not in subplan target lists</quote></para></listitem>
25591 <listitem><para>Force stats processes to detach from shared memory, ensuring cleaner shutdown</para></listitem>
25592 <listitem><para>Make PQescapeBytea and byteaout consistent with each other (Joe)</para></listitem>
25593 <listitem><para>Added missing SPI_finish() calls to dblink's get_tuple_of_interest() (Joe)</para></listitem>
25594 <listitem><para>Fix for possible foreign key violation when rule rewrites INSERT (Jan)</para></listitem>
25595 <listitem><para>Support qualified type names in PL/Tcl's spi_prepare command (Jan)</para></listitem>
25596 <listitem><para>Make pg_dump handle a procedural language handler located in pg_catalog</para></listitem>
25597 <listitem><para>Make pg_dump handle cases where a custom opclass is in another schema</para></listitem>
25598 <listitem><para>Make pg_dump dump binary-compatible casts correctly (Jan)</para></listitem>
25599 <listitem><para>Fix insertion of expressions containing subqueries into rule bodies</para></listitem>
25600 <listitem><para>Fix incorrect argument processing in clusterdb script (Anand Ranganathan)</para></listitem>
25601 <listitem><para>Fix problems with dropped columns in plpython triggers</para></listitem>
25602 <listitem><para>Repair problems with to_char() reading past end of its input string (Karel)</para></listitem>
25603 <listitem><para>Fix GB18030 mapping errors (Tatsuo)</para></listitem>
25604 <listitem><para>Fix several problems with SSL error handling and asynchronous SSL I/O</para></listitem>
25605 <listitem><para>Remove ability to bind a list of values to a single parameter in JDBC
25606 (prevents possible SQL-injection attacks)</para></listitem>
25607 <listitem><para>Fix some errors in HAVE_INT64_TIMESTAMP code paths</para></listitem>
25608 <listitem><para>Fix corner case for btree search in parallel with first root page split</para></listitem>
25609 </itemizedlist>
25610
25611  </sect2>
25612 </sect1>
25613
25614  <sect1 id="release-7-3-4">
25615   <title>Release 7.3.4</title>
25616
25617   <note>
25618   <title>Release date</title>
25619   <simpara>2003-07-24</simpara>
25620   </note>
25621
25622   <para>
25623    This has a variety of fixes from 7.3.3.
25624   </para>
25625
25626
25627   <sect2>
25628    <title>Migration to Version 7.3.4</title>
25629
25630    <para>
25631     A dump/restore is <emphasis>not</emphasis> required for those
25632     running 7.3.*.
25633    </para>
25634   </sect2>
25635
25636   <sect2>
25637    <title>Changes</title>
25638
25639 <itemizedlist>
25640 <listitem><para>Repair breakage in timestamp-to-date conversion for dates before 2000</para></listitem>
25641 <listitem><para>Prevent rare possibility of server startup failure (Tom)</para></listitem>
25642 <listitem><para>Fix bugs in interval-to-time conversion (Tom)</para></listitem>
25643 <listitem><para>Add constraint names in a few places in pg_dump (Rod)</para></listitem>
25644 <listitem><para>Improve performance of functions with many parameters (Tom)</para></listitem>
25645 <listitem><para>Fix to_ascii() buffer overruns (Tom)</para></listitem>
25646 <listitem><para>Prevent restore of database comments from throwing an error (Tom)</para></listitem>
25647 <listitem><para>Work around buggy strxfrm() present in some Solaris releases (Tom)</para></listitem>
25648 <listitem><para>Properly escape jdbc setObject() strings to improve security (Barry)</para></listitem>
25649 </itemizedlist>
25650   </sect2>
25651  </sect1>
25652
25653
25654 <sect1 id="release-7-3-3">
25655  <title>Release 7.3.3</title>
25656
25657  <note>
25658   <title>Release date</title>
25659   <simpara>2003-05-22</simpara>
25660  </note>
25661
25662  <para>
25663   This release contains a variety of fixes for version 7.3.2.
25664  </para>
25665
25666  <sect2>
25667   <title>Migration to Version 7.3.3</title>
25668
25669   <para>
25670    A dump/restore is <emphasis>not</emphasis> required for those
25671    running version 7.3.*.
25672   </para>
25673  </sect2>
25674
25675  <sect2>
25676   <title>Changes</title>
25677
25678 <itemizedlist>
25679 <listitem><para>Repair sometimes-incorrect computation of StartUpID after a crash</para></listitem>
25680 <listitem><para>Avoid slowness with lots of deferred triggers in one transaction (Stephan)</para></listitem>
25681 <listitem><para>Don't lock referenced row when <command>UPDATE</command> doesn't change foreign key's value (Jan)</para></listitem>
25682 <listitem><para>Use <command>-fPIC</command> not <command>-fpic</command> on Sparc (Tom Callaway)</para></listitem>
25683 <listitem><para>Repair lack of schema-awareness in contrib/reindexdb</para></listitem>
25684 <listitem><para>Fix contrib/intarray error for zero-element result array (Teodor)</para></listitem>
25685 <listitem><para>Ensure createuser script will exit on control-C (Oliver)</para></listitem>
25686 <listitem><para>Fix errors when the type of a dropped column has itself been dropped</para></listitem>
25687 <listitem><para><command>CHECKPOINT</command> does not cause database panic on failure in noncritical steps</para></listitem>
25688 <listitem><para>Accept 60 in seconds fields of timestamp, time, interval input values</para></listitem>
25689 <listitem><para>Issue notice, not error, if <type>TIMESTAMP</type>,
25690 <type> TIME</type>, or <type>INTERVAL</type> precision too large</para></listitem>
25691 <listitem><para>Fix <function>abstime-to-time</function> cast function (fix is
25692       not applied unless you <application>initdb</application>)</para></listitem>
25693 <listitem><para>Fix <application>pg_proc</application> entry for
25694      <type>timestampt_izone</type> (fix is not applied unless you
25695        <application>initdb</application>)</para></listitem>
25696 <listitem><para>Make <function>EXTRACT(EPOCH FROM timestamp without time zone)</function> treat input as local time</para></listitem>
25697 <listitem><para><command>'now'::timestamptz</command> gave wrong answer if timezone changed earlier in transaction</para></listitem>
25698 <listitem><para><envar>HAVE_INT64_TIMESTAMP</envar> code for time with timezone overwrote its input</para></listitem>
25699 <listitem><para>Accept <command>GLOBAL TEMP/TEMPORARY</command> as a
25700       synonym for <command>TEMPORARY</command></para></listitem>
25701 <listitem><para>Avoid improper schema-privilege-check failure in foreign-key triggers</para></listitem>
25702 <listitem><para>Fix bugs in foreign-key triggers for <command>SET DEFAULT</command> action</para></listitem>
25703 <listitem><para>Fix incorrect time-qual check in row fetch for
25704       <command>UPDATE</command> and <command>DELETE</command> triggers</para></listitem>
25705 <listitem><para>Foreign-key clauses were parsed but ignored in
25706       <command>ALTER TABLE ADD COLUMN</command></para></listitem>
25707 <listitem><para>Fix createlang script breakage for case where handler function already exists</para></listitem>
25708 <listitem><para>Fix misbehavior on zero-column tables in <application>pg_dump</application>, COPY, ANALYZE, other places</para></listitem>
25709 <listitem><para>Fix misbehavior of <function>func_error()</function> on type names containing '%'</para></listitem>
25710 <listitem><para>Fix misbehavior of <function>replace()</function> on strings containing '%'</para></listitem>
25711 <listitem><para>Regular-expression patterns containing certain multibyte characters failed</para></listitem>
25712 <listitem><para>Account correctly for <command>NULL</command>s in more cases in join size estimation</para></listitem>
25713 <listitem><para>Avoid conflict with system definition of <function>isblank()</function> function or macro</para></listitem>
25714 <listitem><para>Fix failure to convert large code point values in EUC_TW conversions (Tatsuo)</para></listitem>
25715 <listitem><para>Fix error recovery for <function>SSL_read</function>/<function>SSL_write</function> calls</para></listitem>
25716 <listitem><para>Don't do early constant-folding of type coercion expressions</para></listitem>
25717 <listitem><para>Validate page header fields immediately after reading in any page</para></listitem>
25718 <listitem><para>Repair incorrect check for ungrouped variables in unnamed joins</para></listitem>
25719 <listitem><para>Fix buffer overrun in <function>to_ascii</function> (Guido Notari)</para></listitem>
25720 <listitem><para>contrib/ltree fixes (Teodor)</para></listitem>
25721 <listitem><para>Fix core dump in deadlock detection on machines where char is unsigned</para></listitem>
25722 <listitem><para>Avoid running out of buffers in many-way indexscan (bug introduced in 7.3)</para></listitem>
25723 <listitem><para>Fix planner's selectivity estimation functions to handle domains properly</para></listitem>
25724 <listitem><para>Fix <application>dbmirror</application> memory-allocation bug (Steven Singer)</para></listitem>
25725 <listitem><para>Prevent infinite loop in <function>ln(numeric)</function> due to roundoff error</para></listitem>
25726 <listitem><para><command>GROUP BY</command> got confused if there were multiple equal GROUP BY items</para></listitem>
25727 <listitem><para>Fix bad plan when inherited <command>UPDATE</command>/<command>DELETE</command> references another inherited table</para></listitem>
25728 <listitem><para>Prevent clustering on incomplete (partial or non-NULL-storing) indexes</para></listitem>
25729 <listitem><para>Service shutdown request at proper time if it arrives while still starting up</para></listitem>
25730 <listitem><para>Fix left-links in temporary indexes (could make backwards scans miss entries)</para></listitem>
25731 <listitem><para>Fix incorrect handling of client_encoding setting in postgresql.conf (Tatsuo)</para></listitem>
25732 <listitem><para>Fix failure to respond to <command>pg_ctl stop -m fast</command> after Async_NotifyHandler runs</para></listitem>
25733 <listitem><para>Fix SPI for case where rule contains multiple statements of the same type</para></listitem>
25734 <listitem><para>Fix problem with checking for wrong type of access privilege in rule query</para></listitem>
25735 <listitem><para>Fix problem with <command>EXCEPT</command> in <command>CREATE RULE</command></para></listitem>
25736 <listitem><para>Prevent problem with dropping temp tables having serial columns</para></listitem>
25737 <listitem><para>Fix replace_vars_with_subplan_refs failure in complex views</para></listitem>
25738 <listitem><para>Fix regexp slowness in single-byte encodings (Tatsuo)</para></listitem>
25739 <listitem><para>Allow qualified type names in <command>CREATE CAST</command>
25740       and <command> DROP CAST</command></para></listitem>
25741 <listitem><para>Accept <function>SETOF type[]</function>, which formerly had to
25742       be written <function>SETOF _type</function></para></listitem>
25743 <listitem><para>Fix <application>pg_dump</application> core dump in some cases with procedural languages</para></listitem>
25744 <listitem><para>Force ISO datestyle in <application>pg_dump</application> output, for portability (Oliver)</para></listitem>
25745 <listitem><para><application>pg_dump</application> failed to handle error return
25746       from <function>lo_read</function> (Oleg Drokin)</para></listitem>
25747 <listitem><para><application>pg_dumpall</application> failed with groups having no members (Nick Eskelinen)</para></listitem>
25748 <listitem><para><application>pg_dumpall</application> failed to recognize --globals-only switch</para></listitem>
25749 <listitem><para>pg_restore failed to restore blobs if -X disable-triggers is specified</para></listitem>
25750 <listitem><para>Repair intrafunction memory leak in plpgsql</para></listitem>
25751 <listitem><para>pltcl's <command>elog</command> command dumped core if given wrong parameters (Ian Harding)</para></listitem>
25752 <listitem><para>plpython used wrong value of <envar>atttypmod</envar> (Brad McLean)</para></listitem>
25753 <listitem><para>Fix improper quoting of boolean values in Python interface (D'Arcy)</para></listitem>
25754 <listitem><para>Added <function>addDataType()</function> method to PGConnection interface for JDBC</para></listitem>
25755 <listitem><para>Fixed various problems with updateable ResultSets for JDBC (Shawn Green)</para></listitem>
25756 <listitem><para>Fixed various problems with DatabaseMetaData for JDBC (Kris Jurka, Peter Royal)</para></listitem>
25757 <listitem><para>Fixed problem with parsing table ACLs in JDBC</para></listitem>
25758 <listitem><para>Better error message for character set conversion problems in JDBC</para></listitem>
25759 </itemizedlist>
25760  </sect2>
25761 </sect1>
25762
25763
25764 <sect1 id="release-7-3-2">
25765  <title>Release 7.3.2</title>
25766
25767  <note>
25768   <title>Release date</title>
25769   <simpara>2003-02-04</simpara>
25770  </note>
25771
25772  <para>
25773   This release contains a variety of fixes for version 7.3.1.
25774  </para>
25775
25776
25777  <sect2>
25778   <title>Migration to Version 7.3.2</title>
25779
25780   <para>
25781    A dump/restore is <emphasis>not</emphasis> required for those
25782    running version 7.3.*.
25783   </para>
25784  </sect2>
25785
25786  <sect2>
25787   <title>Changes</title>
25788
25789 <itemizedlist>
25790 <listitem><para>Restore creation of OID column in CREATE TABLE AS / SELECT INTO</para></listitem>
25791 <listitem><para>Fix <application>pg_dump</> core dump when dumping views having comments</para></listitem>
25792 <listitem><para>Dump DEFERRABLE/INITIALLY DEFERRED constraints properly</para></listitem>
25793 <listitem><para>Fix UPDATE when child table's column numbering differs from parent</para></listitem>
25794 <listitem><para>Increase default value of max_fsm_relations</para></listitem>
25795 <listitem><para>Fix problem when fetching backwards in a cursor for a single-row query</para></listitem>
25796 <listitem><para>Make backward fetch work properly with cursor on SELECT DISTINCT query</para></listitem>
25797 <listitem><para>Fix problems with loading <application>pg_dump</> files containing contrib/lo usage</para></listitem>
25798 <listitem><para>Fix problem with all-numeric user names</para></listitem>
25799 <listitem><para>Fix possible memory leak and core dump during disconnect in libpgtcl</para></listitem>
25800 <listitem><para>Make plpython's spi_execute command handle nulls properly (Andrew Bosma)</para></listitem>
25801 <listitem><para>Adjust plpython error reporting so that its regression test passes again</para></listitem>
25802 <listitem><para>Work with bison 1.875</para></listitem>
25803 <listitem><para>Handle mixed-case names properly in plpgsql's %type (Neil)</para></listitem>
25804 <listitem><para>Fix core dump in pltcl when executing a query rewritten by a rule</para></listitem>
25805 <listitem><para>Repair array subscript overruns (per report from Yichen Xie)</para></listitem>
25806 <listitem><para>Reduce MAX_TIME_PRECISION from 13 to 10 in floating-point case</para></listitem>
25807 <listitem><para>Correctly case-fold variable names in per-database and per-user settings</para></listitem>
25808 <listitem><para>Fix coredump in plpgsql's RETURN NEXT when SELECT into record returns no rows</para></listitem>
25809 <listitem><para>Fix outdated use of pg_type.typprtlen in python client interface</para></listitem>
25810 <listitem><para>Correctly handle fractional seconds in timestamps in JDBC driver</para></listitem>
25811 <listitem><para>Improve performance of getImportedKeys() in JDBC</para></listitem>
25812 <listitem><para>Make shared-library symlinks work standardly on HPUX (Giles)</para></listitem>
25813 <listitem><para>Repair inconsistent rounding behavior for timestamp, time, interval</para></listitem>
25814 <listitem><para>SSL negotiation fixes (Nathan Mueller)</para></listitem>
25815 <listitem><para>Make libpq's ~/.pgpass feature work when connecting with PQconnectDB</para></listitem>
25816 <listitem><para>Update my2pg, ora2pg</para></listitem>
25817 <listitem><para>Translation updates</para></listitem>
25818 <listitem><para>Add casts between types lo and oid in contrib/lo</para></listitem>
25819 <listitem><para>fastpath code now checks for privilege to call function</para></listitem>
25820 </itemizedlist>
25821  </sect2>
25822 </sect1>
25823
25824
25825 <sect1 id="release-7-3-1">
25826  <title>Release 7.3.1</title>
25827
25828  <note>
25829   <title>Release date</title>
25830   <simpara>2002-12-18</simpara>
25831  </note>
25832
25833  <para>
25834   This release contains a variety of fixes for version 7.3.
25835  </para>
25836
25837
25838  <sect2>
25839   <title>Migration to Version 7.3.1</title>
25840
25841   <para>
25842    A dump/restore is <emphasis>not</emphasis> required for those
25843    running version 7.3. However, it should be noted that the main
25844    <productname>PostgreSQL</productname> interface library, libpq,
25845    has a new major version number for this release, which might require
25846    recompilation of client code in certain cases.
25847   </para>
25848  </sect2>
25849
25850  <sect2>
25851   <title>Changes</title>
25852
25853 <itemizedlist>
25854 <listitem><para>Fix a core dump of COPY TO when client/server encodings don't match (Tom)</para></listitem>
25855 <listitem><para>Allow <application>pg_dump</> to work with pre-7.2 servers (Philip)</para></listitem>
25856 <listitem><para>contrib/adddepend fixes (Tom)</para></listitem>
25857 <listitem><para>Fix problem with deletion of per-user/per-database config settings (Tom)</para></listitem>
25858 <listitem><para>contrib/vacuumlo fix (Tom)</para></listitem>
25859 <listitem><para>Allow 'password' encryption even when pg_shadow contains MD5 passwords (Bruce)</para></listitem>
25860 <listitem><para>contrib/dbmirror fix (Steven Singer)</para></listitem>
25861 <listitem><para>Optimizer fixes (Tom)</para></listitem>
25862 <listitem><para>contrib/tsearch fixes (Teodor Sigaev, Magnus)</para></listitem>
25863 <listitem><para>Allow locale names to be mixed case (Nicolai Tufar)</para></listitem>
25864 <listitem><para>Increment libpq library's major version number (Bruce)</para></listitem>
25865 <listitem><para>pg_hba.conf error reporting fixes (Bruce, Neil)</para></listitem>
25866 <listitem><para>Add SCO Openserver 5.0.4 as a supported platform (Bruce)</para></listitem>
25867 <listitem><para>Prevent EXPLAIN from crashing server (Tom)</para></listitem>
25868 <listitem><para>SSL fixes (Nathan Mueller)</para></listitem>
25869 <listitem><para>Prevent composite column creation via ALTER TABLE (Tom)</para></listitem>
25870 </itemizedlist>
25871  </sect2>
25872 </sect1>
25873
25874
25875 <sect1 id="release-7-3">
25876  <title>Release 7.3</title>
25877
25878  <note>
25879   <title>Release date</title>
25880   <simpara>2002-11-27</simpara>
25881  </note>
25882
25883  <sect2>
25884   <title>Overview</title>
25885
25886   <para>
25887    Major changes in this release:
25888   </para>
25889
25890   <variablelist>
25891    <varlistentry>
25892     <term>Schemas</term>
25893     <listitem>
25894      <para>
25895       Schemas allow users to create objects in separate namespaces,
25896       so two people or applications can have tables with the same
25897       name. There is also a public schema for shared tables.
25898       Table/index creation can be restricted by removing privileges
25899       on the public schema.
25900      </para>
25901     </listitem>
25902    </varlistentry>
25903
25904    <varlistentry>
25905     <term>Drop Column</term>
25906     <listitem>
25907      <para>
25908       <productname>PostgreSQL</productname> now supports the
25909       <literal>ALTER TABLE ... DROP COLUMN</literal> functionality.
25910      </para>
25911     </listitem>
25912    </varlistentry>
25913
25914    <varlistentry>
25915     <term>Table Functions</term>
25916     <listitem>
25917      <para>
25918       Functions returning multiple rows and/or multiple columns are
25919       now much easier to use than before.  You can call such a
25920       <quote>table function</quote> in the <literal>SELECT</literal>
25921       <literal>FROM</literal> clause, treating its output like a
25922       table. Also, <application>PL/pgSQL</application> functions can
25923       now return sets.
25924      </para>
25925     </listitem>
25926    </varlistentry>
25927
25928    <varlistentry>
25929     <term>Prepared Queries</term>
25930     <listitem>
25931      <para>
25932       <productname>PostgreSQL</productname> now supports prepared
25933       queries, for improved performance.
25934      </para>
25935     </listitem>
25936    </varlistentry>
25937
25938    <varlistentry>
25939     <term>Dependency Tracking</term>
25940     <listitem>
25941      <para>
25942       <productname>PostgreSQL</productname> now records object
25943       dependencies, which allows improvements in many areas.
25944       <command>DROP</command> statements now take either
25945       <literal>CASCADE</> or <literal>RESTRICT</> to control whether
25946       dependent objects are also dropped.
25947      </para>
25948     </listitem>
25949    </varlistentry>
25950
25951    <varlistentry>
25952     <term>Privileges</term>
25953     <listitem>
25954      <para>
25955       Functions and procedural languages now have privileges, and
25956       functions can be defined to run with the privileges of their
25957       creator.
25958      </para>
25959     </listitem>
25960    </varlistentry>
25961
25962    <varlistentry>
25963     <term>Internationalization</term>
25964     <listitem>
25965      <para>
25966       Both multibyte and locale support are now always enabled.
25967      </para>
25968     </listitem>
25969    </varlistentry>
25970
25971    <varlistentry>
25972     <term>Logging</term>
25973     <listitem>
25974      <para>
25975       A variety of logging options have been enhanced.
25976      </para>
25977     </listitem>
25978    </varlistentry>
25979
25980    <varlistentry>
25981     <term>Interfaces</term>
25982     <listitem>
25983      <para>
25984       A large number of interfaces have been moved to <ulink
25985       url="http://gborg.postgresql.org">http://gborg.postgresql.org</>
25986       where they can be developed and released independently.
25987      </para>
25988     </listitem>
25989    </varlistentry>
25990
25991    <varlistentry>
25992     <term>Functions/Identifiers</term>
25993     <listitem>
25994      <para>
25995       By default, functions can now take up to 32 parameters, and
25996       identifiers can be up to 63 bytes long.  Also, <literal>OPAQUE</>
25997       is now deprecated: there are specific <quote>pseudo-datatypes</>
25998       to represent each of the former meanings of <literal>OPAQUE</>
25999       in function argument and result types.
26000      </para>
26001     </listitem>
26002    </varlistentry>
26003
26004   </variablelist>
26005  </sect2>
26006
26007  <sect2>
26008   <title>Migration to Version 7.3</title>
26009
26010   <para>
26011    A dump/restore using <application>pg_dump</> is required for those
26012    wishing to migrate data from any previous release. If your
26013    application examines the system catalogs, additional changes will
26014    be required due to the introduction of schemas in 7.3; for more
26015    information, see: <ulink
26016    url="http://developer.postgresql.org/~momjian/upgrade_tips_7.3"></>.
26017   </para>
26018
26019   <para>
26020    Observe the following incompatibilities:
26021   </para>
26022
26023   <itemizedlist>
26024    <listitem>
26025     <para>
26026      Pre-6.3 clients are no longer supported.
26027     </para>
26028    </listitem>
26029
26030    <listitem>
26031     <para>
26032      <filename>pg_hba.conf</filename> now has a column for the user
26033      name and additional features.  Existing files need to be
26034      adjusted.
26035     </para>
26036    </listitem>
26037
26038    <listitem>
26039     <para>
26040      Several <filename>postgresql.conf</filename> logging parameters
26041      have been renamed.
26042     </para>
26043    </listitem>
26044
26045    <listitem>
26046     <para>
26047      <literal>LIMIT #,#</literal> has been disabled; use
26048      <literal>LIMIT # OFFSET #</literal>.
26049     </para>
26050    </listitem>
26051
26052    <listitem>
26053     <para>
26054      <command>INSERT</command> statements with column lists must
26055      specify a value for each specified column. For example,
26056      <literal>INSERT INTO tab (col1, col2) VALUES ('val1')</literal>
26057      is now invalid.  It's still allowed to supply fewer columns than
26058      expected if the <command>INSERT</command> does not have a column list.
26059     </para>
26060    </listitem>
26061
26062    <listitem>
26063     <para>
26064      <type>serial</type> columns are no longer automatically
26065      <literal>UNIQUE</>; thus, an index will not automatically be
26066      created.
26067     </para>
26068    </listitem>
26069
26070    <listitem>
26071     <para>
26072      A <command>SET</command> command inside an aborted transaction
26073      is now rolled back.
26074     </para>
26075    </listitem>
26076
26077    <listitem>
26078     <para>
26079      <command>COPY</command> no longer considers missing trailing
26080      columns to be null.  All columns need to be specified.
26081      (However, one can achieve a similar effect by specifying a
26082      column list in the <command>COPY</command> command.)
26083     </para>
26084    </listitem>
26085
26086    <listitem>
26087     <para>
26088      The data type <type>timestamp</type> is now equivalent to
26089      <type>timestamp without time zone</type>, instead of
26090      <type>timestamp with time zone</type>.
26091     </para>
26092    </listitem>
26093
26094    <listitem>
26095     <para>
26096      Pre-7.3 databases loaded into 7.3 will not have the new object
26097      dependencies for <type>serial</type> columns, unique
26098      constraints, and foreign keys. See the directory
26099      <filename>contrib/adddepend/</filename> for a detailed
26100      description and a script that will add such dependencies.
26101     </para>
26102    </listitem>
26103
26104    <listitem>
26105     <para>
26106      An empty string (<literal>''</literal>) is no longer allowed as
26107      the input into an integer field.  Formerly, it was silently
26108      interpreted as 0.
26109     </para>
26110    </listitem>
26111
26112   </itemizedlist>
26113  </sect2>
26114
26115  <sect2>
26116   <title>Changes</title>
26117
26118   <sect3>
26119    <title>Server Operation</title>
26120 <itemizedlist>
26121 <listitem><para>Add pg_locks view to show locks (Neil)</para></listitem>
26122 <listitem><para>Security fixes for password negotiation memory allocation (Neil)</para></listitem>
26123 <listitem><para>Remove support for version 0 FE/BE protocol (<productname>PostgreSQL</productname> 6.2 and earlier) (Tom)</para></listitem>
26124 <listitem><para>Reserve the last few backend slots for superusers, add parameter superuser_reserved_connections to control this (Nigel J. Andrews)</para></listitem>
26125 </itemizedlist>
26126   </sect3>
26127
26128   <sect3>
26129    <title>Performance</title>
26130 <itemizedlist>
26131 <listitem><para>Improve startup by calling localtime() only once (Tom)</para></listitem>
26132 <listitem><para>Cache system catalog information in flat files for faster startup (Tom)</para></listitem>
26133 <listitem><para>Improve caching of index information (Tom)</para></listitem>
26134 <listitem><para>Optimizer improvements (Tom, Fernando Nasser)</para></listitem>
26135 <listitem><para>Catalog caches now store failed lookups (Tom)</para></listitem>
26136 <listitem><para>Hash function improvements (Neil)</para></listitem>
26137 <listitem><para>Improve performance of query tokenization and network handling (Peter)</para></listitem>
26138 <listitem><para>Speed improvement for large object restore (Mario Weilguni)</para></listitem>
26139 <listitem><para>Mark expired index entries on first lookup, saving later heap fetches (Tom)</para></listitem>
26140 <listitem><para>Avoid excessive NULL bitmap padding (Manfred Koizar)</para></listitem>
26141 <listitem><para>Add BSD-licensed qsort() for Solaris, for performance (Bruce)</para></listitem>
26142 <listitem><para>Reduce per-row overhead by four bytes (Manfred Koizar)</para></listitem>
26143 <listitem><para>Fix GEQO optimizer bug (Neil Conway)</para></listitem>
26144 <listitem><para>Make WITHOUT OID actually save four bytes per row (Manfred Koizar)</para></listitem>
26145 <listitem><para>Add default_statistics_target variable to specify ANALYZE buckets (Neil)</para></listitem>
26146 <listitem><para>Use local buffer cache for temporary tables so no WAL overhead (Tom)</para></listitem>
26147 <listitem><para>Improve free space map performance on large tables (Stephen Marshall, Tom)</para></listitem>
26148 <listitem><para>Improved WAL write concurrency (Tom)</para></listitem>
26149 </itemizedlist>
26150   </sect3>
26151
26152   <sect3>
26153    <title>Privileges</title>
26154 <itemizedlist>
26155 <listitem><para>Add privileges on functions and procedural languages (Peter)</para></listitem>
26156 <listitem><para>Add OWNER to CREATE DATABASE so superusers can create databases on behalf of unprivileged users (Gavin Sherry, Tom)</para></listitem>
26157 <listitem><para>Add new object privilege bits EXECUTE and USAGE (Tom)</para></listitem>
26158 <listitem><para>Add SET SESSION AUTHORIZATION DEFAULT and RESET SESSION AUTHORIZATION (Tom)</para></listitem>
26159 <listitem><para>Allow functions to be executed with the privilege of the function owner (Peter)</para></listitem>
26160 </itemizedlist>
26161   </sect3>
26162
26163   <sect3>
26164    <title>Server Configuration</title>
26165 <itemizedlist>
26166 <listitem><para>Server log messages now tagged with LOG, not DEBUG (Bruce)</para></listitem>
26167 <listitem><para>Add user column to pg_hba.conf (Bruce)</para></listitem>
26168 <listitem><para>Have log_connections output two lines in log file (Tom)</para></listitem>
26169 <listitem><para>Remove debug_level from postgresql.conf, now server_min_messages (Bruce)</para></listitem>
26170 <listitem><para>New ALTER DATABASE/USER ... SET command for per-user/database initialization (Peter)</para></listitem>
26171 <listitem><para>New parameters server_min_messages and client_min_messages to control which messages are sent to the server logs or client applications (Bruce)</para></listitem>
26172 <listitem><para>Allow pg_hba.conf to specify lists of users/databases separated by commas, group names prepended with +, and file names prepended with @ (Bruce)</para></listitem>
26173 <listitem><para>Remove secondary password file capability and pg_password utility (Bruce)</para></listitem>
26174 <listitem><para>Add variable db_user_namespace for database-local user names (Bruce)</para></listitem>
26175 <listitem><para>SSL improvements (Bear Giles)</para></listitem>
26176 <listitem><para>Make encryption of stored passwords the default (Bruce)</para></listitem>
26177 <listitem><para>Allow pg_statistics to be reset by calling pg_stat_reset() (Christopher)</para></listitem>
26178 <listitem><para>Add log_duration parameter (Bruce)</para></listitem>
26179 <listitem><para>Rename debug_print_query to log_statement (Bruce)</para></listitem>
26180 <listitem><para>Rename show_query_stats to show_statement_stats (Bruce)</para></listitem>
26181 <listitem><para>Add param log_min_error_statement to print commands to logs on error (Gavin)</para></listitem>
26182 </itemizedlist>
26183   </sect3>
26184
26185   <sect3>
26186    <title>Queries</title>
26187 <itemizedlist>
26188 <listitem><para>Make cursors insensitive, meaning their contents do not change (Tom)</para></listitem>
26189 <listitem><para>Disable LIMIT #,# syntax; now only LIMIT # OFFSET # supported (Bruce)</para></listitem>
26190 <listitem><para>Increase identifier length to 63 (Neil, Bruce)</para></listitem>
26191 <listitem><para>UNION fixes for merging &gt;= 3 columns of different lengths (Tom)</para></listitem>
26192 <listitem><para>Add DEFAULT key word to INSERT, e.g., INSERT ... (..., DEFAULT, ...) (Rod)</para></listitem>
26193 <listitem><para>Allow views to have default values using ALTER COLUMN ... SET DEFAULT (Neil)</para></listitem>
26194 <listitem><para>Fail on INSERTs with column lists that don't supply all column values, e.g., INSERT INTO tab (col1, col2) VALUES ('val1');  (Rod)</para></listitem>
26195 <listitem><para>Fix for join aliases (Tom)</para></listitem>
26196 <listitem><para>Fix for FULL OUTER JOINs (Tom)</para></listitem>
26197 <listitem><para>Improve reporting of invalid identifier and location (Tom, Gavin)</para></listitem>
26198 <listitem><para>Fix OPEN cursor(args) (Tom)</para></listitem>
26199 <listitem><para>Allow 'ctid' to be used in a view and currtid(viewname) (Hiroshi)</para></listitem>
26200 <listitem><para>Fix for CREATE TABLE AS with UNION (Tom)</para></listitem>
26201 <listitem><para>SQL99 syntax improvements (Thomas)</para></listitem>
26202 <listitem><para>Add statement_timeout variable to cancel queries (Bruce)</para></listitem>
26203 <listitem><para>Allow prepared queries with PREPARE/EXECUTE (Neil)</para></listitem>
26204 <listitem><para>Allow FOR UPDATE to appear after LIMIT/OFFSET (Bruce)</para></listitem>
26205 <listitem><para>Add variable autocommit (Tom, David Van Wie)</para></listitem>
26206 </itemizedlist>
26207   </sect3>
26208
26209   <sect3>
26210    <title>Object Manipulation</title>
26211 <itemizedlist>
26212 <listitem><para>Make equals signs optional in CREATE DATABASE (Gavin Sherry)</para></listitem>
26213 <listitem><para>Make ALTER TABLE OWNER change index ownership too (Neil)</para></listitem>
26214 <listitem><para>New ALTER TABLE tabname ALTER COLUMN colname SET STORAGE controls TOAST storage, compression (John Gray)</para></listitem>
26215 <listitem><para>Add schema support, CREATE/DROP SCHEMA (Tom)</para></listitem>
26216 <listitem><para>Create schema for temporary tables (Tom)</para></listitem>
26217 <listitem><para>Add variable search_path for schema search (Tom)</para></listitem>
26218 <listitem><para>Add ALTER TABLE SET/DROP NOT NULL (Christopher)</para></listitem>
26219 <listitem><para>New CREATE FUNCTION volatility levels (Tom)</para></listitem>
26220 <listitem><para>Make rule names unique only per table (Tom)</para></listitem>
26221 <listitem><para>Add 'ON tablename' clause to DROP RULE and COMMENT ON RULE (Tom)</para></listitem>
26222 <listitem><para>Add ALTER TRIGGER RENAME (Joe)</para></listitem>
26223 <listitem><para>New current_schema() and current_schemas() inquiry functions (Tom)</para></listitem>
26224 <listitem><para>Allow functions to return multiple rows (table functions) (Joe)</para></listitem>
26225 <listitem><para>Make WITH optional in CREATE DATABASE, for consistency (Bruce)</para></listitem>
26226 <listitem><para>Add object dependency tracking (Rod, Tom)</para></listitem>
26227 <listitem><para>Add RESTRICT/CASCADE to DROP commands (Rod)</para></listitem>
26228 <listitem><para>Add ALTER TABLE DROP for non-CHECK CONSTRAINT (Rod)</para></listitem>
26229 <listitem><para>Autodestroy sequence on DROP of table with SERIAL (Rod)</para></listitem>
26230 <listitem><para>Prevent column dropping if column is used by foreign key (Rod)</para></listitem>
26231 <listitem><para>Automatically drop constraints/functions when object is dropped (Rod)</para></listitem>
26232 <listitem><para>Add CREATE/DROP OPERATOR CLASS (Bill Studenmund, Tom)</para></listitem>
26233 <listitem><para>Add ALTER TABLE DROP COLUMN (Christopher, Tom, Hiroshi)</para></listitem>
26234 <listitem><para>Prevent inherited columns from being removed or renamed (Alvaro Herrera)</para></listitem>
26235 <listitem><para>Fix foreign key constraints to not error on intermediate database states (Stephan)</para></listitem>
26236 <listitem><para>Propagate column or table renaming to foreign key constraints</para></listitem>
26237 <listitem><para>Add CREATE OR REPLACE VIEW (Gavin, Neil, Tom)</para></listitem>
26238 <listitem><para>Add CREATE OR REPLACE RULE (Gavin, Neil, Tom)</para></listitem>
26239 <listitem><para>Have rules execute alphabetically, returning more predictable values (Tom)</para></listitem>
26240 <listitem><para>Triggers are now fired in alphabetical order (Tom)</para></listitem>
26241 <listitem><para>Add /contrib/adddepend to handle pre-7.3 object dependencies (Rod)</para></listitem>
26242 <listitem><para>Allow better casting when inserting/updating values (Tom)</para></listitem>
26243 </itemizedlist>
26244   </sect3>
26245
26246   <sect3>
26247    <title>Utility Commands</title>
26248 <itemizedlist>
26249 <listitem><para>Have COPY TO output embedded carriage returns and newlines as \r and \n (Tom)</para></listitem>
26250 <listitem><para>Allow DELIMITER in COPY FROM to be 8-bit clean (Tatsuo)</para></listitem>
26251 <listitem><para>Make <application>pg_dump</> use ALTER TABLE ADD PRIMARY KEY, for performance (Neil)</para></listitem>
26252 <listitem><para>Disable brackets in multistatement rules (Bruce)</para></listitem>
26253 <listitem><para>Disable VACUUM from being called inside a function (Bruce)</para></listitem>
26254 <listitem><para>Allow dropdb and other scripts to use identifiers with spaces (Bruce)</para></listitem>
26255 <listitem><para>Restrict database comment changes to the current database</para></listitem>
26256 <listitem><para>Allow comments on operators, independent of the underlying function (Rod)</para></listitem>
26257 <listitem><para>Rollback SET commands in aborted transactions (Tom)</para></listitem>
26258 <listitem><para>EXPLAIN now outputs as a query (Tom)</para></listitem>
26259 <listitem><para>Display condition expressions and sort keys in EXPLAIN (Tom)</para></listitem>
26260 <listitem><para>Add 'SET LOCAL var = value' to set configuration variables for a single transaction (Tom)</para></listitem>
26261 <listitem><para>Allow ANALYZE to run in a transaction (Bruce)</para></listitem>
26262 <listitem><para>Improve COPY syntax using new WITH clauses, keep backward compatibility (Bruce)</para></listitem>
26263 <listitem><para>Fix <application>pg_dump</> to consistently output tags in non-ASCII dumps (Bruce)</para></listitem>
26264 <listitem><para>Make foreign key constraints clearer in dump file (Rod)</para></listitem>
26265 <listitem><para>Add COMMENT ON CONSTRAINT (Rod)</para></listitem>
26266 <listitem><para>Allow COPY TO/FROM to specify column names (Brent Verner)</para></listitem>
26267 <listitem><para>Dump UNIQUE and PRIMARY KEY constraints as ALTER TABLE (Rod)</para></listitem>
26268 <listitem><para>Have SHOW output a query result (Joe)</para></listitem>
26269 <listitem><para>Generate failure on short COPY lines rather than pad NULLs (Neil)</para></listitem>
26270 <listitem><para>Fix CLUSTER to preserve all table attributes (Alvaro Herrera)</para></listitem>
26271 <listitem><para>New pg_settings table to view/modify GUC settings (Joe)</para></listitem>
26272 <listitem><para>Add smart quoting, portability improvements to <application>pg_dump</> output (Peter)</para></listitem>
26273 <listitem><para>Dump serial columns out as SERIAL (Tom)</para></listitem>
26274 <listitem><para>Enable large file support, &gt;2G for <application>pg_dump</> (Peter, Philip Warner, Bruce)</para></listitem>
26275 <listitem><para>Disallow TRUNCATE on tables that are involved in referential constraints (Rod)</para></listitem>
26276 <listitem><para>Have TRUNCATE also auto-truncate the toast table of the relation (Tom)</para></listitem>
26277 <listitem><para>Add clusterdb utility that will auto-cluster an entire database based on previous CLUSTER operations (Alvaro Herrera)</para></listitem>
26278 <listitem><para>Overhaul pg_dumpall (Peter)</para></listitem>
26279 <listitem><para>Allow REINDEX of TOAST tables (Tom)</para></listitem>
26280 <listitem><para>Implemented START TRANSACTION, per SQL99 (Neil)</para></listitem>
26281 <listitem><para>Fix rare index corruption when a page split affects bulk delete (Tom)</para></listitem>
26282 <listitem><para>Fix ALTER TABLE ... ADD COLUMN for inheritance (Alvaro Herrera)</para></listitem>
26283 </itemizedlist>
26284   </sect3>
26285
26286   <sect3>
26287    <title>Data Types and Functions</title>
26288 <itemizedlist>
26289 <listitem><para>Fix factorial(0) to return 1 (Bruce)</para></listitem>
26290 <listitem><para>Date/time/timezone improvements (Thomas)</para></listitem>
26291 <listitem><para>Fix for array slice extraction (Tom)</para></listitem>
26292 <listitem><para>Fix extract/date_part to report proper microseconds for timestamp (Tatsuo)</para></listitem>
26293 <listitem><para>Allow text_substr() and bytea_substr() to read TOAST values more efficiently (John Gray)</para></listitem>
26294 <listitem><para>Add domain support (Rod)</para></listitem>
26295 <listitem><para>Make WITHOUT TIME ZONE the default for TIMESTAMP and TIME data types (Thomas)</para></listitem>
26296 <listitem><para>Allow alternate storage scheme of 64-bit integers for date/time types using --enable-integer-datetimes in configure (Thomas)</para></listitem>
26297 <listitem><para>Make timezone(timestamptz) return timestamp rather than a string (Thomas)</para></listitem>
26298 <listitem><para>Allow fractional seconds in date/time types for dates prior to 1BC (Thomas)</para></listitem>
26299 <listitem><para>Limit timestamp data types to 6 decimal places of precision (Thomas)</para></listitem>
26300 <listitem><para>Change timezone conversion functions from timetz() to timezone() (Thomas)</para></listitem>
26301 <listitem><para>Add configuration variables datestyle and timezone (Tom)</para></listitem>
26302 <listitem><para>Add OVERLAY(), which allows substitution of a substring in a string (Thomas)</para></listitem>
26303 <listitem><para>Add SIMILAR TO (Thomas, Tom)</para></listitem>
26304 <listitem><para>Add regular expression SUBSTRING(string FROM pat FOR escape) (Thomas)</para></listitem>
26305 <listitem><para>Add LOCALTIME and LOCALTIMESTAMP functions (Thomas)</para></listitem>
26306 <listitem><para>Add named composite types using CREATE TYPE typename AS (column) (Joe)</para></listitem>
26307 <listitem><para>Allow composite type definition in the table alias clause (Joe)</para></listitem>
26308 <listitem><para>Add new API to simplify creation of C language table functions (Joe)</para></listitem>
26309 <listitem><para>Remove ODBC-compatible empty parentheses from calls to SQL99 functions for which these parentheses do not match the standard (Thomas)</para></listitem>
26310 <listitem><para>Allow macaddr data type to accept 12 hex digits with no separators (Mike Wyer)</para></listitem>
26311 <listitem><para>Add CREATE/DROP CAST (Peter)</para></listitem>
26312 <listitem><para>Add IS DISTINCT FROM operator (Thomas)</para></listitem>
26313 <listitem><para>Add SQL99 TREAT() function, synonym for CAST() (Thomas)</para></listitem>
26314 <listitem><para>Add pg_backend_pid() to output backend pid (Bruce)</para></listitem>
26315 <listitem><para>Add IS OF / IS NOT OF type predicate (Thomas)</para></listitem>
26316 <listitem><para>Allow bit string constants without fully-specified length (Thomas)</para></listitem>
26317 <listitem><para>Allow conversion between 8-byte integers and bit strings (Thomas)</para></listitem>
26318 <listitem><para>Implement hex literal conversion to bit string literal (Thomas)</para></listitem>
26319 <listitem><para>Allow table functions to appear in the FROM clause (Joe)</para></listitem>
26320 <listitem><para>Increase maximum number of function parameters to 32 (Bruce)</para></listitem>
26321 <listitem><para>No longer automatically create index for SERIAL column (Tom)</para></listitem>
26322 <listitem><para>Add current_database() (Rod)</para></listitem>
26323 <listitem><para>Fix cash_words() to not overflow buffer (Tom)</para></listitem>
26324 <listitem><para>Add functions replace(), split_part(), to_hex() (Joe)</para></listitem>
26325 <listitem><para>Fix LIKE for bytea as a right-hand argument (Joe)</para></listitem>
26326 <listitem><para>Prevent crashes caused by SELECT cash_out(2) (Tom)</para></listitem>
26327 <listitem><para>Fix to_char(1,'FM999.99') to return a period (Karel)</para></listitem>
26328 <listitem><para>Fix trigger/type/language functions returning OPAQUE to return proper type (Tom)</para></listitem>
26329 </itemizedlist>
26330   </sect3>
26331
26332   <sect3>
26333    <title>Internationalization</title>
26334 <itemizedlist>
26335 <listitem><para>Add additional encodings: Korean (JOHAB), Thai (WIN874), Vietnamese (TCVN), Arabic (WIN1256), Simplified Chinese (GBK), Korean (UHC) (Eiji Tokuya)</para></listitem>
26336 <listitem><para>Enable locale support by default (Peter)</para></listitem>
26337 <listitem><para>Add locale variables (Peter)</para></listitem>
26338 <listitem><para>Escape byes &gt;= 0x7f for multibyte in PQescapeBytea/PQunescapeBytea (Tatsuo)</para></listitem>
26339 <listitem><para>Add locale awareness to regular expression character classes</para></listitem>
26340 <listitem><para>Enable multibyte support by default (Tatsuo)</para></listitem>
26341 <listitem><para>Add GB18030 multibyte support (Bill Huang)</para></listitem>
26342 <listitem><para>Add CREATE/DROP CONVERSION, allowing loadable encodings (Tatsuo, Kaori)</para></listitem>
26343 <listitem><para>Add pg_conversion table (Tatsuo)</para></listitem>
26344 <listitem><para>Add SQL99 CONVERT() function (Tatsuo)</para></listitem>
26345 <listitem><para>pg_dumpall, pg_controldata, and pg_resetxlog now national-language aware (Peter)</para></listitem>
26346 <listitem><para>New and updated translations</para></listitem>
26347 </itemizedlist>
26348   </sect3>
26349
26350   <sect3>
26351    <title>Server-side Languages</title>
26352 <itemizedlist>
26353 <listitem><para>Allow recursive SQL function (Peter)</para></listitem>
26354 <listitem><para>Change PL/Tcl build to use configured compiler and Makefile.shlib (Peter)</para></listitem>
26355 <listitem><para>Overhaul the PL/pgSQL FOUND variable to be more Oracle-compatible (Neil, Tom)</para></listitem>
26356 <listitem><para>Allow PL/pgSQL to handle quoted identifiers (Tom)</para></listitem>
26357 <listitem><para>Allow set-returning PL/pgSQL functions (Neil)</para></listitem>
26358 <listitem><para>Make PL/pgSQL schema-aware (Joe)</para></listitem>
26359 <listitem><para>Remove some memory leaks (Nigel J. Andrews, Tom)</para></listitem>
26360 </itemizedlist>
26361   </sect3>
26362
26363   <sect3>
26364    <title>psql</title>
26365 <itemizedlist>
26366 <listitem><para>Don't lowercase psql \connect database name for 7.2.0 compatibility (Tom)</para></listitem>
26367 <listitem><para>Add psql \timing to time user queries (Greg Sabino Mullane)</para></listitem>
26368 <listitem><para>Have psql \d show index information (Greg Sabino Mullane)</para></listitem>
26369 <listitem><para>New psql \dD shows domains (Jonathan Eisler)</para></listitem>
26370 <listitem><para>Allow psql to show rules on views (Paul ?)</para></listitem>
26371 <listitem><para>Fix for psql variable substitution (Tom)</para></listitem>
26372 <listitem><para>Allow psql \d to show temporary table structure (Tom)</para></listitem>
26373 <listitem><para>Allow psql \d to show foreign keys (Rod)</para></listitem>
26374 <listitem><para>Fix \? to honor \pset pager (Bruce)</para></listitem>
26375 <listitem><para>Have psql reports its version number on startup (Tom)</para></listitem>
26376 <listitem><para>Allow \copy to specify column names (Tom)</para></listitem>
26377 </itemizedlist>
26378   </sect3>
26379
26380   <sect3>
26381    <title>libpq</title>
26382 <itemizedlist>
26383 <listitem><para>Add ~/.pgpass to store host/user password combinations (Alvaro Herrera)</para></listitem>
26384 <listitem><para>Add PQunescapeBytea() function to libpq (Patrick Welche)</para></listitem>
26385 <listitem><para>Fix for sending large queries over non-blocking connections (Bernhard Herzog)</para></listitem>
26386 <listitem><para>Fix for libpq using timers on Win9X (David Ford)</para></listitem>
26387 <listitem><para>Allow libpq notify to handle servers with different-length identifiers (Tom)</para></listitem>
26388 <listitem><para>Add libpq PQescapeString() and PQescapeBytea() to Windows (Bruce)</para></listitem>
26389 <listitem><para>Fix for SSL with non-blocking connections (Jack Bates)</para></listitem>
26390 <listitem><para>Add libpq connection timeout parameter (Denis A Ustimenko)</para></listitem>
26391 </itemizedlist>
26392   </sect3>
26393
26394   <sect3>
26395    <title>JDBC</title>
26396 <itemizedlist>
26397 <listitem><para>Allow JDBC to compile with JDK 1.4 (Dave)</para></listitem>
26398 <listitem><para>Add JDBC 3 support (Barry)</para></listitem>
26399 <listitem><para>Allows JDBC to set loglevel by adding ?loglevel=X to the connection URL (Barry)</para></listitem>
26400 <listitem><para>Add Driver.info() message that prints out the version number (Barry)</para></listitem>
26401 <listitem><para>Add updateable result sets (Raghu Nidagal, Dave)</para></listitem>
26402 <listitem><para>Add support for callable statements (Paul Bethe)</para></listitem>
26403 <listitem><para>Add query cancel capability</para></listitem>
26404 <listitem><para>Add refresh row (Dave)</para></listitem>
26405 <listitem><para>Fix MD5 encryption handling for multibyte servers (Jun Kawai)</para></listitem>
26406 <listitem><para>Add support for prepared statements (Barry)</para></listitem>
26407 </itemizedlist>
26408   </sect3>
26409
26410   <sect3>
26411    <title>Miscellaneous Interfaces</title>
26412 <itemizedlist>
26413 <listitem><para>Fixed ECPG bug concerning octal numbers in single quotes (Michael)</para></listitem>
26414 <listitem><para>Move src/interfaces/libpgeasy to http://gborg.postgresql.org (Marc, Bruce)</para></listitem>
26415 <listitem><para>Improve Python interface (Elliot Lee, Andrew Johnson, Greg Copeland)</para></listitem>
26416 <listitem><para>Add libpgtcl connection close event (Gerhard Hintermayer)</para></listitem>
26417 <listitem><para>Move src/interfaces/libpq++ to http://gborg.postgresql.org (Marc, Bruce)</para></listitem>
26418 <listitem><para>Move src/interfaces/odbc to http://gborg.postgresql.org (Marc)</para></listitem>
26419 <listitem><para>Move src/interfaces/libpgeasy to http://gborg.postgresql.org (Marc, Bruce)</para></listitem>
26420 <listitem><para>Move src/interfaces/perl5 to http://gborg.postgresql.org (Marc, Bruce)</para></listitem>
26421 <listitem><para>Remove src/bin/pgaccess from main tree, now at http://www.pgaccess.org (Bruce)</para></listitem>
26422 <listitem><para>Add pg_on_connection_loss command to libpgtcl (Gerhard Hintermayer, Tom)</para></listitem>
26423 </itemizedlist>
26424   </sect3>
26425
26426   <sect3>
26427    <title>Source Code</title>
26428 <itemizedlist>
26429 <listitem><para>Fix for parallel make (Peter)</para></listitem>
26430 <listitem><para>AIX fixes for linking Tcl (Andreas Zeugswetter)</para></listitem>
26431 <listitem><para>Allow PL/Perl to build under Cygwin (Jason Tishler)</para></listitem>
26432 <listitem><para>Improve MIPS compiles (Peter, Oliver Elphick)</para></listitem>
26433 <listitem><para>Require Autoconf version 2.53 (Peter)</para></listitem>
26434 <listitem><para>Require readline and zlib by default in configure (Peter)</para></listitem>
26435 <listitem><para>Allow Solaris to use Intimate Shared Memory (ISM), for performance (Scott Brunza, P.J. Josh Rovero)</para></listitem>
26436 <listitem><para>Always enable syslog in compile, remove --enable-syslog option (Tatsuo)</para></listitem>
26437 <listitem><para>Always enable multibyte in compile, remove --enable-multibyte option (Tatsuo)</para></listitem>
26438 <listitem><para>Always enable locale in compile, remove --enable-locale option (Peter)</para></listitem>
26439 <listitem><para>Fix for Win9x DLL creation (Magnus Naeslund)</para></listitem>
26440 <listitem><para>Fix for link() usage by WAL code on Windows, BeOS (Jason Tishler)</para></listitem>
26441 <listitem><para>Add sys/types.h to c.h, remove from main files (Peter, Bruce)</para></listitem>
26442 <listitem><para>Fix AIX hang on SMP machines (Tomoyuki Niijima)</para></listitem>
26443 <listitem><para>AIX SMP hang fix (Tomoyuki Niijima)</para></listitem>
26444 <listitem><para>Fix pre-1970 date handling on newer glibc libraries (Tom)</para></listitem>
26445 <listitem><para>Fix PowerPC SMP locking (Tom)</para></listitem>
26446 <listitem><para>Prevent gcc -ffast-math from being used (Peter, Tom)</para></listitem>
26447 <listitem><para>Bison &gt;= 1.50 now required for developer builds</para></listitem>
26448 <listitem><para>Kerberos 5 support now builds with Heimdal (Peter)</para></listitem>
26449 <listitem><para>Add appendix in the User's Guide which lists SQL features (Thomas)</para></listitem>
26450 <listitem><para>Improve loadable module linking to use RTLD_NOW (Tom)</para></listitem>
26451 <listitem><para>New error levels WARNING, INFO, LOG, DEBUG[1-5] (Bruce)</para></listitem>
26452 <listitem><para>New src/port directory holds replaced libc functions (Peter, Bruce)</para></listitem>
26453 <listitem><para>New pg_namespace system catalog for schemas (Tom)</para></listitem>
26454 <listitem><para>Add pg_class.relnamespace for schemas (Tom)</para></listitem>
26455 <listitem><para>Add pg_type.typnamespace for schemas (Tom)</para></listitem>
26456 <listitem><para>Add pg_proc.pronamespace for schemas (Tom)</para></listitem>
26457 <listitem><para>Restructure aggregates to have pg_proc entries (Tom)</para></listitem>
26458 <listitem><para>System relations now have their own namespace, pg_* test not required (Fernando Nasser)</para></listitem>
26459 <listitem><para>Rename TOAST index names to be *_index rather than *_idx (Neil)</para></listitem>
26460 <listitem><para>Add namespaces for operators, opclasses (Tom)</para></listitem>
26461 <listitem><para>Add additional checks to server control file (Thomas)</para></listitem>
26462 <listitem><para>New Polish FAQ (Marcin Mazurek)</para></listitem>
26463 <listitem><para>Add Posix semaphore support (Tom)</para></listitem>
26464 <listitem><para>Document need for reindex (Bruce)</para></listitem>
26465 <listitem><para>Rename some internal identifiers to simplify Windows compile (Jan, Katherine Ward)</para></listitem>
26466 <listitem><para>Add documentation on computing disk space (Bruce)</para></listitem>
26467 <listitem><para>Remove KSQO from GUC (Bruce)</para></listitem>
26468 <listitem><para>Fix memory leak in rtree (Kenneth Been)</para></listitem>
26469 <listitem><para>Modify a few error messages for consistency (Bruce)</para></listitem>
26470 <listitem><para>Remove unused system table columns (Peter)</para></listitem>
26471 <listitem><para>Make system columns NOT NULL where appropriate (Tom)</para></listitem>
26472 <listitem><para>Clean up use of sprintf in favor of snprintf() (Neil, Jukka Holappa)</para></listitem>
26473 <listitem><para>Remove OPAQUE and create specific subtypes (Tom)</para></listitem>
26474 <listitem><para>Cleanups in array internal handling (Joe, Tom)</para></listitem>
26475 <listitem><para>Disallow pg_atoi('') (Bruce)</para></listitem>
26476 <listitem><para>Remove parameter wal_files because WAL files are now recycled (Bruce)</para></listitem>
26477 <listitem><para>Add version numbers to heap pages (Tom)</para></listitem>
26478 </itemizedlist>
26479   </sect3>
26480
26481   <sect3>
26482    <title>Contrib</title>
26483 <itemizedlist>
26484 <listitem><para>Allow inet arrays in /contrib/array (Neil)</para></listitem>
26485 <listitem><para>GiST fixes (Teodor Sigaev, Neil)</para></listitem>
26486 <listitem><para>Upgrade /contrib/mysql</para></listitem>
26487 <listitem><para>Add /contrib/dbsize which shows table sizes without vacuum (Peter)</para></listitem>
26488 <listitem><para>Add /contrib/intagg, integer aggregator routines (mlw)</para></listitem>
26489 <listitem><para>Improve /contrib/oid2name (Neil, Bruce)</para></listitem>
26490 <listitem><para>Improve /contrib/tsearch (Oleg, Teodor Sigaev)</para></listitem>
26491 <listitem><para>Cleanups of /contrib/rserver (Alexey V. Borzov)</para></listitem>
26492 <listitem><para>Update /contrib/oracle conversion utility (Gilles Darold)</para></listitem>
26493 <listitem><para>Update /contrib/dblink (Joe)</para></listitem>
26494 <listitem><para>Improve options supported by /contrib/vacuumlo (Mario Weilguni)</para></listitem>
26495 <listitem><para>Improvements to /contrib/intarray (Oleg, Teodor Sigaev, Andrey Oktyabrski)</para></listitem>
26496 <listitem><para>Add /contrib/reindexdb utility (Shaun Thomas)</para></listitem>
26497 <listitem><para>Add indexing to /contrib/isbn_issn (Dan Weston)</para></listitem>
26498 <listitem><para>Add /contrib/dbmirror (Steven Singer)</para></listitem>
26499 <listitem><para>Improve /contrib/pgbench (Neil)</para></listitem>
26500 <listitem><para>Add /contrib/tablefunc table function examples (Joe)</para></listitem>
26501 <listitem><para>Add /contrib/ltree data type for tree structures (Teodor Sigaev, Oleg Bartunov)</para></listitem>
26502 <listitem><para>Move /contrib/pg_controldata, pg_resetxlog into main tree (Bruce)</para></listitem>
26503 <listitem><para>Fixes to /contrib/cube (Bruno Wolff)</para></listitem>
26504 <listitem><para>Improve /contrib/fulltextindex (Christopher)</para></listitem>
26505 </itemizedlist>
26506   </sect3>
26507
26508  </sect2>
26509 </sect1>
26510
26511  <sect1 id="release-7-2-8">
26512   <title>Release 7.2.8</title>
26513
26514   <note>
26515   <title>Release date</title>
26516   <simpara>2005-05-09</simpara>
26517   </note>
26518
26519   <para>
26520    This release contains a variety of fixes from 7.2.7, including one
26521    security-related issue.
26522   </para>
26523
26524   <sect2>
26525    <title>Migration to Version 7.2.8</title>
26526
26527    <para>
26528     A dump/restore is not required for those running 7.2.X.
26529    </para>
26530   </sect2>
26531
26532   <sect2>
26533    <title>Changes</title>
26534
26535 <itemizedlist>
26536 <listitem><para>Repair ancient race condition that allowed a transaction to be
26537 seen as committed for some purposes (eg SELECT FOR UPDATE) slightly sooner
26538 than for other purposes</para>
26539 <para>This is an extremely serious bug since it could lead to apparent
26540 data inconsistencies being briefly visible to applications.</para></listitem>
26541 <listitem><para>Repair race condition between relation extension and
26542 VACUUM</para>
26543 <para>This could theoretically have caused loss of a page's worth of
26544 freshly-inserted data, although the scenario seems of very low probability.
26545 There are no known cases of it having caused more than an Assert failure.
26546 </para></listitem>
26547 <listitem><para>Fix <function>EXTRACT(EPOCH)</> for
26548 <type>TIME WITH TIME ZONE</> values</para></listitem>
26549 <listitem><para>Additional buffer overrun checks in plpgsql
26550 (Neil)</para></listitem>
26551 <listitem><para>Fix pg_dump to dump index names and trigger names containing
26552 <literal>%</> correctly (Neil)</para></listitem>
26553 <listitem><para>Prevent <function>to_char(interval)</> from dumping core for
26554 month-related formats</para></listitem>
26555 <listitem><para>Fix <filename>contrib/pgcrypto</> for newer OpenSSL builds
26556 (Marko Kreen)</para></listitem>
26557 </itemizedlist>
26558
26559  </sect2>
26560 </sect1>
26561
26562  <sect1 id="release-7-2-7">
26563   <title>Release 7.2.7</title>
26564
26565   <note>
26566   <title>Release date</title>
26567   <simpara>2005-01-31</simpara>
26568   </note>
26569
26570   <para>
26571    This release contains a variety of fixes from 7.2.6, including several
26572    security-related issues.
26573   </para>
26574
26575   <sect2>
26576    <title>Migration to Version 7.2.7</title>
26577
26578    <para>
26579     A dump/restore is not required for those running 7.2.X.
26580    </para>
26581   </sect2>
26582
26583   <sect2>
26584    <title>Changes</title>
26585
26586 <itemizedlist>
26587 <listitem><para>Disallow <command>LOAD</> to non-superusers</para>
26588 <para>
26589 On platforms that will automatically execute initialization functions of a
26590 shared library (this includes at least Windows and ELF-based Unixen),
26591 <command>LOAD</> can be used to make the server execute arbitrary code.
26592 Thanks to NGS Software for reporting this.</para></listitem>
26593 <listitem><para>Add needed STRICT marking to some contrib functions (Kris
26594 Jurka)</para></listitem>
26595 <listitem><para>Avoid buffer overrun when plpgsql cursor declaration has too
26596 many parameters (Neil)</para></listitem>
26597 <listitem><para>Fix planning error for FULL and RIGHT outer joins</para>
26598 <para>
26599 The result of the join was mistakenly supposed to be sorted the same as the
26600 left input.  This could not only deliver mis-sorted output to the user, but
26601 in case of nested merge joins could give outright wrong answers.
26602 </para></listitem>
26603 <listitem><para>Fix display of negative intervals in SQL and GERMAN
26604 datestyles</para></listitem>
26605 </itemizedlist>
26606
26607  </sect2>
26608 </sect1>
26609
26610  <sect1 id="release-7-2-6">
26611   <title>Release 7.2.6</title>
26612
26613   <note>
26614   <title>Release date</title>
26615   <simpara>2004-10-22</simpara>
26616   </note>
26617
26618   <para>
26619    This release contains a variety of fixes from 7.2.5.
26620   </para>
26621
26622
26623   <sect2>
26624    <title>Migration to Version 7.2.6</title>
26625
26626    <para>
26627     A dump/restore is not required for those running 7.2.X.
26628    </para>
26629   </sect2>
26630
26631   <sect2>
26632    <title>Changes</title>
26633
26634 <itemizedlist>
26635 <listitem><para>Repair possible failure to update hint bits on disk</para>
26636 <para>
26637 Under rare circumstances this oversight could lead to
26638 <quote>could not access transaction status</> failures, which qualifies
26639 it as a potential-data-loss bug.
26640 </para></listitem>
26641 <listitem><para>Ensure that hashed outer join does not miss tuples</para>
26642 <para>
26643 Very large left joins using a hash join plan could fail to output unmatched
26644 left-side rows given just the right data distribution.
26645 </para></listitem>
26646 <listitem><para>Disallow running pg_ctl as root</para>
26647 <para>
26648 This is to guard against any possible security issues.
26649 </para></listitem>
26650 <listitem><para>Avoid using temp files in /tmp in make_oidjoins_check</para>
26651 <para>
26652 This has been reported as a security issue, though it's hardly worthy of
26653 concern since there is no reason for non-developers to use this script anyway.
26654 </para></listitem>
26655 <listitem><para>Update to newer versions of Bison</para></listitem>
26656 </itemizedlist>
26657
26658  </sect2>
26659 </sect1>
26660
26661  <sect1 id="release-7-2-5">
26662   <title>Release 7.2.5</title>
26663
26664   <note>
26665   <title>Release date</title>
26666   <simpara>2004-08-16</simpara>
26667   </note>
26668
26669   <para>
26670    This release contains a variety of fixes from 7.2.4.
26671   </para>
26672
26673
26674   <sect2>
26675    <title>Migration to Version 7.2.5</title>
26676
26677    <para>
26678     A dump/restore is not required for those running 7.2.X.
26679    </para>
26680   </sect2>
26681
26682   <sect2>
26683    <title>Changes</title>
26684
26685 <itemizedlist>
26686 <listitem><para>Prevent possible loss of committed transactions during crash</para>
26687 <para>
26688 Due to insufficient interlocking between transaction commit and checkpointing,
26689 it was possible for transactions committed just before the most recent
26690 checkpoint to be lost, in whole or in part, following a database crash and
26691 restart.  This is a serious bug that has existed
26692 since <productname>PostgreSQL</productname> 7.1.
26693 </para></listitem>
26694 <listitem><para>Fix corner case for btree search in parallel with first root page split</para></listitem>
26695 <listitem><para>Fix buffer overrun in <function>to_ascii</function> (Guido Notari)</para></listitem>
26696 <listitem><para>Fix core dump in deadlock detection on machines where char is unsigned</para></listitem>
26697 <listitem><para>Fix failure to respond to <command>pg_ctl stop -m fast</command> after Async_NotifyHandler runs</para></listitem>
26698 <listitem><para>Repair memory leaks in pg_dump</para></listitem>
26699 <listitem><para>Avoid conflict with system definition of <function>isblank()</function> function or macro</para></listitem>
26700 </itemizedlist>
26701  </sect2>
26702 </sect1>
26703
26704 <sect1 id="release-7-2-4">
26705  <title>Release 7.2.4</title>
26706
26707  <note>
26708   <title>Release date</title>
26709   <simpara>2003-01-30</simpara>
26710  </note>
26711
26712  <para>
26713   This release contains a variety of fixes for version 7.2.3,
26714   including fixes to prevent possible data loss.
26715  </para>
26716
26717  <sect2>
26718   <title>Migration to Version 7.2.4</title>
26719
26720   <para>
26721    A dump/restore is <emphasis>not</emphasis> required for those
26722    running version 7.2.*.
26723   </para>
26724  </sect2>
26725
26726  <sect2>
26727   <title>Changes</title>
26728
26729 <itemizedlist>
26730 <listitem><para>Fix some additional cases of VACUUM "No one parent tuple was found" error</para></listitem>
26731 <listitem><para>Prevent VACUUM from being called inside a function  (Bruce)</para></listitem>
26732 <listitem><para>Ensure pg_clog updates are sync'd to disk before marking checkpoint complete</para></listitem>
26733 <listitem><para>Avoid integer overflow during large hash joins</para></listitem>
26734 <listitem><para>Make GROUP commands work when pg_group.grolist is large enough to be toasted</para></listitem>
26735 <listitem><para>Fix errors in datetime tables; some timezone names weren't being recognized</para></listitem>
26736 <listitem><para>Fix integer overflows in circle_poly(), path_encode(), path_add()  (Neil)</para></listitem>
26737 <listitem><para>Repair long-standing logic errors in lseg_eq(), lseg_ne(), lseg_center()</para></listitem>
26738 </itemizedlist>
26739  </sect2>
26740 </sect1>
26741
26742
26743 <sect1 id="release-7-2-3">
26744  <title>Release 7.2.3</title>
26745
26746  <note>
26747   <title>Release date</title>
26748   <simpara>2002-10-01</simpara>
26749  </note>
26750
26751  <para>
26752   This release contains a variety of fixes for version 7.2.2,
26753   including fixes to prevent possible data loss.
26754  </para>
26755
26756  <sect2>
26757   <title>Migration to Version 7.2.3</title>
26758
26759   <para>
26760    A dump/restore is <emphasis>not</emphasis> required for those
26761    running version 7.2.*.
26762   </para>
26763  </sect2>
26764
26765  <sect2>
26766   <title>Changes</title>
26767
26768 <itemizedlist>
26769 <listitem><para>Prevent possible compressed transaction log loss (Tom)</para></listitem>
26770 <listitem><para>Prevent non-superuser from increasing most recent vacuum info (Tom)</para></listitem>
26771 <listitem><para>Handle pre-1970 date values in newer versions of glibc (Tom)</para></listitem>
26772 <listitem><para>Fix possible hang during server shutdown</para></listitem>
26773 <listitem><para>Prevent spinlock hangs on SMP PPC machines (Tomoyuki Niijima)</para></listitem>
26774 <listitem><para>Fix <application>pg_dump</> to properly dump FULL JOIN USING (Tom)</para></listitem>
26775 </itemizedlist>
26776  </sect2>
26777 </sect1>
26778
26779
26780 <sect1 id="release-7-2-2">
26781  <title>Release 7.2.2</title>
26782
26783  <note>
26784   <title>Release date</title>
26785   <simpara>2002-08-23</simpara>
26786  </note>
26787
26788  <para>
26789   This release contains a variety of fixes for version 7.2.1.
26790  </para>
26791
26792  <sect2>
26793   <title>Migration to Version 7.2.2</title>
26794
26795   <para>
26796    A dump/restore is <emphasis>not</emphasis> required for those
26797    running version 7.2.*.
26798   </para>
26799  </sect2>
26800
26801  <sect2>
26802   <title>Changes</title>
26803
26804 <itemizedlist>
26805 <listitem><para>Allow EXECUTE of "CREATE TABLE AS ... SELECT" in PL/pgSQL (Tom)</para></listitem>
26806 <listitem><para>Fix for compressed transaction log id wraparound (Tom)</para></listitem>
26807 <listitem><para>Fix PQescapeBytea/PQunescapeBytea so that they handle bytes &gt; 0x7f (Tatsuo)</para></listitem>
26808 <listitem><para>Fix for psql and <application>pg_dump</> crashing when invoked with non-existent long options (Tatsuo)</para></listitem>
26809 <listitem><para>Fix crash when invoking geometric operators (Tom)</para></listitem>
26810 <listitem><para>Allow OPEN cursor(args) (Tom)</para></listitem>
26811 <listitem><para>Fix for rtree_gist index build (Teodor)</para></listitem>
26812 <listitem><para>Fix for dumping user-defined aggregates (Tom)</para></listitem>
26813 <listitem><para>contrib/intarray fixes (Oleg)</para></listitem>
26814 <listitem><para>Fix for complex UNION/EXCEPT/INTERSECT queries using parens (Tom)</para></listitem>
26815 <listitem><para>Fix to pg_convert (Tatsuo)</para></listitem>
26816 <listitem><para>Fix for crash with long DATA strings (Thomas, Neil)</para></listitem>
26817 <listitem><para>Fix for repeat(), lpad(), rpad() and long strings (Neil)</para></listitem>
26818 </itemizedlist>
26819  </sect2>
26820 </sect1>
26821
26822
26823 <sect1 id="release-7-2-1">
26824  <title>Release 7.2.1</title>
26825
26826  <note>
26827   <title>Release date</title>
26828   <simpara>2002-03-21</simpara>
26829  </note>
26830
26831  <para>
26832   This release contains a variety of fixes for version 7.2.
26833  </para>
26834
26835  <sect2>
26836   <title>Migration to Version 7.2.1</title>
26837
26838   <para>
26839    A dump/restore is <emphasis>not</emphasis> required for those
26840    running version 7.2.
26841   </para>
26842  </sect2>
26843
26844  <sect2>
26845   <title>Changes</title>
26846
26847 <itemizedlist>
26848 <listitem><para>Ensure that sequence counters do not go backwards after a crash (Tom)</para></listitem>
26849 <listitem><para>Fix pgaccess kanji-conversion key binding (Tatsuo)</para></listitem>
26850 <listitem><para>Optimizer improvements (Tom)</para></listitem>
26851 <listitem><para>Cash I/O improvements (Tom)</para></listitem>
26852 <listitem><para>New Russian FAQ</para></listitem>
26853 <listitem><para>Compile fix for missing AuthBlockSig (Heiko)</para></listitem>
26854 <listitem><para>Additional time zones and time zone fixes (Thomas)</para></listitem>
26855 <listitem><para>Allow psql \connect to handle mixed case database and user names (Tom)</para></listitem>
26856 <listitem><para>Return proper OID on command completion even with ON INSERT rules (Tom)</para></listitem>
26857 <listitem><para>Allow COPY FROM to use 8-bit DELIMITERS (Tatsuo)</para></listitem>
26858 <listitem><para>Fix bug in extract/date_part for milliseconds/microseconds (Tatsuo)</para></listitem>
26859 <listitem><para>Improve handling of multiple UNIONs with different lengths (Tom)</para></listitem>
26860 <listitem><para>contrib/btree_gist improvements (Teodor Sigaev)</para></listitem>
26861 <listitem><para>contrib/tsearch dictionary improvements, see README.tsearch for an additional installation step (Thomas T. Thai, Teodor Sigaev)</para></listitem>
26862 <listitem><para>Fix for array subscripts handling (Tom)</para></listitem>
26863 <listitem><para>Allow EXECUTE of "CREATE TABLE AS ... SELECT" in PL/pgSQL (Tom)</para></listitem>
26864 </itemizedlist>
26865  </sect2>
26866 </sect1>
26867
26868
26869 <sect1 id="release-7-2">
26870  <title>Release 7.2</title>
26871
26872  <note>
26873   <title>Release date</title>
26874   <simpara>2002-02-04</simpara>
26875  </note>
26876
26877  <sect2>
26878   <title>Overview</title>
26879
26880   <para>
26881    This release improves <productname>PostgreSQL</> for use in
26882    high-volume applications.
26883   </para>
26884
26885   <para>
26886    Major changes in this release:
26887   </para>
26888
26889   <variablelist>
26890    <varlistentry>
26891     <term>VACUUM</term>
26892     <listitem>
26893      <para>
26894       Vacuuming no longer locks tables, thus allowing normal user
26895       access during the vacuum.  A new <command>VACUUM FULL</>
26896       command does old-style vacuum by locking the table and
26897       shrinking the on-disk copy of the table.
26898      </para>
26899     </listitem>
26900    </varlistentry>
26901
26902    <varlistentry>
26903     <term>Transactions</term>
26904     <listitem>
26905      <para>
26906       There is no longer a problem with installations that exceed
26907       four billion transactions.
26908      </para>
26909     </listitem>
26910    </varlistentry>
26911
26912    <varlistentry>
26913     <term>OIDs</term>
26914     <listitem>
26915      <para>
26916       OIDs are now optional.  Users can now create tables without
26917       OIDs for cases where OID usage is excessive.
26918      </para>
26919     </listitem>
26920    </varlistentry>
26921
26922    <varlistentry>
26923     <term>Optimizer</term>
26924     <listitem>
26925      <para>
26926       The system now computes histogram column statistics during
26927       <command>ANALYZE</>, allowing much better optimizer choices.
26928      </para>
26929     </listitem>
26930    </varlistentry>
26931
26932    <varlistentry>
26933     <term>Security</term>
26934     <listitem>
26935      <para>
26936       A new MD5 encryption option allows more secure storage and
26937       transfer of passwords.  A new Unix-domain socket
26938       authentication option is available on Linux and BSD systems.
26939      </para>
26940     </listitem>
26941    </varlistentry>
26942
26943    <varlistentry>
26944     <term>Statistics</term>
26945     <listitem>
26946      <para>
26947       Administrators can use the new table access statistics module
26948       to get fine-grained information about table and index usage.
26949      </para>
26950     </listitem>
26951    </varlistentry>
26952
26953    <varlistentry>
26954     <term>Internationalization</term>
26955     <listitem>
26956      <para>
26957       Program and library messages can now be displayed in several
26958       languages.
26959      </para>
26960     </listitem>
26961    </varlistentry>
26962
26963   </variablelist>
26964  </sect2>
26965
26966  <sect2>
26967   <title>Migration to Version 7.2</title>
26968
26969   <para>
26970    A dump/restore using <command>pg_dump</command> is required for
26971    those wishing to migrate data from any previous release.
26972   </para>
26973
26974   <para>
26975    Observe the following incompatibilities:
26976   </para>
26977
26978   <itemizedlist>
26979    <listitem>
26980     <para>
26981      The semantics of the <command>VACUUM</command> command have
26982      changed in this release.  You might wish to update your
26983      maintenance procedures accordingly.
26984     </para>
26985    </listitem>
26986
26987    <listitem>
26988     <para>
26989      In this release, comparisons using <literal>= NULL</literal>
26990      will always return false (or NULL, more precisely).  Previous
26991      releases automatically transformed this syntax to <literal>IS
26992      NULL</literal>.  The old behavior can be re-enabled using a
26993      <filename>postgresql.conf</filename> parameter.
26994     </para>
26995    </listitem>
26996
26997    <listitem>
26998     <para>
26999      The <filename>pg_hba.conf</> and <filename>pg_ident.conf</>
27000      configuration is now only reloaded after receiving a
27001      <systemitem>SIGHUP</> signal, not with each connection.
27002     </para>
27003    </listitem>
27004
27005    <listitem>
27006     <para>
27007      The function <filename>octet_length()</> now returns the uncompressed data length.
27008     </para>
27009    </listitem>
27010
27011    <listitem>
27012     <para>
27013      The date/time value <literal>'current'</literal> is no longer
27014      available.  You will need to rewrite your applications.
27015     </para>
27016    </listitem>
27017
27018    <listitem>
27019     <para>
27020      The <literal>timestamp()</literal>, <literal>time()</literal>,
27021      and <literal>interval()</literal> functions are no longer
27022      available.  Instead of <literal>timestamp()</literal>, use
27023      <literal>timestamp 'string'</literal> or <literal>CAST</literal>.
27024     </para>
27025    </listitem>
27026
27027   </itemizedlist>
27028
27029   <para>
27030    The <literal>SELECT ... LIMIT #,#</literal> syntax will be removed
27031    in the next release. You should change your queries to use
27032    separate LIMIT and OFFSET clauses, e.g. <literal>LIMIT 10 OFFSET
27033    20</literal>.
27034   </para>
27035  </sect2>
27036
27037  <sect2>
27038   <title>Changes</title>
27039
27040   <sect3>
27041    <title>Server Operation</title>
27042 <itemizedlist>
27043 <listitem><para>Create temporary files in a separate directory (Bruce)</para></listitem>
27044 <listitem><para>Delete orphaned temporary files on postmaster startup (Bruce)</para></listitem>
27045 <listitem><para>Added unique indexes to some system tables (Tom)</para></listitem>
27046 <listitem><para>System table operator reorganization (Oleg Bartunov, Teodor Sigaev, Tom)</para></listitem>
27047 <listitem><para>Renamed pg_log to pg_clog (Tom)</para></listitem>
27048 <listitem><para>Enable SIGTERM, SIGQUIT to kill backends (Jan)</para></listitem>
27049 <listitem><para>Removed compile-time limit on number of backends (Tom)</para></listitem>
27050 <listitem><para>Better cleanup for semaphore resource failure (Tatsuo, Tom)</para></listitem>
27051 <listitem><para>Allow safe transaction ID wraparound (Tom)</para></listitem>
27052 <listitem><para>Removed OIDs from some system tables (Tom)</para></listitem>
27053 <listitem><para>Removed "triggered data change violation" error check (Tom)</para></listitem>
27054 <listitem><para>SPI portal creation of prepared/saved plans (Jan)</para></listitem>
27055 <listitem><para>Allow SPI column functions to work for system columns (Tom)</para></listitem>
27056 <listitem><para>Long value compression improvement (Tom)</para></listitem>
27057 <listitem><para>Statistics collector for table, index access (Jan)</para></listitem>
27058 <listitem><para>Truncate extra-long sequence names to a reasonable value (Tom)</para></listitem>
27059 <listitem><para>Measure transaction times in milliseconds (Thomas)</para></listitem>
27060 <listitem><para>Fix TID sequential scans (Hiroshi)</para></listitem>
27061 <listitem><para>Superuser ID now fixed at 1 (Peter E)</para></listitem>
27062 <listitem><para>New pg_ctl "reload" option (Tom)</para></listitem>
27063 </itemizedlist>
27064   </sect3>
27065
27066   <sect3>
27067    <title>Performance</title>
27068 <itemizedlist>
27069 <listitem><para>Optimizer improvements (Tom)</para></listitem>
27070 <listitem><para>New histogram column statistics for optimizer (Tom)</para></listitem>
27071 <listitem><para>Reuse write-ahead log files rather than discarding them (Tom)</para></listitem>
27072 <listitem><para>Cache improvements (Tom)</para></listitem>
27073 <listitem><para>IS NULL, IS NOT NULL optimizer improvement (Tom)</para></listitem>
27074 <listitem><para>Improve lock manager to reduce lock contention (Tom)</para></listitem>
27075 <listitem><para>Keep relcache entries for index access support functions (Tom)</para></listitem>
27076 <listitem><para>Allow better selectivity with NaN and infinities in NUMERIC (Tom)</para></listitem>
27077 <listitem><para>R-tree performance improvements (Kenneth Been)</para></listitem>
27078 <listitem><para>B-tree splits more efficient (Tom)</para></listitem>
27079 </itemizedlist>
27080   </sect3>
27081
27082   <sect3>
27083    <title>Privileges</title>
27084 <itemizedlist>
27085 <listitem><para>Change UPDATE, DELETE privileges to be distinct (Peter E)</para></listitem>
27086 <listitem><para>New REFERENCES, TRIGGER privileges (Peter E)</para></listitem>
27087 <listitem><para>Allow GRANT/REVOKE to/from more than one user at a time (Peter E)</para></listitem>
27088 <listitem><para>New has_table_privilege() function (Joe Conway)</para></listitem>
27089 <listitem><para>Allow non-superuser to vacuum database (Tom)</para></listitem>
27090 <listitem><para>New SET SESSION AUTHORIZATION command (Peter E)</para></listitem>
27091 <listitem><para>Fix bug in privilege modifications on newly created tables (Tom)</para></listitem>
27092 <listitem><para>Disallow access to pg_statistic for non-superuser, add user-accessible views (Tom)</para></listitem>
27093 </itemizedlist>
27094   </sect3>
27095
27096   <sect3>
27097    <title>Client Authentication</title>
27098 <itemizedlist>
27099 <listitem><para>Fork postmaster before doing authentication to prevent hangs (Peter E)</para></listitem>
27100 <listitem><para>Add ident authentication over Unix domain sockets on Linux, *BSD (Helge Bahmann, Oliver Elphick, Teodor Sigaev, Bruce)</para></listitem>
27101 <listitem><para>Add a password authentication method that uses MD5 encryption (Bruce)</para></listitem>
27102 <listitem><para>Allow encryption of stored passwords using MD5 (Bruce)</para></listitem>
27103 <listitem><para>PAM authentication (Dominic J. Eidson)</para></listitem>
27104 <listitem><para>Load pg_hba.conf and pg_ident.conf only on startup and SIGHUP (Bruce)</para></listitem>
27105 </itemizedlist>
27106   </sect3>
27107
27108   <sect3>
27109    <title>Server Configuration</title>
27110 <itemizedlist>
27111 <listitem><para>Interpretation of some time zone abbreviations as Australian rather than North American now settable at run time (Bruce)</para></listitem>
27112 <listitem><para>New parameter to set default transaction isolation level (Peter E)</para></listitem>
27113 <listitem><para>New parameter to enable conversion of "expr = NULL" into "expr IS NULL", off by default (Peter E)</para></listitem>
27114 <listitem><para>New parameter to control memory usage by VACUUM (Tom)</para></listitem>
27115 <listitem><para>New parameter to set client authentication timeout (Tom)</para></listitem>
27116 <listitem><para>New parameter to set maximum number of open files (Tom)</para></listitem>
27117 </itemizedlist>
27118   </sect3>
27119
27120   <sect3>
27121    <title>Queries</title>
27122 <itemizedlist>
27123 <listitem><para>Statements added by INSERT rules now execute after the INSERT (Jan)</para></listitem>
27124 <listitem><para>Prevent unadorned relation names in target list (Bruce)</para></listitem>
27125 <listitem><para>NULLs now sort after all normal values in ORDER BY (Tom)</para></listitem>
27126 <listitem><para>New IS UNKNOWN, IS NOT UNKNOWN Boolean tests (Tom)</para></listitem>
27127 <listitem><para>New SHARE UPDATE EXCLUSIVE lock mode (Tom)</para></listitem>
27128 <listitem><para>New EXPLAIN ANALYZE command that shows run times and row counts (Martijn van Oosterhout)</para></listitem>
27129 <listitem><para>Fix problem with LIMIT and subqueries (Tom)</para></listitem>
27130 <listitem><para>Fix for LIMIT, DISTINCT ON pushed into subqueries (Tom)</para></listitem>
27131 <listitem><para>Fix nested EXCEPT/INTERSECT (Tom)</para></listitem>
27132 </itemizedlist>
27133   </sect3>
27134
27135   <sect3>
27136    <title>Schema Manipulation</title>
27137 <itemizedlist>
27138 <listitem><para>Fix SERIAL in temporary tables (Bruce)</para></listitem>
27139 <listitem><para>Allow temporary sequences (Bruce)</para></listitem>
27140 <listitem><para>Sequences now use int8 internally (Tom)</para></listitem>
27141 <listitem><para>New SERIAL8 creates int8 columns with sequences, default still SERIAL4 (Tom)</para></listitem>
27142 <listitem><para>Make OIDs optional using WITHOUT OIDS (Tom)</para></listitem>
27143 <listitem><para>Add %TYPE syntax to CREATE TYPE (Ian Lance Taylor)</para></listitem>
27144 <listitem><para>Add ALTER TABLE / DROP CONSTRAINT for CHECK constraints (Christopher Kings-Lynne)</para></listitem>
27145 <listitem><para>New CREATE OR REPLACE FUNCTION to alter existing function (preserving the function OID) (Gavin Sherry)</para></listitem>
27146 <listitem><para>Add ALTER TABLE / ADD [ UNIQUE | PRIMARY ] (Christopher Kings-Lynne)</para></listitem>
27147 <listitem><para>Allow column renaming in views</para></listitem>
27148 <listitem><para>Make ALTER TABLE / RENAME COLUMN update column names of indexes (Brent Verner)</para></listitem>
27149 <listitem><para>Fix for ALTER TABLE / ADD CONSTRAINT ... CHECK with inherited tables (Stephan Szabo)</para></listitem>
27150 <listitem><para>ALTER TABLE RENAME update foreign-key trigger arguments correctly (Brent Verner)</para></listitem>
27151 <listitem><para>DROP AGGREGATE and COMMENT ON AGGREGATE now accept an aggtype (Tom)</para></listitem>
27152 <listitem><para>Add automatic return type data casting for SQL functions (Tom)</para></listitem>
27153 <listitem><para>Allow GiST indexes to handle NULLs and multikey indexes (Oleg Bartunov, Teodor Sigaev, Tom)</para></listitem>
27154 <listitem><para>Enable partial indexes (Martijn van Oosterhout)</para></listitem>
27155 </itemizedlist>
27156   </sect3>
27157
27158   <sect3>
27159    <title>Utility Commands</title>
27160 <itemizedlist>
27161 <listitem><para>Add RESET ALL, SHOW ALL (Marko Kreen)</para></listitem>
27162 <listitem><para>CREATE/ALTER USER/GROUP now allow options in any order (Vince)</para></listitem>
27163 <listitem><para>Add LOCK A, B, C functionality (Neil Padgett)</para></listitem>
27164 <listitem><para>New ENCRYPTED/UNENCRYPTED option to CREATE/ALTER USER (Bruce)</para></listitem>
27165 <listitem><para>New light-weight VACUUM does not lock table; old semantics are available as VACUUM FULL (Tom)</para></listitem>
27166 <listitem><para>Disable COPY TO/FROM on views (Bruce)</para></listitem>
27167 <listitem><para>COPY DELIMITERS string must be exactly one character (Tom)</para></listitem>
27168 <listitem><para>VACUUM warning about index tuples fewer than heap now only appears when appropriate (Martijn van Oosterhout)</para></listitem>
27169 <listitem><para>Fix privilege checks for CREATE INDEX (Tom)</para></listitem>
27170 <listitem><para>Disallow inappropriate use of CREATE/DROP INDEX/TRIGGER/VIEW (Tom)</para></listitem>
27171 </itemizedlist>
27172   </sect3>
27173
27174   <sect3>
27175    <title>Data Types and Functions</title>
27176 <itemizedlist>
27177 <listitem><para>SUM(), AVG(), COUNT() now uses int8 internally for speed (Tom)</para></listitem>
27178 <listitem><para>Add convert(), convert2() (Tatsuo)</para></listitem>
27179 <listitem><para>New function bit_length() (Peter E)</para></listitem>
27180 <listitem><para>Make the "n" in CHAR(n)/VARCHAR(n) represents letters, not bytes (Tatsuo)</para></listitem>
27181 <listitem><para>CHAR(), VARCHAR() now reject strings that are too long (Peter E)</para></listitem>
27182 <listitem><para>BIT VARYING now rejects bit strings that are too long (Peter E)</para></listitem>
27183 <listitem><para>BIT now rejects bit strings that do not match declared size (Peter E)</para></listitem>
27184 <listitem><para>INET, CIDR text conversion functions (Alex Pilosov)</para></listitem>
27185 <listitem><para>INET, CIDR operators &lt;&lt; and &lt;&lt;= indexable (Alex Pilosov)</para></listitem>
27186 <listitem><para>Bytea \### now requires valid three digit octal number</para></listitem>
27187 <listitem><para>Bytea comparison improvements, now supports =, &lt;&gt;, &gt;, &gt;=, &lt;, and &lt;=</para></listitem>
27188 <listitem><para>Bytea now supports B-tree indexes</para></listitem>
27189 <listitem><para>Bytea now supports LIKE, LIKE...ESCAPE, NOT LIKE, NOT LIKE...ESCAPE</para></listitem>
27190 <listitem><para>Bytea now supports concatenation</para></listitem>
27191 <listitem><para>New bytea functions: position, substring, trim, btrim, and length</para></listitem>
27192 <listitem><para>New encode() function mode, "escaped", converts minimally escaped bytea to/from text</para></listitem>
27193 <listitem><para>Add pg_database_encoding_max_length() (Tatsuo)</para></listitem>
27194 <listitem><para>Add pg_client_encoding() function (Tatsuo)</para></listitem>
27195 <listitem><para>now() returns time with millisecond precision (Thomas)</para></listitem>
27196 <listitem><para>New TIMESTAMP WITHOUT TIMEZONE data type (Thomas)</para></listitem>
27197 <listitem><para>Add ISO date/time specification with "T", yyyy-mm-ddThh:mm:ss (Thomas)</para></listitem>
27198 <listitem><para>New xid/int comparison functions (Hiroshi)</para></listitem>
27199 <listitem><para>Add precision to TIME, TIMESTAMP, and INTERVAL data types (Thomas)</para></listitem>
27200 <listitem><para>Modify type coercion logic to attempt binary-compatible functions first (Tom)</para></listitem>
27201 <listitem><para>New encode() function installed by default (Marko Kreen)</para></listitem>
27202 <listitem><para>Improved to_*() conversion functions (Karel Zak)</para></listitem>
27203 <listitem><para>Optimize LIKE/ILIKE when using single-byte encodings (Tatsuo)</para></listitem>
27204 <listitem><para>New functions in contrib/pgcrypto: crypt(), hmac(), encrypt(), gen_salt() (Marko Kreen)</para></listitem>
27205 <listitem><para>Correct description of translate() function (Bruce)</para></listitem>
27206 <listitem><para>Add INTERVAL argument for SET TIME ZONE (Thomas)</para></listitem>
27207 <listitem><para>Add INTERVAL YEAR TO MONTH (etc.) syntax (Thomas)</para></listitem>
27208 <listitem><para>Optimize length functions when using single-byte encodings (Tatsuo)</para></listitem>
27209 <listitem><para>Fix path_inter, path_distance, path_length, dist_ppath to handle closed paths (Curtis Barrett, Tom)</para></listitem>
27210 <listitem><para>octet_length(text) now returns non-compressed length (Tatsuo, Bruce)</para></listitem>
27211 <listitem><para>Handle "July" full name in date/time literals (Greg Sabino Mullane)</para></listitem>
27212 <listitem><para>Some datatype() function calls now evaluated differently</para></listitem>
27213 <listitem><para>Add support for Julian and ISO time specifications (Thomas)</para></listitem>
27214 </itemizedlist>
27215   </sect3>
27216
27217   <sect3>
27218    <title>Internationalization</title>
27219 <itemizedlist>
27220 <listitem><para>National language support in psql, <application>pg_dump</>, libpq, and server (Peter E)</para></listitem>
27221 <listitem><para>Message translations in Chinese (simplified, traditional), Czech, French, German, Hungarian, Russian, Swedish (Peter E, Serguei A. Mokhov, Karel Zak, Weiping He, Zhenbang Wei, Kovacs Zoltan)</para></listitem>
27222 <listitem><para>Make trim, ltrim, rtrim, btrim, lpad, rpad, translate multibyte aware (Tatsuo)</para></listitem>
27223 <listitem><para>Add LATIN5,6,7,8,9,10 support (Tatsuo)</para></listitem>
27224 <listitem><para>Add ISO 8859-5,6,7,8 support (Tatsuo)</para></listitem>
27225 <listitem><para>Correct LATIN5 to mean ISO-8859-9, not ISO-8859-5 (Tatsuo)</para></listitem>
27226 <listitem><para>Make mic2ascii() non-ASCII aware (Tatsuo)</para></listitem>
27227 <listitem><para>Reject invalid multibyte character sequences (Tatsuo)</para></listitem>
27228 </itemizedlist>
27229   </sect3>
27230
27231   <sect3>
27232    <title><application>PL/pgSQL</></title>
27233 <itemizedlist>
27234 <listitem><para>Now uses portals for SELECT loops, allowing huge result sets (Jan)</para></listitem>
27235 <listitem><para>CURSOR and REFCURSOR support (Jan)</para></listitem>
27236 <listitem><para>Can now return open cursors (Jan)</para></listitem>
27237 <listitem><para>Add ELSEIF (Klaus Reger)</para></listitem>
27238 <listitem><para>Improve PL/pgSQL error reporting, including location of error (Tom)</para></listitem>
27239 <listitem><para>Allow IS or FOR key words in cursor declaration, for compatibility (Bruce)</para></listitem>
27240 <listitem><para>Fix for SELECT ... FOR UPDATE (Tom)</para></listitem>
27241 <listitem><para>Fix for PERFORM returning multiple rows (Tom)</para></listitem>
27242 <listitem><para>Make PL/pgSQL use the server's type coercion code (Tom)</para></listitem>
27243 <listitem><para>Memory leak fix (Jan, Tom)</para></listitem>
27244 <listitem><para>Make trailing semicolon optional (Tom)</para></listitem>
27245 </itemizedlist>
27246   </sect3>
27247
27248   <sect3>
27249    <title>PL/Perl</title>
27250 <itemizedlist>
27251 <listitem><para>New untrusted PL/Perl (Alex Pilosov)</para></listitem>
27252 <listitem><para>PL/Perl is now built on some platforms even if libperl is not shared (Peter E)</para></listitem>
27253 </itemizedlist>
27254    </sect3>
27255
27256   <sect3>
27257    <title>PL/Tcl</title>
27258 <itemizedlist>
27259 <listitem><para>Now reports errorInfo (Vsevolod Lobko)</para></listitem>
27260 <listitem><para>Add spi_lastoid function (bob@redivi.com)</para></listitem>
27261 </itemizedlist>
27262   </sect3>
27263
27264   <sect3>
27265    <title>PL/Python</title>
27266 <itemizedlist>
27267 <listitem><para>...is new (Andrew Bosma)</para></listitem>
27268 </itemizedlist>
27269   </sect3>
27270
27271   <sect3>
27272    <title><application>psql</></title>
27273 <itemizedlist>
27274 <listitem><para>\d displays indexes in unique, primary groupings (Christopher Kings-Lynne)</para></listitem>
27275 <listitem><para>Allow trailing semicolons in backslash commands (Greg Sabino Mullane)</para></listitem>
27276 <listitem><para>Read password from /dev/tty if possible</para></listitem>
27277 <listitem><para>Force new password prompt when changing user and database (Tatsuo, Tom)</para></listitem>
27278 <listitem><para>Format the correct number of columns for Unicode (Patrice)</para></listitem>
27279 </itemizedlist>
27280   </sect3>
27281
27282   <sect3>
27283    <title><application>libpq</></title>
27284 <itemizedlist>
27285 <listitem><para>New function PQescapeString() to escape quotes in command strings (Florian Weimer)</para></listitem>
27286 <listitem><para>New function PQescapeBytea() escapes binary strings for use as SQL string literals</para></listitem>
27287 </itemizedlist>
27288   </sect3>
27289
27290   <sect3>
27291    <title>JDBC</title>
27292 <itemizedlist>
27293 <listitem><para>Return OID of INSERT (Ken K)</para></listitem>
27294 <listitem><para>Handle more data types (Ken K)</para></listitem>
27295 <listitem><para>Handle single quotes and newlines in strings (Ken K)</para></listitem>
27296 <listitem><para>Handle NULL variables (Ken K)</para></listitem>
27297 <listitem><para>Fix for time zone handling (Barry Lind)</para></listitem>
27298 <listitem><para>Improved Druid support</para></listitem>
27299 <listitem><para>Allow eight-bit characters with non-multibyte server (Barry Lind)</para></listitem>
27300 <listitem><para>Support BIT, BINARY types (Ned Wolpert)</para></listitem>
27301 <listitem><para>Reduce memory usage (Michael Stephens, Dave Cramer)</para></listitem>
27302 <listitem><para>Update DatabaseMetaData (Peter E)</para></listitem>
27303 <listitem><para>Add DatabaseMetaData.getCatalogs() (Peter E)</para></listitem>
27304 <listitem><para>Encoding fixes (Anders Bengtsson)</para></listitem>
27305 <listitem><para>Get/setCatalog methods (Jason Davies)</para></listitem>
27306 <listitem><para>DatabaseMetaData.getColumns() now returns column defaults (Jason Davies)</para></listitem>
27307 <listitem><para>DatabaseMetaData.getColumns() performance improvement (Jeroen van Vianen)</para></listitem>
27308 <listitem><para>Some JDBC1 and JDBC2 merging (Anders Bengtsson)</para></listitem>
27309 <listitem><para>Transaction performance improvements (Barry Lind)</para></listitem>
27310 <listitem><para>Array fixes (Greg Zoller)</para></listitem>
27311 <listitem><para>Serialize addition </para></listitem>
27312 <listitem><para>Fix batch processing (Rene Pijlman)</para></listitem>
27313 <listitem><para>ExecSQL method reorganization (Anders Bengtsson)</para></listitem>
27314 <listitem><para>GetColumn() fixes (Jeroen van Vianen)</para></listitem>
27315 <listitem><para>Fix isWriteable() function (Rene Pijlman)</para></listitem>
27316 <listitem><para>Improved passage of JDBC2 conformance tests (Rene Pijlman)</para></listitem>
27317 <listitem><para>Add bytea type capability (Barry Lind)</para></listitem>
27318 <listitem><para>Add isNullable() (Rene Pijlman)</para></listitem>
27319 <listitem><para>JDBC date/time test suite fixes (Liam Stewart)</para></listitem>
27320 <listitem><para>Fix for SELECT 'id' AS xxx FROM table (Dave Cramer)</para></listitem>
27321 <listitem><para>Fix DatabaseMetaData to show precision properly (Mark Lillywhite)</para></listitem>
27322 <listitem><para>New getImported/getExported keys (Jason Davies)</para></listitem>
27323 <listitem><para>MD5 password encryption support (Jeremy Wohl)</para></listitem>
27324 <listitem><para>Fix to actually use type cache (Ned Wolpert)</para></listitem>
27325 </itemizedlist>
27326   </sect3>
27327
27328   <sect3>
27329    <title>ODBC</title>
27330 <itemizedlist>
27331 <listitem><para>Remove query size limit (Hiroshi)</para></listitem>
27332 <listitem><para>Remove text field size limit (Hiroshi)</para></listitem>
27333 <listitem><para>Fix for SQLPrimaryKeys in multibyte mode (Hiroshi)</para></listitem>
27334 <listitem><para>Allow ODBC procedure calls (Hiroshi)</para></listitem>
27335 <listitem><para>Improve boolean handing (Aidan Mountford)</para></listitem>
27336 <listitem><para>Most configuration options now settable via DSN (Hiroshi)</para></listitem>
27337 <listitem><para>Multibyte, performance fixes (Hiroshi)</para></listitem>
27338 <listitem><para>Allow driver to be used with iODBC or unixODBC (Peter E)</para></listitem>
27339 <listitem><para>MD5 password encryption support (Bruce)</para></listitem>
27340 <listitem><para>Add more compatibility functions to odbc.sql (Peter E)</para></listitem>
27341 </itemizedlist>
27342   </sect3>
27343
27344   <sect3>
27345    <title><application>ECPG</></title>
27346 <itemizedlist>
27347 <listitem><para>EXECUTE ... INTO implemented (Christof Petig)</para></listitem>
27348 <listitem><para>Multiple row descriptor support (e.g. CARDINALITY) (Christof Petig)</para></listitem>
27349 <listitem><para>Fix for GRANT parameters (Lee Kindness)</para></listitem>
27350 <listitem><para>Fix INITIALLY DEFERRED bug</para></listitem>
27351 <listitem><para>Various bug fixes (Michael, Christof Petig)</para></listitem>
27352 <listitem><para>Auto allocation for indicator variable arrays (int *ind_p=NULL)</para></listitem>
27353 <listitem><para>Auto allocation for string arrays (char **foo_pp=NULL)</para></listitem>
27354 <listitem><para>ECPGfree_auto_mem fixed</para></listitem>
27355 <listitem><para>All function names with external linkage are now prefixed by ECPG</para></listitem>
27356 <listitem><para>Fixes for arrays of structures (Michael)</para></listitem>
27357 </itemizedlist>
27358   </sect3>
27359
27360   <sect3>
27361    <title>Misc. Interfaces</title>
27362 <itemizedlist>
27363 <listitem><para>Python fix fetchone() (Gerhard Haring)</para></listitem>
27364 <listitem><para>Use UTF, Unicode in Tcl where appropriate (Vsevolod Lobko, Reinhard Max)</para></listitem>
27365 <listitem><para>Add Tcl COPY TO/FROM (ljb)</para></listitem>
27366 <listitem><para>Prevent output of default index op class in <application>pg_dump</> (Tom)</para></listitem>
27367 <listitem><para>Fix libpgeasy memory leak (Bruce)</para></listitem>
27368 </itemizedlist>
27369   </sect3>
27370
27371   <sect3>
27372    <title>Build and Install</title>
27373 <itemizedlist>
27374 <listitem><para>Configure, dynamic loader, and shared library fixes (Peter E)</para></listitem>
27375 <listitem><para>Fixes in QNX 4 port (Bernd Tegge)</para></listitem>
27376 <listitem><para>Fixes in Cygwin and Windows ports (Jason Tishler, Gerhard Haring, Dmitry Yurtaev, Darko Prenosil, Mikhail Terekhov)</para></listitem>
27377 <listitem><para>Fix for Windows socket communication failures (Magnus, Mikhail Terekhov)</para></listitem>
27378 <listitem><para>Hurd compile fix (Oliver Elphick)</para></listitem>
27379 <listitem><para>BeOS fixes (Cyril Velter)</para></listitem>
27380 <listitem><para>Remove configure --enable-unicode-conversion, now enabled by multibyte (Tatsuo)</para></listitem>
27381 <listitem><para>AIX fixes (Tatsuo, Andreas)</para></listitem>
27382 <listitem><para>Fix parallel make (Peter E)</para></listitem>
27383 <listitem><para>Install SQL language manual pages into OS-specific directories (Peter E)</para></listitem>
27384 <listitem><para>Rename config.h to pg_config.h (Peter E)</para></listitem>
27385 <listitem><para>Reorganize installation layout of header files (Peter E)</para></listitem>
27386 </itemizedlist>
27387   </sect3>
27388
27389   <sect3>
27390    <title>Source Code</title>
27391 <itemizedlist>
27392 <listitem><para>Remove SEP_CHAR (Bruce)</para></listitem>
27393 <listitem><para>New GUC hooks (Tom)</para></listitem>
27394 <listitem><para>Merge GUC and command line handling (Marko Kreen)</para></listitem>
27395 <listitem><para>Remove EXTEND INDEX (Martijn van Oosterhout, Tom)</para></listitem>
27396 <listitem><para>New pgjindent utility to indent java code (Bruce)</para></listitem>
27397 <listitem><para>Remove define of true/false when compiling under C++ (Leandro Fanzone, Tom)</para></listitem>
27398 <listitem><para>pgindent fixes (Bruce, Tom)</para></listitem>
27399 <listitem><para>Replace strcasecmp() with strcmp() where appropriate (Peter E)</para></listitem>
27400 <listitem><para>Dynahash portability improvements (Tom)</para></listitem>
27401 <listitem><para>Add 'volatile' usage in spinlock structures</para></listitem>
27402 <listitem><para>Improve signal handling logic (Tom)</para></listitem>
27403 </itemizedlist>
27404   </sect3>
27405
27406   <sect3>
27407    <title>Contrib</title>
27408 <itemizedlist>
27409 <listitem><para>New contrib/rtree_gist (Oleg Bartunov, Teodor Sigaev)</para></listitem>
27410 <listitem><para>New contrib/tsearch full-text indexing (Oleg, Teodor Sigaev)</para></listitem>
27411 <listitem><para>Add contrib/dblink for remote database access (Joe Conway)</para></listitem>
27412 <listitem><para>contrib/ora2pg Oracle conversion utility (Gilles Darold)</para></listitem>
27413 <listitem><para>contrib/xml XML conversion utility (John Gray)</para></listitem>
27414 <listitem><para>contrib/fulltextindex fixes (Christopher Kings-Lynne)</para></listitem>
27415 <listitem><para>New contrib/fuzzystrmatch with levenshtein and metaphone, soundex merged (Joe Conway)</para></listitem>
27416 <listitem><para>Add contrib/intarray boolean queries, binary search, fixes (Oleg Bartunov)</para></listitem>
27417 <listitem><para>New pg_upgrade utility (Bruce)</para></listitem>
27418 <listitem><para>Add new pg_resetxlog options (Bruce, Tom)</para></listitem>
27419 </itemizedlist>
27420   </sect3>
27421  </sect2>
27422 </sect1>
27423
27424
27425  <sect1 id="release-7-1-3">
27426   <title>Release 7.1.3</title>
27427
27428   <note>
27429   <title>Release date</title>
27430   <simpara>2001-08-15</simpara>
27431   </note>
27432
27433   <sect2>
27434    <title>Migration to Version 7.1.3</title>
27435
27436    <para>
27437     A dump/restore is <emphasis>not</emphasis> required for those running
27438     7.1.X.
27439    </para>
27440   </sect2>
27441
27442   <sect2>
27443    <title>Changes</title>
27444
27445    <para>
27446     <programlisting>
27447 Remove unused WAL segments of large transactions (Tom)
27448 Multiaction rule fix (Tom)
27449 PL/pgSQL memory allocation fix (Jan)
27450 VACUUM buffer fix (Tom)
27451 Regression test fixes (Tom)
27452 pg_dump fixes for GRANT/REVOKE/comments on views, user-defined types (Tom)
27453 Fix subselects with DISTINCT ON or LIMIT (Tom)
27454 BeOS fix
27455 Disable COPY TO/FROM a view (Tom)
27456 Cygwin build (Jason Tishler)
27457     </programlisting>
27458    </para>
27459   </sect2>
27460  </sect1>
27461
27462
27463  <sect1 id="release-7-1-2">
27464   <title>Release 7.1.2</title>
27465
27466   <note>
27467   <title>Release date</title>
27468   <simpara>2001-05-11</simpara>
27469   </note>
27470
27471   <para>
27472    This has one fix from 7.1.1.
27473   </para>
27474
27475
27476   <sect2>
27477    <title>Migration to Version 7.1.2</title>
27478
27479    <para>
27480     A dump/restore is <emphasis>not</emphasis> required for those running
27481     7.1.X.
27482    </para>
27483   </sect2>
27484
27485   <sect2>
27486    <title>Changes</title>
27487
27488    <para>
27489     <programlisting>
27490 Fix PL/pgSQL SELECTs when returning no rows
27491 Fix for psql backslash core dump
27492 Referential integrity privilege fix
27493 Optimizer fixes
27494 pg_dump cleanups
27495     </programlisting>
27496    </para>
27497   </sect2>
27498  </sect1>
27499
27500
27501  <sect1 id="release-7-1-1">
27502   <title>Release 7.1.1</title>
27503
27504   <note>
27505   <title>Release date</title>
27506   <simpara>2001-05-05</simpara>
27507   </note>
27508
27509   <para>
27510    This has a variety of fixes from 7.1.
27511   </para>
27512
27513
27514   <sect2>
27515    <title>Migration to Version 7.1.1</title>
27516
27517    <para>
27518     A dump/restore is <emphasis>not</emphasis> required for those running
27519     7.1.
27520    </para>
27521   </sect2>
27522
27523   <sect2>
27524    <title>Changes</title>
27525
27526    <para>
27527     <programlisting>
27528 Fix for numeric MODULO operator (Tom)
27529 pg_dump fixes (Philip)
27530 pg_dump can dump 7.0 databases (Philip)
27531 readline 4.2 fixes (Peter E)
27532 JOIN fixes (Tom)
27533 AIX, MSWIN, VAX, N32K fixes (Tom)
27534 Multibytes fixes (Tom)
27535 Unicode fixes (Tatsuo)
27536 Optimizer improvements (Tom)
27537 Fix for whole rows in functions (Tom)
27538 Fix for pg_ctl and option strings with spaces (Peter E)
27539 ODBC fixes (Hiroshi)
27540 EXTRACT can now take string argument (Thomas)
27541 Python fixes (Darcy)
27542     </programlisting>
27543    </para>
27544   </sect2>
27545  </sect1>
27546
27547
27548  <sect1 id="release-7-1">
27549   <title>Release 7.1</title>
27550
27551   <note>
27552   <title>Release date</title>
27553   <simpara>2001-04-13</simpara>
27554   </note>
27555
27556   <para>
27557        This release focuses on removing limitations that have existed in the
27558        <productname>PostgreSQL</productname> code for many years.
27559   </para>
27560
27561   <para>
27562    Major changes in this release:
27563   </para>
27564
27565   <variablelist>
27566    <varlistentry>
27567     <term>
27568       Write-ahead Log (WAL)
27569     </term>
27570     <listitem>
27571      <para>
27572 To maintain database consistency in case of an operating system crash,
27573 previous releases of <productname>PostgreSQL</productname> have forced
27574 all data modifications to disk before each transaction commit.  With
27575 WAL, only one log file must be flushed to disk, greatly improving
27576 performance.  If you have been using -F in previous releases to
27577 disable disk flushes, you might want to consider discontinuing its use.
27578      </para>
27579     </listitem>
27580    </varlistentry>
27581
27582    <varlistentry>
27583     <term>
27584       TOAST
27585     </term>
27586     <listitem>
27587      <para>
27588       TOAST - Previous releases had a compiled-in row length limit,
27589 typically 8k - 32k. This limit made storage of long text fields
27590 difficult.  With TOAST, long rows of any length can be stored with good
27591 performance.
27592      </para>
27593     </listitem>
27594    </varlistentry>
27595
27596    <varlistentry>
27597     <term>
27598       Outer Joins
27599     </term>
27600     <listitem>
27601      <para>
27602 We now support outer joins.  The UNION/NOT IN
27603 workaround for outer joins is no longer required.  We use the SQL92
27604 outer join syntax.
27605      </para>
27606     </listitem>
27607    </varlistentry>
27608
27609    <varlistentry>
27610     <term>
27611       Function Manager
27612     </term>
27613     <listitem>
27614      <para>
27615 The previous C function manager did not
27616 handle null values properly, nor did it support 64-bit <acronym>CPU</acronym>'s (Alpha).  The new
27617 function manager does.  You can continue using your old custom
27618 functions, but you might want to rewrite them in the future to use the new
27619 function manager call interface.
27620      </para>
27621     </listitem>
27622    </varlistentry>
27623
27624    <varlistentry>
27625     <term>
27626       Complex Queries
27627     </term>
27628     <listitem>
27629      <para>
27630 A large number of complex queries that were
27631 unsupported in previous releases now work.  Many combinations of views,
27632 aggregates, UNION, LIMIT, cursors, subqueries, and inherited tables
27633 now work properly. Inherited tables are now accessed by default.
27634 Subqueries in FROM are now supported.
27635      </para>
27636     </listitem>
27637    </varlistentry>
27638
27639   </variablelist>
27640
27641   <sect2>
27642    <title>Migration to Version 7.1</title>
27643
27644    <para>
27645        A dump/restore using pg_dump is required for those wishing to migrate
27646        data from any previous release.
27647    </para>
27648   </sect2>
27649
27650   <sect2>
27651    <title>Changes</title>
27652
27653    <para>
27654     <programlisting>
27655 Bug Fixes
27656 ---------
27657 Many multibyte/Unicode/locale fixes (Tatsuo and others)
27658 More reliable ALTER TABLE RENAME (Tom)
27659 Kerberos V fixes (David Wragg)
27660 Fix for INSERT INTO...SELECT where targetlist has subqueries (Tom)
27661 Prompt username/password on standard error (Bruce)
27662 Large objects inv_read/inv_write fixes (Tom)
27663 Fixes for to_char(), to_date(), to_ascii(), and to_timestamp() (Karel,
27664    Daniel Baldoni)
27665 Prevent query expressions from leaking memory (Tom)
27666 Allow UPDATE of arrays elements (Tom)
27667 Wake up lock waiters during cancel (Hiroshi)
27668 Fix rare cursor crash when using hash join (Tom)
27669 Fix for DROP TABLE/INDEX in rolled-back transaction (Hiroshi)
27670 Fix psql crash from \l+ if MULTIBYTE enabled (Peter E)
27671 Fix truncation of rule names during CREATE VIEW (Ross Reedstrom)
27672 Fix PL/perl (Alex Kapranoff)
27673 Disallow LOCK on views (Mark Hollomon)
27674 Disallow INSERT/UPDATE/DELETE on views (Mark Hollomon)
27675 Disallow DROP RULE, CREATE INDEX, TRUNCATE on views (Mark Hollomon)
27676 Allow PL/pgSQL accept non-ASCII identifiers (Tatsuo)
27677 Allow views to proper handle GROUP BY, aggregates, DISTINCT (Tom)
27678 Fix rare failure with TRUNCATE command (Tom)
27679 Allow UNION/INTERSECT/EXCEPT to be used with ALL, subqueries, views,
27680    DISTINCT, ORDER BY, SELECT...INTO (Tom)
27681 Fix parser failures during aborted transactions (Tom)
27682 Allow temporary relations to properly clean up indexes (Bruce)
27683 Fix VACUUM problem with moving rows in same page (Tom)
27684 Modify pg_dump to better handle user-defined items in template1 (Philip)
27685 Allow LIMIT in VIEW (Tom)
27686 Require cursor FETCH to honor LIMIT (Tom)
27687 Allow PRIMARY/FOREIGN Key definitions on inherited columns (Stephan)
27688 Allow ORDER BY, LIMIT in subqueries (Tom)
27689 Allow UNION in CREATE RULE (Tom)
27690 Make ALTER/DROP TABLE rollback-able (Vadim, Tom)
27691 Store initdb collation in pg_control so collation cannot be changed (Tom)
27692 Fix INSERT...SELECT with rules (Tom)
27693 Fix FOR UPDATE inside views and subselects (Tom)
27694 Fix OVERLAPS operators conform to SQL92 spec regarding NULLs (Tom)
27695 Fix lpad() and rpad() to handle length less than input string (Tom)
27696 Fix use of NOTIFY in some rules (Tom)
27697 Overhaul btree code (Tom)
27698 Fix NOT NULL use in Pl/pgSQL variables (Tom)
27699 Overhaul GIST code (Oleg)
27700 Fix CLUSTER to preserve constraints and column default (Tom)
27701 Improved deadlock detection handling (Tom)
27702 Allow multiple SERIAL columns in a table (Tom)
27703 Prevent occasional index corruption (Vadim)
27704
27705 Enhancements
27706 ------------
27707 Add OUTER JOINs (Tom)
27708 Function manager overhaul (Tom)
27709 Allow ALTER TABLE RENAME on indexes (Tom)
27710 Improve CLUSTER (Tom)
27711 Improve ps status display for more platforms (Peter E, Marc)
27712 Improve CREATE FUNCTION failure message (Ross)
27713 JDBC improvements (Peter, Travis Bauer, Christopher Cain, William Webber,
27714    Gunnar)
27715 Grand Unified Configuration scheme/GUC.  Many options can now be set in
27716    data/postgresql.conf, postmaster/postgres flags, or SET commands (Peter E)
27717 Improved handling of file descriptor cache (Tom)
27718 New warning code about auto-created table alias entries (Bruce)
27719 Overhaul initdb process (Tom, Peter E)
27720 Overhaul of inherited tables; inherited tables now accessed by default;
27721   new ONLY key word prevents it (Chris Bitmead, Tom)
27722 ODBC cleanups/improvements (Nick Gorham, Stephan Szabo, Zoltan Kovacs,
27723    Michael Fork)
27724 Allow renaming of temp tables (Tom)
27725 Overhaul memory manager contexts (Tom)
27726 pg_dumpall uses CREATE USER or CREATE GROUP rather using COPY (Peter E)
27727 Overhaul pg_dump (Philip Warner)
27728 Allow pg_hba.conf secondary password file to specify only username (Peter E)
27729 Allow TEMPORARY or TEMP key word when creating temporary tables (Bruce)
27730 New memory leak checker (Karel)
27731 New SET SESSION CHARACTERISTICS (Thomas)
27732 Allow nested block comments (Thomas)
27733 Add WITHOUT TIME ZONE type qualifier (Thomas)
27734 New ALTER TABLE ADD CONSTRAINT (Stephan)
27735 Use NUMERIC accumulators for INTEGER aggregates (Tom)
27736 Overhaul aggregate code (Tom)
27737 New VARIANCE and STDDEV() aggregates
27738 Improve dependency ordering of pg_dump (Philip)
27739 New pg_restore command (Philip)
27740 New pg_dump tar output option (Philip)
27741 New pg_dump of large objects  (Philip)
27742 New ESCAPE option to LIKE (Thomas)
27743 New case-insensitive LIKE - ILIKE (Thomas)
27744 Allow functional indexes to use binary-compatible type (Tom)
27745 Allow SQL functions to be used in more contexts (Tom)
27746 New pg_config utility (Peter E)
27747 New PL/pgSQL EXECUTE command which allows dynamic SQL and utility statements
27748    (Jan)
27749 New PL/pgSQL GET DIAGNOSTICS statement for SPI value access (Jan)
27750 New quote_identifiers() and quote_literal() functions (Jan)
27751 New ALTER TABLE table OWNER TO user command (Mark Hollomon)
27752 Allow subselects in FROM, i.e. FROM (SELECT ...) [AS] alias (Tom)
27753 Update PyGreSQL to version 3.1 (D'Arcy)
27754 Store tables as files named by OID (Vadim)
27755 New SQL function setval(seq,val,bool) for use in pg_dump (Philip)
27756 Require DROP VIEW to remove views, no DROP TABLE (Mark)
27757 Allow DROP VIEW view1, view2 (Mark)
27758 Allow multiple objects in DROP INDEX, DROP RULE, and DROP TYPE (Tom)
27759 Allow automatic conversion to/from Unicode (Tatsuo, Eiji)
27760 New /contrib/pgcrypto hashing functions (Marko Kreen)
27761 New pg_dumpall --globals-only option (Peter E)
27762 New CHECKPOINT command for WAL which creates new WAL log file (Vadim)
27763 New AT TIME ZONE syntax (Thomas)
27764 Allow location of Unix domain socket to be configurable (David J. MacKenzie)
27765 Allow postmaster to listen on a specific IP address (David J. MacKenzie)
27766 Allow socket path name to be specified in hostname by using leading slash
27767    (David J. MacKenzie)
27768 Allow CREATE DATABASE to specify template database (Tom)
27769 New utility to convert MySQL schema dumps to SQL92 and PostgreSQL (Thomas)
27770 New /contrib/rserv replication toolkit (Vadim)
27771 New file format for COPY BINARY (Tom)
27772 New /contrib/oid2name to map numeric files to table names (B Palmer)
27773 New "idle in transaction" ps status message (Marc)
27774 Update to pgaccess 0.98.7 (Constantin Teodorescu)
27775 pg_ctl now defaults to -w (wait) on shutdown, new -l (log) option
27776 Add rudimentary dependency checking to pg_dump (Philip)
27777
27778 Types
27779 -----
27780 Fix INET/CIDR type ordering and add new functions (Tom)
27781 Make OID behave as an unsigned type (Tom)
27782 Allow BIGINT as synonym for INT8 (Peter E)
27783 New int2 and int8 comparison operators (Tom)
27784 New BIT and BIT VARYING types (Adriaan Joubert, Tom, Peter E)
27785 CHAR() no longer faster than VARCHAR() because of TOAST (Tom)
27786 New GIST seg/cube examples (Gene Selkov)
27787 Improved round(numeric) handling (Tom)
27788 Fix CIDR output formatting (Tom)
27789 New CIDR abbrev() function (Tom)
27790
27791 Performance
27792 -----------
27793 Write-Ahead Log (WAL) to provide crash recovery with less performance
27794    overhead (Vadim)
27795 ANALYZE stage of VACUUM no longer exclusively locks table (Bruce)
27796 Reduced file seeks (Denis Perchine)
27797 Improve BTREE code for duplicate keys (Tom)
27798 Store all large objects in a single table (Denis Perchine, Tom)
27799 Improve memory allocation performance (Karel, Tom)
27800
27801 Source Code
27802 -----------
27803 New function manager call conventions (Tom)
27804 SGI portability fixes (David Kaelbling)
27805 New configure --enable-syslog option (Peter E)
27806 New BSDI README (Bruce)
27807 configure script moved to top level, not /src (Peter E)
27808 Makefile/configuration/compilation overhaul (Peter E)
27809 New configure --with-python option (Peter E)
27810 Solaris cleanups (Peter E)
27811 Overhaul /contrib Makefiles (Karel)
27812 New OpenSSL configuration option (Magnus, Peter E)
27813 AIX fixes (Andreas)
27814 QNX fixes (Maurizio)
27815 New heap_open(), heap_openr() API (Tom)
27816 Remove colon and semi-colon operators (Thomas)
27817 New pg_class.relkind value for views (Mark Hollomon)
27818 Rename ichar() to chr() (Karel)
27819 New documentation for btrim(), ascii(), chr(), repeat() (Karel)
27820 Fixes for NT/Cygwin (Pete Forman)
27821 AIX port fixes (Andreas)
27822 New BeOS port (David Reid, Cyril Velter)
27823 Add proofreader's changes to docs (Addison-Wesley, Bruce)
27824 New Alpha spinlock code (Adriaan Joubert, Compaq)
27825 UnixWare port overhaul (Peter E)
27826 New Darwin/MacOS X port (Peter Bierman, Bruce Hartzler)
27827 New FreeBSD Alpha port (Alfred)
27828 Overhaul shared memory segments (Tom)
27829 Add IBM S/390 support (Neale Ferguson)
27830 Moved macmanuf to /contrib (Larry Rosenman)
27831 Syslog improvements (Larry Rosenman)
27832 New template0 database that contains no user additions (Tom)
27833 New /contrib/cube and /contrib/seg GIST sample code (Gene Selkov)
27834 Allow NetBSD's libedit instead of readline (Peter)
27835 Improved assembly language source code format (Bruce)
27836 New contrib/pg_logger
27837 New --template option to createdb
27838 New contrib/pg_control utility (Oliver)
27839 New FreeBSD tools ipc_check, start-scripts/freebsd
27840     </programlisting>
27841    </para>
27842   </sect2>
27843  </sect1>
27844
27845
27846  <sect1 id="release-7-0-3">
27847   <title>Release 7.0.3</title>
27848
27849   <note>
27850   <title>Release date</title>
27851   <simpara>2000-11-11</simpara>
27852   </note>
27853
27854   <para>
27855    This has a variety of fixes from 7.0.2.
27856   </para>
27857
27858
27859   <sect2>
27860    <title>Migration to Version 7.0.3</title>
27861
27862    <para>
27863     A dump/restore is <emphasis>not</emphasis> required for those running
27864     7.0.*.
27865    </para>
27866   </sect2>
27867
27868   <sect2>
27869    <title>Changes</title>
27870
27871    <para>
27872     <programlisting>
27873 Jdbc fixes (Peter)
27874 Large object fix (Tom)
27875 Fix lean in COPY WITH OIDS leak (Tom)
27876 Fix backwards-index-scan (Tom)
27877 Fix SELECT ... FOR UPDATE so it checks for duplicate keys (Hiroshi)
27878 Add --enable-syslog to configure (Marc)
27879 Fix abort transaction at backend exit in rare cases (Tom)
27880 Fix for psql \l+ when multibyte enabled (Tatsuo)
27881 Allow PL/pgSQL to accept non ascii identifiers (Tatsuo)
27882 Make vacuum always flush buffers (Tom)
27883 Fix to allow cancel while waiting for a lock (Hiroshi)
27884 Fix for memory allocation problem in user authentication code (Tom)
27885 Remove bogus use of int4out() (Tom)
27886 Fixes for multiple subqueries in COALESCE or BETWEEN (Tom)
27887 Fix for failure of triggers on heap open in certain cases (Jeroen van
27888    Vianen)
27889 Fix for erroneous selectivity of not-equals (Tom)
27890 Fix for erroneous use of strcmp() (Tom)
27891 Fix for bug where storage manager accesses items beyond end of file
27892    (Tom)
27893 Fix to include kernel errno message in all smgr elog messages (Tom)
27894 Fix for '.' not in PATH at build time (SL Baur)
27895 Fix for out-of-file-descriptors error (Tom)
27896 Fix to make pg_dump dump 'iscachable' flag for functions (Tom)
27897 Fix for subselect in targetlist of Append node (Tom)
27898 Fix for mergejoin plans (Tom)
27899 Fix TRUNCATE failure on relations with indexes (Tom)
27900 Avoid database-wide restart on write error (Hiroshi)
27901 Fix nodeMaterial to honor chgParam by recomputing its output (Tom)
27902 Fix VACUUM problem with moving chain of update row versions when source
27903    and destination of a row version lie on the same page (Tom)
27904 Fix user.c CommandCounterIncrement (Tom)
27905 Fix for AM/PM boundary problem in to_char() (Karel Zak)
27906 Fix TIME aggregate handling (Tom)
27907 Fix to_char() to avoid coredump on NULL input (Tom)
27908 Buffer fix (Tom)
27909 Fix for inserting/copying longer multibyte strings into char() data
27910    types (Tatsuo)
27911 Fix for crash of backend, on abort (Tom)
27912     </programlisting>
27913    </para>
27914   </sect2>
27915  </sect1>
27916
27917
27918  <sect1 id="release-7-0-2">
27919   <title>Release 7.0.2</title>
27920
27921   <note>
27922   <title>Release date</title>
27923   <simpara>2000-06-05</simpara>
27924   </note>
27925
27926   <para>
27927    This is a repackaging of 7.0.1 with added documentation.
27928   </para>
27929
27930
27931   <sect2>
27932    <title>Migration to Version 7.0.2</title>
27933
27934    <para>
27935     A dump/restore is <emphasis>not</emphasis> required for those running
27936     7.*.
27937    </para>
27938   </sect2>
27939
27940   <sect2>
27941    <title>Changes</title>
27942
27943    <para>
27944     <programlisting>
27945 Added documentation to tarball.
27946     </programlisting>
27947    </para>
27948   </sect2>
27949  </sect1>
27950
27951
27952  <sect1 id="release-7-0-1">
27953   <title>Release 7.0.1</title>
27954
27955   <note>
27956   <title>Release date</title>
27957   <simpara>2000-06-01</simpara>
27958   </note>
27959
27960   <para>
27961    This is a cleanup release for 7.0.
27962   </para>
27963
27964   <sect2>
27965    <title>Migration to Version 7.0.1</title>
27966
27967    <para>
27968     A dump/restore is <emphasis>not</emphasis> required for those running
27969     7.0.
27970    </para>
27971   </sect2>
27972
27973   <sect2>
27974    <title>Changes</title>
27975
27976    <para>
27977     <programlisting>
27978 Fix many CLUSTER failures (Tom)
27979 Allow ALTER TABLE RENAME works on indexes (Tom)
27980 Fix plpgsql to handle datetime-&gt;timestamp and timespan-&gt;interval (Bruce)
27981 New configure --with-setproctitle switch to use setproctitle() (Marc, Bruce)
27982 Fix the off by one errors in ResultSet from 6.5.3, and more.
27983 jdbc ResultSet fixes (Joseph Shraibman)
27984 optimizer tunings (Tom)
27985 Fix create user for pgaccess
27986 Fix for UNLISTEN failure
27987 IRIX fixes (David Kaelbling)
27988 QNX fixes (Andreas Kardos)
27989 Reduce COPY IN lock level (Tom)
27990 Change libpqeasy to use PQconnectdb() style parameters (Bruce)
27991 Fix pg_dump to handle OID indexes (Tom)
27992 Fix small memory leak (Tom)
27993 Solaris fix for createdb/dropdb (Tatsuo)
27994 Fix for non-blocking connections (Alfred Perlstein)
27995 Fix improper recovery after RENAME TABLE failures (Tom)
27996 Copy pg_ident.conf.sample into /lib directory in install (Bruce)
27997 Add SJIS UDC (NEC selection IBM kanji) support (Eiji Tokuya)
27998 Fix too long syslog message (Tatsuo)
27999 Fix problem with quoted indexes that are too long (Tom)
28000 JDBC ResultSet.getTimestamp() fix (Gregory Krasnow &amp; Floyd Marinescu)
28001 ecpg changes (Michael)
28002     </programlisting>
28003    </para>
28004   </sect2>
28005  </sect1>
28006
28007  <sect1 id="release-7-0">
28008   <title>Release 7.0</title>
28009
28010   <note>
28011   <title>Release date</title>
28012   <simpara>2000-05-08</simpara>
28013   </note>
28014
28015   <para>
28016    This release contains improvements in many areas, demonstrating
28017    the continued growth of <productname>PostgreSQL</productname>.
28018    There are more improvements and fixes in 7.0 than in any previous
28019    release. The developers have confidence that this is the best
28020    release yet; we do our best to put out only solid releases, and
28021    this one is no exception.
28022   </para>
28023
28024   <para>
28025    Major changes in this release:
28026   </para>
28027
28028   <variablelist>
28029    <varlistentry>
28030     <term>
28031      Foreign Keys
28032     </term>
28033     <listitem>
28034      <para>
28035       Foreign keys are now implemented, with the exception of PARTIAL MATCH
28036       foreign keys. Many users have been asking for this feature, and we are
28037       pleased to offer it.
28038      </para>
28039     </listitem>
28040    </varlistentry>
28041
28042    <varlistentry>
28043     <term>
28044      Optimizer Overhaul
28045     </term>
28046     <listitem>
28047      <para>
28048       Continuing on work started a year ago, the optimizer has been
28049       improved, allowing better query plan selection and faster performance
28050       with less memory usage.
28051      </para>
28052     </listitem>
28053    </varlistentry>
28054
28055    <varlistentry>
28056     <term>
28057      Updated <application>psql</application>
28058     </term>
28059     <listitem>
28060      <para>
28061       <application>psql</application>, our interactive terminal monitor, has been
28062       updated with a variety of new features. See the <application>psql</application> manual page for details.
28063      </para>
28064     </listitem>
28065    </varlistentry>
28066
28067    <varlistentry>
28068     <term>
28069      Join Syntax
28070     </term>
28071     <listitem>
28072      <para>
28073       SQL92 join syntax is now supported, though only as
28074       <literal>INNER JOIN</> for this release. <literal>JOIN</>,
28075       <literal>NATURAL JOIN</>, <literal>JOIN</>/<literal>USING</>,
28076       and <literal>JOIN</>/<literal>ON</> are available, as are
28077       column correlation names.
28078      </para>
28079     </listitem>
28080
28081    </varlistentry>
28082   </variablelist>
28083
28084   <sect2>
28085    <title>Migration to Version 7.0</title>
28086
28087    <para>
28088     A dump/restore using <application>pg_dump</application>
28089     is required for those wishing to migrate data from any
28090     previous release of <productname>PostgreSQL</productname>.
28091     For those upgrading from 6.5.*, you can instead use
28092     <application>pg_upgrade</application> to upgrade to this
28093     release; however, a full dump/reload installation is always the
28094     most robust method for upgrades.
28095    </para>
28096
28097    <para>
28098     Interface and compatibility issues to consider for the new
28099     release include:
28100    </para>
28101
28102    <itemizedlist>
28103     <listitem>
28104      <para>
28105       The date/time types <type>datetime</type> and
28106       <type>timespan</type> have been superseded by the
28107       SQL92-defined types <type>timestamp</type> and
28108       <type>interval</type>. Although there has been some effort to
28109       ease the transition by allowing
28110       <productname>PostgreSQL</productname> to recognize
28111       the deprecated type names and translate them to the new type
28112       names, this mechanism cannot be completely transparent to
28113       your existing application.
28114      </para>
28115     </listitem>
28116
28117     <listitem>
28118      <para>
28119       The optimizer has been substantially improved in the area of
28120       query cost estimation. In some cases, this will result in
28121       decreased query times as the optimizer makes a better choice
28122       for the preferred plan. However, in a small number of cases,
28123       usually involving pathological distributions of data, your
28124       query times might go up. If you are dealing with large amounts
28125       of data, you might want to check your queries to verify
28126       performance.
28127      </para>
28128     </listitem>
28129
28130     <listitem>
28131      <para>
28132       The <acronym>JDBC</acronym> and <acronym>ODBC</acronym>
28133       interfaces have been upgraded and extended.
28134      </para>
28135     </listitem>
28136
28137     <listitem>
28138      <para>
28139       The string function <function>CHAR_LENGTH</function> is now a
28140       native function. Previous versions translated this into a call
28141       to <function>LENGTH</function>, which could result in
28142       ambiguity with other types implementing
28143       <function>LENGTH</function> such as the geometric types.
28144      </para>
28145     </listitem>
28146    </itemizedlist>
28147   </sect2>
28148
28149   <sect2>
28150    <title>Changes</title>
28151
28152    <para>
28153     <programlisting>
28154 Bug Fixes
28155 ---------
28156 Prevent function calls exceeding maximum number of arguments (Tom)
28157 Improve CASE construct (Tom)
28158 Fix SELECT coalesce(f1,0) FROM int4_tbl GROUP BY f1 (Tom)
28159 Fix SELECT sentence.words[0] FROM sentence GROUP BY sentence.words[0] (Tom)
28160 Fix GROUP BY scan bug (Tom)
28161 Improvements in SQL grammar processing (Tom)
28162 Fix for views involved in INSERT ... SELECT ... (Tom)
28163 Fix for SELECT a/2, a/2 FROM test_missing_target GROUP BY a/2 (Tom)
28164 Fix for subselects in INSERT ... SELECT (Tom)
28165 Prevent INSERT ... SELECT ... ORDER BY (Tom)
28166 Fixes for relations greater than 2GB, including vacuum
28167 Improve propagating system table changes to other backends (Tom)
28168 Improve propagating user table changes to other backends (Tom)
28169 Fix handling of temp tables in complex situations (Bruce, Tom)
28170 Allow table locking at table open, improving concurrent reliability (Tom)
28171 Properly quote sequence names in pg_dump (Ross J. Reedstrom)
28172 Prevent DROP DATABASE while others accessing
28173 Prevent any rows from being returned by GROUP BY if no rows processed (Tom)
28174 Fix SELECT COUNT(1) FROM table WHERE ...' if no rows matching WHERE (Tom)
28175 Fix pg_upgrade so it works for MVCC (Tom)
28176 Fix for SELECT ... WHERE x IN (SELECT ... HAVING SUM(x) &gt; 1) (Tom)
28177 Fix for "f1 datetime DEFAULT 'now'"  (Tom)
28178 Fix problems with CURRENT_DATE used in DEFAULT (Tom)
28179 Allow comment-only lines, and ;;; lines too. (Tom)
28180 Improve recovery after failed disk writes, disk full (Hiroshi)
28181 Fix cases where table is mentioned in FROM but not joined (Tom)
28182 Allow HAVING clause without aggregate functions (Tom)
28183 Fix for "--" comment and no trailing newline, as seen in perl interface
28184 Improve pg_dump failure error reports (Bruce)
28185 Allow sorts and hashes to exceed 2GB file sizes (Tom)
28186 Fix for pg_dump dumping of inherited rules (Tom)
28187 Fix for NULL handling comparisons (Tom)
28188 Fix inconsistent state caused by failed CREATE/DROP commands (Hiroshi)
28189 Fix for dbname with dash
28190 Prevent DROP INDEX from interfering with other backends (Tom)
28191 Fix file descriptor leak in verify_password()
28192 Fix for "Unable to identify an operator =$" problem
28193 Fix ODBC so no segfault if CommLog and Debug enabled (Dirk Niggemann)
28194 Fix for recursive exit call (Massimo)
28195 Fix for extra-long timezones (Jeroen van Vianen)
28196 Make pg_dump preserve primary key information (Peter E)
28197 Prevent databases with single quotes (Peter E)
28198 Prevent DROP DATABASE inside  transaction (Peter E)
28199 ecpg memory leak fixes (Stephen Birch)
28200 Fix for SELECT null::text, SELECT int4fac(null) and SELECT 2 + (null) (Tom)
28201 Y2K timestamp fix (Massimo)
28202 Fix for VACUUM 'HEAP_MOVED_IN was not expected' errors (Tom)
28203 Fix for views with tables/columns containing spaces  (Tom)
28204 Prevent privileges on indexes (Peter E)
28205 Fix for spinlock stuck problem when error is generated (Hiroshi)
28206 Fix ipcclean on Linux
28207 Fix handling of NULL constraint conditions (Tom)
28208 Fix memory leak in odbc driver (Nick Gorham)
28209 Fix for privilege check on UNION tables (Tom)
28210 Fix to allow SELECT 'a' LIKE 'a' (Tom)
28211 Fix for SELECT 1 + NULL (Tom)
28212 Fixes to CHAR
28213 Fix log() on numeric type (Tom)
28214 Deprecate ':' and ';' operators
28215 Allow vacuum of temporary tables
28216 Disallow inherited columns with the same name as new columns
28217 Recover or force failure when disk space is exhausted (Hiroshi)
28218 Fix INSERT INTO ... SELECT with AS columns matching result columns
28219 Fix INSERT ... SELECT ... GROUP BY groups by target columns not source columns (Tom)
28220 Fix CREATE TABLE test (a char(5) DEFAULT text '', b int4) with INSERT (Tom)
28221 Fix UNION with LIMIT
28222 Fix CREATE TABLE x AS SELECT 1 UNION SELECT 2
28223 Fix CREATE TABLE test(col char(2) DEFAULT user)
28224 Fix mismatched types in CREATE TABLE ... DEFAULT
28225 Fix SELECT * FROM pg_class where oid in (0,-1)
28226 Fix SELECT COUNT('asdf') FROM pg_class WHERE oid=12
28227 Prevent user who can create databases can modifying pg_database table (Peter E)
28228 Fix btree to give a useful elog when key &gt; 1/2 (page - overhead) (Tom)
28229 Fix INSERT of 0.0 into DECIMAL(4,4) field (Tom)
28230
28231 Enhancements
28232 ------------
28233 New CLI interface include file sqlcli.h, based on SQL3/SQL98
28234 Remove all limits on query length, row length limit still exists (Tom)
28235 Update jdbc protocol to 2.0 (Jens Glaser <email>jens@jens.de</email>)
28236 Add TRUNCATE command to quickly truncate relation (Mike Mascari)
28237 Fix to give super user and createdb user proper update catalog rights (Peter E)
28238 Allow ecpg bool variables to have NULL values (Christof)
28239 Issue ecpg error if NULL value for variable with no NULL indicator (Christof)
28240 Allow ^C to cancel COPY command (Massimo)
28241 Add SET FSYNC and SHOW PG_OPTIONS commands(Massimo)
28242 Function name overloading for dynamically-loaded C functions (Frankpitt)
28243 Add CmdTuples() to libpq++(Vince)
28244 New CREATE CONSTRAINT TRIGGER and SET CONSTRAINTS commands(Jan)
28245 Allow CREATE FUNCTION/WITH clause to be used for all language types
28246 configure --enable-debug adds -g (Peter E)
28247 configure --disable-debug removes -g (Peter E)
28248 Allow more complex default expressions (Tom)
28249 First real FOREIGN KEY constraint trigger functionality (Jan)
28250 Add FOREIGN KEY ... MATCH FULL ... ON DELETE CASCADE (Jan)
28251 Add FOREIGN KEY ... MATCH &lt;unspecified&gt; referential actions (Don Baccus)
28252 Allow WHERE restriction on ctid (physical heap location) (Hiroshi)
28253 Move pginterface from contrib to interface directory, rename to pgeasy (Bruce)
28254 Change pgeasy connectdb() parameter ordering (Bruce)
28255 Require SELECT DISTINCT target list to have all ORDER BY columns (Tom)
28256 Add Oracle's COMMENT ON command (Mike Mascari <email>mascarim@yahoo.com</email>)
28257 libpq's PQsetNoticeProcessor function now returns previous hook(Peter E)
28258 Prevent PQsetNoticeProcessor from being set to NULL (Peter E)
28259 Make USING in COPY optional (Bruce)
28260 Allow subselects in the target list (Tom)
28261 Allow subselects on the left side of comparison operators (Tom)
28262 New parallel regression test (Jan)
28263 Change backend-side COPY to write files with permissions 644 not 666 (Tom)
28264 Force permissions on PGDATA directory to be secure, even if it exists (Tom)
28265 Added psql LASTOID variable to return last inserted oid (Peter E)
28266 Allow concurrent vacuum and remove pg_vlock vacuum lock file (Tom)
28267 Add privilege check for vacuum (Peter E)
28268 New libpq functions to allow asynchronous connections: PQconnectStart(),
28269   PQconnectPoll(), PQresetStart(), PQresetPoll(), PQsetenvStart(),
28270   PQsetenvPoll(), PQsetenvAbort (Ewan Mellor)
28271 New libpq PQsetenv() function (Ewan Mellor)
28272 create/alter user extension (Peter E)
28273 New postmaster.pid and postmaster.opts under $PGDATA (Tatsuo)
28274 New scripts for create/drop user/db (Peter E)
28275 Major psql overhaul (Peter E)
28276 Add const to libpq interface (Peter E)
28277 New libpq function PQoidValue (Peter E)
28278 Show specific non-aggregate causing problem with GROUP BY (Tom)
28279 Make changes to pg_shadow recreate pg_pwd file (Peter E)
28280 Add aggregate(DISTINCT ...) (Tom)
28281 Allow flag to control COPY input/output of NULLs (Peter E)
28282 Make postgres user have a password by default (Peter E)
28283 Add CREATE/ALTER/DROP GROUP (Peter E)
28284 All administration scripts now support --long options (Peter E, Karel)
28285 Vacuumdb script now supports --all option (Peter E)
28286 ecpg new portable FETCH syntax
28287 Add ecpg EXEC SQL IFDEF, EXEC SQL IFNDEF, EXEC SQL ELSE, EXEC SQL ELIF
28288        and EXEC SQL ENDIF directives
28289 Add pg_ctl script to control backend start-up (Tatsuo)
28290 Add postmaster.opts.default file to store start-up flags (Tatsuo)
28291 Allow --with-mb=SQL_ASCII
28292 Increase maximum number of index keys to 16 (Bruce)
28293 Increase maximum number of function arguments to 16 (Bruce)
28294 Allow configuration of maximum number of index keys and arguments (Bruce)
28295 Allow unprivileged users to change their passwords (Peter E)
28296 Password authentication enabled; required for new users (Peter E)
28297 Disallow dropping a user who owns a database (Peter E)
28298 Change initdb option --with-mb to --enable-multibyte
28299 Add option for initdb to prompts for superuser password (Peter E)
28300 Allow complex type casts like col::numeric(9,2) and col::int2::float8 (Tom)
28301 Updated user interfaces on initdb, initlocation, pg_dump, ipcclean (Peter E)
28302 New pg_char_to_encoding() and pg_encoding_to_char() functions (Tatsuo)
28303 libpq non-blocking mode (Alfred Perlstein)
28304 Improve conversion of types in casts that don't specify a length
28305 New plperl internal programming language (Mark Hollomon)
28306 Allow COPY IN to read file that do not end with a newline (Tom)
28307 Indicate when long identifiers are truncated (Tom)
28308 Allow aggregates to use type equivalency (Peter E)
28309 Add Oracle's to_char(), to_date(), to_datetime(), to_timestamp(), to_number()
28310        conversion functions (Karel Zak &lt;zakkr@zf.jcu.cz&gt;)
28311 Add SELECT DISTINCT ON (expr [, expr ...]) targetlist ... (Tom)
28312 Check to be sure ORDER BY is compatible with the DISTINCT operation (Tom)
28313 Add NUMERIC and int8 types to ODBC
28314 Improve EXPLAIN results for Append, Group, Agg, Unique (Tom)
28315 Add ALTER TABLE ... ADD FOREIGN KEY (Stephan Szabo)
28316 Allow SELECT .. FOR UPDATE in PL/pgSQL (Hiroshi)
28317 Enable backward sequential scan even after reaching EOF (Hiroshi)
28318 Add btree indexing of boolean values, &gt;= and &lt;= (Don Baccus)
28319 Print current line number when COPY FROM fails (Massimo)
28320 Recognize POSIX time zone e.g. "PST+8" and "GMT-8" (Thomas)
28321 Add DEC as synonym for DECIMAL (Thomas)
28322 Add SESSION_USER as SQL92 key word, same as CURRENT_USER (Thomas)
28323 Implement SQL92 column aliases (aka correlation names) (Thomas)
28324 Implement SQL92 join syntax (Thomas)
28325 Make INTERVAL reserved word allowed as a column identifier (Thomas)
28326 Implement REINDEX command (Hiroshi)
28327 Accept ALL in aggregate function SUM(ALL col) (Tom)
28328 Prevent GROUP BY from using column aliases (Tom)
28329 New psql \encoding option (Tatsuo)
28330 Allow PQrequestCancel() to terminate when in waiting-for-lock state (Hiroshi)
28331 Allow negation of a negative number in all cases
28332 Add ecpg descriptors (Christof, Michael)
28333 Allow CREATE VIEW v AS SELECT f1::char(8) FROM tbl
28334 Allow casts with length, like foo::char(8)
28335 New libpq functions PQsetClientEncoding(), PQclientEncoding() (Tatsuo)
28336 Add support for SJIS user defined characters (Tatsuo)
28337 Larger views/rules supported
28338 Make libpq's PQconndefaults() thread-safe (Tom)
28339 Disable // as comment to be ANSI conforming, should use -- (Tom)
28340 Allow column aliases on views CREATE VIEW name (collist)
28341 Fixes for views with subqueries (Tom)
28342 Allow UPDATE table SET fld = (SELECT ...) (Tom)
28343 SET command options no longer require quotes
28344 Update pgaccess to 0.98.6
28345 New SET SEED command
28346 New pg_options.sample file
28347 New SET FSYNC command (Massimo)
28348 Allow pg_descriptions when creating tables
28349 Allow pg_descriptions when creating types, columns, and functions
28350 Allow psql \copy to allow delimiters (Peter E)
28351 Allow psql to print nulls as distinct from "" [null] (Peter E)
28352
28353 Types
28354 -----
28355 Many array fixes (Tom)
28356 Allow bare column names to be subscripted as arrays (Tom)
28357 Improve type casting of int and float constants (Tom)
28358 Cleanups for int8 inputs, range checking, and type conversion (Tom)
28359 Fix for SELECT timespan('21:11:26'::time) (Tom)
28360 netmask('x.x.x.x/0') is 255.255.255.255 instead of 0.0.0.0 (Oleg Sharoiko)
28361 Add btree index on NUMERIC (Jan)
28362 Perl fix for large objects containing NUL characters (Douglas Thomson)
28363 ODBC fix for large objects (free)
28364 Fix indexing of cidr data type
28365 Fix for Ethernet MAC addresses (macaddr type) comparisons
28366 Fix for date/time types when overflows happened in computations (Tom)
28367 Allow array on int8 (Peter E)
28368 Fix for rounding/overflow of NUMERIC type, like NUMERIC(4,4) (Tom)
28369 Allow NUMERIC arrays
28370 Fix bugs in NUMERIC ceil() and floor() functions (Tom)
28371 Make char_length()/octet_length including trailing blanks (Tom)
28372 Made abstime/reltime use int4 instead of time_t (Peter E)
28373 New lztext data type for compressed text fields
28374 Revise code to handle coercion of int and float constants (Tom)
28375 Start at new code to implement a BIT and BIT VARYING type (Adriaan Joubert)
28376 NUMERIC now accepts scientific notation (Tom)
28377 NUMERIC to int4 rounds (Tom)
28378 Convert float4/8 to NUMERIC properly (Tom)
28379 Allow type conversion with NUMERIC (Thomas)
28380 Make ISO date style (2000-02-16 09:33) the default (Thomas)
28381 Add NATIONAL CHAR [ VARYING ] (Thomas)
28382 Allow NUMERIC round and trunc to accept negative scales (Tom)
28383 New TIME WITH TIME ZONE type (Thomas)
28384 Add MAX()/MIN() on time type (Thomas)
28385 Add abs(), mod(), fac() for int8 (Thomas)
28386 Rename functions to round(), sqrt(), cbrt(), pow() for float8 (Thomas)
28387 Add transcendental math functions (e.g. sin(), acos()) for float8 (Thomas)
28388 Add exp() and ln() for NUMERIC type
28389 Rename NUMERIC power() to pow() (Thomas)
28390 Improved TRANSLATE() function (Edwin Ramirez, Tom)
28391 Allow X=-Y operators  (Tom)
28392 Allow SELECT float8(COUNT(*))/(SELECT COUNT(*) FROM t) FROM t GROUP BY f1; (Tom)
28393 Allow LOCALE to use indexes in regular expression searches (Tom)
28394 Allow creation of functional indexes to use default types
28395
28396 Performance
28397 -----------
28398 Prevent exponential space consumption with many AND's and OR's (Tom)
28399 Collect attribute selectivity values for system columns (Tom)
28400 Reduce memory usage of aggregates (Tom)
28401 Fix for LIKE optimization to use indexes with multibyte encodings (Tom)
28402 Fix r-tree index optimizer selectivity (Thomas)
28403 Improve optimizer selectivity computations and functions (Tom)
28404 Optimize btree searching for cases where many equal keys exist (Tom)
28405 Enable fast LIKE index processing only if index present (Tom)
28406 Re-use free space on index pages with duplicates (Tom)
28407 Improve hash join processing (Tom)
28408 Prevent descending sort if result is already sorted(Hiroshi)
28409 Allow commuting of index scan query qualifications (Tom)
28410 Prefer index scans in cases where ORDER BY/GROUP BY is required (Tom)
28411 Allocate large memory requests in fix-sized chunks for performance (Tom)
28412 Fix vacuum's performance by reducing memory allocation requests (Tom)
28413 Implement constant-expression simplification (Bernard Frankpitt, Tom)
28414 Use secondary columns to be used to determine start of index scan (Hiroshi)
28415 Prevent quadruple use of disk space when doing internal sorting (Tom)
28416 Faster sorting by calling fewer functions (Tom)
28417 Create system indexes to match all system caches (Bruce, Hiroshi)
28418 Make system caches use system indexes (Bruce)
28419 Make all system indexes unique (Bruce)
28420 Improve pg_statistics management for VACUUM speed improvement (Tom)
28421 Flush backend cache less frequently (Tom, Hiroshi)
28422 COPY now reuses previous memory allocation, improving performance (Tom)
28423 Improve optimization cost estimation (Tom)
28424 Improve optimizer estimate of range queries x &gt; lowbound AND x &lt; highbound (Tom)
28425 Use DNF instead of CNF where appropriate (Tom, Taral)
28426 Further cleanup for OR-of-AND WHERE-clauses (Tom)
28427 Make use of index in OR clauses (x = 1 AND y = 2) OR (x = 2 AND y = 4) (Tom)
28428 Smarter optimizer computations for random index page access (Tom)
28429 New SET variable to control optimizer costs (Tom)
28430 Optimizer queries based on LIMIT, OFFSET, and EXISTS qualifications (Tom)
28431 Reduce optimizer internal housekeeping of join paths for speedup (Tom)
28432 Major subquery speedup (Tom)
28433 Fewer fsync writes when fsync is not disabled (Tom)
28434 Improved LIKE optimizer estimates (Tom)
28435 Prevent fsync in SELECT-only queries (Vadim)
28436 Make index creation use psort code, because it is now faster (Tom)
28437 Allow creation of sort temp tables &gt; 1 Gig
28438
28439 Source Tree Changes
28440 -------------------
28441 Fix for linux PPC compile
28442 New generic expression-tree-walker subroutine (Tom)
28443 Change form() to varargform() to prevent portability problems
28444 Improved range checking for large integers on Alphas
28445 Clean up #include in /include directory (Bruce)
28446 Add scripts for checking includes (Bruce)
28447 Remove un-needed #include's from *.c files (Bruce)
28448 Change #include's to use &lt;&gt; and "" as appropriate (Bruce)
28449 Enable Windows compilation of libpq
28450 Alpha spinlock fix from Uncle George <email>gatgul@voicenet.com</email>
28451 Overhaul of optimizer data structures (Tom)
28452 Fix to cygipc library (Yutaka Tanida)
28453 Allow pgsql to work on newer Cygwin snapshots (Dan)
28454 New catalog version number (Tom)
28455 Add Linux ARM
28456 Rename heap_replace to heap_update
28457 Update for QNX (Dr. Andreas Kardos)
28458 New platform-specific regression handling (Tom)
28459 Rename oid8 -&gt; oidvector and int28 -&gt; int2vector (Bruce)
28460 Included all yacc and lex files into the distribution (Peter E.)
28461 Remove lextest, no longer needed (Peter E)
28462 Fix for libpq and psql on Windows (Magnus)
28463 Internally change datetime and timespan into timestamp and interval (Thomas)
28464 Fix for plpgsql on BSD/OS
28465 Add SQL_ASCII test case to the regression test (Tatsuo)
28466 configure --with-mb now deprecated (Tatsuo)
28467 NT fixes
28468 NetBSD fixes (Johnny C. Lam <email>lamj@stat.cmu.edu</email>)
28469 Fixes for Alpha compiles
28470 New multibyte encodings
28471     </programlisting>
28472    </para>
28473   </sect2>
28474  </sect1>
28475
28476  <sect1 id="release-6-5-3">
28477   <title>Release 6.5.3</title>
28478
28479   <note>
28480   <title>Release date</title>
28481   <simpara>1999-10-13</simpara>
28482   </note>
28483
28484   <para>
28485    This is basically a cleanup release for 6.5.2.  We have added a new
28486    <application>PgAccess</> that was missing in 6.5.2, and installed an NT-specific fix.
28487   </para>
28488
28489
28490   <sect2>
28491    <title>Migration to Version 6.5.3</title>
28492
28493    <para>
28494     A dump/restore is <emphasis>not</emphasis> required for those running
28495     6.5.*.
28496    </para>
28497   </sect2>
28498   <sect2>
28499    <title>Changes</title>
28500
28501    <para>
28502     <programlisting>
28503 Updated version of pgaccess 0.98
28504 NT-specific patch
28505 Fix dumping rules on inherited tables
28506     </programlisting>
28507    </para>
28508   </sect2>
28509  </sect1>
28510
28511
28512  <sect1 id="release-6-5-2">
28513   <title>Release 6.5.2</title>
28514
28515   <note>
28516   <title>Release date</title>
28517   <simpara>1999-09-15</simpara>
28518   </note>
28519
28520   <para>
28521    This is basically a cleanup release for 6.5.1.  We have fixed a variety of
28522    problems reported by 6.5.1 users.
28523   </para>
28524
28525
28526   <sect2>
28527    <title>Migration to Version 6.5.2</title>
28528
28529    <para>
28530     A dump/restore is <emphasis>not</emphasis> required for those running
28531     6.5.*.
28532    </para>
28533   </sect2>
28534
28535   <sect2>
28536    <title>Changes</title>
28537
28538    <para>
28539     <programlisting>
28540 subselect+CASE fixes(Tom)
28541 Add SHLIB_LINK setting for solaris_i386 and solaris_sparc ports(Daren Sefcik)
28542 Fixes for CASE in WHERE join clauses(Tom)
28543 Fix BTScan abort(Tom)
28544 Repair the check for redundant UNIQUE and PRIMARY KEY indexes(Thomas)
28545 Improve it so that it checks for multicolumn constraints(Thomas)
28546 Fix for Windows making problem with MB enabled(Hiroki Kataoka)
28547 Allow BSD yacc and bison to compile pl code(Bruce)
28548 Fix SET NAMES working
28549 int8 fixes(Thomas)
28550 Fix vacuum's memory consumption(Hiroshi,Tatsuo)
28551 Reduce the total memory consumption of vacuum(Tom)
28552 Fix for timestamp(datetime)
28553 Rule deparsing bugfixes(Tom)
28554 Fix quoting problems in mkMakefile.tcldefs.sh.in and mkMakefile.tkdefs.sh.in(Tom)
28555 This is to re-use space on index pages freed by vacuum(Vadim)
28556 document -x for pg_dump(Bruce)
28557 Fix for unary operators in rule deparser(Tom)
28558 Comment out FileUnlink of excess segments during mdtruncate()(Tom)
28559 IRIX linking fix from Yu Cao &gt;yucao@falcon.kla-tencor.com&lt;
28560 Repair logic error in LIKE: should not return LIKE_ABORT
28561   when reach end of pattern before end of text(Tom)
28562 Repair incorrect cleanup of heap memory allocation during transaction abort(Tom)
28563 Updated version of pgaccess 0.98
28564     </programlisting>
28565    </para>
28566   </sect2>
28567  </sect1>
28568
28569  <sect1 id="release-6-5-1">
28570   <title>Release 6.5.1</title>
28571
28572   <note>
28573   <title>Release date</title>
28574   <simpara>1999-07-15</simpara>
28575   </note>
28576
28577   <para>
28578    This is basically a cleanup release for 6.5.  We have fixed a variety of
28579    problems reported by 6.5 users.
28580   </para>
28581
28582   <sect2>
28583    <title>Migration to Version 6.5.1</title>
28584
28585    <para>
28586     A dump/restore is <emphasis>not</emphasis> required for those running
28587     6.5.
28588    </para>
28589   </sect2>
28590
28591   <sect2>
28592    <title>Changes</title>
28593
28594    <para>
28595     <programlisting>
28596 Add NT README file
28597 Portability fixes for linux_ppc, IRIX, linux_alpha, OpenBSD, alpha
28598 Remove QUERY_LIMIT, use SELECT...LIMIT
28599 Fix for EXPLAIN on inheritance(Tom)
28600 Patch to allow vacuum on multisegment tables(Hiroshi)
28601 R-Tree optimizer selectivity fix(Tom)
28602 ACL file descriptor leak fix(Atsushi Ogawa)
28603 New expression subtree code(Tom)
28604 Avoid disk writes for read-only transactions(Vadim)
28605 Fix for removal of temp tables if last transaction was aborted(Bruce)
28606 Fix to prevent too large row from being created(Bruce)
28607 plpgsql fixes
28608 Allow port numbers 32k - 64k(Bruce)
28609 Add ^ precedence(Bruce)
28610 Rename sort files called pg_temp to pg_sorttemp(Bruce)
28611 Fix for microseconds in time values(Tom)
28612 Tutorial source cleanup
28613 New linux_m68k port
28614 Fix for sorting of NULL's in some cases(Tom)
28615 Shared library dependencies fixed (Tom)
28616 Fixed glitches affecting GROUP BY in subselects(Tom)
28617 Fix some compiler warnings (Tomoaki Nishiyama)
28618 Add Win1250 (Czech) support (Pavel Behal)
28619     </programlisting>
28620    </para>
28621   </sect2>
28622  </sect1>
28623
28624  <sect1 id="release-6-5">
28625   <title>Release 6.5</title>
28626
28627   <note>
28628   <title>Release date</title>
28629   <simpara>1999-06-09</simpara>
28630   </note>
28631
28632   <para>
28633    This release marks a major step in the development team's mastery of the source
28634    code we inherited from Berkeley.  You will see we are now easily adding
28635    major features, thanks to the increasing size and experience of our
28636    world-wide development team.
28637   </para>
28638
28639   <para>
28640    Here is a brief summary of the more notable changes:
28641
28642    <variablelist>
28643     <varlistentry>
28644      <term>
28645       Multiversion concurrency control(MVCC)
28646      </term>
28647      <listitem>
28648       <para>
28649        This removes our old table-level locking, and replaces it with
28650        a locking system that is superior to most commercial database
28651        systems.  In a traditional system, each row that is modified
28652        is locked until committed, preventing reads by other users.
28653        MVCC uses the natural multiversion nature of
28654        <productname>PostgreSQL</productname> to allow readers to
28655        continue reading consistent data during writer activity.
28656        Writers continue to use the compact pg_log transaction system.
28657        This is all performed without having to allocate a lock for
28658        every row like traditional database systems.  So, basically,
28659        we no longer are restricted by simple table-level locking; we
28660        have something better than row-level locking.
28661       </para>
28662      </listitem>
28663     </varlistentry>
28664
28665     <varlistentry>
28666      <term>
28667       Hot backups from <application>pg_dump</application>
28668      </term>
28669      <listitem>
28670       <para>
28671        <application>pg_dump</application> takes advantage of the new
28672        MVCC features to give a consistent database dump/backup while
28673        the database stays online and available for queries.
28674       </para>
28675      </listitem>
28676     </varlistentry>
28677
28678     <varlistentry>
28679      <term>
28680       Numeric data type
28681      </term>
28682      <listitem>
28683       <para>
28684        We now have a true numeric data type, with
28685        user-specified precision.
28686       </para>
28687      </listitem>
28688     </varlistentry>
28689
28690     <varlistentry>
28691      <term>
28692       Temporary tables
28693      </term>
28694      <listitem>
28695       <para>
28696        Temporary tables are guaranteed to have unique names
28697        within a database session, and are destroyed on session exit.
28698       </para>
28699      </listitem>
28700     </varlistentry>
28701
28702     <varlistentry>
28703      <term>
28704       New SQL features
28705      </term>
28706      <listitem>
28707       <para>
28708        We now have CASE, INTERSECT, and EXCEPT statement
28709        support.  We have new LIMIT/OFFSET, SET TRANSACTION ISOLATION LEVEL,
28710        SELECT ... FOR UPDATE, and an improved LOCK TABLE command.
28711       </para>
28712      </listitem>
28713     </varlistentry>
28714
28715     <varlistentry>
28716      <term>
28717       Speedups
28718      </term>
28719      <listitem>
28720       <para>
28721        We continue to speed up <productname>PostgreSQL</productname>,
28722        thanks to the variety of talents within our team.  We have
28723        sped up memory allocation, optimization, table joins, and row
28724        transfer routines.
28725       </para>
28726      </listitem>
28727     </varlistentry>
28728
28729     <varlistentry>
28730      <term>
28731       Ports
28732      </term>
28733      <listitem>
28734       <para>
28735        We continue to expand our port list, this time including
28736        <systemitem class="osname">Windows NT</>/<systemitem>ix86</> and <systemitem class="osname">NetBSD</>/<systemitem>arm32</>.
28737       </para>
28738      </listitem>
28739     </varlistentry>
28740
28741     <varlistentry>
28742      <term>
28743       Interfaces
28744      </term>
28745      <listitem>
28746       <para>
28747        Most interfaces have new versions, and existing functionality
28748        has been improved.
28749       </para>
28750      </listitem>
28751     </varlistentry>
28752
28753     <varlistentry>
28754      <term>
28755       Documentation
28756      </term>
28757      <listitem>
28758       <para>
28759        New and updated material is present throughout the
28760        documentation. New <acronym>FAQ</acronym>s have been
28761        contributed for <systemitem class="osname">SGI</> and <systemitem class="osname">AIX</> platforms.
28762        The <citetitle>Tutorial</citetitle> has introductory information
28763        on <acronym>SQL</acronym> from Stefan Simkovics.
28764        For the <citetitle>User's Guide</citetitle>, there are
28765        reference pages covering the postmaster and more utility
28766        programs, and a new appendix
28767        contains details on date/time behavior.
28768        The <citetitle>Administrator's Guide</citetitle> has a new
28769        chapter on troubleshooting from Tom Lane.
28770        And the <citetitle>Programmer's Guide</citetitle> has a
28771        description of query processing, also from Stefan, and details
28772        on obtaining the <productname>PostgreSQL</productname> source
28773        tree via anonymous <productname>CVS</productname> and
28774        <productname>CVSup</productname>.
28775       </para>
28776      </listitem>
28777     </varlistentry>
28778    </variablelist>
28779   </para>
28780
28781   <sect2>
28782    <title>Migration to Version 6.5</title>
28783
28784    <para>
28785     A dump/restore using <application>pg_dump</application>
28786     is required for those wishing to migrate data from any
28787     previous release of <productname>PostgreSQL</productname>.
28788     <application>pg_upgrade</application> can <emphasis>not</emphasis>
28789     be used to upgrade to this release because the on-disk structure
28790     of the tables has changed compared to previous releases.
28791    </para>
28792
28793    <para>
28794     The new Multiversion Concurrency Control (MVCC) features can
28795     give somewhat different behaviors in multiuser
28796     environments. <emphasis>Read and understand the following section
28797      to ensure that your existing applications will give you the
28798      behavior you need.</emphasis>
28799    </para>
28800
28801    <sect3>
28802     <title>Multiversion Concurrency Control</title>
28803
28804     <para>
28805      Because readers in 6.5 don't lock data, regardless of transaction
28806      isolation level, data read by one transaction can be overwritten by
28807      another. In other words, if a row is returned by
28808      <command>SELECT</command> it doesn't mean that this row really exists
28809      at the time it is returned (i.e. sometime after the statement or
28810      transaction began) nor that the row is protected from being deleted or
28811      updated by concurrent transactions before the current transaction does
28812      a commit or rollback.
28813     </para>
28814
28815     <para>
28816      To ensure the actual existence of a row and protect it against
28817      concurrent updates one must use <command>SELECT FOR UPDATE</command> or
28818      an appropriate <command>LOCK TABLE</command> statement. This should be
28819      taken into account when porting applications from previous releases of
28820      <productname>PostgreSQL</productname> and other environments.
28821     </para>
28822
28823     <para>
28824      Keep the above in mind if you are using
28825      <filename>contrib/refint.*</filename> triggers for
28826      referential integrity. Additional techniques are required now. One way is
28827      to use <command>LOCK parent_table IN SHARE ROW EXCLUSIVE MODE</command>
28828      command if a transaction is going to update/delete a primary key and
28829      use <command>LOCK parent_table IN SHARE MODE</command> command if a
28830      transaction is going to update/insert a foreign key.
28831
28832      <note>
28833       <para>
28834        Note that if you run a transaction in SERIALIZABLE mode then you must
28835        execute the <command>LOCK</command> commands above before execution of any
28836        <acronym>DML</acronym> statement
28837        (<command>SELECT/INSERT/DELETE/UPDATE/FETCH/COPY_TO</command>) in the
28838        transaction.
28839       </para>
28840      </note>
28841     </para>
28842
28843     <para>
28844      These inconveniences will disappear in the future
28845      when the ability to read dirty
28846      (uncommitted) data (regardless of isolation level) and true referential
28847      integrity will be implemented.
28848     </para>
28849    </sect3>
28850    </sect2>
28851
28852   <sect2>
28853    <title>Changes</title>
28854
28855    <para>
28856     <programlisting>
28857 Bug Fixes
28858 ---------
28859 Fix text&lt;-&gt;float8 and text&lt;-&gt;float4 conversion functions(Thomas)
28860 Fix for creating tables with mixed-case constraints(Billy)
28861 Change exp()/pow() behavior to generate error on underflow/overflow(Jan)
28862 Fix bug in pg_dump -z
28863 Memory overrun cleanups(Tatsuo)
28864 Fix for lo_import crash(Tatsuo)
28865 Adjust handling of data type names to suppress double quotes(Thomas)
28866 Use type coercion for matching columns and DEFAULT(Thomas)
28867 Fix deadlock so it only checks once after one second of sleep(Bruce)
28868 Fixes for aggregates and PL/pgsql(Hiroshi)
28869 Fix for subquery crash(Vadim)
28870 Fix for libpq function PQfnumber and case-insensitive names(Bahman Rafatjoo)
28871 Fix for large object write-in-middle, no extra block, memory consumption(Tatsuo)
28872 Fix for pg_dump -d or -D and  quote special characters in INSERT
28873 Repair serious problems with dynahash(Tom)
28874 Fix INET/CIDR portability problems
28875 Fix problem with selectivity error in ALTER TABLE ADD COLUMN(Bruce)
28876 Fix executor so mergejoin of different column types works(Tom)
28877 Fix for Alpha OR selectivity bug
28878 Fix OR index selectivity problem(Bruce)
28879 Fix so \d shows proper length for char()/varchar()(Ryan)
28880 Fix tutorial code(Clark)
28881 Improve destroyuser checking(Oliver)
28882 Fix for Kerberos(Rodney McDuff)
28883 Fix for dropping database while dirty buffers(Bruce)
28884 Fix so sequence nextval() can be case-sensitive(Bruce)
28885 Fix !!= operator
28886 Drop buffers before destroying database files(Bruce)
28887 Fix case where executor evaluates functions twice(Tatsuo)
28888 Allow sequence nextval actions to be case-sensitive(Bruce)
28889 Fix optimizer indexing not working for negative numbers(Bruce)
28890 Fix for memory leak in executor with fjIsNull
28891 Fix for aggregate memory leaks(Erik Riedel)
28892 Allow user name containing a dash to grant privileges
28893 Cleanup of NULL in inet types
28894 Clean up system table bugs(Tom)
28895 Fix problems of PAGER and \? command(Masaaki Sakaida)
28896 Reduce default multisegment file size limit to 1GB(Peter)
28897 Fix for dumping of CREATE OPERATOR(Tom)
28898 Fix for backward scanning of cursors(Hiroshi Inoue)
28899 Fix for COPY FROM STDIN when using \i(Tom)
28900 Fix for subselect is compared inside an expression(Jan)
28901 Fix handling of error reporting while returning rows(Tom)
28902 Fix problems with reference to array types(Tom,Jan)
28903 Prevent UPDATE SET oid(Jan)
28904 Fix pg_dump so -t option can handle case-sensitive tablenames
28905 Fixes for GROUP BY in special cases(Tom, Jan)
28906 Fix for memory leak in failed queries(Tom)
28907 DEFAULT now supports mixed-case identifiers(Tom)
28908 Fix for multisegment uses of DROP/RENAME table, indexes(Ole Gjerde)
28909 Disable use of pg_dump with both -o and -d options(Bruce)
28910 Allow pg_dump to properly dump group privileges(Bruce)
28911 Fix GROUP BY in INSERT INTO table SELECT * FROM table2(Jan)
28912 Fix for computations in views(Jan)
28913 Fix for aggregates on array indexes(Tom)
28914 Fix for DEFAULT handles single quotes in value requiring too many quotes
28915 Fix security problem with non-super users importing/exporting large objects(Tom)
28916 Rollback of transaction that creates table cleaned up properly(Tom)
28917 Fix to allow long table and column names to generate proper serial names(Tom)
28918
28919 Enhancements
28920 ------------
28921 Add "vacuumdb" utility
28922 Speed up libpq by allocating memory better(Tom)
28923 EXPLAIN all indexes used(Tom)
28924 Implement CASE, COALESCE, NULLIF  expression(Thomas)
28925 New pg_dump table output format(Constantin)
28926 Add string min()/max() functions(Thomas)
28927 Extend new type coercion techniques to aggregates(Thomas)
28928 New moddatetime contrib(Terry)
28929 Update to pgaccess 0.96(Constantin)
28930 Add routines for single-byte "char" type(Thomas)
28931 Improved substr() function(Thomas)
28932 Improved multibyte handling(Tatsuo)
28933 Multiversion concurrency control/MVCC(Vadim)
28934 New Serialized mode(Vadim)
28935 Fix for tables over 2gigs(Peter)
28936 New SET TRANSACTION ISOLATION LEVEL(Vadim)
28937 New LOCK TABLE IN ... MODE(Vadim)
28938 Update ODBC driver(Byron)
28939 New NUMERIC data type(Jan)
28940 New SELECT FOR UPDATE(Vadim)
28941 Handle "NaN" and "Infinity" for input values(Jan)
28942 Improved date/year handling(Thomas)
28943 Improved handling of backend connections(Magnus)
28944 New options ELOG_TIMESTAMPS and USE_SYSLOG options for log files(Massimo)
28945 New TCL_ARRAYS option(Massimo)
28946 New INTERSECT and EXCEPT(Stefan)
28947 New pg_index.indisprimary for primary key tracking(D'Arcy)
28948 New pg_dump option to allow dropping of tables before creation(Brook)
28949 Speedup of row output routines(Tom)
28950 New READ COMMITTED isolation level(Vadim)
28951 New TEMP tables/indexes(Bruce)
28952 Prevent sorting if result is already sorted(Jan)
28953 New memory allocation optimization(Jan)
28954 Allow psql to do \p\g(Bruce)
28955 Allow multiple rule actions(Jan)
28956 Added LIMIT/OFFSET functionality(Jan)
28957 Improve optimizer when joining a large number of tables(Bruce)
28958 New intro to SQL from S. Simkovics' Master's Thesis (Stefan, Thomas)
28959 New intro to backend processing from S. Simkovics' Master's Thesis (Stefan)
28960 Improved int8 support(Ryan Bradetich, Thomas, Tom)
28961 New routines to convert between int8 and text/varchar types(Thomas)
28962 New bushy plans, where meta-tables are joined(Bruce)
28963 Enable right-hand queries by default(Bruce)
28964 Allow reliable maximum number of backends to be set at configure time
28965      (--with-maxbackends and postmaster switch (-N backends))(Tom)
28966 GEQO default now 10 tables because of optimizer speedups(Tom)
28967 Allow NULL=Var for MS-SQL portability(Michael, Bruce)
28968 Modify contrib check_primary_key() so either "automatic" or "dependent"(Anand)
28969 Allow psql \d on a view show query(Ryan)
28970 Speedup for LIKE(Bruce)
28971 Ecpg fixes/features, see src/interfaces/ecpg/ChangeLog file(Michael)
28972 JDBC fixes/features, see src/interfaces/jdbc/CHANGELOG(Peter)
28973 Make % operator have precedence like /(Bruce)
28974 Add new postgres -O option to allow system table structure changes(Bruce)
28975 Update contrib/pginterface/findoidjoins script(Tom)
28976 Major speedup in vacuum of deleted rows with indexes(Vadim)
28977 Allow non-SQL functions to run different versions based on arguments(Tom)
28978 Add -E option that shows actual queries sent by \dt and friends(Masaaki Sakaida)
28979 Add version number in start-up banners for psql(Masaaki Sakaida)
28980 New contrib/vacuumlo removes large objects not referenced(Peter)
28981 New initialization for table sizes so non-vacuumed tables perform better(Tom)
28982 Improve error messages when a connection is rejected(Tom)
28983 Support for arrays of char() and varchar() fields(Massimo)
28984 Overhaul of hash code to increase reliability and performance(Tom)
28985 Update to PyGreSQL 2.4(D'Arcy)
28986 Changed debug options so -d4 and -d5 produce different node displays(Jan)
28987 New pg_options: pretty_plan, pretty_parse, pretty_rewritten(Jan)
28988 Better optimization statistics for system table access(Tom)
28989 Better handling of non-default block sizes(Massimo)
28990 Improve GEQO optimizer memory consumption(Tom)
28991 UNION now supports ORDER BY of columns not in target list(Jan)
28992 Major libpq++ improvements(Vince Vielhaber)
28993 pg_dump now uses -z(ACL's) as default(Bruce)
28994 backend cache, memory speedups(Tom)
28995 have pg_dump do everything in one snapshot transaction(Vadim)
28996 fix for large object memory leakage, fix for pg_dumping(Tom)
28997 INET type now respects netmask for comparisons
28998 Make VACUUM ANALYZE only use a readlock(Vadim)
28999 Allow VIEWs on UNIONS(Jan)
29000 pg_dump now can generate consistent snapshots on active databases(Vadim)
29001
29002 Source Tree Changes
29003 -------------------
29004 Improve port matching(Tom)
29005 Portability fixes for SunOS
29006 Add Windows NT backend port and enable dynamic loading(Magnus and Daniel Horak)
29007 New port to Cobalt Qube(Mips) running Linux(Tatsuo)
29008 Port to NetBSD/m68k(Mr. Mutsuki Nakajima)
29009 Port to NetBSD/sun3(Mr. Mutsuki Nakajima)
29010 Port to NetBSD/macppc(Toshimi Aoki)
29011 Fix for tcl/tk configuration(Vince)
29012 Removed CURRENT key word for rule queries(Jan)
29013 NT dynamic loading now works(Daniel Horak)
29014 Add ARM32 support(Andrew McMurry)
29015 Better support for HP-UX 11 and UnixWare
29016 Improve file handling to be more uniform, prevent file descriptor leak(Tom)
29017 New install commands for plpgsql(Jan)
29018     </programlisting>
29019    </para>
29020   </sect2>
29021  </sect1>
29022
29023
29024 <sect1 id="release-6-4-2">
29025 <title>Release 6.4.2</title>
29026
29027   <note>
29028   <title>Release date</title>
29029   <simpara>1998-12-20</simpara>
29030   </note>
29031
29032 <para>
29033 The 6.4.1 release was improperly packaged.  This also has one additional
29034 bug fix.
29035 </para>
29036
29037
29038 <sect2>
29039 <title>Migration to Version 6.4.2</title>
29040
29041 <para>
29042 A dump/restore is <emphasis>not</emphasis> required for those running
29043 6.4.*.
29044 </para>
29045 </sect2>
29046 <sect2>
29047 <title>Changes</title>
29048
29049 <para>
29050 <programlisting>
29051 Fix for datetime constant problem on some platforms(Thomas)
29052 </programlisting>
29053 </para>
29054 </sect2>
29055 </sect1>
29056
29057
29058
29059 <sect1 id="release-6-4-1">
29060 <title>Release 6.4.1</title>
29061
29062   <note>
29063   <title>Release date</title>
29064   <simpara>1998-12-18</simpara>
29065   </note>
29066
29067 <para>
29068 This is basically a cleanup release for 6.4.  We have fixed a variety of
29069 problems reported by 6.4 users.
29070 </para>
29071
29072
29073 <sect2>
29074 <title>Migration to Version 6.4.1</title>
29075
29076 <para>
29077 A dump/restore is <emphasis>not</emphasis> required for those running
29078 6.4.
29079 </para>
29080 </sect2>
29081 <sect2>
29082 <title>Changes</title>
29083
29084 <para>
29085 <programlisting>
29086 Add pg_dump -N flag to force double quotes around identifiers.  This is
29087        the default(Thomas)
29088 Fix for NOT in where clause causing crash(Bruce)
29089 EXPLAIN VERBOSE coredump fix(Vadim)
29090 Fix shared-library problems on Linux
29091 Fix test for table existence to allow mixed-case and whitespace in
29092        the table name(Thomas)
29093 Fix a couple of pg_dump bugs
29094 Configure matches template/.similar entries better(Tom)
29095 Change builtin function names from SPI_* to spi_*
29096 OR WHERE clause fix(Vadim)
29097 Fixes for mixed-case table names(Billy)
29098 contrib/linux/postgres.init.csh/sh fix(Thomas)
29099 libpq memory overrun fix
29100 SunOS fixes(Tom)
29101 Change exp() behavior to generate error on underflow(Thomas)
29102 pg_dump fixes for memory leak, inheritance constraints, layout change
29103 update pgaccess to 0.93
29104 Fix prototype for 64-bit platforms
29105 Multibyte fixes(Tatsuo)
29106 New ecpg man page
29107 Fix memory overruns(Tatsuo)
29108 Fix for lo_import() crash(Bruce)
29109 Better search for install program(Tom)
29110 Timezone fixes(Tom)
29111 HP-UX fixes(Tom)
29112 Use implicit type coercion for matching DEFAULT values(Thomas)
29113 Add routines to help with single-byte (internal) character type(Thomas)
29114 Compilation of libpq for Windows fixes(Magnus)
29115 Upgrade to PyGreSQL 2.2(D'Arcy)
29116 </programlisting>
29117 </para>
29118 </sect2>
29119 </sect1>
29120
29121
29122
29123 <sect1 id="release-6-4">
29124 <title>Release 6.4</title>
29125
29126   <note>
29127   <title>Release date</title>
29128   <simpara>1998-10-30</simpara>
29129   </note>
29130
29131 <para>
29132 There are <emphasis>many</emphasis> new features and improvements in this release.
29133 Thanks to our developers and maintainers, nearly every aspect of the system
29134 has received some attention since the previous release.
29135 Here is a brief, incomplete summary:
29136
29137 <itemizedlist>
29138 <listitem>
29139 <para>
29140 Views and rules are now functional thanks to extensive new code in the
29141 rewrite rules system from Jan Wieck. He also wrote a chapter on it
29142 for the <citetitle>Programmer's Guide</citetitle>.
29143 </para>
29144 </listitem>
29145 <listitem>
29146 <para>
29147 Jan also contributed a second procedural language, <application>PL/pgSQL</application>, to go with the
29148 original <application>PL/pgTCL</application> procedural language he contributed last release.
29149 </para>
29150 </listitem>
29151
29152 <listitem>
29153 <para>
29154 We have optional multiple-byte character set support from Tatsuo Ishii
29155 to complement our existing locale support.
29156 </para>
29157 </listitem>
29158
29159 <listitem>
29160 <para>
29161 Client/server communications has been cleaned up, with better support for
29162 asynchronous messages and interrupts thanks to Tom Lane.
29163 </para>
29164 </listitem>
29165
29166 <listitem>
29167 <para>
29168 The parser will now perform automatic type coercion to match arguments
29169 to available operators and functions, and to match columns and expressions
29170 with target columns. This uses a generic mechanism which supports
29171 the type extensibility features of <productname>PostgreSQL</productname>.
29172 There is a new chapter in the <citetitle>User's Guide</citetitle>
29173 which covers this topic.
29174 </para>
29175 </listitem>
29176
29177 <listitem>
29178 <para>
29179 Three new data types have been added.
29180 Two types, <type>inet</type> and <type>cidr</type>, support various forms
29181 of IP network, subnet, and machine addressing. There is now an 8-byte integer
29182 type available on some platforms. See the chapter on data types
29183 in the <citetitle>User's Guide</citetitle> for details.
29184 A fourth type, <type>serial</type>, is now supported by the parser as an
29185 amalgam of the <type>int4</type> type, a sequence, and a unique index.
29186 </para>
29187 </listitem>
29188
29189 <listitem>
29190 <para>
29191 Several more <acronym>SQL92</acronym>-compatible syntax features have been
29192 added, including <command>INSERT DEFAULT VALUES</command>
29193 </para>
29194 </listitem>
29195
29196 <listitem>
29197 <para>
29198 The automatic configuration and installation system has received some
29199 attention, and should be more robust for more platforms than it has ever
29200 been.
29201 </para>
29202 </listitem>
29203
29204 </itemizedlist>
29205 </para>
29206
29207 <sect2>
29208 <title>Migration to Version 6.4</title>
29209
29210 <para>
29211 A dump/restore using <application>pg_dump</application>
29212 or <application>pg_dumpall</application>
29213 is required for those wishing to migrate data from any
29214 previous release of <productname>PostgreSQL</productname>.
29215 </para>
29216 </sect2>
29217
29218   <sect2>
29219 <title>Changes</title>
29220
29221    <para>
29222     <programlisting>
29223 Bug Fixes
29224 ---------
29225 Fix for a tiny memory leak in PQsetdb/PQfinish(Bryan)
29226 Remove char2-16 data types, use char/varchar(Darren)
29227 Pqfn not handles a NOTICE message(Anders)
29228 Reduced busywaiting overhead for spinlocks with many backends (dg)
29229 Stuck spinlock detection (dg)
29230 Fix up "ISO-style" timespan decoding and encoding(Thomas)
29231 Fix problem with table drop after rollback of transaction(Vadim)
29232 Change error message and remove non-functional update message(Vadim)
29233 Fix for COPY array checking
29234 Fix for SELECT 1 UNION SELECT NULL
29235 Fix for buffer leaks in large object calls(Pascal)
29236 Change owner from oid to int4 type(Bruce)
29237 Fix a bug in the oracle compatibility functions btrim() ltrim() and rtrim()
29238 Fix for shared invalidation cache overflow(Massimo)
29239 Prevent file descriptor leaks in failed COPY's(Bruce)
29240 Fix memory leak in libpgtcl's pg_select(Constantin)
29241 Fix problems with username/passwords over 8 characters(Tom)
29242 Fix problems with handling of asynchronous NOTIFY in backend(Tom)
29243 Fix of many bad system table entries(Tom)
29244
29245 Enhancements
29246 ------------
29247 Upgrade ecpg and ecpglib,see src/interfaces/ecpc/ChangeLog(Michael)
29248 Show the index used in an EXPLAIN(Zeugswetter)
29249 EXPLAIN  invokes  rule system and shows plan(s) for rewritten queries(Jan)
29250 Multibyte awareness of many data types and functions, via configure(Tatsuo)
29251 New configure --with-mb option(Tatsuo)
29252 New initdb --pgencoding option(Tatsuo)
29253 New createdb -E multibyte option(Tatsuo)
29254 Select version(); now returns PostgreSQL version(Jeroen)
29255 libpq now allows asynchronous clients(Tom)
29256 Allow cancel from client of backend query(Tom)
29257 psql now cancels query with Control-C(Tom)
29258 libpq users need not issue dummy queries to get NOTIFY messages(Tom)
29259 NOTIFY now sends sender's PID, so you can tell whether it was your own(Tom)
29260 PGresult struct now includes associated error message, if any(Tom)
29261 Define "tz_hour" and "tz_minute" arguments to date_part()(Thomas)
29262 Add routines to convert between varchar and bpchar(Thomas)
29263 Add routines to allow sizing of varchar and bpchar into target columns(Thomas)
29264 Add bit flags to support timezonehour and minute in data retrieval(Thomas)
29265 Allow more variations on valid floating point numbers (e.g. ".1", "1e6")(Thomas)
29266 Fixes for unary minus parsing with leading spaces(Thomas)
29267 Implement TIMEZONE_HOUR, TIMEZONE_MINUTE per SQL92 specs(Thomas)
29268 Check for and properly ignore FOREIGN KEY column constraints(Thomas)
29269 Define USER as synonym for CURRENT_USER per SQL92 specs(Thomas)
29270 Enable HAVING clause but no fixes elsewhere yet.
29271 Make "char" type a synonym for "char(1)" (actually implemented as bpchar)(Thomas)
29272 Save string type if specified for DEFAULT clause handling(Thomas)
29273 Coerce operations involving different data types(Thomas)
29274 Allow some index use for columns of different types(Thomas)
29275 Add capabilities for automatic type conversion(Thomas)
29276 Cleanups for large objects, so file is truncated on open(Peter)
29277 Readline cleanups(Tom)
29278 Allow psql  \f \ to make spaces as delimiter(Bruce)
29279 Pass pg_attribute.atttypmod to the frontend for column field lengths(Tom,Bruce)
29280 Msql compatibility library in /contrib(Aldrin)
29281 Remove the requirement that ORDER/GROUP BY clause identifiers be
29282 included in the target list(David)
29283 Convert columns to match columns in UNION clauses(Thomas)
29284 Remove fork()/exec() and only do fork()(Bruce)
29285 Jdbc cleanups(Peter)
29286 Show backend status on ps command line(only works on some platforms)(Bruce)
29287 Pg_hba.conf now has a sameuser option in the database field
29288 Make lo_unlink take oid param, not int4
29289 New DISABLE_COMPLEX_MACRO for compilers that cannot handle our macros(Bruce)
29290 Libpgtcl now handles NOTIFY as a Tcl event, need not send dummy queries(Tom)
29291 libpgtcl cleanups(Tom)
29292 Add -error option to libpgtcl's pg_result command(Tom)
29293 New locale patch, see docs/README/locale(Oleg)
29294 Fix for pg_dump so CONSTRAINT and CHECK syntax is correct(ccb)
29295 New contrib/lo code for large object orphan removal(Peter)
29296 New psql command "SET CLIENT_ENCODING TO 'encoding'" for multibytes
29297 feature, see /doc/README.mb(Tatsuo)
29298 contrib/noupdate code to revoke update permission on a column
29299 libpq can now be compiled on Windows(Magnus)
29300 Add PQsetdbLogin() in libpq
29301 New 8-byte integer type, checked by configure for OS support(Thomas)
29302 Better support for quoted table/column names(Thomas)
29303 Surround table and column names with double-quotes in pg_dump(Thomas)
29304 PQreset() now works with passwords(Tom)
29305 Handle case of GROUP BY target list column number out of range(David)
29306 Allow UNION in subselects
29307 Add auto-size to screen to \d? commands(Bruce)
29308 Use UNION to show all \d? results in one query(Bruce)
29309 Add \d? field search feature(Bruce)
29310 Pg_dump issues fewer \connect requests(Tom)
29311 Make pg_dump -z flag work better, document it in manual page(Tom)
29312 Add HAVING clause with full support for subselects and unions(Stephan)
29313 Full text indexing routines in contrib/fulltextindex(Maarten)
29314 Transaction ids now stored in shared memory(Vadim)
29315 New PGCLIENTENCODING when issuing COPY command(Tatsuo)
29316 Support for SQL92 syntax "SET NAMES"(Tatsuo)
29317 Support for LATIN2-5(Tatsuo)
29318 Add UNICODE regression test case(Tatsuo)
29319 Lock manager cleanup, new locking modes for LLL(Vadim)
29320 Allow index use with OR clauses(Bruce)
29321 Allows "SELECT NULL ORDER BY 1;"
29322 Explain VERBOSE prints the plan, and now pretty-prints the plan to
29323 the postmaster log file(Bruce)
29324 Add indexes display to \d command(Bruce)
29325 Allow GROUP BY on functions(David)
29326 New pg_class.relkind for large objects(Bruce)
29327 New way to send libpq NOTICE messages to a different location(Tom)
29328 New \w write command to psql(Bruce)
29329 New /contrib/findoidjoins scans oid columns to find join relationships(Bruce)
29330 Allow binary-compatible indexes to be considered when checking for valid
29331 Indexes for restriction clauses containing a constant(Thomas)
29332 New ISBN/ISSN code in /contrib/isbn_issn
29333 Allow NOT LIKE, IN, NOT IN, BETWEEN, and NOT BETWEEN constraint(Thomas)
29334 New rewrite system fixes many problems with rules and views(Jan)
29335        * Rules on relations work
29336        * Event qualifications on insert/update/delete work
29337        * New OLD variable to reference CURRENT, CURRENT will be remove in future
29338        * Update rules can reference NEW and OLD in rule qualifications/actions
29339        * Insert/update/delete rules on views work
29340        * Multiple rule actions are now supported, surrounded by parentheses
29341        * Regular users can create views/rules on tables they have RULE permits
29342        * Rules and views inherit the privileges of the creator
29343        * No rules at the column level
29344        * No UPDATE NEW/OLD rules
29345        * New pg_tables, pg_indexes, pg_rules and pg_views system views
29346        * Only a single action on SELECT rules
29347        * Total rewrite overhaul, perhaps for 6.5
29348        * handle subselects
29349        * handle aggregates on views
29350        * handle insert into select from view works
29351 System indexes are now multikey(Bruce)
29352 Oidint2, oidint4, and oidname types are removed(Bruce)
29353 Use system cache for more system table lookups(Bruce)
29354 New backend programming language PL/pgSQL in backend/pl(Jan)
29355 New SERIAL data type, auto-creates sequence/index(Thomas)
29356 Enable assert checking without a recompile(Massimo)
29357 User lock enhancements(Massimo)
29358 New setval() command to set sequence value(Massimo)
29359 Auto-remove unix socket file on start-up if no postmaster running(Massimo)
29360 Conditional trace package(Massimo)
29361 New UNLISTEN command(Massimo)
29362 psql and libpq now compile under Windows using win32.mak(Magnus)
29363 Lo_read no longer stores trailing NULL(Bruce)
29364 Identifiers are now truncated to 31 characters internally(Bruce)
29365 Createuser options now available on the command line
29366 Code for 64-bit integer supported added, configure tested, int8 type(Thomas)
29367 Prevent file descriptor leaf from failed COPY(Bruce)
29368 New pg_upgrade command(Bruce)
29369 Updated /contrib directories(Massimo)
29370 New CREATE TABLE DEFAULT VALUES statement available(Thomas)
29371 New INSERT INTO TABLE DEFAULT VALUES statement available(Thomas)
29372 New DECLARE and FETCH feature(Thomas)
29373 libpq's internal structures now not exported(Tom)
29374 Allow up to 8 key indexes(Bruce)
29375 Remove ARCHIVE key word, that is no longer used(Thomas)
29376 pg_dump -n flag to suppress quotes around indentifiers
29377 disable system columns for views(Jan)
29378 new INET and CIDR types for network addresses(TomH, Paul)
29379 no more double quotes in psql output
29380 pg_dump now dumps views(Terry)
29381 new SET QUERY_LIMIT(Tatsuo,Jan)
29382
29383 Source Tree Changes
29384 -------------------
29385 /contrib cleanup(Jun)
29386 Inline some small functions called for every row(Bruce)
29387 Alpha/linux fixes
29388 HP-UX cleanups(Tom)
29389 Multibyte regression tests(Soonmyung.)
29390 Remove --disabled options from configure
29391 Define PGDOC to use POSTGRESDIR by default
29392 Make regression optional
29393 Remove extra braces code to pgindent(Bruce)
29394 Add bsdi shared library support(Bruce)
29395 New --without-CXX support configure option(Brook)
29396 New FAQ_CVS
29397 Update backend flowchart in tools/backend(Bruce)
29398 Change atttypmod from int16 to int32(Bruce, Tom)
29399 Getrusage() fix for platforms that do not have it(Tom)
29400 Add PQconnectdb, PGUSER, PGPASSWORD to libpq man page
29401 NS32K platform fixes(Phil Nelson, John Buller)
29402 SCO 7/UnixWare 2.x fixes(Billy,others)
29403 Sparc/Solaris 2.5 fixes(Ryan)
29404 Pgbuiltin.3 is obsolete, move to doc files(Thomas)
29405 Even more documentation(Thomas)
29406 Nextstep support(Jacek)
29407 Aix support(David)
29408 pginterface manual page(Bruce)
29409 shared libraries all have version numbers
29410 merged all OS-specific shared library defines into one file
29411 smarter TCL/TK configuration checking(Billy)
29412 smarter perl configuration(Brook)
29413 configure uses supplied install-sh if no install script found(Tom)
29414 new Makefile.shlib for shared library configuration(Tom)
29415 </programlisting>
29416 </para>
29417 </sect2>
29418 </sect1>
29419
29420 <sect1 id="release-6-3-2">
29421 <title>Release 6.3.2</title>
29422
29423   <note>
29424   <title>Release date</title>
29425   <simpara>1998-04-07</simpara>
29426   </note>
29427
29428 <para>
29429 This is a bug-fix release for 6.3.x.
29430 Refer to the release notes for version 6.3 for a more complete summary of new features.
29431 </para>
29432 <para>
29433 Summary:
29434
29435 <itemizedlist>
29436 <listitem>
29437 <para>
29438 Repairs automatic configuration support for some platforms, including Linux,
29439 from breakage inadvertently introduced in version 6.3.1.
29440 </para>
29441 </listitem>
29442
29443 <listitem>
29444 <para>
29445 Correctly handles function calls on the left side of BETWEEN and LIKE clauses.
29446 </para>
29447 </listitem>
29448
29449 </itemizedlist>
29450 </para>
29451 <para>
29452 A dump/restore is NOT required for those running 6.3 or 6.3.1.  A
29453 <literal>make distclean</>, <literal>make</>, and <literal>make install</> is all that is required.
29454 This last step should be performed while the postmaster is not running.
29455 You should re-link any custom applications that use <productname>PostgreSQL</productname> libraries.
29456 </para>
29457 <para>
29458 For upgrades from pre-6.3 installations,
29459 refer to the installation and migration instructions for version 6.3.
29460 </para>
29461
29462   <sect2>
29463    <title>Changes</title>
29464
29465    <para>
29466     <programlisting>
29467 Configure detection improvements for tcl/tk(Brook Milligan, Alvin)
29468 Manual page improvements(Bruce)
29469 BETWEEN and LIKE fix(Thomas)
29470 fix for psql \connect used by pg_dump(Oliver Elphick)
29471 New odbc driver
29472 pgaccess, version 0.86
29473 qsort removed, now uses libc version, cleanups(Jeroen)
29474 fix for buffer over-runs detected(Maurice Gittens)
29475 fix for buffer overrun in libpgtcl(Randy Kunkee)
29476 fix for UNION with DISTINCT or ORDER BY(Bruce)
29477 gettimeofday configure check(Doug Winterburn)
29478 Fix "indexes not used" bug(Vadim)
29479 docs additions(Thomas)
29480 Fix for backend memory leak(Bruce)
29481 libreadline cleanup(Erwan MAS)
29482 Remove DISTDIR(Bruce)
29483 Makefile dependency cleanup(Jeroen van Vianen)
29484 ASSERT fixes(Bruce)
29485     </programlisting>
29486    </para>
29487   </sect2>
29488  </sect1>
29489
29490  <sect1 id="release-6-3-1">
29491   <title>Release 6.3.1</title>
29492
29493   <note>
29494   <title>Release date</title>
29495   <simpara>1998-03-23</simpara>
29496   </note>
29497
29498   <para>
29499    Summary:
29500
29501 <itemizedlist>
29502 <listitem>
29503 <para>
29504 Additional support for multibyte character sets.
29505 </para>
29506 </listitem>
29507
29508 <listitem>
29509 <para>
29510 Repair byte ordering for mixed-endian clients and servers.
29511 </para>
29512 </listitem>
29513
29514 <listitem>
29515 <para>
29516 Minor updates to allowed SQL syntax.
29517 </para>
29518 </listitem>
29519
29520 <listitem>
29521 <para>
29522 Improvements to the configuration autodetection for installation.
29523 </para>
29524 </listitem>
29525
29526 </itemizedlist>
29527 </para>
29528 <para>
29529 A dump/restore is NOT required for those running 6.3.  A
29530 <literal>make distclean</>, <literal>make</>, and <literal>make install</> is all that is required.
29531 This last step should be performed while the postmaster is not running.
29532 You should re-link any custom applications that use <productname>PostgreSQL</productname> libraries.
29533 </para>
29534 <para>
29535 For upgrades from pre-6.3 installations,
29536 refer to the installation and migration instructions for version 6.3.
29537 </para>
29538
29539   <sect2>
29540    <title>Changes</title>
29541
29542    <para>
29543     <programlisting>
29544 ecpg cleanup/fixes, now version 1.1(Michael Meskes)
29545 pg_user cleanup(Bruce)
29546 large object fix for pg_dump and tclsh (alvin)
29547 LIKE fix for multiple adjacent underscores
29548 fix for redefining builtin functions(Thomas)
29549 ultrix4 cleanup
29550 upgrade to pg_access 0.83
29551 updated CLUSTER manual page
29552 multibyte character set support, see doc/README.mb(Tatsuo)
29553 configure --with-pgport fix
29554 pg_ident fix
29555 big-endian fix for backend communications(Kataoka)
29556 SUBSTR() and substring() fix(Jan)
29557 several jdbc fixes(Peter)
29558 libpgtcl improvements, see libptcl/README(Randy Kunkee)
29559 Fix for "Datasize = 0" error(Vadim)
29560 Prevent \do from wrapping(Bruce)
29561 Remove duplicate Russian character set entries
29562 Sunos4 cleanup
29563 Allow optional TABLE key word in LOCK and SELECT INTO(Thomas)
29564 CREATE SEQUENCE options to allow a negative integer(Thomas)
29565 Add "PASSWORD" as an allowed column identifier(Thomas)
29566 Add checks for UNION target fields(Bruce)
29567 Fix Alpha port(Dwayne Bailey)
29568 Fix for text arrays containing quotes(Doug Gibson)
29569 Solaris compile fix(Albert Chin-A-Young)
29570 Better identify tcl and tk libs and includes(Bruce)
29571     </programlisting>
29572    </para>
29573   </sect2>
29574  </sect1>
29575
29576  <sect1 id="release-6-3">
29577   <title>Release 6.3</title>
29578
29579   <note>
29580   <title>Release date</title>
29581   <simpara>1998-03-01</simpara>
29582   </note>
29583
29584   <para>
29585    There are <emphasis>many</emphasis> new features and improvements in this release.
29586    Here is a brief, incomplete summary:
29587
29588    <itemizedlist>
29589     <listitem>
29590      <para>
29591       Many new SQL features, including
29592       full <acronym>SQL92</acronym> subselect capability
29593       (everything is here but target-list subselects).
29594      </para>
29595     </listitem>
29596
29597     <listitem>
29598      <para>
29599       Support for client-side environment variables to specify time zone and date style.
29600      </para>
29601     </listitem>
29602
29603     <listitem>
29604      <para>
29605       Socket interface for client/server connection. This is the default now
29606       so you might need to start <application>postmaster</application> with the
29607       <option>-i</option> flag.
29608      </para>
29609     </listitem>
29610
29611     <listitem>
29612      <para>
29613       Better password authorization mechanisms. Default table privileges have changed.
29614      </para>
29615     </listitem>
29616
29617     <listitem>
29618      <para>
29619       Old-style <firstterm>time travel</firstterm>
29620       has been removed. Performance has been improved.
29621      </para>
29622     </listitem>
29623    </itemizedlist>
29624   </para>
29625
29626   <note>
29627    <para>
29628     Bruce Momjian wrote the following notes to introduce the new release.
29629    </para>
29630   </note>
29631
29632   <para>
29633    There are some general 6.3 issues that I want to mention.  These are
29634    only the big items that cannot be described in one sentence.  A review
29635    of the detailed changes list is still needed.
29636   </para>
29637   <para>
29638    First, we now have subselects.  Now that we have them, I would like to
29639    mention that without subselects, SQL is a very limited language.
29640    Subselects are a major feature, and you should review your code for
29641    places where subselects provide a better solution for your queries.  I
29642    think you will find that there are more uses for subselects than you might
29643    think.  Vadim has put us on the big SQL map with subselects, and fully
29644    functional ones too.  The only thing you cannot do with subselects is to
29645    use them in the target list.
29646   </para>
29647   <para>
29648    Second, 6.3 uses Unix domain sockets rather than TCP/IP by default.  To
29649    enable connections from other machines, you have to use the new
29650    postmaster -i option, and of course edit <filename>pg_hba.conf</filename>.  Also, for this
29651    reason, the format of <filename>pg_hba.conf</filename> has changed.
29652   </para>
29653   <para>
29654    Third, <type>char()</type> fields will now allow faster access than <type>varchar()</type> or
29655    <type>text</type>. Specifically, the <type>text</> and <type>varchar()</type> have a penalty for access to
29656    any columns after the first column of this type.  <type>char()</type> used to also
29657    have this access penalty, but it no longer does.  This might suggest that
29658    you redesign some of your tables, especially if you have short character
29659    columns that you have defined as <type>varchar()</type> or <type>text</type>.  This and other
29660    changes make 6.3 even faster than earlier releases.
29661   </para>
29662   <para>
29663    We now have passwords definable independent of any Unix file.  There are
29664    new SQL USER commands.
29665    See the <citetitle>Administrator's Guide</citetitle> for more
29666    information.  There is a new table, pg_shadow, which is used to store
29667    user information and user passwords, and it by default only SELECT-able
29668    by the <systemitem>postgres</systemitem> super-user.  pg_user is now a view of pg_shadow, and is
29669    SELECT-able by PUBLIC.  You should keep using pg_user in your
29670    application without changes.
29671   </para>
29672   <para>
29673    User-created tables now no longer have SELECT privilege to PUBLIC by
29674    default.  This was done because the ANSI standard requires it.  You can
29675    of course GRANT any privileges you want after the table is created.
29676    System tables continue to be SELECT-able by PUBLIC.
29677   </para>
29678   <para>
29679    We also have real deadlock detection code.  No more sixty-second
29680    timeouts.  And the new locking code implements a <acronym>FIFO</acronym> better, so there
29681    should be less resource starvation during heavy use.
29682   </para>
29683   <para>
29684    Many complaints have been made about inadequate documentation in previous
29685    releases.  Thomas has put much effort into many new manuals for this
29686    release.  Check out the doc/ directory.
29687   </para>
29688   <para>
29689    For performance reasons, time travel is gone, but can be implemented
29690    using triggers (see <filename>pgsql/contrib/spi/README</filename>).  Please check out the new
29691    \d command for types, operators, etc.  Also, views have their own
29692    privileges now, not based on the underlying tables, so privileges on
29693    them have to be set separately.  Check <filename>/pgsql/interfaces</filename> for some new
29694    ways to talk to <productname>PostgreSQL</productname>.
29695   </para>
29696   <para>
29697    This is the first release that really required an explanation for
29698    existing users.  In many ways, this was necessary because the new
29699    release removes many limitations, and the work-arounds people were using
29700    are no longer needed.
29701   </para>
29702
29703   <sect2>
29704    <title>Migration to Version 6.3</title>
29705
29706    <para>
29707     A dump/restore using <application>pg_dump</application>
29708     or <application>pg_dumpall</application>
29709     is required for those wishing to migrate data from any
29710     previous release of <productname>PostgreSQL</productname>.
29711    </para>
29712   </sect2>
29713
29714   <sect2>
29715    <title>Changes</title>
29716
29717    <para>
29718     <programlisting>
29719 Bug Fixes
29720 ---------
29721 Fix binary cursors broken by MOVE implementation(Vadim)
29722 Fix for tcl library crash(Jan)
29723 Fix for array handling, from Gerhard Hintermayer
29724 Fix acl error, and remove duplicate pqtrace(Bruce)
29725 Fix psql \e for empty file(Bruce)
29726 Fix for textcat on varchar() fields(Bruce)
29727 Fix for DBT Sendproc (Zeugswetter Andres)
29728 Fix vacuum analyze syntax problem(Bruce)
29729 Fix for international identifiers(Tatsuo)
29730 Fix aggregates on inherited tables(Bruce)
29731 Fix substr() for out-of-bounds data
29732 Fix for select 1=1 or 2=2, select 1=1 and 2=2, and select sum(2+2)(Bruce)
29733 Fix notty output to show status result.  -q option still turns it off(Bruce)
29734 Fix for count(*), aggs with views and multiple tables and sum(3)(Bruce)
29735 Fix cluster(Bruce)
29736 Fix for PQtrace start/stop several times(Bruce)
29737 Fix a variety of locking problems like newer lock waiters getting
29738        lock before older waiters, and having readlock people not share
29739        locks if a writer is waiting for a lock, and waiting writers not
29740        getting priority over waiting readers(Bruce)
29741 Fix crashes in psql when executing queries from external files(James)
29742 Fix problem with multiple order by columns, with the first one having
29743        NULL values(Jeroen)
29744 Use correct hash table support functions for float8 and int4(Thomas)
29745 Re-enable JOIN= option in CREATE OPERATOR statement (Thomas)
29746 Change precedence for boolean operators to match expected behavior(Thomas)
29747 Generate elog(ERROR) on over-large integer(Bruce)
29748 Allow multiple-argument functions in constraint clauses(Thomas)
29749 Check boolean input literals for 'true','false','yes','no','1','0'
29750        and throw elog(ERROR) if unrecognized(Thomas)
29751 Major large objects fix
29752 Fix for GROUP BY showing duplicates(Vadim)
29753 Fix for index scans in MergeJoin(Vadim)
29754
29755 Enhancements
29756 ------------
29757 Subselects with EXISTS, IN, ALL, ANY key words (Vadim, Bruce, Thomas)
29758 New User Manual(Thomas, others)
29759 Speedup by inlining some frequently-called functions
29760 Real deadlock detection, no more timeouts(Bruce)
29761 Add SQL92 "constants" CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP,
29762        CURRENT_USER(Thomas)
29763 Modify constraint syntax to be SQL92-compliant(Thomas)
29764 Implement SQL92 PRIMARY KEY and UNIQUE clauses using indexes(Thomas)
29765 Recognize SQL92 syntax for FOREIGN KEY. Throw elog notice(Thomas)
29766 Allow NOT NULL UNIQUE constraint clause (each allowed separately before)(Thomas)
29767 Allow PostgreSQL-style casting ("::") of non-constants(Thomas)
29768 Add support for SQL3 TRUE and FALSE boolean constants(Thomas)
29769 Support SQL92 syntax for IS TRUE/IS FALSE/IS NOT TRUE/IS NOT FALSE(Thomas)
29770 Allow shorter strings for boolean literals (e.g. "t", "tr", "tru")(Thomas)
29771 Allow SQL92 delimited identifiers(Thomas)
29772 Implement SQL92 binary and hexadecimal string decoding (b'10' and x'1F')(Thomas)
29773 Support SQL92 syntax for type coercion of literal strings
29774        (e.g. "DATETIME 'now'")(Thomas)
29775 Add conversions for int2, int4, and OID types to and from text(Thomas)
29776 Use shared lock when building indexes(Vadim)
29777 Free memory allocated for an user query inside transaction block after
29778        this query is done, was turned off in &lt;= 6.2.1(Vadim)
29779 New SQL statement CREATE PROCEDURAL LANGUAGE(Jan)
29780 New <productname>PostgreSQL</productname> Procedural Language (PL) backend interface(Jan)
29781 Rename pg_dump -H option to -h(Bruce)
29782 Add Java support for passwords, European dates(Peter)
29783 Use indexes for LIKE and ~, !~ operations(Bruce)
29784 Add hash functions for datetime and timespan(Thomas)
29785 Time Travel removed(Vadim, Bruce)
29786 Add paging for \d and \z, and fix \i(Bruce)
29787 Add Unix domain socket support to backend and to frontend library(Goran)
29788 Implement CREATE DATABASE/WITH LOCATION and initlocation utility(Thomas)
29789 Allow more SQL92 and/or <productname>PostgreSQL</productname> reserved words as column identifiers(Thomas)
29790 Augment support for SQL92 SET TIME ZONE...(Thomas)
29791 SET/SHOW/RESET TIME ZONE uses TZ backend environment variable(Thomas)
29792 Implement SET keyword = DEFAULT and SET TIME ZONE DEFAULT(Thomas)
29793 Enable SET TIME ZONE using TZ environment variable(Thomas)
29794 Add PGDATESTYLE environment variable to frontend and backend initialization(Thomas)
29795 Add PGTZ, PGCOSTHEAP, PGCOSTINDEX, PGRPLANS, PGGEQO
29796        frontend library initialization environment variables(Thomas)
29797 Regression tests time zone automatically set with "setenv PGTZ PST8PDT"(Thomas)
29798 Add pg_description table for info on tables, columns, operators, types, and
29799        aggregates(Bruce)
29800 Increase 16 char limit on system table/index names to 32 characters(Bruce)
29801 Rename system indexes(Bruce)
29802 Add 'GERMAN' option to SET DATESTYLE(Thomas)
29803 Define an "ISO-style" timespan output format with "hh:mm:ss" fields(Thomas)
29804 Allow fractional values for delta times (e.g. '2.5 days')(Thomas)
29805 Validate numeric input more carefully for delta times(Thomas)
29806 Implement day of year as possible input to date_part()(Thomas)
29807 Define timespan_finite() and text_timespan() functions(Thomas)
29808 Remove archive stuff(Bruce)
29809 Allow for a pg_password authentication database that is separate from
29810        the system password file(Todd)
29811 Dump ACLs, GRANT, REVOKE privileges(Matt)
29812 Define text, varchar, and bpchar string length functions(Thomas)
29813 Fix Query handling for inheritance, and cost computations(Bruce)
29814 Implement CREATE TABLE/AS SELECT (alternative to SELECT/INTO)(Thomas)
29815 Allow NOT, IS NULL, IS NOT NULL in constraints(Thomas)
29816 Implement UNIONs for SELECT(Bruce)
29817 Add UNION, GROUP, DISTINCT to INSERT(Bruce)
29818 varchar() stores only necessary bytes on disk(Bruce)
29819 Fix for BLOBs(Peter)
29820 Mega-Patch for JDBC...see README_6.3 for list of changes(Peter)
29821 Remove unused "option" from PQconnectdb()
29822 New LOCK command and lock manual page describing deadlocks(Bruce)
29823 Add new psql \da, \dd, \df, \do, \dS, and \dT commands(Bruce)
29824 Enhance psql \z to show sequences(Bruce)
29825 Show NOT NULL and DEFAULT in psql \d table(Bruce)
29826 New psql .psqlrc file start-up(Andrew)
29827 Modify sample start-up script in contrib/linux to show syslog(Thomas)
29828 New types for IP and MAC addresses in contrib/ip_and_mac(TomH)
29829 Unix system time conversions with date/time types in contrib/unixdate(Thomas)
29830 Update of contrib stuff(Massimo)
29831 Add Unix socket support to DBD::Pg(Goran)
29832 New python interface (PyGreSQL 2.0)(D'Arcy)
29833 New frontend/backend protocol has a version number, network byte order(Phil)
29834 Security features in pg_hba.conf enhanced and documented, many cleanups(Phil)
29835 CHAR() now faster access than VARCHAR() or TEXT
29836 ecpg embedded SQL preprocessor
29837 Reduce system column overhead(Vadmin)
29838 Remove pg_time table(Vadim)
29839 Add pg_type attribute to identify types that need length (bpchar, varchar)
29840 Add report of offending line when COPY command fails
29841 Allow VIEW privileges to be set separately from the underlying tables.
29842        For security, use GRANT/REVOKE on views as appropriate(Jan)
29843 Tables now have no default GRANT SELECT TO PUBLIC.  You must
29844        explicitly grant such privileges.
29845 Clean up tutorial examples(Darren)
29846
29847 Source Tree Changes
29848 -------------------
29849 Add new html development tools, and flow chart in /tools/backend
29850 Fix for SCO compiles
29851 Stratus computer port Robert Gillies
29852 Added support for shlib for BSD44_derived &amp; i386_solaris
29853 Make configure more automated(Brook)
29854 Add script to check regression test results
29855 Break parser functions into smaller files, group together(Bruce)
29856 Rename heap_create to heap_create_and_catalog, rename heap_creatr
29857        to heap_create()(Bruce)
29858 Sparc/Linux patch for locking(TomS)
29859 Remove PORTNAME and reorganize port-specific stuff(Marc)
29860 Add optimizer README file(Bruce)
29861 Remove some recursion in optimizer and clean up some code there(Bruce)
29862 Fix for NetBSD locking(Henry)
29863 Fix for libptcl make(Tatsuo)
29864 AIX patch(Darren)
29865 Change IS TRUE, IS FALSE, ... to expressions using "=" rather than
29866        function calls to istrue() or isfalse() to allow optimization(Thomas)
29867 Various fixes NetBSD/Sparc related(TomH)
29868 Alpha linux locking(Travis,Ryan)
29869 Change elog(WARN) to elog(ERROR)(Bruce)
29870 FAQ for FreeBSD(Marc)
29871 Bring in the PostODBC source tree as part of our standard distribution(Marc)
29872 A minor patch for HP/UX 10 vs 9(Stan)
29873 New pg_attribute.atttypmod for type-specific info like varchar length(Bruce)
29874 UnixWare patches(Billy)
29875 New i386 'lock' for spinlock asm(Billy)
29876 Support for multiplexed backends is removed
29877 Start an OpenBSD port
29878 Start an AUX port
29879 Start a Cygnus port
29880 Add string functions to regression suite(Thomas)
29881 Expand a few function names formerly truncated to 16 characters(Thomas)
29882 Remove un-needed malloc() calls and replace with palloc()(Bruce)
29883 </programlisting>
29884 </para>
29885 </sect2>
29886 </sect1>
29887
29888 <sect1 id="release-6-2-1">
29889 <title>Release 6.2.1</title>
29890
29891   <note>
29892   <title>Release date</title>
29893   <simpara>1997-10-17</simpara>
29894   </note>
29895
29896 <para>
29897 6.2.1 is a bug-fix and usability release on 6.2.
29898 </para>
29899 <para>
29900 Summary:
29901
29902 <itemizedlist>
29903 <listitem>
29904 <para>
29905 Allow strings to span lines, per <acronym>SQL92</acronym>.
29906 </para>
29907 </listitem>
29908
29909 <listitem>
29910 <para>
29911 Include example trigger function for inserting user names on table updates.
29912 </para>
29913 </listitem>
29914
29915 </itemizedlist>
29916 </para>
29917 <para>
29918 This is a minor bug-fix release on 6.2.
29919 For upgrades from pre-6.2 systems, a full dump/reload is required.
29920 Refer to the 6.2 release notes for instructions.
29921 </para>
29922
29923 <sect2>
29924 <title>Migration from version 6.2 to version 6.2.1</title>
29925
29926 <para>
29927 This is a minor bug-fix release. A dump/reload is not required from version 6.2,
29928 but is required from any release prior to 6.2.
29929 </para>
29930 <para>
29931 In upgrading from version 6.2, if you choose to dump/reload you will find that
29932 avg(money) is now calculated correctly. All other bug fixes take effect
29933 upon updating the executables.
29934 </para>
29935 <para>
29936 Another way to avoid dump/reload is to use the following SQL command
29937 from <command>psql</command> to update the existing system table:
29938
29939 <programlisting>
29940  update pg_aggregate set aggfinalfn = 'cash_div_flt8'
29941   where aggname = 'avg' and aggbasetype = 790;
29942 </programlisting>
29943 </para>
29944 <para>
29945 This will need to be done to every existing database, including template1.
29946 </para>
29947 </sect2>
29948
29949   <sect2>
29950    <title>Changes</title>
29951
29952    <para>
29953     <programlisting>
29954 Allow TIME and TYPE column names(Thomas)
29955 Allow larger range of true/false as boolean values(Thomas)
29956 Support output of "now" and "current"(Thomas)
29957 Handle DEFAULT with INSERT of NULL properly(Vadim)
29958 Fix for relation reference counts problem in buffer manager(Vadim)
29959 Allow strings to span lines, like ANSI(Thomas)
29960 Fix for backward cursor with ORDER BY(Vadim)
29961 Fix avg(cash) computation(Thomas)
29962 Fix for specifying a column twice in ORDER/GROUP BY(Vadim)
29963 Documented new libpq function to return affected rows, PQcmdTuples(Bruce)
29964 Trigger function for inserting user names for INSERT/UPDATE(Brook Milligan)
29965     </programlisting>
29966    </para>
29967   </sect2>
29968  </sect1>
29969
29970 <sect1 id="release-6-2">
29971 <title>Release 6.2</title>
29972
29973   <note>
29974   <title>Release date</title>
29975   <simpara>1997-10-02</simpara>
29976   </note>
29977
29978 <para>
29979 A dump/restore is required for those wishing to migrate data from
29980 previous releases of <productname>PostgreSQL</productname>.
29981 </para>
29982
29983 <sect2>
29984 <title>Migration from version 6.1 to version 6.2</title>
29985
29986 <para>
29987 This migration requires a complete dump of the 6.1 database and a
29988 restore of the database in 6.2.
29989 </para>
29990 <para>
29991 Note that the <command>pg_dump</command> and <command>pg_dumpall</command> utility from 6.2 should be used
29992 to dump the 6.1 database.
29993 </para>
29994 </sect2>
29995
29996 <sect2>
29997 <title>Migration from version 1.<replaceable>x</> to version 6.2</title>
29998
29999 <para>
30000 Those migrating from earlier 1.* releases should first upgrade to 1.09
30001 because the COPY output format was improved from the 1.02 release.
30002 </para>
30003 </sect2>
30004
30005   <sect2>
30006    <title>Changes</title>
30007
30008    <para>
30009     <programlisting>
30010 Bug Fixes
30011 ---------
30012 Fix problems with pg_dump for inheritance, sequences, archive tables(Bruce)
30013 Fix compile errors on overflow due to shifts, unsigned, and bad prototypes
30014         from Solaris(Diab Jerius)
30015 Fix bugs in geometric line arithmetic (bad intersection calculations)(Thomas)
30016 Check for geometric intersections at endpoints to avoid rounding ugliness(Thomas)
30017 Catch non-functional delete attempts(Vadim)
30018 Change time function names to be more consistent(Michael Reifenberg)
30019 Check for zero divides(Michael Reifenberg)
30020 Fix very old bug which made rows changed/inserted by a command
30021        visible to the command itself (so we had multiple update of
30022        updated rows, etc.)(Vadim)
30023 Fix for SELECT null, 'fail' FROM pg_am (Patrick)
30024 SELECT NULL as EMPTY_FIELD now allowed(Patrick)
30025 Remove un-needed signal stuff from contrib/pginterface
30026 Fix OR (where x != 1 or x isnull didn't return rows with x NULL) (Vadim)
30027 Fix time_cmp function (Vadim)
30028 Fix handling of functions with non-attribute first argument in
30029        WHERE clauses (Vadim)
30030 Fix GROUP BY when order of entries is different from order
30031        in target list (Vadim)
30032 Fix pg_dump for aggregates without sfunc1 (Vadim)
30033
30034 Enhancements
30035 ------------
30036 Default genetic optimizer GEQO parameter is now 8(Bruce)
30037 Allow use parameters in target list having aggregates in functions(Vadim)
30038 Added JDBC driver as an interface(Adrian &amp; Peter)
30039 pg_password utility
30040 Return number of rows inserted/affected by INSERT/UPDATE/DELETE etc.(Vadim)
30041 Triggers implemented with CREATE TRIGGER (SQL3)(Vadim)
30042 SPI (Server Programming Interface) allows execution of queries inside
30043        C-functions (Vadim)
30044 NOT NULL implemented (SQL92)(Robson Paniago de Miranda)
30045 Include reserved words for string handling, outer joins, and unions(Thomas)
30046 Implement extended comments ("/* ... */") using exclusive states(Thomas)
30047 Add "//" single-line comments(Bruce)
30048 Remove some restrictions on characters in operator names(Thomas)
30049 DEFAULT and CONSTRAINT for tables implemented (SQL92)(Vadim &amp; Thomas)
30050 Add text concatenation operator and function (SQL92)(Thomas)
30051 Support WITH TIME ZONE syntax (SQL92)(Thomas)
30052 Support INTERVAL unit TO unit syntax (SQL92)(Thomas)
30053 Define types DOUBLE PRECISION, INTERVAL, CHARACTER,
30054        and CHARACTER VARYING (SQL92)(Thomas)
30055 Define type FLOAT(p) and rudimentary DECIMAL(p,s), NUMERIC(p,s) (SQL92)(Thomas)
30056 Define EXTRACT(), POSITION(), SUBSTRING(), and TRIM() (SQL92)(Thomas)
30057 Define CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP (SQL92)(Thomas)
30058 Add syntax and warnings for UNION, HAVING, INNER and OUTER JOIN (SQL92)(Thomas)
30059 Add more reserved words, mostly for SQL92 compliance(Thomas)
30060 Allow hh:mm:ss time entry for timespan/reltime types(Thomas)
30061 Add center() routines for lseg, path, polygon(Thomas)
30062 Add distance() routines for circle-polygon, polygon-polygon(Thomas)
30063 Check explicitly for points and polygons contained within polygons
30064        using an axis-crossing algorithm(Thomas)
30065 Add routine to convert circle-box(Thomas)
30066 Merge conflicting operators for different geometric data types(Thomas)
30067 Replace distance operator "&lt;===&gt;" with "&lt;-&gt;"(Thomas)
30068 Replace "above" operator "!^" with "&gt;^" and "below" operator "!|" with "&lt;^"(Thomas)
30069 Add routines for text trimming on both ends, substring, and string position(Thomas)
30070 Added conversion routines circle(box) and poly(circle)(Thomas)
30071 Allow internal sorts to be stored in memory rather than in files(Bruce &amp; Vadim)
30072 Allow functions and operators on internally-identical types to succeed(Bruce)
30073 Speed up backend start-up after profiling analysis(Bruce)
30074 Inline frequently called functions for performance(Bruce)
30075 Reduce open() calls(Bruce)
30076 psql:  Add PAGER for \h and \?,\C fix
30077 Fix for psql pager when no tty(Bruce)
30078 New entab utility(Bruce)
30079 General trigger functions for referential integrity (Vadim)
30080 General trigger functions for time travel (Vadim)
30081 General trigger functions for AUTOINCREMENT/IDENTITY feature (Vadim)
30082 MOVE implementation (Vadim)
30083
30084 Source Tree Changes
30085 -------------------
30086 HP-UX 10 patches (Vladimir Turin)
30087 Added SCO support, (Daniel Harris)
30088 MkLinux patches (Tatsuo Ishii)
30089 Change geometric box terminology from "length" to "width"(Thomas)
30090 Deprecate temporary unstored slope fields in geometric code(Thomas)
30091 Remove restart instructions from INSTALL(Bruce)
30092 Look in /usr/ucb first for install(Bruce)
30093 Fix c++ copy example code(Thomas)
30094 Add -o to psql manual page(Bruce)
30095 Prevent relname unallocated string length from being copied into database(Bruce)
30096 Cleanup for NAMEDATALEN use(Bruce)
30097 Fix pg_proc names over 15 chars in output(Bruce)
30098 Add strNcpy() function(Bruce)
30099 remove some (void) casts that are unnecessary(Bruce)
30100 new interfaces directory(Marc)
30101 Replace fopen() calls with calls to fd.c functions(Bruce)
30102 Make functions static where possible(Bruce)
30103 enclose unused functions in #ifdef NOT_USED(Bruce)
30104 Remove call to difftime() in timestamp support to fix SunOS(Bruce &amp; Thomas)
30105 Changes for Digital Unix
30106 Portability fix for pg_dumpall(Bruce)
30107 Rename pg_attribute.attnvals to attdispersion(Bruce)
30108 "intro/unix" manual page now "pgintro"(Bruce)
30109 "built-in" manual page now "pgbuiltin"(Bruce)
30110 "drop" manual page now "drop_table"(Bruce)
30111 Add "create_trigger", "drop_trigger" manual pages(Thomas)
30112 Add constraints regression test(Vadim &amp; Thomas)
30113 Add comments syntax regression test(Thomas)
30114 Add PGINDENT and support program(Bruce)
30115 Massive commit to run PGINDENT on all *.c and *.h files(Bruce)
30116 Files moved to /src/tools directory(Bruce)
30117 SPI and Trigger programming guides (Vadim &amp; D'Arcy)
30118 </programlisting>
30119 </para>
30120 </sect2>
30121 </sect1>
30122
30123 <sect1 id="release-6-1-1">
30124 <title>Release 6.1.1</title>
30125
30126   <note>
30127   <title>Release date</title>
30128   <simpara>1997-07-22</simpara>
30129   </note>
30130
30131 <sect2>
30132 <title>Migration from version 6.1 to version 6.1.1</title>
30133
30134 <para>
30135 This is a minor bug-fix release. A dump/reload is not required from version 6.1,
30136 but is required from any release prior to 6.1.
30137 Refer to the release notes for 6.1 for more details.
30138 </para>
30139 </sect2>
30140
30141   <sect2>
30142    <title>Changes</title>
30143
30144    <para>
30145     <programlisting>
30146 fix for SET with options (Thomas)
30147 allow pg_dump/pg_dumpall to preserve ownership of all tables/objects(Bruce)
30148 new psql \connect option allows changing usernames without changing databases
30149 fix for initdb --debug option(Yoshihiko Ichikawa))
30150 lextest cleanup(Bruce)
30151 hash fixes(Vadim)
30152 fix date/time month boundary arithmetic(Thomas)
30153 fix timezone daylight handling for some ports(Thomas, Bruce, Tatsuo)
30154 timestamp overhauled to use standard functions(Thomas)
30155 other code cleanup in date/time routines(Thomas)
30156 psql's \d now case-insensitive(Bruce)
30157 psql's backslash commands can now have trailing semicolon(Bruce)
30158 fix memory leak in psql when using \g(Bruce)
30159 major fix for endian handling of communication to server(Thomas, Tatsuo)
30160 Fix for Solaris assembler and include files(Yoshihiko Ichikawa)
30161 allow underscores in usernames(Bruce)
30162 pg_dumpall now returns proper status, portability fix(Bruce)
30163     </programlisting>
30164    </para>
30165   </sect2>
30166  </sect1>
30167
30168 <sect1 id="release-6-1">
30169 <title>Release 6.1</title>
30170
30171   <note>
30172   <title>Release date</title>
30173   <simpara>1997-06-08</simpara>
30174   </note>
30175
30176 <para>
30177  The regression tests have been adapted and extensively modified for the
30178  6.1 release of <productname>PostgreSQL</productname>.
30179 </para>
30180
30181 <para>
30182  Three new data types (<type>datetime</type>, <type>timespan</type>, and <type>circle</type>) have been added to
30183  the native set of <productname>PostgreSQL</productname> types. Points, boxes, paths, and polygons
30184  have had their output formats made consistent across the data types.
30185  The polygon output in misc.out has only been spot-checked for correctness
30186  relative to the original regression output.
30187 </para>
30188
30189 <para>
30190  <productname>PostgreSQL</productname> 6.1 introduces a new, alternate
30191 optimizer which uses <firstterm>genetic</firstterm>
30192  algorithms. These algorithms introduce a random behavior in the ordering
30193  of query results when the query contains multiple qualifiers or multiple
30194  tables (giving the optimizer a choice on order of evaluation). Several
30195  regression tests have been modified to explicitly order the results, and
30196  hence are insensitive to optimizer choices. A few regression tests are
30197  for data types which are inherently unordered (e.g. points and time
30198  intervals) and tests involving those types are explicitly bracketed with
30199  <command>set geqo to 'off'</command> and <command>reset geqo</command>.
30200 </para>
30201
30202 <para>
30203  The interpretation of array specifiers (the curly braces around atomic
30204  values) appears to have changed sometime after the original regression
30205  tests were generated. The current <filename>./expected/*.out</filename> files reflect this
30206  new interpretation, which might not be correct!
30207 </para>
30208
30209 <para>
30210  The float8 regression test fails on at least some platforms. This is due
30211  to differences in implementations of <function>pow()</function> and <function>exp()</function> and the signaling
30212  mechanisms used for overflow and underflow conditions.
30213 </para>
30214
30215 <para>
30216  The <quote>random</> results in the random test should cause the
30217  <quote>random</quote> test to be <quote>failed</quote>, since the
30218  regression tests are evaluated using a simple diff. However,
30219  <quote>random</> does not seem to produce random results on my test
30220  machine (Linux/<application>gcc</>/i686).
30221 </para>
30222
30223 <sect2>
30224 <title>Migration to Version 6.1</title>
30225
30226 <para>
30227 This migration requires a complete dump of the 6.0 database and a
30228 restore of the database in 6.1.
30229 </para>
30230 <para>
30231 Those migrating from earlier 1.* releases should first upgrade to 1.09
30232 because the COPY output format was improved from the 1.02 release.
30233 </para>
30234 </sect2>
30235
30236   <sect2>
30237    <title>Changes</title>
30238
30239    <para>
30240     <programlisting>
30241 Bug Fixes
30242 ---------
30243 packet length checking in library routines
30244 lock manager priority patch
30245 check for under/over flow of float8(Bruce)
30246 multitable join fix(Vadim)
30247 SIGPIPE crash fix(Darren)
30248 large object fixes(Sven)
30249 allow btree indexes to handle NULLs(Vadim)
30250 timezone fixes(D'Arcy)
30251 select SUM(x) can return NULL on no rows(Thomas)
30252 internal optimizer, executor bug fixes(Vadim)
30253 fix problem where inner loop in &lt; or &lt;= has no rows(Vadim)
30254 prevent re-commuting join index clauses(Vadim)
30255 fix join clauses for multiple tables(Vadim)
30256 fix hash, hashjoin for arrays(Vadim)
30257 fix btree for abstime type(Vadim)
30258 large object fixes(Raymond)
30259 fix buffer leak in hash indexes (Vadim)
30260 fix rtree for use in inner scan (Vadim)
30261 fix gist for use in inner scan, cleanups (Vadim, Andrea)
30262 avoid unnecessary local buffers allocation (Vadim, Massimo)
30263 fix local buffers leak in transaction aborts (Vadim)
30264 fix file manager memmory leaks, cleanups (Vadim, Massimo)
30265 fix storage manager memmory leaks (Vadim)
30266 fix btree duplicates handling (Vadim)
30267 fix deleted rows reincarnation caused by vacuum (Vadim)
30268 fix SELECT varchar()/char() INTO TABLE made zero-length fields(Bruce)
30269 many psql, pg_dump, and libpq memory leaks fixed using Purify (Igor)
30270
30271 Enhancements
30272 ------------
30273 attribute optimization statistics(Bruce)
30274 much faster new btree bulk load code(Paul)
30275 BTREE UNIQUE added to bulk load code(Vadim)
30276 new lock debug code(Massimo)
30277 massive changes to libpg++(Leo)
30278 new GEQO optimizer speeds table multitable optimization(Martin)
30279 new WARN message for non-unique insert into unique key(Marc)
30280 update x=-3, no spaces, now valid(Bruce)
30281 remove case-sensitive identifier handling(Bruce,Thomas,Dan)
30282 debug backend now pretty-prints tree(Darren)
30283 new Oracle character functions(Edmund)
30284 new plaintext password functions(Dan)
30285 no such class or insufficient privilege changed to distinct messages(Dan)
30286 new ANSI timestamp function(Dan)
30287 new ANSI Time and Date types (Thomas)
30288 move large chunks of data in backend(Martin)
30289 multicolumn btree indexes(Vadim)
30290 new SET var TO value command(Martin)
30291 update transaction status on reads(Dan)
30292 new locale settings for character types(Oleg)
30293 new SEQUENCE serial number generator(Vadim)
30294 GROUP BY function now possible(Vadim)
30295 re-organize regression test(Thomas,Marc)
30296 new optimizer operation weights(Vadim)
30297 new psql \z grant/permit option(Marc)
30298 new MONEY data type(D'Arcy,Thomas)
30299 tcp socket communication speed improved(Vadim)
30300 new VACUUM option for attribute statistics, and for certain columns (Vadim)
30301 many geometric type improvements(Thomas,Keith)
30302 additional regression tests(Thomas)
30303 new datestyle variable(Thomas,Vadim,Martin)
30304 more comparison operators for sorting types(Thomas)
30305 new conversion functions(Thomas)
30306 new more compact btree format(Vadim)
30307 allow pg_dumpall to preserve database ownership(Bruce)
30308 new SET GEQO=# and R_PLANS variable(Vadim)
30309 old (!GEQO) optimizer can use right-sided plans (Vadim)
30310 typechecking improvement in SQL parser(Bruce)
30311 new SET, SHOW, RESET commands(Thomas,Vadim)
30312 new \connect database USER option
30313 new destroydb -i option (Igor)
30314 new \dt and \di psql commands (Darren)
30315 SELECT "\n" now escapes newline (A. Duursma)
30316 new geometry conversion functions from old format (Thomas)
30317
30318 Source tree changes
30319 -------------------
30320 new configuration script(Marc)
30321 readline configuration option added(Marc)
30322 OS-specific configuration options removed(Marc)
30323 new OS-specific template files(Marc)
30324 no more need to edit Makefile.global(Marc)
30325 re-arrange include files(Marc)
30326 nextstep patches (Gregor Hoffleit)
30327 removed Windows-specific code(Bruce)
30328 removed postmaster -e option, now only postgres -e option (Bruce)
30329 merge duplicate library code in front/backends(Martin)
30330 now works with eBones, international Kerberos(Jun)
30331 more shared library support
30332 c++ include file cleanup(Bruce)
30333 warn about buggy flex(Bruce)
30334 DG/UX, Ultrix, IRIX, AIX portability fixes
30335 </programlisting>
30336 </para>
30337 </sect2>
30338 </sect1>
30339
30340 <sect1 id="release-6-0">
30341 <title>Release 6.0</title>
30342
30343   <note>
30344   <title>Release date</title>
30345   <simpara>1997-01-29</simpara>
30346   </note>
30347
30348 <para>
30349 A dump/restore is required for those wishing to migrate data from
30350 previous releases of <productname>PostgreSQL</productname>.
30351 </para>
30352
30353 <sect2>
30354 <title>Migration from version 1.09 to version 6.0</title>
30355
30356 <para>
30357 This migration requires a complete dump of the 1.09 database and a
30358 restore of the database in 6.0.
30359 </para>
30360 </sect2>
30361
30362 <sect2>
30363 <title>Migration from pre-1.09 to version 6.0</title>
30364
30365 <para>
30366 Those migrating from earlier 1.* releases should first upgrade to 1.09
30367 because the COPY output format was improved from the 1.02 release.
30368 </para>
30369 </sect2>
30370
30371   <sect2>
30372    <title>Changes</title>
30373
30374    <para>
30375     <programlisting>
30376 Bug Fixes
30377 ---------
30378 ALTER TABLE bug - running postgres process needs to re-read table definition
30379 Allow vacuum to be run on one table or entire database(Bruce)
30380 Array fixes
30381 Fix array over-runs of memory writes(Kurt)
30382 Fix elusive btree range/non-range bug(Dan)
30383 Fix for hash indexes on some types like time and date
30384 Fix for pg_log size explosion
30385 Fix permissions on lo_export()(Bruce)
30386 Fix uninitialized reads of memory(Kurt)
30387 Fixed ALTER TABLE ... char(3) bug(Bruce)
30388 Fixed a few small memory leaks
30389 Fixed EXPLAIN handling of options and changed full_path option name
30390 Fixed output of group acl privileges
30391 Memory leaks (hunt and destroy with tools like Purify(Kurt)
30392 Minor improvements to rules system
30393 NOTIFY fixes
30394 New asserts for run-checking
30395 Overhauled parser/analyze code to properly report errors and increase speed
30396 Pg_dump -d now handles NULL's properly(Bruce)
30397 Prevent SELECT NULL from crashing server (Bruce)
30398 Properly report errors when INSERT ... SELECT columns did not match
30399 Properly report errors when insert column names were not correct
30400 psql \g filename now works(Bruce)
30401 psql fixed problem with multiple statements on one line with multiple outputs
30402 Removed duplicate system OIDs
30403 SELECT * INTO TABLE . GROUP/ORDER BY gives unlink error if table exists(Bruce)
30404 Several fixes for queries that crashed the backend
30405 Starting quote in insert string errors(Bruce)
30406 Submitting an empty query now returns empty status, not just " " query(Bruce)
30407
30408 Enhancements
30409 ------------
30410 Add EXPLAIN manual page(Bruce)
30411 Add UNIQUE index capability(Dan)
30412 Add hostname/user level access control rather than just hostname and user
30413 Add synonym of != for &lt;&gt;(Bruce)
30414 Allow "select oid,* from table"
30415 Allow BY,ORDER BY to specify columns by number, or by non-alias table.column(Bruce)
30416 Allow COPY from the frontend(Bryan)
30417 Allow GROUP BY to use alias column name(Bruce)
30418 Allow actual compression, not just reuse on the same page(Vadim)
30419 Allow installation-configuration option to auto-add all local users(Bryan)
30420 Allow libpq to distinguish between text value '' and null(Bruce)
30421 Allow non-postgres users with createdb privs to destroydb's
30422 Allow restriction on who can create C functions(Bryan)
30423 Allow restriction on who can do backend COPY(Bryan)
30424 Can shrink tables, pg_time and pg_log(Vadim &amp; Erich)
30425 Change debug level 2 to print queries only, changed debug heading layout(Bruce)
30426 Change default decimal constant representation from float4 to float8(Bruce)
30427 European date format now set when postmaster is started
30428 Execute lowercase function names if not found with exact case
30429 Fixes for aggregate/GROUP processing, allow 'select sum(func(x),sum(x+y) from z'
30430 Gist now included in the distribution(Marc)
30431 Idend authentication of local users(Bryan)
30432 Implement BETWEEN qualifier(Bruce)
30433 Implement IN qualifier(Bruce)
30434 libpq has PQgetisnull()(Bruce)
30435 libpq++ improvements
30436 New options to initdb(Bryan)
30437 Pg_dump allow dump of OIDs(Bruce)
30438 Pg_dump create indexes after tables are loaded for speed(Bruce)
30439 Pg_dumpall dumps all databases, and the user table
30440 Pginterface additions for NULL values(Bruce)
30441 Prevent postmaster from being run as root
30442 psql \h and \? is now readable(Bruce)
30443 psql allow backslashed, semicolons anywhere on the line(Bruce)
30444 psql changed command prompt for lines in query or in quotes(Bruce)
30445 psql char(3) now displays as (bp)char in \d output(Bruce)
30446 psql return code now more accurate(Bryan?)
30447 psql updated help syntax(Bruce)
30448 Re-visit and fix vacuum(Vadim)
30449 Reduce size of regression diffs, remove timezone name difference(Bruce)
30450 Remove compile-time parameters to enable binary distributions(Bryan)
30451 Reverse meaning of HBA masks(Bryan)
30452 Secure Authentication of local users(Bryan)
30453 Speed up vacuum(Vadim)
30454 Vacuum now had VERBOSE option(Bruce)
30455
30456 Source tree changes
30457 -------------------
30458 All functions now have prototypes that are compared against the calls
30459 Allow asserts to be disabled easily from Makefile.global(Bruce)
30460 Change oid constants used in code to #define names
30461 Decoupled sparc and solaris defines(Kurt)
30462 Gcc -Wall compiles cleanly with warnings only from unfixable constructs
30463 Major include file reorganization/reduction(Marc)
30464 Make now stops on compile failure(Bryan)
30465 Makefile restructuring(Bryan, Marc)
30466 Merge bsdi_2_1 to bsdi(Bruce)
30467 Monitor program removed
30468 Name change from Postgres95 to PostgreSQL
30469 New config.h file(Marc, Bryan)
30470 PG_VERSION now set to 6.0 and used by postmaster
30471 Portability additions, including Ultrix, DG/UX, AIX, and Solaris
30472 Reduced the number of #define's, centralized #define's
30473 Remove duplicate OIDS in system tables(Dan)
30474 Remove duplicate system catalog info or report mismatches(Dan)
30475 Removed many os-specific #define's
30476 Restructured object file generation/location(Bryan, Marc)
30477 Restructured port-specific file locations(Bryan, Marc)
30478 Unused/uninitialized variables corrected
30479 </programlisting>
30480 </para>
30481 </sect2>
30482 </sect1>
30483
30484 <sect1 id="release-1-09">
30485 <title>Release 1.09</title>
30486
30487   <note>
30488   <title>Release date</title>
30489   <simpara>1996-11-04</simpara>
30490   </note>
30491
30492 <para>
30493 Sorry, we didn't keep track of changes from 1.02 to 1.09.  Some of
30494 the changes listed in 6.0 were actually included in the 1.02.1 to 1.09
30495 releases.
30496 </para>
30497 </sect1>
30498
30499 <sect1 id="release-1-02">
30500 <title>Release 1.02</title>
30501
30502   <note>
30503   <title>Release date</title>
30504   <simpara>1996-08-01</simpara>
30505   </note>
30506
30507 <sect2>
30508 <title>Migration from version 1.02 to version 1.02.1</title>
30509
30510 <para>
30511 Here is a new migration file for 1.02.1.  It includes the 'copy' change
30512 and a script to convert old <acronym>ASCII</acronym> files.
30513 </para>
30514 <note>
30515 <para>
30516 The following notes are for the benefit of users who want to migrate
30517 databases from <productname>Postgres95</> 1.01 and 1.02 to <productname>Postgres95</> 1.02.1.
30518 </para>
30519 <para>
30520 If you are starting afresh with <productname>Postgres95</> 1.02.1 and do not need
30521 to migrate old databases, you do not need to read any further.
30522 </para>
30523 </note>
30524
30525 <para>
30526 In order to upgrade older <productname>Postgres95</> version 1.01 or 1.02 databases to
30527 version 1.02.1, the following steps are required:
30528 </para>
30529 <procedure>
30530 <step>
30531 <para>
30532 Start up a new 1.02.1 postmaster
30533 </para>
30534 </step>
30535 <step>
30536 <para>
30537 Add the new built-in functions and operators of 1.02.1 to 1.01 or 1.02
30538   databases.  This is done by running the new 1.02.1 server against
30539   your own 1.01 or 1.02 database and applying the queries attached at
30540   the end of the file.   This can be done easily through <command>psql</>.  If your
30541   1.01 or 1.02 database is named <literal>testdb</literal> and you have cut the commands
30542   from the end of this file and saved them in <filename>addfunc.sql</filename>:
30543 <programlisting>
30544        % psql testdb -f addfunc.sql
30545 </programlisting>
30546
30547 Those upgrading 1.02 databases will get a warning when executing the
30548 last two statements in the file because they are already present in 1.02.  This is
30549 not a cause for concern.
30550 </para>
30551 </step>
30552 </procedure>
30553 </sect2>
30554
30555 <sect2>
30556 <title>Dump/Reload Procedure</title>
30557
30558 <para>
30559 If you are trying to reload a pg_dump or text-mode, <literal>copy tablename to
30560 stdout</literal> generated with a previous version, you will need to run the
30561 attached <command>sed</command> script on the ASCII file before loading it into the
30562 database.  The old format used '.' as end-of-data, while '\.' is now the
30563 end-of-data marker.  Also, empty strings are now loaded in as '' rather
30564 than NULL. See the copy manual page for full details.
30565
30566 <programlisting>
30567        sed 's/^\.$/\\./g' &lt;in_file &gt;out_file
30568 </programlisting>
30569 </para>
30570 <para>
30571 If you are loading an older binary copy or non-<systemitem>stdout</> copy, there is no
30572 end-of-data character, and hence no conversion necessary.
30573
30574 <programlisting>
30575 -- following lines added by agc to reflect the case-insensitive
30576 -- regexp searching for varchar (in 1.02), and bpchar (in 1.02.1)
30577 create operator ~* (leftarg = bpchar, rightarg = text, procedure = texticregexeq);
30578 create operator !~* (leftarg = bpchar, rightarg = text, procedure = texticregexne);
30579 create operator ~* (leftarg = varchar, rightarg = text, procedure = texticregexeq);
30580 create operator !~* (leftarg = varchar, rightarg = text, procedure = texticregexne);
30581 </programlisting>
30582 </para>
30583 </sect2>
30584
30585 <sect2>
30586 <title>Changes</title>
30587
30588 <para>
30589 <programlisting>
30590 Source code maintenance and development
30591  * worldwide team of volunteers
30592  * the source tree now in CVS at ftp.ki.net
30593
30594 Enhancements
30595  * psql (and underlying libpq library) now has many more options for
30596    formatting output, including HTML
30597  * pg_dump now output the schema and/or the data, with many fixes to
30598    enhance completeness.
30599  * psql used in place of monitor in administration shell scripts.
30600    monitor to be deprecated in next release.
30601  * date/time functions enhanced
30602  * NULL insert/update/comparison fixed/enhanced
30603  * TCL/TK lib and shell fixed to work with both tck7.4/tk4.0 and tcl7.5/tk4.1
30604
30605 Bug Fixes (almost too numerous to mention)
30606  * indexes
30607  * storage management
30608  * check for NULL pointer before dereferencing
30609  * Makefile fixes
30610
30611 New Ports
30612  * added SolarisX86 port
30613  * added BSD/OS 2.1 port
30614  * added DG/UX port
30615 </programlisting>
30616 </para>
30617 <!--
30618 Contributors (apologies to any missed)
30619  * Kurt J. Lidl &lt;lidl@va.pubnix.com&gt;
30620         (missed in first run, but no less important)
30621  * Erich Stamberger &lt;eberger@gewi.kfunigraz.ac.at&gt;
30622  * Jason Wright &lt;jason@shiloh.vnet.net&gt;
30623  * Cees de Groot &lt;C.deGroot@inter.NL.net&gt;
30624  * ernst.molitor@uni-bonn.de
30625  * michael.siebenborn@ae3.Hypo.DE (Michael Siebenborn (6929))
30626  * Brian E. Gallew &lt;geek+@cmu.edu&gt;
30627  * Vadim B. Mikheev &lt;vadim@sable.krasnoyarsk.su&gt;
30628  * Adam Sussman &lt;myddryn@vidya.com&gt;
30629  * Chris Dunlop &lt;chris@onthe.net.au&gt;
30630  * Marc G. Fournier &lt;scrappy@ki.net&gt;
30631  * Dan McGuirk &lt;mcguirk@indirect.com&gt;
30632  * Dr_George_D_Detlefsen &lt;drgeorge@ilt.com&gt;
30633  * Erich Stamberger &lt;eberger@gewi.kfunigraz.ac.at&gt;
30634  * Massimo Dal Zotto &lt;dz@cs.unitn.it&gt;
30635  * Randy Kunkee &lt;kunkee@Starbase.NeoSoft.COM&gt;
30636  * Rick Weldon &lt;rick@wisetech.com&gt;
30637  * Thomas van Reimersdahl &lt;reimersd@dali.techinfo.rwth-aachen.de&gt;
30638  * david bennett &lt;dave@bensoft.com&gt;
30639  * ernst.molitor@uni-bonn.de
30640  * Julian Assange &lt;proff@suburbia.net&gt;
30641  * Bruce Momjian &lt;pgman@candle.pha.pa.us&gt;
30642  * Paul "Shag" Walmsley &lt;ccshag@cclabs.missouri.edu&gt;
30643  * "Alistair G. Crooks" &lt;azcb0@sde.uts.amdahl.com&gt;
30644 -->
30645 </sect2>
30646 </sect1>
30647
30648 <sect1 id="release-1-01">
30649 <title>Release 1.01</title>
30650
30651    <note>
30652    <title>Release date</title>
30653    <simpara>1996-02-23</simpara>
30654    </note>
30655
30656
30657 <sect2>
30658 <title>Migration from version 1.0 to version 1.01</title>
30659
30660 <para>
30661 The following notes are for the benefit of users who want to migrate
30662 databases from <productname>Postgres95</> 1.0 to <productname>Postgres95</> 1.01.
30663 </para>
30664 <para>
30665 If you are starting afresh with <productname>Postgres95</> 1.01 and do not need
30666 to migrate old databases, you do not need to read any further.
30667 </para>
30668 <para>
30669 In order to <productname>Postgres95</> version 1.01 with databases created with
30670 <productname>Postgres95</> version 1.0, the following steps are required:
30671 </para>
30672 <procedure>
30673 <step>
30674 <para>
30675 Set the definition of <symbol>NAMEDATALEN</symbol> in <filename>src/Makefile.global</filename> to 16
30676    and <symbol>OIDNAMELEN</symbol> to 20.
30677 </para>
30678 </step>
30679 <step>
30680 <para>
30681 Decide whether you want to use Host based authentication.
30682 </para>
30683 <substeps>
30684 <step>
30685 <para>
30686 If you do, you must create a file name <literal>pg_hba</literal> in your top-level data
30687    directory (typically the value of your <envar>$PGDATA</envar>).  <filename>src/libpq/pg_hba</filename>
30688    shows an example syntax.
30689 </para>
30690 </step>
30691 <step>
30692 <para>
30693 If you do not want host-based authentication, you can comment out
30694    the line:
30695 <programlisting>
30696         HBA = 1
30697 </programlisting>
30698    in <filename>src/Makefile.global</filename>
30699 </para>
30700 <para>
30701    Note that host-based authentication is turned on by default, and if
30702    you do not take steps A or B above, the out-of-the-box 1.01 will
30703    not allow you to connect to 1.0 databases.
30704 </para>
30705 </step>
30706 </substeps>
30707 </step>
30708
30709 <step>
30710 <para>
30711 Compile and install 1.01, but DO NOT do the <command>initdb</command> step.
30712 </para>
30713 </step>
30714 <step>
30715 <para>
30716 Before doing anything else, terminate your 1.0 postmaster, and
30717    backup your existing <envar>$PGDATA</envar> directory.
30718 </para>
30719 </step>
30720 <step>
30721 <para>
30722 Set your <envar>PGDATA</envar> environment variable to your 1.0 databases, but set up
30723    path up so that 1.01 binaries are being used.
30724 </para>
30725 </step>
30726 <step>
30727 <para>
30728 Modify the file <filename><envar>$PGDATA</envar>/PG_VERSION</filename> from 5.0 to 5.1
30729 </para>
30730 </step>
30731 <step>
30732 <para>
30733 Start up a new 1.01 postmaster
30734 </para>
30735 </step>
30736 <step>
30737 <para>
30738 Add the new built-in functions and operators of 1.01 to 1.0
30739    databases.  This is done by running the new 1.01 server against
30740    your own 1.0 database and applying the queries attached and saving
30741    in the file 1.0_to_1.01.sql.   This can be done easily through <command>psql</command>.
30742    If your 1.0 database is name <literal>testdb</literal>:
30743
30744 <programlisting>
30745         % psql testdb -f 1.0_to_1.01.sql
30746 </programlisting>
30747
30748 and then execute the following commands (cut and paste from here):
30749
30750 <programlisting>
30751 -- add builtin functions that are new to 1.01
30752
30753 create function int4eqoid (int4, oid) returns bool as 'foo'
30754 language 'internal';
30755 create function oideqint4 (oid, int4) returns bool as 'foo'
30756 language 'internal';
30757 create function char2icregexeq (char2, text) returns bool as 'foo'
30758 language 'internal';
30759 create function char2icregexne (char2, text) returns bool as 'foo'
30760 language 'internal';
30761 create function char4icregexeq (char4, text) returns bool as 'foo'
30762 language 'internal';
30763 create function char4icregexne (char4, text) returns bool as 'foo'
30764 language 'internal';
30765 create function char8icregexeq (char8, text) returns bool as 'foo'
30766 language 'internal';
30767 create function char8icregexne (char8, text) returns bool as 'foo'
30768 language 'internal';
30769 create function char16icregexeq (char16, text) returns bool as 'foo'
30770 language 'internal';
30771 create function char16icregexne (char16, text) returns bool as 'foo'
30772 language 'internal';
30773 create function texticregexeq (text, text) returns bool as 'foo'
30774 language 'internal';
30775 create function texticregexne (text, text) returns bool as 'foo'
30776 language 'internal';
30777
30778 -- add builtin functions that are new to 1.01
30779
30780 create operator = (leftarg = int4, rightarg = oid, procedure = int4eqoid);
30781 create operator = (leftarg = oid, rightarg = int4, procedure = oideqint4);
30782 create operator ~* (leftarg = char2, rightarg = text, procedure = char2icregexeq);
30783 create operator !~* (leftarg = char2, rightarg = text, procedure = char2icregexne);
30784 create operator ~* (leftarg = char4, rightarg = text, procedure = char4icregexeq);
30785 create operator !~* (leftarg = char4, rightarg = text, procedure = char4icregexne);
30786 create operator ~* (leftarg = char8, rightarg = text, procedure = char8icregexeq);
30787 create operator !~* (leftarg = char8, rightarg = text, procedure = char8icregexne);
30788 create operator ~* (leftarg = char16, rightarg = text, procedure = char16icregexeq);
30789 create operator !~* (leftarg = char16, rightarg = text, procedure = char16icregexne);
30790 create operator ~* (leftarg = text, rightarg = text, procedure = texticregexeq);
30791 create operator !~* (leftarg = text, rightarg = text, procedure = texticregexne);
30792 </programlisting>
30793 </para>
30794 </step>
30795 </procedure>
30796 </sect2>
30797
30798 <sect2>
30799 <title>Changes</title>
30800
30801 <para>
30802 <programlisting>
30803 Incompatibilities:
30804  * 1.01 is backwards compatible with 1.0 database provided the user
30805    follow the steps outlined in the MIGRATION_from_1.0_to_1.01 file.
30806    If those steps are not taken, 1.01 is not compatible with 1.0 database.
30807
30808 Enhancements:
30809  * added PQdisplayTuples() to libpq and changed monitor and psql to use it
30810  * added NeXT port (requires SysVIPC implementation)
30811  * added CAST .. AS ... syntax
30812  * added ASC and DESC key words
30813  * added 'internal' as a possible language for CREATE FUNCTION
30814    internal functions are C functions which have been statically linked
30815    into the postgres backend.
30816  * a new type "name" has been added for system identifiers (table names,
30817    attribute names, etc.)  This replaces the old char16 type.   The
30818    of name is set by the NAMEDATALEN #define in src/Makefile.global
30819  * a readable reference manual that describes the query language.
30820  * added host-based access control.  A configuration file ($PGDATA/pg_hba)
30821    is used to hold the configuration data.  If host-based access control
30822    is not desired, comment out HBA=1 in src/Makefile.global.
30823  * changed regex handling to be uniform use of Henry Spencer's regex code
30824    regardless of platform.  The regex code is included in the distribution
30825  * added functions and operators for case-insensitive regular expressions.
30826    The operators are ~* and !~*.
30827  * pg_dump uses COPY instead of SELECT loop for better performance
30828
30829 Bug fixes:
30830  * fixed an optimizer bug that was causing core dumps when
30831    functions calls were used in comparisons in the WHERE clause
30832  * changed all uses of getuid to geteuid so that effective uids are used
30833  * psql now returns non-zero status on errors when using -c
30834  * applied public patches 1-14
30835 </programlisting>
30836 </para>
30837 </sect2>
30838 </sect1>
30839
30840 <sect1 id="release-1-0">
30841 <title>Release 1.0</title>
30842
30843    <note>
30844    <title>Release date</title>
30845    <simpara>1995-09-05</simpara>
30846    </note>
30847
30848 <sect2>
30849 <title>Changes</title>
30850
30851 <para>
30852 <programlisting>
30853 Copyright change:
30854  * The copyright of <productname>Postgres</productname> 1.0 has been loosened to be freely modifiable
30855    and modifiable for any purpose.  Please read the COPYRIGHT file.
30856    Thanks to Professor Michael Stonebraker for making this possible.
30857
30858 Incompatibilities:
30859  *  date formats have to be MM-DD-YYYY (or DD-MM-YYYY if you're using
30860    EUROPEAN STYLE).  This follows SQL-92 specs.
30861  *  "delimiters" is now a key word
30862
30863 Enhancements:
30864  *  sql LIKE syntax has been added
30865  *  copy command now takes an optional USING DELIMITER specification.
30866    delimiters can be any single-character string.
30867  *  IRIX 5.3 port has been added.
30868    Thanks to Paul Walmsley and others.
30869  *  updated pg_dump to work with new libpq
30870  *  \d has been added psql
30871    Thanks to Keith Parks
30872  *  regexp performance for architectures that use POSIX regex has been
30873    improved due to caching of precompiled patterns.
30874    Thanks to Alistair Crooks
30875  *  a new version of libpq++
30876    Thanks to William Wanders
30877
30878 Bug fixes:
30879  *  arbitrary userids can be specified in the createuser script
30880  *  \c to connect to other databases in psql now works.
30881  *  bad pg_proc entry for float4inc() is fixed
30882  *  users with usecreatedb field set can now create databases without
30883    having to be usesuper
30884  *  remove access control entries when the entry no longer has any
30885    privileges
30886  *  fixed non-portable datetimes implementation
30887  *  added kerberos flags to the src/backend/Makefile
30888  *  libpq now works with kerberos
30889  *  typographic errors in the user manual have been corrected.
30890  *  btrees with multiple index never worked, now we tell you they don't
30891    work when you try to use them
30892 </programlisting>
30893 </para>
30894 </sect2>
30895 </sect1>
30896
30897 <sect1 id="release-0-03">
30898 <title><productname>Postgres95</productname> Release 0.03</title>
30899
30900    <note>
30901    <title>Release date</title>
30902    <simpara>1995-07-21</simpara>
30903    </note>
30904
30905 <sect2>
30906 <title>Changes</title>
30907 <para>
30908 <programlisting>
30909 Incompatible changes:
30910  * BETA-0.3 IS INCOMPATIBLE WITH DATABASES CREATED WITH PREVIOUS VERSIONS
30911    (due to system catalog changes and indexing structure changes).
30912  * double-quote (") is deprecated as a quoting character for string literals;
30913    you need to convert them to single quotes ('). <!-- " -->
30914  * name of aggregates (eg. int4sum) are renamed in accordance with the
30915    SQL standard (eg. sum).
30916  * CHANGE ACL syntax is replaced by GRANT/REVOKE syntax.
30917  * float literals (eg. 3.14) are now of type float4 (instead of float8 in
30918    previous releases); you might have to do typecasting if you depend on it
30919    being of type float8.  If you neglect to do the typecasting and you assign
30920    a float literal to a field of type float8, you might get incorrect values
30921    stored!
30922  * LIBPQ has been totally revamped so that frontend applications
30923    can connect to multiple backends
30924  * the usesysid field in pg_user has been changed from int2 to int4 to
30925    allow wider range of Unix user ids.
30926  * the netbsd/freebsd/bsd o/s ports have been consolidated into a
30927    single BSD44_derived port.  (thanks to Alistair Crooks)
30928
30929 SQL standard-compliance (the following details changes that makes postgres95
30930 more compliant to the SQL-92 standard):
30931  * the following SQL types are now built-in: smallint, int(eger), float, real,
30932    char(N), varchar(N), date and time.
30933
30934    The following are aliases to existing postgres types:
30935                 smallint -&gt; int2
30936                 integer, int -&gt; int4
30937                 float, real  -&gt; float4
30938    char(N) and varchar(N) are implemented as truncated text types. In
30939    addition, char(N) does blank-padding.
30940  * single-quote (') is used for quoting string literals; '' (in addition to
30941    \') is supported as means of inserting a single quote in a string
30942  * SQL standard aggregate names (MAX, MIN, AVG, SUM, COUNT) are used
30943    (Also, aggregates can now be overloaded, i.e. you can define your
30944    own MAX aggregate to take in a user-defined type.)
30945  * CHANGE ACL removed. GRANT/REVOKE syntax added.
30946    - Privileges can be given to a group using the "GROUP" key word.
30947         For example:
30948                 GRANT SELECT ON foobar TO GROUP my_group;
30949         The key word 'PUBLIC' is also supported to mean all users.
30950
30951         Privileges can only be granted or revoked to one user or group
30952         at a time.
30953
30954         "WITH GRANT OPTION" is not supported.  Only class owners can change
30955         access control
30956    - The default access control is to grant users readonly access.
30957      You must explicitly grant insert/update access to users.  To change
30958      this, modify the line in
30959                 src/backend/utils/acl.h
30960      that defines ACL_WORLD_DEFAULT
30961
30962 Bug fixes:
30963  * the bug where aggregates of empty tables were not run has been fixed. Now,
30964    aggregates run on empty tables will return the initial conditions of the
30965    aggregates. Thus, COUNT of an empty  table will now properly return 0.
30966    MAX/MIN of an empty table will return a row of value NULL.
30967  * allow the use of \; inside the monitor
30968  * the LISTEN/NOTIFY asynchronous notification mechanism now work
30969  * NOTIFY in rule action bodies now work
30970  * hash indexes work, and access methods in general should perform better.
30971    creation of large btree indexes should be much faster.  (thanks to Paul
30972    Aoki)
30973
30974 Other changes and enhancements:
30975  * addition of an EXPLAIN statement used for explaining the query execution
30976    plan (eg. "EXPLAIN SELECT * FROM EMP" prints out the execution plan for
30977    the query).
30978  * WARN and NOTICE messages no longer have timestamps on them. To turn on
30979    timestamps of error messages, uncomment the line in
30980    src/backend/utils/elog.h:
30981         /* define ELOG_TIMESTAMPS */
30982  * On an access control violation, the message
30983         "Either no such class or insufficient privilege"
30984    will be given.  This is the same message that is returned when
30985    a class is not found.  This dissuades non-privileged users from
30986    guessing the existence of privileged classes.
30987  * some additional system catalog changes have been made that are not
30988    visible to the user.
30989
30990 libpgtcl changes:
30991  * The -oid option has been added to the "pg_result" tcl command.
30992    pg_result -oid returns oid of the last row inserted.   If the
30993    last command was not an INSERT, then pg_result -oid returns "".
30994  * the large object interface is available as pg_lo* tcl commands:
30995    pg_lo_open, pg_lo_close, pg_lo_creat, etc.
30996
30997 Portability enhancements and New Ports:
30998  * flex/lex problems have been cleared up.  Now, you should be able to use
30999    flex instead of lex on any platforms.  We no longer make assumptions of
31000    what lexer you use based on the platform you use.
31001  * The Linux-ELF port is now supported.  Various configuration have been
31002    tested:  The following configuration is known to work:
31003         kernel 1.2.10, gcc 2.6.3, libc 4.7.2, flex 2.5.2, bison 1.24
31004    with everything in ELF format,
31005
31006 New utilities:
31007  * ipcclean added to the distribution
31008    ipcclean usually does not need to be run, but if your backend crashes
31009    and leaves shared memory segments hanging around, ipcclean will
31010    clean them up for you.
31011
31012 New documentation:
31013  * the user manual has been revised and libpq documentation added.
31014 </programlisting>
31015 </para>
31016 </sect2>
31017 </sect1>
31018
31019 <sect1 id="release-0-02">
31020 <title><productname>Postgres95</productname> Release 0.02</title>
31021
31022    <note>
31023    <title>Release date</title>
31024    <simpara>1995-05-25</simpara>
31025    </note>
31026
31027 <sect2>
31028 <title>Changes</title>
31029
31030 <para>
31031 <programlisting>
31032 Incompatible changes:
31033  * The SQL statement for creating a database is 'CREATE DATABASE' instead
31034    of 'CREATEDB'. Similarly, dropping a database is 'DROP DATABASE' instead
31035    of 'DESTROYDB'. However, the names of the executables 'createdb' and
31036    'destroydb' remain the same.
31037
31038 New tools:
31039  * pgperl - a Perl (4.036) interface to Postgres95
31040  * pg_dump - a utility for dumping out a postgres database into a
31041         script file containing query commands. The script files are in a ASCII
31042         format and can be used to reconstruct the database, even on other
31043         machines and other architectures. (Also good for converting
31044         a Postgres 4.2 database to Postgres95 database.)
31045
31046 The following ports have been incorporated into postgres95-beta-0.02:
31047  * the NetBSD port by Alistair Crooks
31048  * the AIX port by Mike Tung
31049  * the Windows NT port by Jon Forrest (more stuff but not done yet)
31050  * the Linux ELF port by Brian Gallew
31051
31052 The following bugs have been fixed in postgres95-beta-0.02:
31053  * new lines not escaped in COPY OUT and problem with COPY OUT when first
31054    attribute is a '.'
31055  * cannot type return to use the default user id in createuser
31056  * SELECT DISTINCT on big tables crashes
31057  * Linux installation problems
31058  * monitor doesn't allow use of 'localhost' as PGHOST
31059  * psql core dumps when doing \c or \l
31060  * the "pgtclsh" target missing from src/bin/pgtclsh/Makefile
31061  * libpgtcl has a hard-wired default port number
31062  * SELECT DISTINCT INTO TABLE hangs
31063  * CREATE TYPE doesn't accept 'variable' as the internallength
31064  * wrong result using more than 1 aggregate in a SELECT
31065 </programlisting>
31066 </para>
31067 </sect2>
31068 </sect1>
31069
31070 <sect1 id="release-0-01">
31071 <title><productname>Postgres95</productname> Release 0.01</title>
31072
31073    <note>
31074    <title>Release date</title>
31075    <simpara>1995-05-01</simpara>
31076    </note>
31077
31078 <para>
31079 Initial release.
31080 </para>
31081 </sect1>
31082
31083 <![IGNORE[
31084   <sect1 id="timing-results">
31085    <title>Timing Results</title>
31086
31087    <para>
31088     These timing results are from running the regression test with the commands
31089
31090     <programlisting>
31091 % cd src/test/regress
31092 % make all
31093 % time make runtest
31094     </programlisting>
31095    </para>
31096    <para>
31097     Timing under Linux 2.0.27 seems to have a roughly 5% variation from run
31098     to run, presumably due to the scheduling vagaries of multitasking systems.
31099    </para>
31100
31101    <sect2>
31102     <title>Version 6.5</title>
31103
31104     <para>
31105      As has been the case for previous releases, timing between
31106      releases is not directly comparable since new regression tests
31107      have been added. In general, 6.5 is faster than previous
31108      releases.
31109     </para>
31110
31111     <para>
31112      Timing with <function>fsync()</function> disabled:
31113
31114      <programlisting>
31115   Time   System
31116   02:00  Dual Pentium Pro 180, 224MB, UW-SCSI, Linux 2.0.36, gcc 2.7.2.3 -O2 -m486
31117   04:38  Sparc Ultra 1 143MHz, 64MB, Solaris 2.6
31118      </programlisting>
31119     </para>
31120
31121     <para>
31122      Timing with <function>fsync()</function> enabled:
31123
31124      <programlisting>
31125   Time   System
31126   04:21  Dual Pentium Pro 180, 224MB, UW-SCSI, Linux 2.0.36, gcc 2.7.2.3 -O2 -m486
31127      </programlisting>
31128
31129      For the <systemitem class="osname">Linux</systemitem> system above, using <acronym>UW-SCSI</acronym> disks rather than (older) <acronym>IDE</acronym>
31130      disks leads to a 50% improvement in speed on the regression test.
31131     </para>
31132    </sect2>
31133
31134 <sect2>
31135 <title>Version 6.4beta</title>
31136
31137 <para>
31138 The times for this release are not directly comparable to those for previous releases
31139 since some additional regression tests have been included.
31140 In general, however, 6.4 should be slightly faster than the previous release (thanks, Bruce!).
31141 </para>
31142 <para>
31143 <programlisting>
31144   Time   System
31145   02:26  Dual Pentium Pro 180, 96MB, UW-SCSI, Linux 2.0.30, gcc 2.7.2.1 -O2 -m486
31146 </programlisting>
31147 </para>
31148 </sect2>
31149
31150 <sect2>
31151 <title>Version 6.3</title>
31152
31153 <para>
31154 The times for this release are not directly comparable to those for previous releases
31155 since some additional regression tests have been included and some obsolete tests involving
31156 time travel have been removed.
31157 In general, however, 6.3 is substantially faster than previous releases (thanks, Bruce!).
31158 </para>
31159 <para>
31160 <programlisting>
31161   Time   System
31162   02:30  Dual Pentium Pro 180, 96MB, UW-SCSI, Linux 2.0.30, gcc 2.7.2.1 -O2 -m486
31163   04:12  Dual Pentium Pro 180, 96MB, EIDE, Linux 2.0.30, gcc 2.7.2.1 -O2 -m486
31164 </programlisting>
31165 </para>
31166 </sect2>
31167
31168 <sect2>
31169 <title>Version 6.1</title>
31170
31171 <para>
31172 <programlisting>
31173   Time   System
31174   06:12  Pentium Pro 180, 32MB, EIDE, Linux 2.0.30, gcc 2.7.2 -O2 -m486
31175   12:06  P-100, 48MB, Linux 2.0.29, gcc
31176   39:58  Sparc IPC 32MB, Solaris 2.5, gcc 2.7.2.1 -O -g
31177 </programlisting>
31178 </para>
31179 </sect2>
31180 </sect1>
31181 ]]>
31182 </appendix>