]> granicus.if.org Git - postgresql/blob - doc/src/sgml/release.sgml
fb79b8053cfffe76b5235f53b1b4a1979bd799e7
[postgresql] / doc / src / sgml / release.sgml
1 <!-- $PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.611 2009/03/28 14:15: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, ITEMS CURRENT AS OF 2009-03-16</simpara>
72   </note>
73
74   <sect2>
75    <title>Overview</title>
76
77    <para>
78     This major PostgreSQL release brings SQL features people have been
79     waiting for for years, as well as performance enhancements
80     and changes to make space reuse more efficient and
81     more automatic.  This release adds the following major features:
82    </para>
83
84    <itemizedlist>
85
86     <!-- This list duplicates items below, but without authors or details-->
87
88     <listitem>
89      <para>
90       *MAJOR ITEM LIST GOES HERE*
91      </para>
92     </listitem>
93
94    </itemizedlist>
95
96    <para>
97     The above items are explained in more detail in the sections below.
98    </para>
99
100   </sect2>
101
102   <sect2>
103    <title>Migration to Version 8.4</title>
104
105    <para>
106     A dump/restore using <application>pg_dump</application> is
107     required for those wishing to migrate data from any previous
108     release.
109    </para>
110
111    <para>
112     Observe the following incompatibilities:
113    </para>
114
115    <sect3>
116     <title>General</title>
117     <itemizedlist>
118
119      <listitem>
120       <para>
121        Use 64-bit integer datetimes by default (Neil Conway)
122       </para>
123
124       <para>
125        This was available previously via a configure
126        --enable-integer-datetimes.
127       </para>
128      </listitem>
129
130      <listitem>
131       <para>
132        Change postgresql.conf default for log_min_messages to 'warning'
133        (previously 'notice') to reduce log file volume (Tom)
134       </para>
135      </listitem>
136
137      <listitem>
138       <para>
139        Have debug_print_parse, debug_print_rewritten, and debug_print_plan
140        output appear as LOG message level, not DEBUG1 (Tom) bjm: inconsistency
141        because of var names?
142       </para>
143      </listitem>
144
145      <listitem>
146       <para>
147        Have debug_pretty_print default to on (Tom)
148       </para>
149      </listitem>
150
151      <listitem>
152       <para>
153        Make "log_temp_files" super-user set only, like other logging options
154        (Simon)
155       </para>
156      </listitem>
157
158      <listitem>
159       <para>
160        Disable appending of the epoch date/time when no '%' escapes are
161        present in log_filename (Robert Haas)
162       </para>
163
164       <para>
165        This change was made because some users wanted a constant log filename,
166        for use with an external log rotation tool.
167       </para>
168      </listitem>
169
170      <listitem>
171       <para>
172        Remove explain_pretty_print postgresql.conf setting (no longer needed)
173        (Tom)
174       </para>
175      </listitem>
176
177      <listitem>
178       <para>
179        Remove log_restartpoints from recovery.conf;  instead use
180        log_checkpoints (Simon Riggs)
181       </para>
182      </listitem>
183
184      <listitem>
185       <para>
186        Remove support for the (insecure) crypt authentication method (Magnus)
187       </para>
188
189       <para>
190        This breaks compatibility with pre-7.2 versions.
191       </para>
192      </listitem>
193
194      <listitem>
195       <para>
196        Remove krb_realm and krb_server_hostname, now pg_hba.conf-only settings
197        (Magnus)
198       </para>
199      </listitem>
200
201      <listitem>
202       <para>
203        Remove ipcclean utility command (Bruce)
204       </para>
205
206       <para>
207        The utility only worked on a few platforms;  users should use their
208        operating system tools instead.
209       </para>
210      </listitem>
211
212      <listitem>
213       <para>
214        pg_hba.conf also has extensive changes related to migration. bjm: add markup
215       </para>
216      </listitem>
217
218     </itemizedlist>
219
220     </sect3>
221
222     <sect3>
223      <title>Queries</title>
224
225     <itemizedlist>
226
227      <listitem>
228       <para>
229        Have children inherit CHECK constraints from parents (Alex Hunsaker,
230        Nikhil Sontakke, Tom Lane)
231       </para>
232      </listitem>
233
234      <listitem>
235       <para>
236        Force child tables to have the same CHECK constraints as parents (Alex
237        Hunsaker, Nikhil Sontakke, Tom Lane) bjm: verify
238       </para>
239      </listitem>
240
241      <listitem>
242       <para>
243        Change TRUNCATE and LOCK behavior to apply to all child tables (Peter)
244       </para>
245
246       <para>
247        There is a new ONLY clause which disables this behavior.
248       </para>
249      </listitem>
250
251      <listitem>
252       <para>
253        Disallow negative LIMIT or OFFSET values, rather than treating them as
254        zero (Simon)
255       </para>
256      </listitem>
257
258      <listitem>
259       <para>
260        Disallow LOCK TABLE outside a transaction block (Tom)
261       </para>
262
263       <para>
264        Such an operation is useless because the lock would be immediately
265        released.
266       </para>
267      </listitem>
268
269      <listitem>
270       <para>
271        Make DISCARD ALL also discard advisory locks (Marko Kreen)
272       </para>
273      </listitem>
274
275     </itemizedlist>
276
277     </sect3>
278
279
280     <sect3>
281      <title>Functions and Operators</title>
282
283     <itemizedlist>
284
285      <listitem>
286       <para>
287        Have NUMERIC 0 ^ 4.3 return 1, rather than an error, and have 0 ^ 0.0
288        return 1, rather than error (Bruce)
289       </para>
290
291       <para>
292        This was already the float8 behavior.
293       </para>
294      </listitem>
295
296      <listitem>
297       <para>
298        Remove code that prevented unary minus of floating-point values from
299        producing '-0' (Tom)
300       </para>
301
302       <para>
303         The changed behavior is more IEEE-standards compliant.
304       </para>
305      </listitem>
306
307      <listitem>
308       <para>
309        Throw an error if an escape character is the last character in a LIKE
310        pattern (it has nothing to escape) (Tom)
311       </para>
312      </listitem>
313
314      <listitem>
315       <para>
316        Have to_char()'s localized month/day names depend on LC_TIME, not
317        LC_MESSAGES (Euler Taveira de Oliveira)
318       </para>
319      </listitem>
320
321      <listitem>
322       <para>
323        Cause to_date() and to_timestamp() to more consistently report errors on
324        invalid input (Brendan Jurd)
325       </para>
326      </listitem>
327
328      <listitem>
329       <para>
330        Provide consistent rounding for fractional seconds (Ron Mayer) bjm:
331        combine with another item?
332       </para>
333      </listitem>
334
335      <listitem>
336       <para>
337        Fix to_timestamp() to not require upper/lower case matching for meridian
338        (AM/PM) and era (BC/AD) format designations  (Brendan Jurd)
339       </para>
340      </listitem>
341
342      <listitem>
343       <para>
344        Require the existence of periods in to_timestamp() meridian
345        (AM/PM) and era (BC/AD) format designations to match (Brendan Jurd)
346       </para>
347
348       <para>
349        For example, input value 'AD' does not match format string 'A.D.'.
350       </para>
351      </listitem>
352
353      <listitem>
354       <para>
355        DateStyle no longer controls interval output (use new variable
356        IntervalStyle)
357       </para>
358      </listitem>
359
360      <listitem>
361       <para>
362        Remove ~=~ and ~&lt;&gt;~ operators used for LIKE index comparisons
363        (Tom) bjm: needed?
364       </para>
365
366       <para>
367        A not-immediately-obvious incompatibility is that the sort order within
368        bpchar_pattern_ops indexes changes --- it had been identical to plain
369        strcmp, but is now trailing-blank-insensitive.  This will impact
370        in-place upgrades, if those ever happen.
371       </para>
372      </listitem>
373
374     </itemizedlist>
375
376    </sect3>
377
378   </sect2>
379
380   <sect2>
381    <title>Changes</title>
382
383    <para>
384     Below you will find a detailed account of the
385     changes between <productname>PostgreSQL</productname> 8.4 and
386     the previous major release.
387    </para>
388
389    <sect3>
390     <title>Performance</title>
391     <itemizedlist>
392
393      <listitem>
394       <para>
395        Improve optimizer statistics calculations (Tom, Jan
396        Urbanski)
397       </para>
398
399       <para>
400        This includes improved statistics for full text columns.
401       </para>
402      </listitem>
403
404      <listitem>
405       <para>
406        Allow SELECT DISTINCT and UNION/INTERSECT/EXCEPT to use hashing (Tom)
407       </para>
408
409       <para>
410        This causes SELECT DISTINCT no longer always produces sorted output;
411        add an ORDER BY clause. The old SELECT DISTINCT behavior can be
412        restored by disabling enable_hashagg. SELECT DISTINCT ON does not use
413        hashing. bjm: enable_hashagg accurate?
414       </para>
415      </listitem>
416
417      <listitem>
418       <para>
419        New semi- and anti-joins (Tom)
420       </para>
421
422       <para>
423        While semi-joins merely replace existing IN joins, anti-joins
424        are a new capability for NOT EXISTS clauses (Tom) This improves
425        optimization possibilities.
426       </para>
427      </listitem>
428
429      <listitem>
430       <para>
431        Improve IN/ANY/EXISTS processing (Tom)
432       </para>
433
434       <para>
435        IN and EXISTS now provide similar performance for equivalent clauses.
436       </para>
437      </listitem>
438
439      <listitem>
440       <para>
441        Improve the performance of text_position() and related functions by
442        using Boyer-Moore-Horspool searching (David Rowley)
443       </para>
444
445       <para>
446        This is particularly useful for long search patterns.
447       </para>
448      </listitem>
449
450      <listitem>
451       <para>
452        Improve handling of subqueries by the optimizer (Tom)
453       </para>
454      </listitem>
455
456      <listitem>
457       <para>
458        Reduce I/O frequency of writing the  backend statistics file by writing
459        the file only when requested (Martin Pihlak)
460       </para>
461      </listitem>
462
463      <listitem>
464       <para>
465        Improve performance for bulk inserts (Robert Haas, Simon)
466       </para>
467      </listitem>
468
469      <listitem>
470       <para>
471        Increase the default value of default_statistics_target from 10 to 100
472        (Greg Sabino Mullane, Tom)
473       </para>
474
475       <para>
476        The maximum value was also increased from 1000 to 10000.
477       </para>
478      </listitem>
479
480      <listitem>
481       <para>
482        Modify 'constraint_exclusion' to check for partitioned tables by default
483        when inheritance or UNION ALL is used (Tom)
484       </para>
485
486       <para>
487        A new constraint_exclusion setting, "partition", was added to match this
488        behavior.
489       </para>
490      </listitem>
491
492      <listitem>
493       <para>
494        Allow I/O read-ahead for bitmap index scans (Greg Stark)
495       </para>
496
497       <para>
498        The amount of read-ahead is controlled by effective_io_concurrency.
499        This requires posix_fadvise() support in the kernel.
500       </para>
501      </listitem>
502
503      <listitem>
504       <para>
505        Inline simple set-returning SQL functions in FROM clauses (Richard Rowell)
506       </para>
507      </listitem>
508
509     </itemizedlist>
510
511    </sect3>
512
513    <sect3>
514     <title>TOAST</title>
515     <itemizedlist>
516
517      <listitem>
518       <para>
519        Consider TOAST compression on values as short as 32 bytes (previously
520        256 bytes) (Tom)
521       </para>
522      </listitem>
523
524      <listitem>
525       <para>
526        Require 25% of space savings before using TOAST compression (previously
527        20%) (Tom)
528       </para>
529      </listitem>
530
531      <listitem>
532       <para>
533        Be more aggressive in storing EXTERNAL and EXTENDED column values in
534        TOAST (Tom)
535       </para>
536      </listitem>
537
538     </itemizedlist>
539
540    </sect3>
541
542    <sect3>
543     <title>Server Settings</title>
544     <itemizedlist>
545
546      <listitem>
547       <para>
548        Convert many postgresql.conf settings to enumerated values so
549        pg_settings can easily display valid values (Magnus)
550       </para>
551      </listitem>
552
553      <listitem>
554       <para>
555        Add postgresql.conf setting cursor_tuple_fraction to control the
556        fraction of a cursor's rows expected to be requested by the user (Robert
557        Hell)
558       </para>
559      </listitem>
560
561      <listitem>
562       <para>
563        Allow underscores in postgresql.conf custom variable classes (Tom)
564       </para>
565      </listitem>
566
567     </itemizedlist>
568
569    </sect3>
570
571    <sect3>
572     <title>Monitoring</title>
573     <itemizedlist>
574
575      <listitem>
576       <para>
577        Add pg_conf_load_time() function to report when the Postgres configuration
578        files were last loaded (George Gensure)
579       </para>
580      </listitem>
581
582      <listitem>
583       <para>
584        Add pg_terminate_backend() to safely terminate a backend (the SIGTERM
585        signal also works) (Tom, Bruce)
586       </para>
587      </listitem>
588
589      <listitem>
590       <para>
591        Add ability to track user-defined functions call counts and runtimes via
592        postgresql.conf variable 'track_functions' (Martin Pihlak)
593       </para>
594
595       <para>
596        Function statistics appear in a new system table, pg_stat_user_functions.
597        However, inlined SQL functions are not tracked.
598       </para>
599      </listitem>
600
601      <listitem>
602       <para>
603        Allow specification of the maximum pg_stat_activity query string size
604        via postgresql.conf variable track_activity_query_size (Thomas Lee)
605       </para>
606      </listitem>
607
608      <listitem>
609       <para>
610        Improve syslog performance by increasing the maximum line length
611        (Tom)
612       </para>
613      </listitem>
614
615      <listitem>
616       <para>
617        Add read-only postgresql.conf variables segment_size, wal_block_size,
618        and wal_segment_size (Bernd Helmle)
619       </para>
620      </listitem>
621
622      <listitem>
623       <para>
624        When reporting a deadlock, report all session queries involved in the
625        deadlock to the server log  (Itagaki Takahiro)
626       </para>
627      </listitem>
628
629      <listitem>
630       <para>
631        New pg_stat_get_activity(pid) function to return information about a
632        specific process id (Magnus)
633       </para>
634      </listitem>
635
636      <listitem>
637       <para>
638        Move the server statistics file into the subdirectory pg_stat_tmp
639        and allow its location to be specified via stats_temp_directory (Magnus)
640       </para>
641
642       <para>
643        This allows the statistics file to be placed in a RAM-resident
644        directory to reduce I/O requirements.  On startup/shutdown, the
645        file is copied to the top-level $PGDATA directory so it is preserved
646        between restarts.
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       
664       <para>
665        Previously errors in the file wouldn't be detected until clients tried
666        to connect, which could leave the system with a broken file loaded.
667       </para>
668      </listitem>
669
670      <listitem>
671       <para>
672        Remove "sameuser" option from pg_hba.conf, making it the default if
673        no usermap is specified (Magnus)
674       </para>
675      </listitem>
676
677      <listitem>
678       <para>
679        Change all pg_hba.conf authentication options to be 'name=value'
680        settings (Magnus)
681       </para>
682      </listitem>
683      
684      <listitem>
685       <para>
686        Allow usermap parameter in pg_hba.conf for all external authentication
687        methods (Magnus)
688       </para>
689       
690       <para>
691        Previously this was only supported for ident authentication.
692       </para>
693      </listitem>
694
695      <listitem>
696       <para>
697        Allow 'ident' authentication over Unix-domain sockets on Solaris (Garick
698        Hamlin)
699       </para>
700      </listitem>
701
702      <listitem>
703       <para>
704        Add pg_hba.conf option "clientcert" to control requesting of a client
705        certificate (Magnus)
706       </para>
707
708       <para>
709        Previously this was controlled by the presence of a root certificate
710        file in the server's data directory.
711       </para>
712      </listitem>
713
714      <listitem>
715       <para>
716        Add pg_hba.conf "cert" authentication method to allow user
717        authentication via SSL certificates (Magnus)
718       </para>
719
720       <para>
721        Previously SSL certificates could only verify that the client had access
722        to a certificate, not authenticate a user.
723       </para>
724      </listitem>
725
726      <listitem>
727       <para>
728        Allow krb5, gssapi and sspi realm and krb5 host settings to be specified
729        in pg_hba.conf (Magnus)
730       </para>
731
732       <para>
733        These override the settings in postgresql.conf.
734       </para>
735      </listitem>
736
737      <listitem>
738       <para>
739        Addkrb5, gssapi and sspi 'include_realm' parameter to pg_hba.conf
740        (Magnus)
741       </para>
742
743       <para>
744        This allows identical usernames from different realms to be
745        authenticated as different database users using usermaps.
746       </para>
747      </listitem>
748
749      <listitem>
750       <para>
751        Show all parsing errors in pg_hba.conf instead of aborting after the
752        first one (Selena Deckelmann)
753       </para>
754      </listitem>
755
756     </itemizedlist>
757
758    </sect3>
759
760    <sect3>
761     <title>Authentication</title>
762     <itemizedlist>
763
764      <listitem>
765       <para>
766        Report appropriate error message for combination of MD5 authentication
767        and db_user_namespace enabled (Bruce)
768       </para>
769      </listitem>
770
771      <listitem>
772       <para>
773        Support regular expressions in pg_ident.conf (Magnus)
774       </para>
775      </listitem>
776
777      <listitem>
778       <para>
779        Allow Kerberos/GSSAPI parameters to be changed without restarting the
780        postmaster (Magnus)
781       </para>
782      </listitem>
783
784     </itemizedlist>
785
786    </sect3>
787
788    <sect3>
789     <title>Continuous Archiving</title>
790     <itemizedlist>
791
792      <listitem>
793       <para>
794        Have pg_stop_backup() wait for modified WAL files to be archived (Simon)
795       </para>
796
797       <para>
798        This guarantees that the backup is valid at the time pg_stop_backup()
799        completes.
800       </para>
801      </listitem>
802
803      <listitem>
804       <para>
805        Prevent normal shutdown if a continuous archiving base backup is in
806        progress (Laurenz Albe)
807       </para>
808      </listitem>
809
810      <listitem>
811       <para>
812        Cancel a continuous archiving base backup if a fast shutdown is requested
813        (Laurenz Albe)
814       </para>
815      </listitem>
816
817      <listitem>
818       <para>
819        Allow recovery.conf boolean variables to take the same range of string
820        values as postgresql.conf (Bruce)
821       </para>
822      </listitem>
823
824     </itemizedlist>
825
826    </sect3>
827
828    <sect3>
829     <title>Queries</title>
830     <itemizedlist>
831
832      <listitem>
833       <para>
834        Add support for WINDOW functions (Hitoshi Harada)
835       </para>
836      </listitem>
837
838      <listitem>
839       <para>
840        Add WITH clauses support, including WITH RECURSIVE (Yoshiyuki Asaba,
841        Tatsuo Ishii, Tom)
842       </para>
843      </listitem>
844
845      <listitem>
846       <para>
847        New TABLE command (Peter)
848       </para>
849
850       <para>
851        "TABLE tablename" is a short-hand for "SELECT * FROM tablename".
852       </para>
853      </listitem>
854
855      <listitem>
856       <para>
857        Allow AS to be optional when specifying a SELECT (or RETURNING) column
858        output label (assuming the label is not an SQL keyword) (Hiroshi Saito)
859       </para>
860      </listitem>
861
862      <listitem>
863       <para>
864        Support set-returning functions in the target lists of Agg and Group plan
865        nodes.  This is a pretty ugly feature but since we don't yet have a
866        plausible substitute, we'd better support it everywhere (Tom) bjm:
867        details?
868       </para>
869      </listitem>
870
871      <listitem>
872       <para>
873        Allow SELECT FOR UPDATE/SHARE to work on inheritance trees (Tom)
874       </para>
875      </listitem>
876
877      <listitem>
878       <para>
879        Add infrastructure for SQL/MED (Martin Pihlak, Peter)
880       </para>
881
882       <para>
883        There are no remote or external SQL/MED capabilities yet. bjm:
884        accurate?
885       </para>
886      </listitem>
887
888      <listitem>
889       <para>
890        Invalidate cached plans when schemas, operators, or operator classes are
891        modified (Tom) bjm: effect?
892       </para>
893      </listitem>
894
895      <listitem>
896       <para>
897        Improve the plan cache invalidation mechanism to make it invalidate plans
898        when user-defined functions used in a plan are modified (Tom, Martin
899        Pihlak) bjm: explain
900       </para>
901      </listitem>
902
903      <listitem>
904       <para>
905        Allow comparison of composite types and allow arrays of
906        possibly-anonymous composite types (Tom)  bjm: clear?
907       </para>
908
909       <para>
910        Specifically this allows 'array[ row(1,2), row(3,4)]' and 'row(1,1.1)
911        = any (array[ row(7,7.7), row(1,1.0)'.  This is particularly useful
912        for recursive queries.
913       </para>
914      </listitem>
915
916      <listitem>
917       <para>
918        Add support for Unicode string and identifier specifications using code
919        points, e.g. U&'d\0061t\+000061' (Peter)
920       </para>
921      </listitem>
922
923      <listitem>
924       <para>
925        Improve the parser's ability to report the error location of a query
926        (Tom)
927       </para>
928      </listitem>
929
930     </itemizedlist>
931
932    </sect3>
933
934    <sect3>
935     <title>LIMIT/OFFSET</title>
936     <itemizedlist>
937
938      <listitem>
939       <para>
940        Allow LIMIT and OFFSET to use subselects as arguments (Tom)
941       </para>
942      </listitem>
943
944      <listitem>
945       <para>
946        Document that LIMIT NULL and OFFSET NULL have no effect (Tom)
947       </para>
948      </listitem>
949
950      <listitem>
951       <para>
952        Add SQL-standards syntax for LIMIT/OFFSET capabilities (Peter)
953       </para>
954      </listitem>
955
956      <listitem>
957       <para>
958        OFFSET num {ROW|ROWS} FETCH {FIRST|NEXT} [num] {ROW|ROWS} ONLY.
959       </para>
960      </listitem>
961
962     </itemizedlist>
963
964    </sect3>
965
966    <sect3>
967     <title>ALTER TABLE</title>
968     <itemizedlist>
969
970      <listitem>
971       <para>
972        Add ALTER TYPE RENAME (Petr Jelinek)
973       </para>
974      </listitem>
975
976      <listitem>
977       <para>
978        Add ALTER SEQUENCE ... RESTART (no parameter) to reset a sequence to its
979        initial value (Zoltan Boszormenyi)  bjm: compatibility problem?
980       </para>
981      </listitem>
982
983      <listitem>
984       <para>
985        Modify the ALTER TABLE syntax to allow all reasonable combinations for
986        tables, indexes, sequences, and views (Tom)
987       </para>
988      </listitem>
989
990      <listitem>
991       <para>
992        New syntax supported (these formerly required "ALTER TABLE")
993       </para>
994      </listitem>
995
996      <listitem>
997       <para>
998        <itemizedlist>
999         <listitem>
1000          <para>
1001           ALTER SEQUENCE OWNER TO
1002          </para>
1003         </listitem>
1004         <listitem>
1005          <para>
1006           ALTER VIEW ALTER COLUMN SET/DROP DEFAULT
1007          </para>
1008         </listitem>
1009         <listitem>
1010          <para>
1011           ALTER VIEW OWNER TO
1012          </para>
1013         </listitem>
1014         <listitem>
1015          <para>
1016           ALTER VIEW SET SCHEMA
1017          </para>
1018         </listitem>
1019        </itemizedlist>
1020       </para>
1021      </listitem>
1022
1023      <listitem>
1024       <para>
1025        Add support for the syntax ALTER TABLE ... ALTER COLUMN ... SET DATA
1026        TYPE (Peter)
1027       </para>
1028
1029       <para>
1030        This is SQL-standard syntax for functionality that was already
1031        supported.
1032       </para>
1033      </listitem>
1034
1035      <listitem>
1036       <para>
1037        Have ALTER TABLE SET WITHOUT OIDS rewrite the table to remove oid values
1038        (Tom)
1039       </para>
1040
1041       <para>
1042        Also, add ALTER TABLE SET WITH OIDS to rewrite the table to add oids.
1043       </para>
1044      </listitem>
1045
1046      <listitem>
1047       <para>
1048        Add ALTER DATABASE SET TABLESPACE to move a database to a new tablespace
1049        (Guillaume Lelarge, Bernd Helmle)
1050       </para>
1051      </listitem>
1052
1053     </itemizedlist>
1054
1055    </sect3>
1056
1057    <sect3>
1058     <title>TRUNCATE</title>
1059     <itemizedlist>
1060
1061      <listitem>
1062       <para>
1063        Support statement-level ON TRUNCATE triggers (Simon)
1064       </para>
1065      </listitem>
1066
1067      <listitem>
1068       <para>
1069        Add TRUNCATE TABLE ... RESTART/CONTINUE IDENTITY clauses (Zoltan
1070        Boszormenyi)
1071       </para>
1072
1073       <para>
1074        The start value of a sequence can be changed by ALTER SEQUENCE START
1075        WITH.
1076       </para>
1077      </listitem>
1078
1079      <listitem>
1080       <para>
1081        Allow TRUNCATE foo, foo to succeed (Bruce)
1082       </para>
1083      </listitem>
1084
1085      <listitem>
1086       <para>
1087        Add a separate TRUNCATE permission (Robert Haas)
1088       </para>
1089      </listitem>
1090
1091     </itemizedlist>
1092
1093    </sect3>
1094
1095    <sect3>
1096     <title>Database Manipulation</title>
1097     <itemizedlist>
1098
1099      <listitem>
1100       <para>
1101        Improve reporting of CREATE/DROP/RENAME DATABASE failure when
1102        uncommitted prepared transactions are the cause (Tom)
1103       </para>
1104      </listitem>
1105
1106      <listitem>
1107       <para>
1108        Make LC_COLLATE and LC_CTYPE database-level settings (Radek Strnad, Heikki)
1109       </para>
1110
1111       <para>
1112        This makes collation similar to encoding, which was always configurable
1113        per database.
1114       </para>
1115      </listitem>
1116
1117      <listitem>
1118       <para>
1119        Improve checks that the database encoding, collation (LC_COLLATE), and
1120        character classes (LC_CTYPE) match (Heikki)
1121       </para>
1122      </listitem>
1123
1124     </itemizedlist>
1125
1126    </sect3>
1127
1128    <sect3>
1129     <title>Object Manipulation</title>
1130     <itemizedlist>
1131
1132      <listitem>
1133       <para>
1134        Add support for column-level privileges (Stephen Frost, KaiGai Kohei)
1135       </para>
1136      </listitem>
1137
1138      <listitem>
1139       <para>
1140        Improve reporting of dependencies during DROP commands (Alex Hunsaker)
1141       </para>
1142      </listitem>
1143
1144      <listitem>
1145       <para>
1146        Refactor multi-object DROP operations so conflicting dependencies don't
1147        generate an error (Alex Hunsaker)
1148       </para>
1149      </listitem>
1150
1151      <listitem>
1152       <para>
1153        Add WITH [NO] DATA clause to CREATE TABLE AS, per the SQL standard (Tom, Peter)
1154       </para>
1155      </listitem>
1156
1157      <listitem>
1158       <para>
1159        Add support for user-defined I/O conversion casts (Heikki)
1160       </para>
1161      </listitem>
1162
1163      <listitem>
1164       <para>
1165        Allow CREATE AGGREGATE to user an "internal" transition datatype (for
1166        super-users only)  (Tom)
1167       </para>
1168      </listitem>
1169
1170      <listitem>
1171       <para>
1172        Add LIKE clause to CREATE TYPE (Tom)
1173       </para>
1174
1175       <para>
1176        This simplifies creation of data types like existing types.
1177       </para>
1178      </listitem>
1179
1180      <listitem>
1181       <para>
1182        Allow CREATE OR REPLACE VIEW to add columns to the <emphasis>end</>
1183        of the view (Robert Haas)
1184       </para>
1185      </listitem>
1186
1187     </itemizedlist>
1188
1189    </sect3>
1190
1191    <sect3>
1192     <title>EXPLAIN</title>
1193     <itemizedlist>
1194
1195      <listitem>
1196       <para>
1197        Have EXPLAIN VERBOSE show the output columns of a query (Tom)
1198       </para>
1199
1200       <para>
1201        Previously EXPLAIN VERBOSE had output an internal representation of the
1202        query plan.  (That behavior is now available via debug_print_plan.)
1203       </para>
1204      </listitem>
1205
1206      <listitem>
1207       <para>
1208        Have EXPLAIN honor debug_print_plan (Tom)
1209       </para>
1210      </listitem>
1211
1212      <listitem>
1213       <para>
1214        Allow EXPLAIN on CREATE TABLE AS (Peter)
1215       </para>
1216      </listitem>
1217
1218     </itemizedlist>
1219
1220    </sect3>
1221
1222    <sect3>
1223     <title>Indexes</title>
1224     <itemizedlist>
1225
1226      <listitem>
1227       <para>
1228        Dramatically improve the speed of building and accessing hash indexes
1229        (Tom Raney, Shreya Bhargava, Kenneth Marshall)
1230       </para>
1231
1232       <para>
1233        This allows hash indexes to be sometimes faster than btree indexes.
1234        However, hash indexes are still not crash-safe.
1235       </para>
1236      </listitem>
1237
1238      <listitem>
1239       <para>
1240        Have hash indexes store only the hashed value, not the full indexed
1241        columns (Xiao Meng)
1242       </para>
1243
1244       <para>
1245        This greatly reduces the size of hash indexes for long indexed
1246        values, and improves performance.
1247       </para>
1248      </listitem>
1249
1250      <listitem>
1251       <para>
1252        Remove requirement to use "@@@" when doing GIN weighted lookups on full
1253        text indexes (Tom)
1254       </para>
1255      </listitem>
1256
1257      <listitem>
1258       <para>
1259        Add optimizer selectivity function for '@@' text search operations (Jan
1260        Urbanski)
1261       </para>
1262      </listitem>
1263
1264      <listitem>
1265       <para>
1266        Add partial match support for GIN indexes (Teodor Sigaev, Oleg Bartunov)
1267       </para>
1268      </listitem>
1269
1270      <listitem>
1271       <para>
1272        Allow prefix matching in full text searches (Teodor Sigaev, Oleg
1273        Bartunov)
1274       </para>
1275      </listitem>
1276
1277      <listitem>
1278       <para>
1279        Support multi-column GIN indexes (Teodor Sigaev)
1280       </para>
1281      </listitem>
1282
1283      <listitem>
1284       <para>
1285        Special xxx_pattern_ops LIKE indexes can now be used for simple equality
1286        comparisons (Tom)
1287       </para>
1288      </listitem>
1289
1290     </itemizedlist>
1291
1292    </sect3>
1293
1294    <sect3>
1295     <title>VACUUM</title>
1296     <itemizedlist>
1297
1298      <listitem>
1299       <para>
1300        Allow relation forks to track free space (Heikki)
1301       </para>
1302
1303       <para>
1304        This allows the recording of all free space discovered by vacuum in
1305        *.fsm files, rather than having to limit recording to a fixed-sized
1306        shared memory area;  max_fsm_pages and max_fsm_relations settings
1307        have been removed.
1308       </para>
1309      </listitem>
1310
1311      <listitem>
1312       <para>
1313        New visibility map file to track pages that do not require vacuum
1314        (Heikki)
1315       </para>
1316
1317       <para>
1318        This allows VACUUM to avoid sequentially scanning a table when only a
1319        portion of the table needs vacuuming.
1320       </para>
1321      </listitem>
1322
1323      <listitem>
1324       <para>
1325        Track explicit transaction snapshots (Alvaro)
1326       </para>
1327
1328       <para>
1329        This improves space reuse by vacuum in the presence of long-running
1330        transactions.
1331       </para>
1332      </listitem>
1333
1334      <listitem>
1335       <para>
1336        Add vacuum_freeze_table_age to postgresql.conf to control when VACUUM should
1337        ignore the visibility map and do a full table scan to set frozen xids
1338        (Heikki)
1339       </para>
1340      </listitem>
1341
1342      <listitem>
1343       <para>
1344        Add ability to specify autovacuum and TOAST parameters in
1345        CREATE TABLE (Alvaro, Euler Taveira de Oliveira)
1346       </para>
1347
1348       <para>
1349        Autovacuum options used to be stored in a system table.
1350       </para>
1351      </listitem>
1352
1353      <listitem>
1354       <para>
1355        Add --freeze option to vacuumdb (Bruce)
1356       </para>
1357      </listitem>
1358
1359     </itemizedlist>
1360
1361    </sect3>
1362
1363    <sect3>
1364     <title>Other Utility Operations</title>
1365     <itemizedlist>
1366
1367      <listitem>
1368       <para>
1369        Add verbose option to the CLUSTER command and clusterdb (Jim Cox)
1370       </para>
1371      </listitem>
1372
1373      <listitem>
1374       <para>
1375        Decrease memory requirements for recording pending trigger events (Tom)
1376       </para>
1377      </listitem>
1378
1379     </itemizedlist>
1380
1381    </sect3>
1382
1383    <sect3>
1384     <title>General Data Types</title>
1385     <itemizedlist>
1386
1387      <listitem>
1388       <para>
1389        Add a CaseSensitive option for text search synonym dictionaries (Simon)
1390       </para>
1391      </listitem>
1392
1393      <listitem>
1394       <para>
1395        Improve the precision of NUMERIC division (Tom)
1396       </para>
1397      </listitem>
1398
1399      <listitem>
1400       <para>
1401        Add int2 with int8 basic arithmetic operators (Tom)
1402       </para>
1403
1404       <para>
1405        This simplifies casting requirements.
1406       </para>
1407      </listitem>
1408
1409      <listitem>
1410       <para>
1411        Allow UUID input to accept optional hyphens after every four digits
1412        (Robert Haas)
1413       </para>
1414      </listitem>
1415
1416      <listitem>
1417       <para>
1418        Accept 'on'/'off' as boolean data type values (ITAGAKI Takahiro)
1419       </para>
1420      </listitem>
1421
1422     </itemizedlist>
1423
1424    </sect3>
1425
1426    <sect3>
1427     <title>Temporal Data Types</title>
1428     <itemizedlist>
1429
1430      <listitem>
1431       <para>
1432        Reject year '0 BC' and years '000' and '0000' (Tom)
1433       </para>
1434
1435       <para>
1436        Previously these were interpreted as 1 BC.  (Years '0' and '00' are
1437        assumed to be the year 2000.)
1438       </para>
1439      </listitem>
1440
1441      <listitem>
1442       <para>
1443        Include SGT (Singapore time) as a valid timezone abbreviation (Tom)
1444       </para>
1445      </listitem>
1446
1447      <listitem>
1448       <para>
1449        Support the IS0 8601 time interval syntax (Tom, Kevin Grittner)
1450       </para>
1451
1452       <para>
1453        For example, INTERVAL 'P1Y2M3DT4H5M6.7S' is now supported.
1454       </para>
1455      </listitem>
1456
1457      <listitem>
1458       <para>
1459        Allow the interval precision to be specified after the last field, for
1460        SQL-standards compliance (Tom)
1461       </para>
1462
1463       <para>
1464        Formerly the precision had to be specified after the keyword INTERVAL
1465        (the old syntax is still supported).  Data type definitions will now
1466        be output using the new format.
1467       </para>
1468      </listitem>
1469
1470      <listitem>
1471       <para>
1472        Support 'infinite' dates (Tom)
1473       </para>
1474      </listitem>
1475
1476      <listitem>
1477       <para>
1478        Add postgresql.conf variable IntervalStyle which controls how interval
1479        values are output (Ron Mayer)
1480       </para>
1481
1482       <para>
1483        Valid value are:  postgres, postgres_verbose, sql_standard, iso_8601.
1484        This also controls handling of negative interval input when only some
1485        fields have positive/negative designations.
1486       </para>
1487      </listitem>
1488
1489      <listitem>
1490       <para>
1491        Made interval seconds rounding more consistent across output
1492        formats (Ron Mayer)
1493       </para>
1494      </listitem>
1495
1496
1497     </itemizedlist>
1498
1499    </sect3>
1500
1501    <sect3>
1502     <title>Arrays</title>
1503     <itemizedlist>
1504
1505      <listitem>
1506       <para>
1507        Have cast on ARRAY[] apply to all elements, not just the array result
1508        (Brendan Jurd)
1509       </para>
1510
1511       <para>
1512        This allows NULL ARRAY[] entries as long as it is properly cast
1513       </para>
1514      </listitem>
1515
1516      <listitem>
1517       <para>
1518        Make the SQL ARRAY dimensions optional to match the SQL standard
1519        (Peter)
1520       </para>
1521      </listitem>
1522
1523      <listitem>
1524       <para>
1525        Add array_ndims() function to return the number of dimensions of an array (Robert
1526        Haas)
1527       </para>
1528      </listitem>
1529
1530      <listitem>
1531       <para>
1532        Add array_length() function to return the length of an array for the
1533        specified dimensions (Jim Nasby, Robert Haas, Peter Eisentraut)
1534       </para>
1535
1536       <para>
1537        Also add identically-functioning SQL-standard function cardinality().
1538       </para>
1539      </listitem>
1540
1541      <listitem>
1542       <para>
1543        Add new aggregate function array_agg(), which returns all aggregated
1544        values as a single array (Robert Haas, Jeff Davis, Peter)
1545       </para>
1546      </listitem>
1547
1548      <listitem>
1549       <para>
1550        Add function unnest(), which converts an array to individual row values
1551        (Tom)
1552       </para>
1553
1554       <para>
1555        This is the opposite of array_agg().
1556       </para>
1557      </listitem>
1558
1559      <listitem>
1560       <para>
1561        Add array_fill() to create arrays initialized with a value (Pavel Stehule)
1562       </para>
1563      </listitem>
1564
1565      <listitem>
1566       <para>
1567        Add generate_subscripts() to generate array subscripts (Pavel Stehule)
1568       </para>
1569      </listitem>
1570
1571      <listitem>
1572       <para>
1573        Generate proper error if a SERIAL array is specified (Tom)
1574       </para>
1575      </listitem>
1576
1577     </itemizedlist>
1578
1579    </sect3>
1580
1581    <sect3>
1582     <title>General Functions</title>
1583     <itemizedlist>
1584
1585      <listitem>
1586       <para>
1587        Document that setseed() allows values from -1 to 1 (not 0 to 1), and
1588        enforce the valid range (Kris Jurka)
1589       </para>
1590      </listitem>
1591
1592      <listitem>
1593       <para>
1594        Add server side lo_import(filename, oid) function (Tatsuo)
1595       </para>
1596      </listitem>
1597
1598      <listitem>
1599       <para>
1600        Add quote_nullable(), which behaves like quote_literal() but returns
1601        'NULL' for a null argument (Brendan Jurd)
1602       </para>
1603      </listitem>
1604
1605      <listitem>
1606       <para>
1607        Improve full text search headline() generation to allow several
1608        fragments (Sushant Sinha)
1609       </para>
1610      </listitem>
1611
1612      <listitem>
1613       <para>
1614        Add suppress_redundant_updates_trigger() trigger function to avoid
1615        non-data-changing updates (Andrew)
1616       </para>
1617      </listitem>
1618
1619      <listitem>
1620       <para>
1621        Add div(NUMERIC, NUMERIC) for NUMERIC division, without rounding (Tom)
1622       </para>
1623      </listitem>
1624
1625      <listitem>
1626       <para>
1627        Add timestamp and timestamptz versions of generate_series() (Hitoshi
1628        Harada)
1629       </para>
1630      </listitem>
1631
1632     </itemizedlist>
1633
1634    </sect3>
1635
1636    <sect3>
1637     <title>Object Information Functions</title>
1638     <itemizedlist>
1639
1640      <listitem>
1641       <para>
1642        Implement current_query() for use by functions that need to know the
1643        currently running query (Tomas Doran)
1644       </para>
1645      </listitem>
1646
1647      <listitem>
1648       <para>
1649        Add pg_get_keywords() function to return predefined parser keywords
1650        (Dave Page)
1651       </para>
1652      </listitem>
1653
1654      <listitem>
1655       <para>
1656        Add function pg_get_functiondef() to see a functions definition (Abhijit
1657        Menon-Sen)
1658       </para>
1659      </listitem>
1660
1661      <listitem>
1662       <para>
1663        Modify pg_relation_size() to handle free space map (*.fsm) files
1664        (Heikki)
1665       </para>
1666      </listitem>
1667
1668      <listitem>
1669       <para>
1670        Modify pg_relation_size() to use 'regclass' (Heikki)
1671       </para>
1672
1673       <para>
1674        pg_relation_size(data_type_name) no longer works.
1675       </para>
1676      </listitem>
1677
1678      <listitem>
1679       <para>
1680        Add boot_val and reset_val columns to pg_settings output (Greg Smith)
1681       </para>
1682      </listitem>
1683
1684      <listitem>
1685       <para>
1686        Add support for CURRENT_CATALOG, CURRENT_SCHEMA, SET CATALOG, SET SCHEMA
1687        (Peter)
1688       </para>
1689
1690       <para>
1691        These are SQL-standard capabilities.
1692       </para>
1693      </listitem>
1694
1695      <listitem>
1696       <para>
1697        Add pg_typeof() function to return the data type of any value (Brendan
1698        Jurd)
1699       </para>
1700      </listitem>
1701
1702      <listitem>
1703       <para>
1704        Have version() return information about whether the server is a 32
1705        or 64-bit binary (Bruce)
1706       </para>
1707      </listitem>
1708
1709      <listitem>
1710       <para>
1711        Fix the behavior of information schema columns is_insertable_into and
1712        is_updatable to be consistent (Peter)
1713       </para>
1714      </listitem>
1715
1716      <listitem>
1717       <para>
1718        Convert remaining builtin set-returning functions to use OUT parameters
1719        (Jaime Casanova)
1720       </para>
1721
1722       <para>
1723        This makes it possible to call these functions without specifying
1724        a column list:  pg_show_all_settings(), pg_lock_status(),
1725        pg_prepared_xact(), pg_prepared_statement(), pg_cursor()
1726       </para>
1727      </listitem>
1728
1729      <listitem>
1730       <para>
1731        Have pg_*_is_visible and has_*_privilege functions return NULL for
1732        invalid oids, rather than generate an error (Tom)
1733       </para>
1734      </listitem>
1735
1736      <listitem>
1737       <para>
1738        Add has_column_privilege() and has_any_column_privilege() functions
1739        (Stephen Frost, Tom)
1740       </para>
1741      </listitem>
1742
1743     </itemizedlist>
1744
1745    </sect3>
1746
1747    <sect3>
1748     <title>Function Creation</title>
1749     <itemizedlist>
1750
1751      <listitem>
1752       <para>
1753        Support variadic functions (functions with a variable number of
1754        arguments) (Pavel Stehule)
1755       </para>
1756
1757       <para>
1758        Only trailing arguments can be of variable length, and they all must
1759        be of the same data type.
1760       </para>
1761      </listitem>
1762
1763      <listitem>
1764       <para>
1765        Allow DEFAULT values for function arguments (Pavel Stehule)
1766       </para>
1767      </listitem>
1768
1769      <listitem>
1770       <para>
1771        Add CREATE FUNCTION ... RETURNS TABLE clause (Pavel Stehule)
1772       </para>
1773      </listitem>
1774
1775      <listitem>
1776       <para>
1777        Allow SQL-language functions to return the output of an INSERT/UPDATE/DELETE
1778        RETURNING clause (Tom)
1779       </para>
1780
1781       <para>
1782        Formerly only SELECT was supported.
1783       </para>
1784      </listitem>
1785
1786     </itemizedlist>
1787
1788    </sect3>
1789
1790    <sect3>
1791     <title>PL/PgSQL Server-Side Language</title>
1792     <itemizedlist>
1793
1794      <listitem>
1795       <para>
1796        Support EXECUTE USING in PL/pgSQL (Pavel Stehule)
1797       </para>
1798      </listitem>
1799
1800      <listitem>
1801       <para>
1802        Allow PL/pgSQL to loop over an open cursor using a FOR loop (Pavel
1803        Stehule)
1804       </para>
1805      </listitem>
1806
1807      <listitem>
1808       <para>
1809        Support RETURN QUERY EXECUTE in PL/pgSQL (Pavel Stehule)
1810       </para>
1811      </listitem>
1812
1813      <listitem>
1814       <para>
1815        Improve the PL/pgSQL RAISE command (Pavel Stehule)
1816       </para>
1817      </listitem>
1818
1819      <listitem>
1820       <para>
1821        <itemizedlist>
1822         <listitem>
1823          <para>
1824           Support DETAIL and HINT fields
1825          </para>
1826         </listitem>
1827         <listitem>
1828          <para>
1829           Support SQLSTATE error codes
1830          </para>
1831         </listitem>
1832         <listitem>
1833          <para>
1834           Support an exception name parameter
1835          </para>
1836         </listitem>
1837         <listitem>
1838          <para>
1839           Allow RAISE without parameters in an exception
1840           block to rethrow the current error
1841          </para>
1842         </listitem>
1843        </itemizedlist>
1844       </para>
1845      </listitem>
1846
1847      <listitem>
1848       <para>
1849        Allow the specification of SQLSTATE numeric codes in EXCEPTION lists
1850        (Pavel Stehule)
1851       </para>
1852
1853       <para>
1854        This is useful for handling custom SQLSTATE codes.
1855       </para>
1856      </listitem>
1857
1858      <listitem>
1859       <para>
1860        Support CASE statement in PL/pgSQL (Pavel Stehule)
1861       </para>
1862      </listitem>
1863
1864      <listitem>
1865       <para>
1866        Add PL/PgSQL FOUND and GET DIAGNOSTICS support for the RETURN QUERY
1867         statement (Pavel Stehule)
1868       </para>
1869      </listitem>
1870
1871      <listitem>
1872       <para>
1873        Add PL/pgSQL translation (Alvaro)
1874       </para>
1875      </listitem>
1876
1877     </itemizedlist>
1878
1879    </sect3>
1880
1881    <sect3>
1882     <title>General <link linkend="APP-PSQL"><application>psql</></link></title>
1883     <itemizedlist>
1884
1885      <listitem>
1886       <para>
1887        Remove psql startup banner;  now just suggest 'help' (Joshua Drake)
1888       </para>
1889      </listitem>
1890
1891      <listitem>
1892       <para>
1893        Have psql 'help' show common backslash commands (Greg Sabino Mullane)
1894       </para>
1895      </listitem>
1896
1897      <listitem>
1898       <para>
1899        Add psql '\pset format wrapped' mode to wrap output to screen width, or
1900         file/pipe output too if \pset columns' is set (Bryce Nesbitt)
1901       </para>
1902      </listitem>
1903
1904      <listitem>
1905       <para>
1906        Use the psql pager for wide output (Bruce)
1907       </para>
1908      </listitem>
1909
1910      <listitem>
1911       <para>
1912        Require a space between a psql backslash command and the first argument (Bernd
1913        Helmle)
1914       </para>
1915      </listitem>
1916
1917      <listitem>
1918       <para>
1919        Display access control rights on multiple lines in psql (Brendan Jurd,
1920        Andreas Scherbaum)
1921       </para>
1922      </listitem>
1923
1924      <listitem>
1925       <para>
1926        Improve psql tab completion support for schema qualified and quoted
1927        identifiers (Greg Sabino Mullane)
1928       </para>
1929      </listitem>
1930
1931      <listitem>
1932       <para>
1933        Allow the normal range of boolean values in \pset, rather than just
1934        'on' and 'off' (Bruce)
1935       </para>
1936      </listitem>
1937
1938      <listitem>
1939       <para>
1940        Add optional on/off argument to psql \timing (David Fetter)
1941       </para>
1942      </listitem>
1943
1944      <listitem>
1945       <para>
1946        Have psql \l show access privileges (Andrew Gilligan)
1947       </para>
1948      </listitem>
1949
1950      <listitem>
1951       <para>
1952        Have psql \l+ show database sizes, if permissions allow (Andrew Gilligan)
1953       </para>
1954      </listitem>
1955
1956      <listitem>
1957       <para>
1958        Add psql \ef command to edit function definitions (Abhijit Menon-Sen)
1959       </para>
1960
1961       <para>
1962        \ef without a function names creates an empty function template for
1963        editing.
1964       </para>
1965      </listitem>
1966
1967     </itemizedlist>
1968
1969    </sect3>
1970
1971    <sect3>
1972     <title><link linkend="APP-PSQL"><application>psql</></link> \d*</title>
1973     <itemizedlist>
1974
1975      <listitem>
1976       <para>
1977        Have psql \d display references to this table as a foreign-key constraint
1978        (Kenneth D'Souza)
1979       </para>
1980      </listitem>
1981
1982      <listitem>
1983       <para>
1984        Have psql \d show the value of sequence columns (Euler Taveira de
1985        Oliveira)
1986       </para>
1987      </listitem>
1988
1989      <listitem>
1990       <para>
1991        Add column storage type and other relation options to psql \d+ display
1992        (Gregory Stark, Euler Taveira de Oliveira)
1993       </para>
1994      </listitem>
1995
1996      <listitem>
1997       <para>
1998        Show relation size in psql \d+ output (Dickson S. Guedes)
1999       </para>
2000      </listitem>
2001
2002      <listitem>
2003       <para>
2004        Have all psql \d* commands show system objects only if 'S' is specified
2005        (Greg Sabino Mullane)
2006       </para>
2007
2008       <para>
2009        psql \dt already behaved this way.
2010       </para>
2011      </listitem>
2012
2013      <listitem>
2014       <para>
2015        Make psql \d and \dt consistent in their display of system tables
2016        (Bruce)
2017       </para>
2018
2019       <para>
2020        Previously, '\d pg_class' would show pg_class while '\dt pg_class'
2021        would not.
2022       </para>
2023      </listitem>
2024
2025      <listitem>
2026       <para>
2027        Show enumerated values in psql's \dT+ (David Fetter)
2028       </para>
2029      </listitem>
2030
2031      <listitem>
2032       <para>
2033        Allow psql \dC to accept wildcard patterns (Tom)
2034       </para>
2035      </listitem>
2036
2037      <listitem>
2038       <para>
2039        Allow psql \d* commands to work with versions of Postgres back to 7.4
2040        (Guillaume Lelarge)
2041       </para>
2042      </listitem>
2043
2044     </itemizedlist>
2045
2046    </sect3>
2047
2048    <sect3>
2049     <title><link linkend="APP-PGDUMP"><application>pg_dump</></link></title>
2050     <itemizedlist>
2051
2052      <listitem>
2053       <para>
2054        Add --no-tablespaces option to pg_dump/pg_dumpall/pg_restore so dumps
2055        can be restored to clusters that have non-matching tablespace layouts
2056        (Gavin Roy)
2057       </para>
2058      </listitem>
2059
2060      <listitem>
2061       <para>
2062        Remove -i/--ignore-version option from pg_dump and pg_dumpall (Tom)
2063       </para>
2064
2065       <para>
2066        Use of the options does not throw an error, but it has no effect.
2067        This option was removed because the version checks are considered
2068        necessary.
2069       </para>
2070      </listitem>
2071
2072      <listitem>
2073       <para>
2074        Disable statement_timeout during dump and restore (Joshua Drake)
2075       </para>
2076      </listitem>
2077
2078      <listitem>
2079       <para>
2080        Add pg_dump/pg_dumpall option --lock-wait-timeout (David Gould)
2081       </para>
2082
2083       <para>
2084        Allows dumps to fail if unable to acquire shared lock within the
2085        specified amount of time.
2086       </para>
2087      </listitem>
2088
2089      <listitem>
2090       <para>
2091        Reorder pg_dump --data-only output to dump primary-key tables referenced
2092        by foreign keys are dumped before the foreign-key referencing tables
2093        (Tom)
2094       </para>
2095
2096       <para>
2097        This allows data loads when foreign keys are already present.  If
2098        circular references make this impossible, issue a NOTICE.
2099       </para>
2100      </listitem>
2101
2102      <listitem>
2103       <para>
2104        Allow pg_dump, pg_dumpall, and pg_restore to use a specified role (Benedek
2105        László)
2106       </para>
2107      </listitem>
2108
2109      <listitem>
2110       <para>
2111        Allow pg_restore of a custom format archive to use multiple concurrent
2112        connections to do the restore (Andrew)
2113       </para>
2114
2115       <para>
2116        The number of concurrent connections is controlled by the option
2117        --jobs.
2118       </para>
2119      </listitem>
2120
2121      <listitem>
2122       <para>
2123        Add new pg_dump --binary-upgrade flag to be used by binary upgrade
2124        utilities (Bruce)
2125       </para>
2126      </listitem>
2127
2128     </itemizedlist>
2129
2130    </sect3>
2131
2132    <sect3>
2133     <title>Other Client Applications</title>
2134     <itemizedlist>
2135
2136      <listitem>
2137       <para>
2138        Fix 'pg_ctl restart' to preserve command-line arguments (Bruce)
2139       </para>
2140      </listitem>
2141
2142      <listitem>
2143       <para>
2144        Add -w/--no-password option that suppresses password prompts to all
2145        utilities that have a -W/--password option (Peter)
2146       </para>
2147      </listitem>
2148
2149      <listitem>
2150       <para>
2151        Remove -q (quiet) option for create* and drop* utility commands (Peter)
2152       </para>
2153
2154       <para>
2155        These options have had no effect since 8.3.
2156       </para>
2157      </listitem>
2158
2159     </itemizedlist>
2160
2161    </sect3>
2162
2163    <sect3>
2164     <title>General <link linkend="libpq"><application>libpq</></link></title>
2165     <itemizedlist>
2166
2167      <listitem>
2168       <para>
2169        Allow the OID to be specified when importing large objects using
2170        libpq lo_import_with_oid() (Tatsuo)
2171       </para>
2172      </listitem>
2173
2174      <listitem>
2175       <para>
2176        Add events support to libpq (Andrew Chernow, Merlin Moncure)
2177       </para>
2178
2179       <para>
2180        This adds the ability to register callbacks to handle private data
2181        for connection and result creation and destruction.
2182       </para>
2183      </listitem>
2184
2185      <listitem>
2186       <para>
2187        Improve libpq error handling to allow the return of multiple error
2188        messages as multi-line error reports (Magnus)
2189       </para>
2190      </listitem>
2191
2192      <listitem>
2193       <para>
2194        Have libpq PQexecParams() return PGRES_EMPTY_QUERY for an empty query
2195        (Tom)
2196       </para>
2197
2198       <para>
2199         It previously returned PGRES_COMMAND_OK.
2200       </para>
2201      </listitem>
2202
2203      <listitem>
2204       <para>
2205        Document how to avoid the libpq overhead of WSACleanup() overhead on
2206        Windows (Andrew Chernow)
2207       </para>
2208      </listitem>
2209
2210     </itemizedlist>
2211
2212    </sect3>
2213
2214    <sect3>
2215     <title><link linkend="libpq"><application>libpq</></link> SSL</title>
2216     <itemizedlist>
2217
2218      <listitem>
2219       <para>
2220        Fix libpq certificate validation for SSL connections (Magnus)
2221       </para>
2222       
2223       <para>
2224        libpq now verifies both the certificate and the name of the server by
2225        default when making SSL connections. If a root certificate is not
2226        available to use for verification, SSL connections will fail. The
2227        "sslverify" parameter can be used to disable the host and certificate
2228        verification if required.
2229       </para>
2230      </listitem>
2231
2232      <listitem>
2233       <para>
2234        Allow the file locations for libpq SSL certificates to be specified
2235        (Mark Woodward, Alvaro, Magnus)
2236       </para>
2237      </listitem>
2238
2239      <listitem>
2240       <para>
2241        Add libpq connection parameter "sslverify" to control the verification
2242        of the server's SSL certificate (Magnus)
2243       </para>
2244
2245       <para>
2246        The default is full verification.
2247       </para>
2248      </listitem>
2249
2250      <listitem>
2251       <para>
2252        Properly unregister OpenSSL callbacks when libpq is done with
2253        all connection (Bruce, Magnus, Russell Smith)
2254       </para>
2255
2256       <para>
2257        This is required for applications that unload the libpq library so
2258        no invalid OpenSSL callbacks remain.
2259       </para>
2260      </listitem>
2261
2262     </itemizedlist>
2263
2264    </sect3>
2265
2266    <sect3>
2267     <title><link linkend="ecpg"><application>ecpg</></link></title>
2268     <itemizedlist>
2269
2270      <listitem>
2271       <para>
2272        Add localization support for ecpg messages (Euler Taveira de Oliveira)
2273       </para>
2274      </listitem>
2275
2276      <listitem>
2277       <para>
2278        ecpg parser is now automatically generated from the server parser
2279        (Michael)
2280       </para>
2281
2282       <para>
2283        Previously a separate ecpg parser was maintained.
2284
2285       </para>
2286      </listitem>
2287
2288     </itemizedlist>
2289
2290    </sect3>
2291
2292    <sect3>
2293     <title>Server Programming Interface (<acronym>SPI</>)</title>
2294     <itemizedlist>
2295
2296      <listitem>
2297       <para>
2298        Add SPI support for single-use plans with out-of-line parameters (Tom)
2299       </para>
2300      </listitem>
2301
2302      <listitem>
2303       <para>
2304        Add new SPI_OK_REWRITTEN return code to SPI_execute() (Heikki)
2305       </para>
2306
2307       <para>
2308        This is used when a command is rewritten to another type of command.
2309       </para>
2310      </listitem>
2311
2312     </itemizedlist>
2313
2314    </sect3>
2315
2316    <sect3>
2317     <title>Build Options</title>
2318     <itemizedlist>
2319
2320      <listitem>
2321       <para>
2322        Support 64-bit timezone data files (Heikki)
2323       </para>
2324
2325       <para>
2326        This adds support for daylight saving time (DST) calculations beyond 2038.
2327       </para>
2328      </listitem>
2329
2330      <listitem>
2331       <para>
2332        Fix bug in handling of the timezone database when cross-compiling
2333        (Richard Evans)
2334       </para>
2335      </listitem>
2336
2337      <listitem>
2338       <para>
2339        Update build system to use Autoconf 2.61 (Peter)
2340       </para>
2341      </listitem>
2342
2343      <listitem>
2344       <para>
2345        Require GNU bison for source code builds (Peter)
2346       </para>
2347
2348       <para>
2349        This has been a requirement for several years but this removes the
2350        infrastructure for supporting other parser tools.
2351       </para>
2352      </listitem>
2353
2354      <listitem>
2355       <para>
2356        Add pg_config --htmldir option (Peter)
2357       </para>
2358      </listitem>
2359
2360      <listitem>
2361       <para>
2362        Pass float4 by value inside the server (Zoltan Boszormenyi)
2363       </para>
2364
2365       <para>
2366        Add configure option --disable-float4-byval to use the old
2367        behavior.
2368       </para>
2369      </listitem>
2370
2371      <listitem>
2372       <para>
2373        Pass float8 and int8 by value in the server where possible (Zoltan
2374        Boszormenyi)
2375       </para>
2376
2377       <para>
2378        Add configure option --disable-float8-byval to use the old behavior.
2379       </para>
2380      </listitem>
2381
2382      <listitem>
2383       <para>
2384        Add configure options -with-segsize, --with-blocksize,
2385        --with-wal-blocksize, --with-wal-segsize (Zdenek Kotala, Tom)
2386       </para>
2387
2388       <para>
2389        This allows compile-time control over several compile-time constants
2390        that control how large tables and WAL are segmented into separate files and
2391        their internal block sizes
2392       </para>
2393      </listitem>
2394
2395      <listitem>
2396       <para>
2397        Allow threaded builds on Solaris 2.5 (Bruce)
2398       </para>
2399      </listitem>
2400
2401      <listitem>
2402       <para>
2403        Add support for Sun Studio compiler on Linux (Julius Stroffek)
2404       </para>
2405      </listitem>
2406
2407      <listitem>
2408       <para>
2409        Append major version number to the gettext domain name, and for
2410        libraries the soname major version number (Peter)
2411       </para>
2412
2413       <para>
2414        This simplifies parallel installations.
2415       </para>
2416      </listitem>
2417
2418      <listitem>
2419       <para>
2420        Allow out-of-tree builds on Mingw and Cygwin (Richard Evans)
2421       </para>
2422      </listitem>
2423
2424      <listitem>
2425       <para>
2426        Fix the use of Mingw32 as a cross-compiling source platform (Peter)
2427       </para>
2428      </listitem>
2429
2430      <listitem>
2431       <para>
2432        Fix problem when setting LC_MESSAGES on MSVC-built systems (Hiroshi
2433        Inoue, Hiroshi Saito, Magnus)  bjm: details?
2434       </para>
2435      </listitem>
2436
2437     </itemizedlist>
2438
2439    </sect3>
2440
2441    <sect3>
2442     <title>Source Code</title>
2443     <itemizedlist>
2444
2445      <listitem>
2446       <para>
2447        Link backend object files in one step, rather than in stages (Peter)
2448       </para>
2449      </listitem>
2450
2451      <listitem>
2452       <para>
2453        Additional DTrace probes (Robert Lor)
2454       </para>
2455      </listitem>
2456
2457      <listitem>
2458       <para>
2459        Add DTrace support on Mac OS X Leopard (Robert Lor)
2460       </para>
2461      </listitem>
2462
2463      <listitem>
2464       <para>
2465        Add new cstring to text conversion functions (Brendan Jurd, Tom)
2466       </para>
2467      </listitem>
2468
2469      <listitem>
2470       <para>
2471        Improve logic for shared cache invalidation (Tom)
2472       </para>
2473      </listitem>
2474
2475      <listitem>
2476       <para>
2477        Make "name" char-aligned (Tom) bjm: pg_upgrade?
2478       </para>
2479      </listitem>
2480
2481      <listitem>
2482       <para>
2483        Add function hook to let plug-ins control the executor (ITAGAKI
2484        Takahiro)
2485       </para>
2486      </listitem>
2487
2488      <listitem>
2489       <para>
2490        Add a hook to allow planner statistics lookup behavior to be overridden
2491        (Simon Riggs)
2492       </para>
2493      </listitem>
2494
2495      <listitem>
2496       <para>
2497        Add "shmem_startup_hook" for custom shared memory requirements (Tom)
2498       </para>
2499      </listitem>
2500
2501      <listitem>
2502       <para>
2503        Replace pg_class column reltriggers with boolean relhastriggers (Simon)
2504       </para>
2505
2506       <para>
2507        Also remove unused pg_class columns relukeys, relfkeys, and relrefs.
2508       </para>
2509      </listitem>
2510
2511      <listitem>
2512       <para>
2513        Move SQL-command manual pages from the 'manl' (man-el) section to 'man7'
2514        (Peter)
2515       </para>
2516      </listitem>
2517
2518      <listitem>
2519       <para>
2520        Move platform FAQs into the main documentation (Peter)
2521       </para>
2522      </listitem>
2523
2524      <listitem>
2525       <para>
2526        Add %expect 0 to all parser input files to prevent builds with parser
2527        conflicts (Peter)
2528       </para>
2529      </listitem>
2530
2531      <listitem>
2532       <para>
2533        Add support for the KOI8U (Ukrainian) encoding (Peter)
2534       </para>
2535      </listitem>
2536
2537     </itemizedlist>
2538
2539    </sect3>
2540
2541    <sect3>
2542     <title>Contrib</title>
2543     <itemizedlist>
2544
2545      <listitem>
2546       <para>
2547        Add -M (query mode) to /contrib/pgbench (ITAGAKI Takahiro)
2548       </para>
2549      </listitem>
2550
2551      <listitem>
2552       <para>
2553        Add duration option to /contrib/pgbench (ITAGAKI Takahiro)
2554       </para>
2555      </listitem>
2556
2557      <listitem>
2558       <para>
2559        Fix /contrib/pgstattuple to handle tables and indexes with over 2
2560        billion pages (Tatsuhito Kasahara)
2561       </para>
2562      </listitem>
2563
2564      <listitem>
2565       <para>
2566        Add Levenshtein string-distance function to /contrib/fuzzystrmatch
2567        that allows the user to specify the cost of insertion, deletion,
2568        and substitution (Volkan Yazici)
2569       </para>
2570      </listitem>
2571
2572      <listitem>
2573       <para>
2574        Remove dblink_current_query() from /contrib/dblink;  it should now use
2575        current_query() (Tomas Doran)
2576       </para>
2577      </listitem>
2578
2579      <listitem>
2580       <para>
2581        Have /contrib/ltree support multibyte encodings (laser)
2582       </para>
2583      </listitem>
2584
2585      <listitem>
2586       <para>
2587        Add /contrib/citext as a case-insensitive, multibyte-capable text data type (David Wheeler)
2588       </para>
2589      </listitem>
2590
2591      <listitem>
2592       <para>
2593        Make sure /contrib/dblink uses a password supplied by the user, and not
2594        accidentally from the server .pgpass file (Joe Conway)
2595       </para>
2596
2597       <para>
2598        This is a security enhancement.
2599       </para>
2600      </listitem>
2601
2602      <listitem>
2603       <para>
2604        Add fsm_page_contents() to contrib/pageinspect (Heikki)
2605       </para>
2606
2607       <para>
2608        Modify get_raw_page() to support free space map (*.fsm) files.
2609        Also update /contrib/pg_freespacemap.
2610       </para>
2611      </listitem>
2612
2613      <listitem>
2614       <para>
2615        Add support for multibyte encodings to /contrib/pg_trgm (Teodor)
2616       </para>
2617      </listitem>
2618
2619      <listitem>
2620       <para>
2621        Rewrite contrib/intagg to user new server-side functions array_agg() and
2622        unnest() (Tom)
2623       </para>
2624      </listitem>
2625
2626      <listitem>
2627       <para>
2628        Add /contrib/auto_explain to automatically run EXPLAIN on queries
2629        exceeding a specified duration (Takahiro Itagaki, Tom)
2630       </para>
2631      </listitem>
2632
2633      <listitem>
2634       <para>
2635        Add contrib/pg_stat_statements for server-wide tracking of statement execution
2636        statistics (Takahiro Itagaki)
2637       </para>
2638      </listitem>
2639
2640     </itemizedlist>
2641
2642    </sect3>
2643   </sect2>
2644  </sect1>
2645
2646  <sect1 id="release-8-3-7">
2647   <title>Release 8.3.7</title>
2648
2649   <note>
2650   <title>Release date</title>
2651   <simpara>2009-03-16</simpara>
2652   </note>
2653
2654   <para>
2655    This release contains a variety of fixes from 8.3.6.
2656    For information about new features in the 8.3 major release, see
2657    <xref linkend="release-8-3">.
2658   </para>
2659
2660   <sect2>
2661    <title>Migration to Version 8.3.7</title>
2662
2663    <para>
2664     A dump/restore is not required for those running 8.3.X.
2665     However, if you are upgrading from a version earlier than 8.3.5,
2666     see the release notes for 8.3.5.
2667    </para>
2668
2669   </sect2>
2670
2671   <sect2>
2672    <title>Changes</title>
2673
2674    <itemizedlist>
2675
2676     <listitem>
2677      <para>
2678       Prevent error recursion crashes when encoding conversion fails (Tom)
2679      </para>
2680
2681      <para>
2682       This change extends fixes made in the last two minor releases for
2683       related failure scenarios.  The previous fixes were narrowly tailored
2684       for the original problem reports, but we have now recognized that
2685       <emphasis>any</> error thrown by an encoding conversion function could
2686       potentially lead to infinite recursion while trying to report the
2687       error.  The solution therefore is to disable translation and encoding
2688       conversion and report the plain-ASCII form of any error message,
2689       if we find we have gotten into a recursive error reporting situation.
2690       (CVE-2009-0922)
2691      </para>
2692     </listitem>
2693
2694     <listitem>
2695      <para>
2696       Disallow <command>CREATE CONVERSION</> with the wrong encodings
2697       for the specified conversion function (Heikki)
2698      </para>
2699
2700      <para>
2701       This prevents one possible scenario for encoding conversion failure.
2702       The previous change is a backstop to guard against other kinds of
2703       failures in the same area.
2704      </para>
2705     </listitem>
2706
2707     <listitem>
2708      <para>
2709       Fix <function>xpath()</> to not modify the path expression unless
2710       necessary, and to make a saner attempt at it when necessary (Andrew)
2711      </para>
2712
2713      <para>
2714       The SQL standard suggests that <function>xpath</> should work on data
2715       that is a document fragment, but <application>libxml</> doesn't support
2716       that, and indeed it's not clear that this is sensible according to the
2717       XPath standard.  <function>xpath</> attempted to work around this
2718       mismatch by modifying both the data and the path expression, but the
2719       modification was buggy and could cause valid searches to fail.  Now,
2720       <function>xpath</> checks whether the data is in fact a well-formed
2721       document, and if so invokes <application>libxml</> with no change to the
2722       data or path expression.  Otherwise, a different modification method
2723       that is somewhat less likely to fail is used.
2724      </para>
2725
2726      <note>
2727       <para>
2728        The new modification method is still not 100% satisfactory, and it
2729        seems likely that no real solution is possible.  This patch should
2730        therefore be viewed as a band-aid to keep from breaking existing
2731        applications unnecessarily.  It is likely that
2732        <productname>PostgreSQL</> 8.4 will simply reject use of
2733        <function>xpath</> on data that is not a well-formed document.
2734       </para>
2735      </note>
2736     </listitem>
2737
2738     <listitem>
2739      <para>
2740       Fix core dump when <function>to_char()</> is given format codes that
2741       are inappropriate for the type of the data argument (Tom)
2742      </para>
2743     </listitem>
2744
2745     <listitem>
2746      <para>
2747       Fix possible failure in text search when C locale is used with
2748       a multi-byte encoding (Teodor)
2749      </para>
2750
2751      <para>
2752       Crashes were possible on platforms where <type>wchar_t</> is narrower
2753       than <type>int</>; Windows in particular.
2754      </para>
2755     </listitem>
2756
2757     <listitem>
2758      <para>
2759       Fix extreme inefficiency in text search parser's handling of an
2760       email-like string containing multiple <literal>@</> characters (Heikki)
2761      </para>
2762     </listitem>
2763
2764     <listitem>
2765      <para>
2766       Fix planner problem with sub-<command>SELECT</> in the output list
2767       of a larger subquery (Tom)
2768      </para>
2769
2770      <para>
2771       The known symptom of this bug is a <quote>failed to locate grouping
2772       columns</> error that is dependent on the datatype involved;
2773       but there could be other issues as well.
2774      </para>
2775     </listitem>
2776
2777     <listitem>
2778      <para>
2779       Fix decompilation of <literal>CASE WHEN</> with an implicit coercion
2780       (Tom)
2781      </para>
2782
2783      <para>
2784       This mistake could lead to Assert failures in an Assert-enabled build,
2785       or an <quote>unexpected CASE WHEN clause</> error message in other
2786       cases, when trying to examine or dump a view.
2787      </para>
2788     </listitem>
2789
2790     <listitem>
2791      <para>
2792       Fix possible misassignment of the owner of a TOAST table's rowtype (Tom)
2793      </para>
2794
2795      <para>
2796       If <command>CLUSTER</> or a rewriting variant of <command>ALTER TABLE</>
2797       were executed by someone other than the table owner, the
2798       <structname>pg_type</> entry for the table's TOAST table would end up
2799       marked as owned by that someone.  This caused no immediate problems,
2800       since the permissions on the TOAST rowtype aren't examined by any
2801       ordinary database operation.  However, it could lead to unexpected
2802       failures if one later tried to drop the role that issued the command
2803       (in 8.1 or 8.2), or <quote>owner of data type appears to be invalid</>
2804       warnings from <application>pg_dump</> after having done so (in 8.3).
2805      </para>
2806     </listitem>
2807
2808     <listitem>
2809      <para>
2810       Change <command>UNLISTEN</> to exit quickly if the current session has
2811       never executed any <command>LISTEN</> command (Tom)
2812      </para>
2813
2814      <para>
2815       Most of the time this is not a particularly useful optimization, but
2816       since <command>DISCARD ALL</> invokes <command>UNLISTEN</>, the previous
2817       coding caused a substantial performance problem for applications that
2818       made heavy use of <command>DISCARD ALL</>.
2819      </para>
2820     </listitem>
2821
2822     <listitem>
2823      <para>
2824       Fix PL/pgSQL to not treat <literal>INTO</> after <command>INSERT</> as
2825       an INTO-variables clause anywhere in the string, not only at the start;
2826       in particular, don't fail for <command>INSERT INTO</> within
2827       <command>CREATE RULE</> (Tom)
2828      </para>
2829     </listitem>
2830
2831     <listitem>
2832      <para>
2833       Clean up PL/pgSQL error status variables fully at block exit
2834       (Ashesh Vashi and Dave Page)
2835      </para>
2836
2837      <para>
2838       This is not a problem for PL/pgSQL itself, but the omission could cause
2839       the PL/pgSQL Debugger to crash while examining the state of a function.
2840      </para>
2841     </listitem>
2842
2843     <listitem>
2844      <para>
2845       Retry failed calls to <function>CallNamedPipe()</> on Windows
2846       (Steve Marshall, Magnus)
2847      </para>
2848
2849      <para>
2850       It appears that this function can sometimes fail transiently;
2851       we previously treated any failure as a hard error, which could
2852       confuse <command>LISTEN</>/<command>NOTIFY</> as well as other
2853       operations.
2854      </para>
2855     </listitem>
2856
2857     <listitem>
2858      <para>
2859       Add <literal>MUST</> (Mauritius Island Summer Time) to the default list
2860       of known timezone abbreviations (Xavier Bugaud)
2861      </para>
2862     </listitem>
2863
2864    </itemizedlist>
2865
2866   </sect2>
2867  </sect1>
2868
2869  <sect1 id="release-8-3-6">
2870   <title>Release 8.3.6</title>
2871
2872   <note>
2873   <title>Release date</title>
2874   <simpara>2009-02-02</simpara>
2875   </note>
2876
2877   <para>
2878    This release contains a variety of fixes from 8.3.5.
2879    For information about new features in the 8.3 major release, see
2880    <xref linkend="release-8-3">.
2881   </para>
2882
2883   <sect2>
2884    <title>Migration to Version 8.3.6</title>
2885
2886    <para>
2887     A dump/restore is not required for those running 8.3.X.
2888     However, if you are upgrading from a version earlier than 8.3.5,
2889     see the release notes for 8.3.5.
2890    </para>
2891
2892   </sect2>
2893
2894   <sect2>
2895    <title>Changes</title>
2896
2897    <itemizedlist>
2898
2899     <listitem>
2900      <para>
2901       Make <command>DISCARD ALL</> release advisory locks, in addition
2902       to everything it already did (Tom)
2903      </para>
2904
2905      <para>
2906       This was decided to be the most appropriate behavior.  This could
2907       affect existing applications, however.
2908      </para>
2909     </listitem>
2910
2911     <listitem>
2912      <para>
2913       Fix whole-index GiST scans to work correctly (Teodor)
2914      </para>
2915
2916      <para>
2917       This error could cause rows to be lost if a table is clustered
2918       on a GiST index.
2919      </para>
2920     </listitem>
2921
2922     <listitem>
2923      <para>
2924       Fix crash of <literal>xmlconcat(NULL)</> (Peter)
2925      </para>
2926     </listitem>
2927
2928     <listitem>
2929      <para>
2930       Fix possible crash in <literal>ispell</> dictionary if high-bit-set
2931       characters are used as flags (Teodor)
2932      </para>
2933
2934      <para>
2935       This is known to be done by one widely available Norwegian dictionary,
2936       and the same condition may exist in others.
2937      </para>
2938     </listitem>
2939
2940     <listitem>
2941      <para>
2942       Fix misordering of <application>pg_dump</> output for composite types
2943       (Tom)
2944      </para>
2945
2946      <para>
2947       The most likely problem was for user-defined operator classes to
2948       be dumped after indexes or views that needed them.
2949      </para>
2950     </listitem>
2951
2952     <listitem>
2953      <para>
2954       Improve handling of URLs in <function>headline()</> function (Teodor)
2955      </para>
2956     </listitem>
2957
2958     <listitem>
2959      <para>
2960       Improve handling of overlength headlines in <function>headline()</>
2961       function (Teodor)
2962      </para>
2963     </listitem>
2964
2965     <listitem>
2966      <para>
2967       Prevent possible Assert failure or misconversion if an encoding
2968       conversion is created with the wrong conversion function for the
2969       specified pair of encodings (Tom, Heikki)
2970      </para>
2971     </listitem>
2972
2973     <listitem>
2974      <para>
2975       Fix possible Assert failure if a statement executed in PL/pgSQL is
2976       rewritten into another kind of statement, for example if an
2977       <command>INSERT</> is rewritten into an <command>UPDATE</> (Heikki)
2978      </para>
2979     </listitem>
2980
2981     <listitem>
2982      <para>
2983       Ensure that a snapshot is available to datatype input functions (Tom)
2984      </para>
2985
2986      <para>
2987       This primarily affects domains that are declared with <literal>CHECK</>
2988       constraints involving user-defined stable or immutable functions.  Such
2989       functions typically fail if no snapshot has been set.
2990      </para>
2991     </listitem>
2992
2993     <listitem>
2994      <para>
2995       Make it safer for SPI-using functions to be used within datatype I/O;
2996       in particular, to be used in domain check constraints (Tom)
2997      </para>
2998     </listitem>
2999
3000     <listitem>
3001      <para>
3002       Avoid unnecessary locking of small tables in <command>VACUUM</>
3003       (Heikki)
3004      </para>
3005     </listitem>
3006
3007     <listitem>
3008      <para>
3009       Fix a problem that sometimes kept <command>ALTER TABLE ENABLE/DISABLE
3010       RULE</> from being recognized by active sessions (Tom)
3011      </para>
3012     </listitem>
3013
3014     <listitem>
3015      <para>
3016       Fix a problem that made <literal>UPDATE RETURNING tableoid</>
3017       return zero instead of the correct OID (Tom)
3018      </para>
3019     </listitem>
3020
3021     <listitem>
3022      <para>
3023       Allow functions declared as taking <type>ANYARRAY</> to work on
3024       the <structname>pg_statistic</> columns of that type (Tom)
3025      </para>
3026
3027      <para>
3028       This used to work, but was unintentionally broken in 8.3.
3029      </para>
3030     </listitem>
3031
3032     <listitem>
3033      <para>
3034       Fix planner misestimation of selectivity when transitive equality
3035       is applied to an outer-join clause (Tom)
3036      </para>
3037
3038      <para>
3039       This could result in bad plans for queries like
3040       <literal>... from a left join b on a.a1 = b.b1 where a.a1 = 42 ...</>
3041      </para>
3042     </listitem>
3043
3044     <listitem>
3045      <para>
3046       Improve optimizer's handling of long <literal>IN</> lists (Tom)
3047      </para>
3048
3049      <para>
3050       This change avoids wasting large amounts of time on such lists
3051       when constraint exclusion is enabled.
3052      </para>
3053     </listitem>
3054
3055     <listitem>
3056      <para>
3057       Prevent synchronous scan during GIN index build (Tom)
3058      </para>
3059
3060      <para>
3061       Because GIN is optimized for inserting tuples in increasing TID order,
3062       choosing to use a synchronous scan could slow the build by a factor of
3063       three or more.
3064      </para>
3065     </listitem>
3066
3067     <listitem>
3068      <para>
3069       Ensure that the contents of a holdable cursor don't depend on the
3070       contents of TOAST tables (Tom)
3071      </para>
3072
3073      <para>
3074       Previously, large field values in a cursor result might be represented
3075       as TOAST pointers, which would fail if the referenced table got dropped
3076       before the cursor is read, or if the large value is deleted and then
3077       vacuumed away.  This cannot happen with an ordinary cursor,
3078       but it could with a cursor that is held past its creating transaction.
3079      </para>
3080     </listitem>
3081
3082     <listitem>
3083      <para>
3084       Fix memory leak when a set-returning function is terminated without
3085       reading its whole result (Tom)
3086      </para>
3087     </listitem>
3088
3089     <listitem>
3090      <para>
3091       Fix encoding conversion problems in XML functions when the database
3092       encoding isn't UTF-8 (Tom)
3093      </para>
3094     </listitem>
3095
3096     <listitem>
3097      <para>
3098       Fix <filename>contrib/dblink</>'s
3099       <function>dblink_get_result(text,bool)</> function (Joe)
3100      </para>
3101     </listitem>
3102
3103     <listitem>
3104      <para>
3105       Fix possible garbage output from <filename>contrib/sslinfo</> functions
3106       (Tom)
3107      </para>
3108     </listitem>
3109
3110     <listitem>
3111      <para>
3112       Fix incorrect behavior of <filename>contrib/tsearch2</> compatibility
3113       trigger when it's fired more than once in a command (Teodor)
3114      </para>
3115     </listitem>
3116
3117     <listitem>
3118      <para>
3119       Fix possible mis-signaling in autovacuum (Heikki)
3120      </para>
3121     </listitem>
3122
3123     <listitem>
3124      <para>
3125       Support running as a service on Windows 7 beta (Dave and Magnus)
3126      </para>
3127     </listitem>
3128
3129     <listitem>
3130      <para>
3131       Fix <application>ecpg</>'s handling of varchar structs (Michael)
3132      </para>
3133     </listitem>
3134
3135     <listitem>
3136      <para>
3137       Fix <application>configure</> script to properly report failure when
3138       unable to obtain linkage information for PL/Perl (Andrew)
3139      </para>
3140     </listitem>
3141
3142     <listitem>
3143      <para>
3144       Make all documentation reference <literal>pgsql-bugs</> and/or
3145       <literal>pgsql-hackers</> as appropriate, instead of the
3146       now-decommissioned <literal>pgsql-ports</> and <literal>pgsql-patches</>
3147       mailing lists (Tom)
3148      </para>
3149     </listitem>
3150
3151     <listitem>
3152      <para>
3153       Update time zone data files to <application>tzdata</> release 2009a (for
3154       Kathmandu and historical DST corrections in Switzerland, Cuba)
3155      </para>
3156     </listitem>
3157
3158    </itemizedlist>
3159
3160   </sect2>
3161  </sect1>
3162
3163  <sect1 id="release-8-3-5">
3164   <title>Release 8.3.5</title>
3165
3166   <note>
3167   <title>Release date</title>
3168   <simpara>2008-11-03</simpara>
3169   </note>
3170
3171   <para>
3172    This release contains a variety of fixes from 8.3.4.
3173    For information about new features in the 8.3 major release, see
3174    <xref linkend="release-8-3">.
3175   </para>
3176
3177   <sect2>
3178    <title>Migration to Version 8.3.5</title>
3179
3180    <para>
3181     A dump/restore is not required for those running 8.3.X.
3182     However, if you are upgrading from a version earlier than 8.3.1,
3183     see the release notes for 8.3.1.  Also, if you were running a previous
3184     8.3.X release, it is recommended to <command>REINDEX</> all GiST
3185     indexes after the upgrade.
3186    </para>
3187
3188   </sect2>
3189
3190   <sect2>
3191    <title>Changes</title>
3192
3193    <itemizedlist>
3194
3195     <listitem>
3196      <para>
3197       Fix GiST index corruption due to marking the wrong index entry
3198       <quote>dead</> after a deletion (Teodor)
3199      </para>
3200
3201      <para>
3202       This would result in index searches failing to find rows they
3203       should have found.  Corrupted indexes can be fixed with
3204       <command>REINDEX</>.
3205      </para>
3206     </listitem>
3207
3208     <listitem>
3209      <para>
3210       Fix backend crash when the client encoding cannot represent a localized
3211       error message (Tom)
3212      </para>
3213
3214      <para>
3215       We have addressed similar issues before, but it would still fail if
3216       the <quote>character has no equivalent</> message itself couldn't
3217       be converted.  The fix is to disable localization and send the plain
3218       ASCII error message when we detect such a situation.
3219      </para>
3220     </listitem>
3221
3222     <listitem>
3223      <para>
3224       Fix possible crash in <type>bytea</>-to-XML mapping (Michael McMaster)
3225      </para>
3226     </listitem>
3227
3228     <listitem>
3229      <para>
3230       Fix possible crash when deeply nested functions are invoked from
3231       a trigger (Tom)
3232      </para>
3233     </listitem>
3234
3235     <listitem>
3236      <para>
3237       Improve optimization of <replaceable>expression</> <literal>IN</>
3238       (<replaceable>expression-list</>) queries (Tom, per an idea from Robert
3239       Haas)
3240      </para>
3241
3242      <para>
3243       Cases in which there are query variables on the right-hand side had been
3244       handled less efficiently in 8.2.x and 8.3.x than in prior versions.
3245       The fix restores 8.1 behavior for such cases.
3246      </para>
3247     </listitem>
3248
3249     <listitem>
3250      <para>
3251       Fix mis-expansion of rule queries when a sub-<literal>SELECT</> appears
3252       in a function call in <literal>FROM</>,  a multi-row <literal>VALUES</>
3253       list, or a <literal>RETURNING</> list (Tom)
3254      </para>
3255
3256      <para>
3257       The usual symptom of this problem is an <quote>unrecognized node type</>
3258       error.
3259      </para>
3260     </listitem>
3261
3262     <listitem>
3263      <para>
3264       Fix Assert failure during rescan of an <literal>IS NULL</>
3265       search of a GiST index (Teodor)
3266      </para>
3267     </listitem>
3268
3269     <listitem>
3270      <para>
3271       Fix memory leak during rescan of a hashed aggregation plan (Neil)
3272      </para>
3273     </listitem>
3274
3275     <listitem>
3276      <para>
3277       Ensure an error is reported when a newly-defined PL/pgSQL trigger
3278       function is invoked as a normal function (Tom)
3279      </para>
3280     </listitem>
3281
3282     <listitem>
3283      <para>
3284       Force a checkpoint before <command>CREATE DATABASE</> starts to copy
3285       files (Heikki)
3286      </para>
3287
3288      <para>
3289       This prevents a possible failure if files had recently been deleted
3290       in the source database.
3291      </para>
3292     </listitem>
3293
3294     <listitem>
3295      <para>
3296       Prevent possible collision of <structfield>relfilenode</> numbers
3297       when moving a table to another tablespace with <command>ALTER SET
3298       TABLESPACE</> (Heikki)
3299      </para>
3300
3301      <para>
3302       The command tried to re-use the existing filename, instead of
3303       picking one that is known unused in the destination directory.
3304      </para>
3305     </listitem>
3306
3307     <listitem>
3308      <para>
3309       Fix incorrect text search headline generation when single query
3310       item matches first word of text (Sushant Sinha)
3311      </para>
3312     </listitem>
3313
3314     <listitem>
3315      <para>
3316       Fix improper display of fractional seconds in interval values when
3317       using a non-ISO datestyle in an <option>--enable-integer-datetimes</>
3318       build (Ron Mayer)
3319      </para>
3320     </listitem>
3321
3322     <listitem>
3323      <para>
3324       Make <literal>ILIKE</> compare characters case-insensitively
3325       even when they're escaped (Andrew)
3326      </para>
3327     </listitem>
3328
3329     <listitem>
3330      <para>
3331       Ensure <command>DISCARD</> is handled properly by statement logging (Tom)
3332      </para>
3333     </listitem>
3334
3335     <listitem>
3336      <para>
3337       Fix incorrect logging of last-completed-transaction time during
3338       PITR recovery (Tom)
3339      </para>
3340     </listitem>
3341
3342     <listitem>
3343      <para>
3344       Ensure <function>SPI_getvalue</> and <function>SPI_getbinval</>
3345       behave correctly when the passed tuple and tuple descriptor have
3346       different numbers of columns (Tom)
3347      </para>
3348
3349      <para>
3350       This situation is normal when a table has had columns added or removed,
3351       but these two functions didn't handle it properly.
3352       The only likely consequence is an incorrect error indication.
3353      </para>
3354     </listitem>
3355
3356     <listitem>
3357      <para>
3358       Mark <varname>SessionReplicationRole</> as <literal>PGDLLIMPORT</>
3359       so it can be used by <application>Slony</> on Windows (Magnus)
3360      </para>
3361     </listitem>
3362
3363     <listitem>
3364      <para>
3365       Fix small memory leak when using <application>libpq</>'s
3366       <literal>gsslib</> parameter (Magnus)
3367      </para>
3368
3369      <para>
3370       The space used by the parameter string was not freed at connection
3371       close.
3372      </para>
3373     </listitem>
3374
3375     <listitem>
3376      <para>
3377       Ensure <application>libgssapi</> is linked into <application>libpq</>
3378       if needed (Markus Schaaf)
3379      </para>
3380     </listitem>
3381
3382     <listitem>
3383      <para>
3384       Fix <application>ecpg</>'s parsing of <command>CREATE ROLE</> (Michael)
3385      </para>
3386     </listitem>
3387
3388     <listitem>
3389      <para>
3390       Fix recent breakage of <literal>pg_ctl restart</> (Tom)
3391      </para>
3392     </listitem>
3393
3394     <listitem>
3395      <para>
3396       Ensure <filename>pg_control</> is opened in binary mode
3397       (Itagaki Takahiro)
3398      </para>
3399
3400      <para>
3401       <application>pg_controldata</> and <application>pg_resetxlog</>
3402       did this incorrectly, and so could fail on Windows.
3403      </para>
3404     </listitem>
3405
3406     <listitem>
3407      <para>
3408       Update time zone data files to <application>tzdata</> release 2008i (for
3409       DST law changes in Argentina, Brazil, Mauritius, Syria)
3410      </para>
3411     </listitem>
3412
3413    </itemizedlist>
3414
3415   </sect2>
3416  </sect1>
3417
3418  <sect1 id="release-8-3-4">
3419   <title>Release 8.3.4</title>
3420
3421   <note>
3422   <title>Release date</title>
3423   <simpara>2008-09-22</simpara>
3424   </note>
3425
3426   <para>
3427    This release contains a variety of fixes from 8.3.3.
3428    For information about new features in the 8.3 major release, see
3429    <xref linkend="release-8-3">.
3430   </para>
3431
3432   <sect2>
3433    <title>Migration to Version 8.3.4</title>
3434
3435    <para>
3436     A dump/restore is not required for those running 8.3.X.
3437     However, if you are upgrading from a version earlier than 8.3.1,
3438     see the release notes for 8.3.1.
3439    </para>
3440
3441   </sect2>
3442
3443   <sect2>
3444    <title>Changes</title>
3445
3446    <itemizedlist>
3447
3448     <listitem>
3449      <para>
3450       Fix bug in btree WAL recovery code (Heikki)
3451      </para>
3452
3453      <para>
3454       Recovery failed if the WAL ended partway through a page split operation.
3455      </para>
3456     </listitem>
3457
3458     <listitem>
3459      <para>
3460       Fix potential use of wrong cutoff XID for HOT page pruning (Alvaro)
3461      </para>
3462
3463      <para>
3464       This error created a risk of corruption in system
3465       catalogs that are consulted by <command>VACUUM</>: dead tuple versions
3466       might be removed too soon.  The impact of this on actual database
3467       operations would be minimal, since the system doesn't follow MVCC
3468       rules while examining catalogs, but it might result in transiently
3469       wrong output from <application>pg_dump</> or other client programs.
3470      </para>
3471     </listitem>
3472
3473     <listitem>
3474      <para>
3475       Fix potential miscalculation of <structfield>datfrozenxid</> (Alvaro)
3476      </para>
3477
3478      <para>
3479       This error may explain some recent reports of failure to remove old
3480       <structname>pg_clog</> data.
3481      </para>
3482     </listitem>
3483
3484     <listitem>
3485      <para>
3486       Fix incorrect HOT updates after <structname>pg_class</> is reindexed
3487       (Tom)
3488      </para>
3489
3490      <para>
3491       Corruption of <structname>pg_class</> could occur if <literal>REINDEX
3492       TABLE pg_class</> was followed in the same session by an <literal>ALTER
3493       TABLE RENAME</> or <literal>ALTER TABLE SET SCHEMA</> command.
3494      </para>
3495     </listitem>
3496
3497     <listitem>
3498      <para>
3499       Fix missed <quote>combo cid</> case (Karl Schnaitter)
3500      </para>
3501
3502      <para>
3503       This error made rows incorrectly invisible to a transaction in which they
3504       had been deleted by multiple subtransactions that all aborted.
3505      </para>
3506     </listitem>
3507
3508     <listitem>
3509      <para>
3510       Prevent autovacuum from crashing if the table it's currently
3511       checking is deleted at just the wrong time (Alvaro)
3512      </para>
3513     </listitem>
3514
3515     <listitem>
3516      <para>
3517       Widen local lock counters from 32 to 64 bits (Tom)
3518      </para>
3519
3520      <para>
3521       This responds to reports that the counters could overflow in
3522       sufficiently long transactions, leading to unexpected <quote>lock is
3523       already held</> errors.
3524      </para>
3525     </listitem>
3526
3527     <listitem>
3528      <para>
3529       Fix possible duplicate output of tuples during a GiST index scan (Teodor)
3530      </para>
3531     </listitem>
3532
3533     <listitem>
3534      <para>
3535       Regenerate foreign key checking queries from scratch when either
3536       table is modified (Tom)
3537      </para>
3538
3539      <para>
3540       Previously, 8.3 would attempt to replan the query, but would work from
3541       previously generated query text.  This led to failures if a
3542       table or column was renamed.
3543      </para>
3544     </listitem>
3545
3546     <listitem>
3547      <para>
3548       Fix missed permissions checks when a view contains a simple
3549       <literal>UNION ALL</> construct (Heikki)
3550      </para>
3551
3552      <para>
3553       Permissions for the referenced tables were checked properly, but not
3554       permissions for the view itself.
3555      </para>
3556     </listitem>
3557
3558     <listitem>
3559      <para>
3560       Add checks in executor startup to ensure that the tuples produced by an
3561       <command>INSERT</> or <command>UPDATE</> will match the target table's
3562       current rowtype (Tom)
3563      </para>
3564
3565      <para>
3566       This situation is believed to be impossible in 8.3, but it can happen in
3567       prior releases, so a check seems prudent.
3568      </para>
3569     </listitem>
3570
3571     <listitem>
3572      <para>
3573       Fix possible repeated drops during <command>DROP OWNED</> (Tom)
3574      </para>
3575
3576      <para>
3577       This would typically result in strange errors such as <quote>cache
3578       lookup failed for relation NNN</>.
3579      </para>
3580     </listitem>
3581
3582     <listitem>
3583      <para>
3584       Fix several memory leaks in XML operations (Kris Jurka, Tom)
3585      </para>
3586     </listitem>
3587
3588     <listitem>
3589      <para>
3590       Fix <function>xmlserialize()</> to raise error properly for
3591       unacceptable target data type (Tom)
3592      </para>
3593     </listitem>
3594
3595     <listitem>
3596      <para>
3597       Fix a couple of places that mis-handled multibyte characters in text
3598       search configuration file parsing (Tom)
3599      </para>
3600
3601      <para>
3602       Certain characters occurring in configuration files would always cause
3603       <quote>invalid byte sequence for encoding</> failures.
3604      </para>
3605     </listitem>
3606
3607     <listitem>
3608      <para>
3609       Provide file name and line number location for all errors reported
3610       in text search configuration files (Tom)
3611      </para>
3612     </listitem>
3613
3614     <listitem>
3615      <para>
3616       Fix <literal>AT TIME ZONE</> to first try to interpret its timezone
3617       argument as a timezone abbreviation, and only try it as a full timezone
3618       name if that fails, rather than the other way around as formerly (Tom)
3619      </para>
3620
3621      <para>
3622       The timestamp input functions have always resolved ambiguous zone names
3623       in this order.  Making <literal>AT TIME ZONE</> do so as well improves
3624       consistency, and fixes a compatibility bug introduced in 8.1:
3625       in ambiguous cases we now behave the same as 8.0 and before did,
3626       since in the older versions <literal>AT TIME ZONE</> accepted
3627       <emphasis>only</> abbreviations.
3628      </para>
3629     </listitem>
3630
3631     <listitem>
3632      <para>
3633       Fix datetime input functions to correctly detect integer overflow when
3634       running on a 64-bit platform (Tom)
3635      </para>
3636     </listitem>
3637
3638     <listitem>
3639      <para>
3640       Prevent integer overflows during units conversion when displaying a
3641       configuration parameter that has units (Tom)
3642      </para>
3643     </listitem>
3644
3645     <listitem>
3646      <para>
3647       Improve performance of writing very long log messages to syslog (Tom)
3648      </para>
3649     </listitem>
3650
3651     <listitem>
3652      <para>
3653       Allow spaces in the suffix part of an LDAP URL in
3654       <filename>pg_hba.conf</> (Tom)
3655      </para>
3656     </listitem>
3657
3658     <listitem>
3659      <para>
3660       Fix bug in backwards scanning of a cursor on a <literal>SELECT DISTINCT
3661       ON</> query (Tom)
3662      </para>
3663     </listitem>
3664
3665     <listitem>
3666      <para>
3667       Fix planner bug that could improperly push down <literal>IS NULL</>
3668       tests below an outer join (Tom)
3669      </para>
3670
3671      <para>
3672       This was triggered by occurrence of <literal>IS NULL</> tests for
3673       the same relation in all arms of an upper <literal>OR</> clause.
3674      </para>
3675     </listitem>
3676
3677     <listitem>
3678      <para>
3679       Fix planner bug with nested sub-select expressions (Tom)
3680      </para>
3681
3682      <para>
3683       If the outer sub-select has no direct dependency on the parent query,
3684       but the inner one does, the outer value might not get recalculated
3685       for new parent query rows.
3686      </para>
3687     </listitem>
3688
3689     <listitem>
3690      <para>
3691       Fix planner to estimate that <literal>GROUP BY</> expressions yielding
3692       boolean results always result in two groups, regardless of the
3693       expressions' contents (Tom)
3694      </para>
3695
3696      <para>
3697       This is very substantially more accurate than the regular <literal>GROUP
3698       BY</> estimate for certain boolean tests like <replaceable>col</>
3699       <literal>IS NULL</>.
3700      </para>
3701     </listitem>
3702
3703     <listitem>
3704      <para>
3705       Fix PL/PgSQL to not fail when a <literal>FOR</> loop's target variable
3706       is a record containing composite-type fields (Tom)
3707      </para>
3708     </listitem>
3709
3710     <listitem>
3711      <para>
3712       Fix PL/Tcl to behave correctly with Tcl 8.5, and to be more careful
3713       about the encoding of data sent to or from Tcl (Tom)
3714      </para>
3715     </listitem>
3716
3717     <listitem>
3718      <para>
3719       Improve performance of <function>PQescapeBytea()</> (Rudolf Leitgeb)
3720      </para>
3721     </listitem>
3722
3723     <listitem>
3724      <para>
3725       On Windows, work around a Microsoft bug by preventing
3726       <application>libpq</> from trying to send more than 64kB per system call
3727       (Magnus)
3728      </para>
3729     </listitem>
3730
3731     <listitem>
3732      <para>
3733       Fix <application>ecpg</> to handle variables properly in <command>SET</>
3734       commands (Michael)
3735      </para>
3736     </listitem>
3737
3738     <listitem>
3739      <para>
3740       Improve <application>pg_dump</> and <application>pg_restore</>'s
3741       error reporting after failure to send a SQL command (Tom)
3742      </para>
3743     </listitem>
3744
3745     <listitem>
3746      <para>
3747       Fix <application>pg_ctl</> to properly preserve postmaster
3748       command-line arguments across a <literal>restart</> (Bruce)
3749      </para>
3750     </listitem>
3751
3752     <listitem>
3753      <para>
3754       Fix erroneous WAL file cutoff point calculation in
3755       <application>pg_standby</> (Simon)
3756      </para>
3757     </listitem>
3758
3759     <listitem>
3760      <para>
3761       Update time zone data files to <application>tzdata</> release 2008f (for
3762       DST law changes in Argentina, Bahamas, Brazil, Mauritius, Morocco,
3763       Pakistan, Palestine, and Paraguay)
3764      </para>
3765     </listitem>
3766
3767    </itemizedlist>
3768
3769   </sect2>
3770  </sect1>
3771
3772  <sect1 id="release-8-3-3">
3773   <title>Release 8.3.3</title>
3774
3775   <note>
3776   <title>Release date</title>
3777   <simpara>2008-06-12</simpara>
3778   </note>
3779
3780   <para>
3781    This release contains one serious and one minor bug fix over 8.3.2.
3782    For information about new features in the 8.3 major release, see
3783    <xref linkend="release-8-3">.
3784   </para>
3785
3786   <sect2>
3787    <title>Migration to Version 8.3.3</title>
3788
3789    <para>
3790     A dump/restore is not required for those running 8.3.X.
3791     However, if you are upgrading from a version earlier than 8.3.1,
3792     see the release notes for 8.3.1.
3793    </para>
3794
3795   </sect2>
3796
3797   <sect2>
3798    <title>Changes</title>
3799
3800    <itemizedlist>
3801
3802     <listitem>
3803      <para>
3804       Make <function>pg_get_ruledef()</> parenthesize negative constants (Tom)
3805      </para>
3806
3807      <para>
3808       Before this fix, a negative constant in a view or rule might be dumped
3809       as, say, <literal>-42::integer</>, which is subtly incorrect: it should
3810       be <literal>(-42)::integer</> due to operator precedence rules.
3811       Usually this would make little difference, but it could interact with
3812       another recent patch to cause
3813       <productname>PostgreSQL</> to reject what had been a valid
3814       <command>SELECT DISTINCT</> view query.  Since this could result in
3815       <application>pg_dump</> output failing to reload, it is being treated
3816       as a high-priority fix.  The only released versions in which dump
3817       output is actually incorrect are 8.3.1 and 8.2.7.
3818      </para>
3819     </listitem>
3820
3821     <listitem>
3822      <para>
3823       Make <command>ALTER AGGREGATE ... OWNER TO</> update
3824       <structname>pg_shdepend</> (Tom)
3825      </para>
3826
3827      <para>
3828       This oversight could lead to problems if the aggregate was later
3829       involved in a <command>DROP OWNED</> or <command>REASSIGN OWNED</>
3830       operation.
3831      </para>
3832     </listitem>
3833
3834    </itemizedlist>
3835
3836   </sect2>
3837  </sect1>
3838
3839  <sect1 id="release-8-3-2">
3840   <title>Release 8.3.2</title>
3841
3842   <note>
3843   <title>Release date</title>
3844   <simpara>never released</simpara>
3845   </note>
3846
3847   <para>
3848    This release contains a variety of fixes from 8.3.1.
3849    For information about new features in the 8.3 major release, see
3850    <xref linkend="release-8-3">.
3851   </para>
3852
3853   <sect2>
3854    <title>Migration to Version 8.3.2</title>
3855
3856    <para>
3857     A dump/restore is not required for those running 8.3.X.
3858     However, if you are upgrading from a version earlier than 8.3.1,
3859     see the release notes for 8.3.1.
3860    </para>
3861
3862   </sect2>
3863
3864   <sect2>
3865    <title>Changes</title>
3866
3867    <itemizedlist>
3868
3869     <listitem>
3870      <para>
3871       Fix <literal>ERRORDATA_STACK_SIZE exceeded</literal> crash that
3872       occurred on Windows when using UTF-8 database encoding and a different
3873       client encoding (Tom)
3874      </para>
3875     </listitem>
3876
3877     <listitem>
3878      <para>
3879       Fix incorrect archive truncation point calculation for the
3880       <literal>%r</> macro in <varname>recovery_command</> parameters
3881       (Simon)
3882      </para>
3883
3884      <para>
3885       This could lead to data loss if a warm-standby script relied on
3886       <literal>%r</> to decide when to throw away WAL segment files.
3887      </para>
3888     </listitem>
3889
3890     <listitem>
3891      <para>
3892       Fix <command>ALTER TABLE ADD COLUMN ... PRIMARY KEY</> so that the new
3893       column is correctly checked to see if it's been initialized to all
3894       non-nulls (Brendan Jurd)
3895      </para>
3896
3897      <para>
3898       Previous versions neglected to check this requirement at all.
3899      </para>
3900     </listitem>
3901
3902     <listitem>
3903      <para>
3904       Fix <command>REASSIGN OWNED</> so that it works on procedural
3905       languages too (Alvaro)
3906      </para>
3907     </listitem>
3908
3909     <listitem>
3910      <para>
3911       Fix problems with <command>SELECT FOR UPDATE/SHARE</> occurring as a
3912       subquery in a query with a non-<command>SELECT</> top-level operation
3913       (Tom)
3914      </para>
3915     </listitem>
3916
3917     <listitem>
3918      <para>
3919       Fix possible <command>CREATE TABLE</> failure when inheriting the
3920       <quote>same</> constraint from multiple parent relations that
3921       inherited that constraint from a common ancestor (Tom)
3922      </para>
3923     </listitem>
3924
3925     <listitem>
3926      <para>
3927       Fix <function>pg_get_ruledef()</> to show the alias, if any, attached
3928       to the target table of an <command>UPDATE</> or <command>DELETE</>
3929       (Tom)
3930      </para>
3931     </listitem>
3932
3933     <listitem>
3934      <para>
3935       Restore the pre-8.3 behavior that an out-of-range block number in a
3936       TID being used in a TidScan plan results in silently not matching any
3937       rows (Tom)
3938      </para>
3939
3940      <para>
3941       8.3.0 and 8.3.1 threw an error instead.
3942      </para>
3943     </listitem>
3944
3945     <listitem>
3946      <para>
3947       Fix GIN bug that could result in a <literal>too many LWLocks
3948       taken</literal> failure (Teodor)
3949      </para>
3950     </listitem>
3951
3952     <listitem>
3953      <para>
3954       Fix broken GiST comparison function for <type>tsquery</> (Teodor)
3955      </para>
3956     </listitem>
3957
3958     <listitem>
3959      <para>
3960       Fix <function>tsvector_update_trigger()</> and <function>ts_stat()</>
3961       to accept domains over the types they expect to work with (Tom)
3962      </para>
3963     </listitem>
3964
3965     <listitem>
3966      <para>
3967       Fix failure to support enum data types as foreign keys (Tom)
3968      </para>
3969     </listitem>
3970
3971     <listitem>
3972      <para>
3973       Avoid possible crash when decompressing corrupted data
3974       (Zdenek Kotala)
3975      </para>
3976     </listitem>
3977
3978     <listitem>
3979      <para>
3980       Fix race conditions between delayed unlinks and <command>DROP
3981       DATABASE</> (Heikki)
3982      </para>
3983
3984      <para>
3985       In the worst case this could result in deleting a newly created table
3986       in a new database that happened to get the same OID as the
3987       recently-dropped one; but of course that is an extremely
3988       low-probability scenario.
3989      </para>
3990     </listitem>
3991
3992     <listitem>
3993      <para>
3994       Repair two places where SIGTERM exit of a backend could leave corrupted
3995       state in shared memory (Tom)
3996      </para>
3997
3998      <para>
3999       Neither case is very important if SIGTERM is used to shut down the
4000       whole database cluster together, but there was a problem if someone
4001       tried to SIGTERM individual backends.
4002      </para>
4003     </listitem>
4004
4005     <listitem>
4006      <para>
4007       Fix possible crash due to incorrect plan generated for an
4008       <literal><replaceable>x</> IN (SELECT <replaceable>y</>
4009       FROM ...)</literal> clause when <replaceable>x</> and <replaceable>y</>
4010       have different data types; and make sure the behavior is semantically
4011       correct when the conversion from <replaceable>y</>'s type to
4012       <replaceable>x</>'s type is lossy (Tom)
4013      </para>
4014     </listitem>
4015
4016     <listitem>
4017      <para>
4018       Fix oversight that prevented the planner from substituting known Param
4019       values as if they were constants (Tom)
4020      </para>
4021
4022      <para>
4023       This mistake partially disabled optimization of unnamed
4024       extended-Query statements in 8.3.0 and 8.3.1: in particular the
4025       LIKE-to-indexscan optimization would never be applied if the LIKE
4026       pattern was passed as a parameter, and constraint exclusion
4027       depending on a parameter value didn't work either.
4028      </para>
4029     </listitem>
4030
4031     <listitem>
4032      <para>
4033       Fix planner failure when an indexable <function>MIN</> or
4034       <function>MAX</> aggregate is used with <literal>DISTINCT</> or
4035       <literal>ORDER BY</> (Tom)
4036      </para>
4037     </listitem>
4038
4039     <listitem>
4040      <para>
4041       Fix planner to ensure it never uses a <quote>physical tlist</> for a
4042       plan node that is feeding a Sort node (Tom)
4043      </para>
4044
4045      <para>
4046       This led to the sort having to push around more data than it really
4047       needed to, since unused column values were included in the sorted
4048       data.
4049      </para>
4050     </listitem>
4051
4052     <listitem>
4053      <para>
4054       Avoid unnecessary copying of query strings (Tom)
4055      </para>
4056
4057      <para>
4058       This fixes a performance problem introduced in 8.3.0 when a very large
4059       number of commands are submitted as a single query string.
4060      </para>
4061     </listitem>
4062
4063     <listitem>
4064      <para>
4065       Make <function>TransactionIdIsCurrentTransactionId()</> use binary
4066       search instead of linear search when checking child-transaction XIDs
4067       (Heikki)
4068      </para>
4069
4070      <para>
4071       This fixes some cases in which 8.3.0 was significantly
4072       slower than earlier releases.
4073      </para>
4074     </listitem>
4075
4076     <listitem>
4077      <para>
4078       Fix conversions between ISO-8859-5 and other encodings to handle
4079       Cyrillic <quote>Yo</> characters (<literal>e</> and <literal>E</> with
4080       two dots) (Sergey Burladyan)
4081      </para>
4082     </listitem>
4083
4084     <listitem>
4085      <para>
4086       Fix several datatype input functions, notably <function>array_in()</>,
4087       that were allowing unused bytes in their results to contain
4088       uninitialized, unpredictable values (Tom)
4089      </para>
4090
4091      <para>
4092       This could lead to failures in which two apparently identical literal
4093       values were not seen as equal, resulting in the parser complaining
4094       about unmatched <literal>ORDER BY</> and <literal>DISTINCT</>
4095       expressions.
4096      </para>
4097     </listitem>
4098
4099     <listitem>
4100      <para>
4101       Fix a corner case in regular-expression substring matching
4102       (<literal>substring(<replaceable>string</> from
4103       <replaceable>pattern</>)</literal>) (Tom)
4104      </para>
4105
4106      <para>
4107       The problem occurs when there is a match to the pattern overall but
4108       the user has specified a parenthesized subexpression and that
4109       subexpression hasn't got a match.  An example is
4110       <literal>substring('foo' from 'foo(bar)?')</>.
4111       This should return NULL, since <literal>(bar)</> isn't matched, but
4112       it was mistakenly returning the whole-pattern match instead (ie,
4113       <literal>foo</>).
4114      </para>
4115     </listitem>
4116
4117     <listitem>
4118      <para>
4119       Prevent cancellation of an auto-vacuum that was launched to prevent
4120       XID wraparound (Alvaro)
4121      </para>
4122     </listitem>
4123
4124     <listitem>
4125      <para>
4126       Improve <command>ANALYZE</>'s handling of in-doubt tuples (those
4127       inserted or deleted by a not-yet-committed transaction) so that the
4128       counts it reports to the stats collector are more likely to be correct
4129       (Pavan Deolasee)
4130      </para>
4131     </listitem>
4132
4133     <listitem>
4134      <para>
4135       Fix <application>initdb</> to reject a relative path for its
4136       <literal>--xlogdir</> (<literal>-X</>) option (Tom)
4137      </para>
4138     </listitem>
4139
4140     <listitem>
4141      <para>
4142       Make <application>psql</> print tab characters as an appropriate
4143       number of spaces, rather than <literal>\x09</literal> as was done in
4144       8.3.0 and 8.3.1 (Bruce)
4145      </para>
4146     </listitem>
4147
4148     <listitem>
4149      <para>
4150       Update time zone data files to <application>tzdata</> release 2008c (for
4151       DST law changes in Morocco, Iraq, Choibalsan, Pakistan, Syria, Cuba, and
4152       Argentina/San_Luis)
4153      </para>
4154     </listitem>
4155
4156     <listitem>
4157      <para>
4158       Add <function>ECPGget_PGconn()</> function to
4159       <application>ecpglib</> (Michael)
4160      </para>
4161     </listitem>
4162
4163     <listitem>
4164      <para>
4165       Fix incorrect result from <application>ecpg</>'s
4166       <function>PGTYPEStimestamp_sub()</> function (Michael)
4167      </para>
4168     </listitem>
4169
4170     <listitem>
4171      <para>
4172       Fix handling of continuation line markers in <application>ecpg</>
4173       (Michael)
4174      </para>
4175     </listitem>
4176
4177     <listitem>
4178      <para>
4179       Fix possible crashes in <filename>contrib/cube</> functions (Tom)
4180      </para>
4181     </listitem>
4182
4183     <listitem>
4184      <para>
4185       Fix core dump in <filename>contrib/xml2</>'s
4186       <function>xpath_table()</> function when the input query returns a
4187       NULL value (Tom)
4188      </para>
4189     </listitem>
4190
4191     <listitem>
4192      <para>
4193       Fix <filename>contrib/xml2</>'s makefile to not override
4194       <literal>CFLAGS</>, and make it auto-configure properly for
4195       <application>libxslt</> present or not (Tom)
4196      </para>
4197     </listitem>
4198
4199    </itemizedlist>
4200
4201   </sect2>
4202  </sect1>
4203
4204  <sect1 id="release-8-3-1">
4205   <title>Release 8.3.1</title>
4206
4207   <note>
4208   <title>Release date</title>
4209   <simpara>2008-03-17</simpara>
4210   </note>
4211
4212   <para>
4213    This release contains a variety of fixes from 8.3.0.
4214    For information about new features in the 8.3 major release, see
4215    <xref linkend="release-8-3">.
4216   </para>
4217
4218   <sect2>
4219    <title>Migration to Version 8.3.1</title>
4220
4221    <para>
4222     A dump/restore is not required for those running 8.3.X.
4223     However, you might need to <command>REINDEX</> indexes on textual
4224     columns after updating, if you are affected by the Windows locale
4225     issue described below.
4226    </para>
4227
4228   </sect2>
4229
4230   <sect2>
4231    <title>Changes</title>
4232
4233    <itemizedlist>
4234
4235     <listitem>
4236      <para>
4237       Fix character string comparison for Windows locales that consider
4238       different character combinations as equal (Tom)
4239      </para>
4240
4241      <para>
4242       This fix applies only on Windows and only when using UTF-8
4243       database encoding.  The same fix was made for all other cases
4244       over two years ago, but Windows with UTF-8 uses a separate code
4245       path that was not updated.  If you are using a locale that
4246       considers some non-identical strings as equal, you may need to
4247       <command>REINDEX</> to fix existing indexes on textual columns.
4248      </para>
4249     </listitem>
4250
4251     <listitem>
4252      <para>
4253       Repair corner-case bugs in <command>VACUUM FULL</> (Tom)
4254      </para>
4255
4256      <para>
4257       A potential deadlock between concurrent <command>VACUUM FULL</>
4258       operations on different system catalogs was introduced in 8.2.
4259       This has now been corrected.  8.3 made this worse because the
4260       deadlock could occur within a critical code section, making it
4261       a PANIC rather than just ERROR condition.
4262      </para>
4263
4264      <para>
4265       Also, a <command>VACUUM FULL</> that failed partway through
4266       vacuuming a system catalog could result in cache corruption in
4267       concurrent database sessions.
4268      </para>
4269
4270      <para>
4271       Another <command>VACUUM FULL</> bug introduced in 8.3 could
4272       result in a crash or out-of-memory report when dealing with
4273       pages containing no live tuples.
4274      </para>
4275     </listitem>
4276
4277     <listitem>
4278      <para>
4279       Fix misbehavior of foreign key checks involving <type>character</>
4280       or <type>bit</> columns (Tom)
4281      </para>
4282
4283      <para>
4284       If the referencing column were of a different but compatible type
4285       (for instance <type>varchar</>), the constraint was enforced incorrectly.
4286      </para>
4287     </listitem>
4288
4289     <listitem>
4290      <para>
4291       Avoid needless deadlock failures in no-op foreign-key checks (Stephan
4292       Szabo, Tom)
4293      </para>
4294     </listitem>
4295
4296     <listitem>
4297      <para>
4298       Fix possible core dump when re-planning a prepared query (Tom)
4299      </para>
4300
4301      <para>
4302       This bug affected only protocol-level prepare operations, not
4303       SQL <command>PREPARE</>, and so tended to be seen only with
4304       JDBC, DBI, and other client-side drivers that use prepared
4305       statements heavily.
4306      </para>
4307     </listitem>
4308
4309     <listitem>
4310      <para>
4311       Fix possible failure when re-planning a query that calls an SPI-using
4312       function (Tom)
4313      </para>
4314     </listitem>
4315
4316     <listitem>
4317      <para>
4318       Fix failure in row-wise comparisons involving columns of different
4319       datatypes (Tom)
4320      </para>
4321     </listitem>
4322
4323     <listitem>
4324      <para>
4325       Fix longstanding <command>LISTEN</>/<command>NOTIFY</>
4326       race condition (Tom)
4327      </para>
4328
4329      <para>
4330       In rare cases a session that had just executed a
4331       <command>LISTEN</> might not get a notification, even though
4332       one would be expected because the concurrent transaction executing
4333       <command>NOTIFY</> was observed to commit later.
4334      </para>
4335
4336      <para>
4337       A side effect of the fix is that a transaction that has executed
4338       a not-yet-committed <command>LISTEN</> command will not see any
4339       row in <structname>pg_listener</> for the <command>LISTEN</>,
4340       should it choose to look; formerly it would have.  This behavior
4341       was never documented one way or the other, but it is possible that
4342       some applications depend on the old behavior.
4343      </para>
4344     </listitem>
4345
4346     <listitem>
4347      <para>
4348       Disallow <command>LISTEN</> and <command>UNLISTEN</> within a
4349       prepared transaction (Tom)
4350      </para>
4351
4352      <para>
4353       This was formerly allowed but trying to do it had various unpleasant
4354       consequences, notably that the originating backend could not exit
4355       as long as an <command>UNLISTEN</> remained uncommitted.
4356      </para>
4357     </listitem>
4358
4359     <listitem>
4360      <para>
4361       Disallow dropping a temporary table within a
4362       prepared transaction (Heikki)
4363      </para>
4364
4365      <para>
4366       This was correctly disallowed by 8.1, but the check was inadvertently
4367       broken in 8.2 and 8.3.
4368      </para>
4369     </listitem>
4370
4371     <listitem>
4372      <para>
4373       Fix rare crash when an error occurs during a query using a hash index
4374       (Heikki)
4375      </para>
4376     </listitem>
4377
4378     <listitem>
4379      <para>
4380       Fix incorrect comparison of <type>tsquery</> values (Teodor)
4381      </para>
4382     </listitem>
4383
4384     <listitem>
4385      <para>
4386       Fix incorrect behavior of <literal>LIKE</> with non-ASCII characters
4387       in single-byte encodings (Rolf Jentsch)
4388      </para>
4389     </listitem>
4390
4391     <listitem>
4392      <para>
4393       Disable <function>xmlvalidate</> (Tom)
4394      </para>
4395
4396      <para>
4397       This function should have been removed before 8.3 release, but
4398       was inadvertently left in the source code.  It poses a small
4399       security risk since unprivileged users could use it to read the
4400       first few characters of any file accessible to the server.
4401      </para>
4402     </listitem>
4403
4404     <listitem>
4405      <para>
4406       Fix memory leaks in certain usages of set-returning functions (Neil)
4407      </para>
4408     </listitem>
4409
4410     <listitem>
4411      <para>
4412       Make <function>encode(<replaceable>bytea</>, 'escape')</> convert all
4413       high-bit-set byte values into <literal>\</><replaceable>nnn</> octal
4414       escape sequences (Tom)
4415      </para>
4416
4417      <para>
4418       This is necessary to avoid encoding problems when the database
4419       encoding is multi-byte.  This change could pose compatibility issues
4420       for applications that are expecting specific results from
4421       <function>encode</>.
4422      </para>
4423     </listitem>
4424
4425     <listitem>
4426      <para>
4427       Fix input of datetime values for February 29 in years BC (Tom)
4428      </para>
4429
4430      <para>
4431       The former coding was mistaken about which years were leap years.
4432      </para>
4433     </listitem>
4434
4435     <listitem>
4436      <para>
4437       Fix <quote>unrecognized node type</> error in some variants of
4438       <command>ALTER OWNER</> (Tom)
4439      </para>
4440     </listitem>
4441
4442     <listitem>
4443      <para>
4444       Avoid tablespace permissions errors in <command>CREATE TABLE LIKE
4445       INCLUDING INDEXES</> (Tom)
4446      </para>
4447     </listitem>
4448
4449     <listitem>
4450      <para>
4451       Ensure <structname>pg_stat_activity</>.<structfield>waiting</> flag
4452       is cleared when a lock wait is aborted (Tom)
4453      </para>
4454     </listitem>
4455
4456     <listitem>
4457      <para>
4458       Fix handling of process permissions on Windows Vista (Dave, Magnus)
4459      </para>
4460
4461      <para>
4462       In particular, this fix allows starting the server as the Administrator
4463       user.
4464      </para>
4465     </listitem>
4466
4467     <listitem>
4468      <para>
4469       Update time zone data files to <application>tzdata</> release 2008a
4470       (in particular, recent Chile changes); adjust timezone abbreviation
4471       <literal>VET</> (Venezuela) to mean UTC-4:30, not UTC-4:00 (Tom)
4472      </para>
4473     </listitem>
4474
4475     <listitem>
4476      <para>
4477       Fix <application>ecpg</> problems with arrays (Michael)
4478      </para>
4479     </listitem>
4480
4481     <listitem>
4482      <para>
4483       Fix <application>pg_ctl</> to correctly extract the postmaster's port
4484       number from command-line options (Itagaki Takahiro, Tom)
4485      </para>
4486
4487      <para>
4488       Previously, <literal>pg_ctl start -w</> could try to contact the
4489       postmaster on the wrong port, leading to bogus reports of startup
4490       failure.
4491      </para>
4492     </listitem>
4493
4494     <listitem>
4495      <para>
4496       Use <option>-fwrapv</> to defend against possible misoptimization
4497       in recent <application>gcc</> versions (Tom)
4498      </para>
4499
4500      <para>
4501       This is known to be necessary when building <productname>PostgreSQL</>
4502       with <application>gcc</> 4.3 or later.
4503      </para>
4504     </listitem>
4505
4506     <listitem>
4507      <para>
4508       Enable building <filename>contrib/uuid-ossp</> with MSVC (Hiroshi Saito)
4509      </para>
4510     </listitem>
4511
4512    </itemizedlist>
4513
4514   </sect2>
4515  </sect1>
4516
4517  <sect1 id="release-8-3">
4518   <title>Release 8.3</title>
4519
4520   <note>
4521    <title>Release date</title>
4522    <simpara>2008-02-04</simpara>
4523   </note>
4524
4525   <sect2>
4526    <title>Overview</title>
4527
4528    <para>
4529     With significant new functionality and performance enhancements,
4530     this release represents a major leap forward for
4531     <productname>PostgreSQL</>. This was made possible by a growing
4532     community that has dramatically accelerated the pace of
4533     development. This release adds the following major features:
4534    </para>
4535
4536    <itemizedlist>
4537
4538     <listitem>
4539      <para>
4540       Full text search is integrated into the core database system
4541      </para>
4542     </listitem>
4543
4544     <listitem>
4545      <para>
4546       Support for the SQL/XML standard, including new operators and an
4547       <type>XML</type> data type
4548      </para>
4549     </listitem>
4550
4551     <listitem>
4552      <para>
4553       Enumerated data types (<type>ENUM</type>)
4554      </para>
4555     </listitem>
4556
4557     <listitem>
4558      <para>
4559       Arrays of composite types
4560      </para>
4561     </listitem>
4562
4563     <listitem>
4564      <para>
4565       Universally Unique Identifier (<type>UUID</>) data type
4566      </para>
4567     </listitem>
4568
4569     <listitem>
4570      <para>
4571       Add control over whether <literal>NULL</>s sort first or last
4572      </para>
4573     </listitem>
4574
4575     <listitem>
4576      <para>
4577       Updatable cursors
4578      </para>
4579     </listitem>
4580
4581     <listitem>
4582      <para>
4583       Server configuration parameters can now be set on a per-function
4584       basis
4585      </para>
4586     </listitem>
4587
4588     <listitem>
4589      <para>
4590       User-defined types can now have type modifiers
4591      </para>
4592     </listitem>
4593
4594     <listitem>
4595      <para>
4596       Automatically re-plan cached queries when table
4597       definitions change or statistics are updated
4598      </para>
4599     </listitem>
4600
4601     <listitem>
4602      <para>
4603       Numerous improvements in logging and statistics collection
4604      </para>
4605     </listitem>
4606
4607     <listitem>
4608      <para>
4609       Support Security Service Provider Interface (<acronym>SSPI</>) for
4610       authentication on Windows
4611      </para>
4612     </listitem>
4613
4614     <listitem>
4615      <para>
4616       Support multiple concurrent autovacuum processes, and other
4617       autovacuum improvements
4618      </para>
4619     </listitem>
4620
4621     <listitem>
4622      <para>
4623       Allow the whole <productname>PostgreSQL</> distribution to be compiled
4624       with <productname>Microsoft Visual C++</>
4625      </para>
4626     </listitem>
4627
4628    </itemizedlist>
4629
4630    <para>
4631     Major performance improvements are listed below.  Most of
4632     these enhancements are automatic and do not require user changes or
4633     tuning:
4634    </para>
4635
4636   <itemizedlist>
4637
4638     <listitem>
4639      <para>
4640       Asynchronous commit delays writes to WAL during transaction commit
4641      </para>
4642     </listitem>
4643
4644     <listitem>
4645      <para>
4646       Checkpoint writes can be spread over a longer time period to smooth
4647       the I/O spike during each checkpoint
4648      </para>
4649     </listitem>
4650
4651     <listitem>
4652      <para>
4653       Heap-Only Tuples (<acronym>HOT</>) accelerate space reuse for
4654       most <command>UPDATE</>s and <command>DELETE</>s
4655      </para>
4656     </listitem>
4657
4658     <listitem>
4659      <para>
4660       Just-in-time background writer strategy improves disk write
4661       efficiency
4662      </para>
4663     </listitem>
4664
4665     <listitem>
4666      <para>
4667       Using non-persistent transaction IDs for read-only transactions
4668       reduces overhead and <command>VACUUM</> requirements
4669      </para>
4670     </listitem>
4671
4672     <listitem>
4673      <para>
4674       Per-field and per-row storage overhead has been reduced
4675      </para>
4676     </listitem>
4677
4678     <listitem>
4679      <para>
4680       Large sequential scans no longer force out frequently used
4681       cached pages
4682      </para>
4683     </listitem>
4684
4685     <listitem>
4686      <para>
4687       Concurrent large sequential scans can now share disk reads
4688      </para>
4689     </listitem>
4690
4691     <listitem>
4692      <para>
4693       <literal>ORDER BY ... LIMIT</> can be done without sorting
4694      </para>
4695     </listitem>
4696
4697    </itemizedlist>
4698
4699    <para>
4700     The above items are explained in more detail in the sections below.
4701    </para>
4702
4703   </sect2>
4704
4705   <sect2>
4706    <title>Migration to Version 8.3</title>
4707
4708    <para>
4709     A dump/restore using <application>pg_dump</application> is
4710     required for those wishing to migrate data from any previous
4711     release.
4712    </para>
4713
4714    <para>
4715     Observe the following incompatibilities:
4716    </para>
4717
4718    <sect3>
4719     <title>General</title>
4720     <itemizedlist>
4721
4722      <listitem>
4723       <para>
4724        Non-character data types are no longer automatically cast to
4725        <type>TEXT</> (Peter, Tom)
4726       </para>
4727
4728       <para>
4729        Previously, if a non-character value was supplied to an operator or
4730        function that requires <type>text</> input, it was automatically
4731        cast to <type>text</>, for most (though not all) built-in data types.
4732        This no longer happens: an explicit cast to <type>text</> is now
4733        required for all non-character-string types.  For example, these
4734        expressions formerly worked:
4735
4736 <programlisting>
4737 substr(current_date, 1, 4)
4738 23 LIKE '2%'
4739 </programlisting>
4740
4741        but will now draw <quote>function does not exist</> and <quote>operator
4742        does not exist</> errors respectively.  Use an explicit cast instead:
4743
4744 <programlisting>
4745 substr(current_date::text, 1, 4)
4746 23::text LIKE '2%'
4747 </programlisting>
4748
4749        (Of course, you can use the more verbose <literal>CAST()</> syntax too.)
4750        The reason for the change is that these automatic casts too often caused
4751        surprising behavior.  An example is that in previous releases, this
4752        expression was accepted but did not do what was expected:
4753
4754 <programlisting>
4755 current_date &lt; 2017-11-17
4756 </programlisting>
4757
4758        This is actually comparing a date to an integer, which should be
4759        (and now is) rejected &mdash; but in the presence of automatic
4760        casts both sides were cast to <type>text</> and a textual comparison
4761        was done, because the <literal>text &lt; text</> operator was able
4762        to match the expression when no other <literal>&lt;</> operator could.
4763       </para>
4764
4765       <para>
4766        Types <type>char(<replaceable>n</>)</type> and
4767        <type>varchar(<replaceable>n</>)</type> still cast to <type>text</>
4768        automatically.  Also, automatic casting to <type>text</> still works for
4769        inputs to the concatenation (<literal>||</>) operator, so long as least
4770        one input is a character-string type.
4771       </para>
4772      </listitem>
4773
4774      <listitem>
4775       <para>
4776         Full text search features from <filename>contrib/tsearch2</> have
4777         been moved into the core server, with some minor syntax changes
4778       </para>
4779
4780       <para>
4781        <filename>contrib/tsearch2</> now contains a compatibility
4782        interface.
4783       </para>
4784      </listitem>
4785
4786      <listitem>
4787       <para>
4788        <literal>ARRAY(SELECT ...)</literal>, where the <command>SELECT</>
4789        returns no rows, now returns an empty array, rather than NULL
4790        (Tom)
4791       </para>
4792      </listitem>
4793
4794      <listitem>
4795       <para>
4796        The array type name for a base data type is no longer always the base
4797        type's name with an underscore prefix
4798       </para>
4799
4800       <para>
4801        The old naming convention is still honored when possible, but
4802        application code should no longer depend on it. Instead
4803        use the new <literal>pg_type.typarray</literal> column to
4804        identify the array data type associated with a given type.
4805       </para>
4806      </listitem>
4807
4808      <listitem>
4809       <para>
4810        <literal>ORDER BY ... USING</> <replaceable>operator</> must now
4811        use a less-than or greater-than <replaceable>operator</> that is
4812        defined in a btree operator class
4813       </para>
4814
4815       <para>
4816        This restriction was added to prevent inconsistent results.
4817       </para>
4818      </listitem>
4819
4820      <listitem>
4821       <para>
4822        <command>SET LOCAL</command> changes now persist until
4823        the end of the outermost transaction, unless rolled back (Tom)
4824       </para>
4825
4826       <para>
4827        Previously <command>SET LOCAL</command>'s effects were lost
4828        after subtransaction commit (<command>RELEASE SAVEPOINT</>
4829        or exit from a PL/pgSQL exception block).
4830       </para>
4831      </listitem>
4832
4833      <listitem>
4834       <para>
4835        Commands rejected in transaction blocks are now also rejected in
4836        multiple-statement query strings (Tom)
4837       </para>
4838
4839       <para>
4840        For example, <literal>"BEGIN; DROP DATABASE; COMMIT"</> will now be
4841        rejected even if submitted as a single query message.
4842       </para>
4843      </listitem>
4844
4845      <listitem>
4846       <para>
4847        <command>ROLLBACK</> outside a transaction block now
4848        issues <literal>NOTICE</> instead of <literal>WARNING</> (Bruce)
4849       </para>
4850      </listitem>
4851
4852      <listitem>
4853       <para>
4854        Prevent <command>NOTIFY</command>/<command>LISTEN</command>/<command>UNLISTEN</command>
4855        from accepting schema-qualified names (Bruce)
4856       </para>
4857
4858       <para>
4859        Formerly, these commands accepted <literal>schema.relation</> but
4860        ignored the schema part, which was confusing.
4861       </para>
4862      </listitem>
4863
4864      <listitem>
4865       <para>
4866        <command>ALTER SEQUENCE</> no longer affects the sequence's
4867        <function>currval()</> state (Tom)
4868       </para>
4869      </listitem>
4870
4871      <listitem>
4872       <para>
4873        Foreign keys now must match indexable conditions for
4874        cross-data-type references (Tom)
4875       </para>
4876
4877       <para>
4878        This improves semantic consistency and helps avoid
4879        performance problems.
4880       </para>
4881      </listitem>
4882
4883      <listitem>
4884       <para>
4885        Restrict object size functions to users who have reasonable
4886        permissions to view such information (Tom)
4887       </para>
4888
4889       <para>
4890        For example, <function>pg_database_size()</function> now requires
4891        <literal>CONNECT</> permission, which is granted to everyone by
4892        default. <function>pg_tablespace_size()</function> requires
4893        <literal>CREATE</> permission in the tablespace, or is allowed if
4894        the tablespace is the default tablespace for the database.
4895       </para>
4896      </listitem>
4897
4898      <listitem>
4899       <para>
4900        Remove the undocumented <literal>!!=</> (not in) operator (Tom)
4901       </para>
4902
4903       <para>
4904        <literal>NOT IN (SELECT ...)</literal> is the proper way to
4905        perform this operation.
4906       </para>
4907      </listitem>
4908
4909      <listitem>
4910       <para>
4911        Internal hashing functions are now more uniformly-distributed (Tom)
4912       </para>
4913
4914       <para>
4915        If application code was computing and storing hash values using
4916        internal <productname>PostgreSQL</> hashing functions, the hash
4917        values must be regenerated.
4918       </para>
4919      </listitem>
4920
4921      <listitem>
4922       <para>
4923        C-code conventions for handling variable-length data values
4924        have changed (Greg Stark, Tom)
4925       </para>
4926
4927       <para>
4928        The new <function>SET_VARSIZE()</> macro <emphasis>must</> be used
4929        to set the length of generated <type>varlena</> values. Also, it
4930        might be necessary to expand (<quote>de-TOAST</quote>) input values
4931        in more cases.
4932       </para>
4933      </listitem>
4934
4935      <listitem>
4936       <para>
4937        Continuous archiving no longer reports each successful archive
4938        operation to the server logs unless <literal>DEBUG</> level is used
4939        (Simon)
4940       </para>
4941      </listitem>
4942
4943     </itemizedlist>
4944
4945     </sect3>
4946
4947     <sect3>
4948      <title>Configuration Parameters</title>
4949
4950     <itemizedlist>
4951
4952      <listitem>
4953       <para>
4954        Numerous changes in administrative server parameters
4955       </para>
4956
4957       <para>
4958        <varname>bgwriter_lru_percent</>,
4959        <varname>bgwriter_all_percent</>,
4960        <varname>bgwriter_all_maxpages</>,
4961        <varname>stats_start_collector</>, and
4962        <varname>stats_reset_on_server_start</> are removed.
4963        <varname>redirect_stderr</> is renamed to
4964        <varname>logging_collector</>.
4965        <varname>stats_command_string</> is renamed to
4966        <varname>track_activities</>.
4967        <varname>stats_block_level</> and <varname>stats_row_level</>
4968        are merged into <varname>track_counts</>.
4969        A new boolean configuration parameter, <varname>archive_mode</>,
4970        controls archiving. Autovacuum's default settings have changed.
4971       </para>
4972      </listitem>
4973
4974      <listitem>
4975       <para>
4976        Remove <varname>stats_start_collector</varname> parameter (Tom)
4977       </para>
4978
4979       <para>
4980        We now always start the collector process, unless <acronym>UDP</>
4981        socket creation fails.
4982       </para>
4983      </listitem>
4984
4985      <listitem>
4986       <para>
4987        Remove <varname>stats_reset_on_server_start</varname> parameter (Tom)
4988       </para>
4989
4990       <para>
4991        This was removed because <function>pg_stat_reset()</function>
4992        can be used for this purpose.
4993       </para>
4994      </listitem>
4995
4996      <listitem>
4997       <para>
4998        Commenting out a parameter in <filename>postgresql.conf</> now
4999        causes it to revert to its default value (Joachim Wieland)
5000       </para>
5001
5002       <para>
5003        Previously, commenting out an entry left the parameter's value unchanged
5004        until the next server restart.
5005       </para>
5006      </listitem>
5007
5008     </itemizedlist>
5009
5010     </sect3>
5011
5012
5013     <sect3>
5014      <title>Character Encodings</title>
5015
5016     <itemizedlist>
5017
5018      <listitem>
5019       <para>
5020        Add more checks for invalidly-encoded data (Andrew)
5021       </para>
5022
5023       <para>
5024        This change plugs some holes that existed in literal backslash
5025        escape string processing and <command>COPY</command> escape
5026        processing. Now the de-escaped string is rechecked to see if the
5027        result created an invalid multi-byte character.
5028       </para>
5029      </listitem>
5030
5031      <listitem>
5032       <para>
5033        Disallow database encodings that are inconsistent with the server's
5034        locale setting (Tom)
5035       </para>
5036
5037       <para>
5038        On most platforms, <literal>C</> locale is the only locale that
5039        will work with any database encoding.  Other locale settings imply
5040        a specific encoding and will misbehave if the database encoding
5041        is something different.  (Typical symptoms include bogus textual
5042        sort order and wrong results from <function>upper()</> or
5043        <function>lower()</>.)  The server now rejects attempts to create
5044        databases that have an incompatible encoding.
5045       </para>
5046      </listitem>
5047
5048      <listitem>
5049       <para>
5050        Ensure that <function>chr()</function> cannot create
5051        invalidly-encoded values (Andrew)
5052       </para>
5053
5054       <para>
5055        In UTF8-encoded databases the argument of <function>chr()</function> is
5056        now treated as a Unicode code point. In other multi-byte encodings
5057        <function>chr()</function>'s argument must designate a 7-bit ASCII
5058        character.  Zero is no longer accepted.
5059        <function>ascii()</function> has been adjusted to match.
5060       </para>
5061      </listitem>
5062
5063      <listitem>
5064       <para>
5065        Adjust <function>convert()</function> behavior to ensure encoding
5066        validity (Andrew)
5067       </para>
5068
5069       <para>
5070        The two argument form of <function>convert()</function> has been
5071        removed. The three argument form now takes a <type>bytea</type>
5072        first argument and returns a <type>bytea</type>. To cover the
5073        loss of functionality, three new functions have been added:
5074       </para>
5075
5076       <itemizedlist>
5077        <listitem>
5078         <para>
5079          <function>convert_from(bytea, name)</function> returns
5080          <type>text</> &mdash; converts the first argument from the named
5081          encoding to the database encoding
5082         </para>
5083        </listitem>
5084
5085        <listitem>
5086         <para>
5087          <function>convert_to(text, name)</function> returns
5088          <type>bytea</> &mdash; converts the first argument from the
5089          database encoding to the named encoding
5090         </para>
5091        </listitem>
5092
5093        <listitem>
5094         <para>
5095          <function>length(bytea, name)</function> returns
5096          <type>integer</> &mdash; gives the length of the first
5097          argument in characters in the named encoding
5098         </para>
5099        </listitem>
5100       </itemizedlist>
5101      </listitem>
5102
5103      <listitem>
5104       <para>
5105        Remove <literal>convert(argument USING conversion_name)</literal>
5106        (Andrew)
5107       </para>
5108
5109       <para>
5110        Its behavior did not match the SQL standard.
5111       </para>
5112      </listitem>
5113
5114      <listitem>
5115       <para>
5116        Make JOHAB encoding client-only (Tatsuo)
5117       </para>
5118
5119       <para>
5120        JOHAB is not safe as a server-side encoding.
5121       </para>
5122      </listitem>
5123
5124     </itemizedlist>
5125
5126    </sect3>
5127
5128   </sect2>
5129
5130   <sect2>
5131    <title>Changes</title>
5132
5133    <para>
5134     Below you will find a detailed account of the
5135     changes between <productname>PostgreSQL</productname> 8.3 and
5136     the previous major release.
5137    </para>
5138
5139    <sect3>
5140     <title>Performance</title>
5141     <itemizedlist>
5142
5143      <listitem>
5144       <para>
5145        Asynchronous commit delays writes to WAL during transaction commit
5146        (Simon)
5147       </para>
5148
5149       <para>
5150        This feature dramatically increases performance for short data-modifying
5151        transactions.  The disadvantage is that because disk writes are delayed,
5152        if the database or operating system crashes before data is written to
5153        the disk, committed data will be lost.  This feature is useful for
5154        applications that can accept some data loss.  Unlike turning off
5155        <varname>fsync</varname>, using asynchronous commit does not put
5156        database consistency at risk; the worst case is that after a crash the
5157        last few reportedly-committed transactions might not be committed after
5158        all.
5159        This feature is enabled by turning off <varname>synchronous_commit</>
5160        (which can be done per-session or per-transaction, if some transactions
5161        are critical and others are not).
5162        <varname>wal_writer_delay</> can be adjusted to control the maximum
5163        delay before transactions actually reach disk.
5164       </para>
5165      </listitem>
5166
5167      <listitem>
5168       <para>
5169        Checkpoint writes can be spread over a longer time period to smooth
5170        the I/O spike during each checkpoint (Itagaki Takahiro and Heikki
5171        Linnakangas)
5172       </para>
5173
5174       <para>
5175        Previously all modified buffers were forced to disk as quickly as
5176        possible during a
5177        checkpoint, causing an I/O spike that decreased server performance.
5178        This new approach spreads out disk writes during checkpoints,
5179        reducing peak I/O usage. (User-requested and shutdown checkpoints
5180        are still written as quickly as possible.)
5181       </para>
5182      </listitem>
5183
5184      <listitem>
5185       <para>
5186        Heap-Only Tuples (<acronym>HOT</>) accelerate space reuse for most
5187        <command>UPDATE</>s and <command>DELETE</>s (Pavan Deolasee, with
5188        ideas from many others)
5189       </para>
5190
5191       <para>
5192        <command>UPDATE</>s and <command>DELETE</>s leave dead tuples
5193        behind, as do failed <command>INSERT</>s.  Previously only
5194        <command>VACUUM</> could reclaim space taken by dead tuples. With
5195        <acronym>HOT</> dead tuple space can be automatically reclaimed at
5196        the time of <command>INSERT</> or <command>UPDATE</> if no changes
5197        are made to indexed columns.  This allows for more consistent
5198        performance.  Also, <acronym>HOT</> avoids adding duplicate index
5199        entries.
5200       </para>
5201      </listitem>
5202
5203      <listitem>
5204       <para>
5205        Just-in-time background writer strategy improves disk write
5206        efficiency (Greg Smith, Itagaki Takahiro)
5207       </para>
5208
5209       <para>
5210        This greatly reduces the need for manual tuning of the background
5211        writer.
5212       </para>
5213      </listitem>
5214
5215      <listitem>
5216       <para>
5217        Per-field and per-row storage overhead have been reduced
5218        (Greg Stark, Heikki Linnakangas)
5219       </para>
5220
5221       <para>
5222        Variable-length data types with data values less than 128 bytes long
5223        will see a storage decrease of 3 to 6 bytes. For example, two adjacent
5224        <type>char(1)</type> fields now use 4 bytes instead of 16. Row headers
5225        are also 4 bytes shorter than before.
5226       </para>
5227      </listitem>
5228
5229      <listitem>
5230       <para>
5231        Using non-persistent transaction IDs for read-only transactions
5232        reduces overhead and <command>VACUUM</> requirements (Florian Pflug)
5233       </para>
5234
5235       <para>
5236        Non-persistent transaction IDs do not increment the global
5237        transaction counter. Therefore, they reduce the load on
5238        <structname>pg_clog</> and increase the time between forced
5239        vacuums to prevent transaction ID wraparound.
5240        Other performance
5241        improvements were also made that should improve concurrency.
5242       </para>
5243      </listitem>
5244
5245      <listitem>
5246       <para>
5247        Avoid incrementing the command counter after a read-only command (Tom)
5248       </para>
5249
5250       <para>
5251        There was formerly a hard limit of 2<superscript>32</>
5252        (4 billion) commands per transaction.  Now only commands that
5253        actually changed the database count, so while this limit still
5254        exists, it should be significantly less annoying.
5255       </para>
5256      </listitem>
5257
5258      <listitem>
5259       <para>
5260        Create a dedicated <acronym>WAL</> writer process to off-load
5261        work from backends (Simon)
5262       </para>
5263      </listitem>
5264
5265      <listitem>
5266       <para>
5267        Skip unnecessary WAL writes for <command>CLUSTER</command> and
5268        <command>COPY</command> (Simon)
5269       </para>
5270
5271       <para>
5272        Unless WAL archiving is enabled, the system now avoids WAL writes
5273        for <command>CLUSTER</command> and just <function>fsync()</>s the
5274        table at the end of the command.  It also does the same for
5275        <command>COPY</command> if the table was created in the same
5276        transaction.
5277       </para>
5278      </listitem>
5279
5280      <listitem>
5281       <para>
5282        Large sequential scans no longer force out frequently used
5283        cached pages (Simon, Heikki, Tom)
5284       </para>
5285      </listitem>
5286
5287      <listitem>
5288       <para>
5289        Concurrent large sequential scans can now share disk reads (Jeff Davis)
5290       </para>
5291
5292       <para>
5293        This is accomplished by starting the new sequential scan in the
5294        middle of the table (where another sequential scan is already
5295        in-progress) and wrapping around to the beginning to finish.  This
5296        can affect the order of returned rows in a query that does not
5297        specify <literal>ORDER BY</>.  The <varname>synchronize_seqscans</>
5298        configuration parameter can be used to disable this if necessary.
5299       </para>
5300      </listitem>
5301
5302      <listitem>
5303       <para>
5304        <literal>ORDER BY ... LIMIT</> can be done without sorting
5305        (Greg Stark)
5306       </para>
5307
5308       <para>
5309        This is done by sequentially scanning the table and tracking just
5310        the <quote>top N</> candidate rows, rather than performing a
5311        full sort of the entire table.  This is useful when there is no
5312        matching index and the <literal>LIMIT</> is not large.
5313       </para>
5314      </listitem>
5315
5316      <listitem>
5317       <para>
5318        Put a rate limit on messages sent to the statistics
5319        collector by backends
5320        (Tom)
5321       </para>
5322
5323       <para>
5324        This reduces overhead for short transactions, but might sometimes
5325        increase the delay before statistics are tallied.
5326       </para>
5327      </listitem>
5328
5329      <listitem>
5330       <para>
5331        Improve hash join performance for cases with many NULLs (Tom)
5332       </para>
5333      </listitem>
5334
5335      <listitem>
5336       <para>
5337        Speed up operator lookup for cases with non-exact datatype matches (Tom)
5338       </para>
5339      </listitem>
5340
5341     </itemizedlist>
5342
5343    </sect3>
5344
5345    <sect3>
5346     <title>Server</title>
5347     <itemizedlist>
5348
5349      <listitem>
5350       <para>
5351        Autovacuum is now enabled by default (Alvaro)
5352       </para>
5353
5354       <para>
5355        Several changes were made to eliminate disadvantages of having
5356        autovacuum enabled, thereby justifying the change in default.
5357        Several other autovacuum parameter defaults were also modified.
5358       </para>
5359      </listitem>
5360
5361      <listitem>
5362       <para>
5363        Support multiple concurrent autovacuum processes (Alvaro, Itagaki
5364        Takahiro)
5365       </para>
5366
5367       <para>
5368        This allows multiple vacuums to run concurrently.  This prevents
5369        vacuuming of a large table from delaying vacuuming of smaller tables.
5370       </para>
5371      </listitem>
5372
5373      <listitem>
5374       <para>
5375        Automatically re-plan cached queries when table
5376        definitions change or statistics are updated (Tom)
5377       </para>
5378
5379       <para>
5380        Previously PL/PgSQL functions that referenced temporary tables
5381        would fail if the temporary table was dropped and recreated
5382        between function invocations, unless <literal>EXECUTE</> was
5383        used.  This improvement fixes that problem and many related issues.
5384       </para>
5385      </listitem>
5386
5387      <listitem>
5388       <para>
5389        Add a <varname>temp_tablespaces</varname> parameter to control
5390        the tablespaces for temporary tables and files (Jaime Casanova,
5391        Albert Cervera, Bernd Helmle)
5392       </para>
5393
5394       <para>
5395        This parameter defines a list of tablespaces to be used.  This
5396        enables spreading the I/O load across multiple tablespaces. A random
5397        tablespace is chosen each time a temporary object is created.
5398        Temporary files are no longer stored in per-database
5399        <filename>pgsql_tmp/</filename> directories but in per-tablespace
5400        directories.
5401       </para>
5402      </listitem>
5403
5404      <listitem>
5405       <para>
5406        Place temporary tables' TOAST tables in special schemas named
5407        <literal>pg_toast_temp_<replaceable>nnn</></literal> (Tom)
5408       </para>
5409
5410       <para>
5411        This allows low-level code to recognize these tables as temporary,
5412        which enables various optimizations such as not WAL-logging changes
5413        and using local rather than shared buffers for access. This also
5414        fixes a bug wherein backends unexpectedly held open file references
5415        to temporary TOAST tables.
5416       </para>
5417      </listitem>
5418
5419      <listitem>
5420       <para>
5421        Fix problem that a constant flow of new connection requests could
5422        indefinitely delay the postmaster from completing a shutdown or
5423        a crash restart (Tom)
5424       </para>
5425      </listitem>
5426
5427      <listitem>
5428       <para>
5429        Guard against a very-low-probability data loss scenario by preventing
5430        re-use of a deleted table's relfilenode until after the next
5431        checkpoint (Heikki)
5432       </para>
5433      </listitem>
5434
5435      <listitem>
5436       <para>
5437        Fix <command>CREATE CONSTRAINT TRIGGER</>
5438        to convert old-style foreign key trigger definitions into regular
5439        foreign key constraints (Tom)
5440       </para>
5441
5442       <para>
5443        This will ease porting of foreign key constraints carried forward from
5444        pre-7.3 databases, if they were never converted using
5445        <filename>contrib/adddepend</>.
5446       </para>
5447      </listitem>
5448
5449      <listitem>
5450       <para>
5451        Fix <literal>DEFAULT NULL</> to override inherited defaults (Tom)
5452       </para>
5453
5454       <para>
5455        <literal>DEFAULT NULL</> was formerly considered a noise phrase, but it
5456        should (and now does) override non-null defaults that would otherwise
5457        be inherited from a parent table or domain.
5458       </para>
5459      </listitem>
5460
5461      <listitem>
5462       <para>
5463        Add new encodings EUC_JIS_2004 and SHIFT_JIS_2004 (Tatsuo)
5464       </para>
5465
5466       <para>
5467        These new encodings can be converted to and from UTF-8.
5468       </para>
5469      </listitem>
5470
5471      <listitem>
5472       <para>
5473        Change server startup log message from <quote>database system is
5474        ready</quote> to <quote>database system is ready to accept
5475        connections</quote>, and adjust its timing
5476       </para>
5477
5478       <para>
5479        The message now appears only when the postmaster is really ready
5480        to accept connections.
5481       </para>
5482      </listitem>
5483
5484     </itemizedlist>
5485
5486    </sect3>
5487
5488    <sect3>
5489     <title>Monitoring</title>
5490     <itemizedlist>
5491
5492      <listitem>
5493       <para>
5494        Add <varname>log_autovacuum_min_duration</varname> parameter to
5495        support configurable logging of autovacuum activity (Simon, Alvaro)
5496       </para>
5497      </listitem>
5498
5499      <listitem>
5500       <para>
5501        Add <varname>log_lock_waits</varname> parameter to log lock waiting
5502        (Simon)
5503       </para>
5504      </listitem>
5505
5506      <listitem>
5507       <para>
5508        Add <varname>log_temp_files</varname> parameter to log temporary
5509        file usage (Bill Moran)
5510       </para>
5511      </listitem>
5512
5513      <listitem>
5514       <para>
5515        Add <varname>log_checkpoints</varname> parameter to improve logging
5516        of checkpoints (Greg Smith, Heikki)
5517       </para>
5518      </listitem>
5519
5520      <listitem>
5521       <para>
5522        <varname>log_line_prefix</varname> now supports
5523        <literal>%s</literal> and <literal>%c</literal> escapes in all
5524        processes (Andrew)
5525       </para>
5526
5527       <para>
5528        Previously these escapes worked only for user sessions, not for
5529        background database processes.
5530       </para>
5531      </listitem>
5532
5533      <listitem>
5534       <para>
5535        Add <varname>log_restartpoints</varname> to control logging of
5536        point-in-time recovery restart points (Simon)
5537       </para>
5538      </listitem>
5539
5540      <listitem>
5541       <para>
5542        Last transaction end time is now logged at end of recovery and at
5543        each logged restart point (Simon)
5544       </para>
5545      </listitem>
5546
5547      <listitem>
5548       <para>
5549        Autovacuum now reports its activity start time in
5550        <literal>pg_stat_activity</literal> (Tom)
5551       </para>
5552      </listitem>
5553
5554      <listitem>
5555       <para>
5556        Allow server log output in comma-separated value (CSV) format (Arul
5557        Shaji, Greg Smith, Andrew Dunstan)
5558       </para>
5559
5560       <para>
5561        CSV-format log files can easily be loaded into a database table for
5562        subsequent analysis.
5563       </para>
5564      </listitem>
5565
5566      <listitem>
5567       <para>
5568        Use PostgreSQL-supplied timezone support for formatting timestamps
5569        displayed in the server log (Tom)
5570       </para>
5571
5572       <para>
5573        This avoids Windows-specific problems with localized time zone
5574        names that are in the wrong encoding. There is a new
5575        <varname>log_timezone</> parameter that controls the timezone
5576        used in log messages, independently of the client-visible
5577        <varname>timezone</> parameter.
5578       </para>
5579      </listitem>
5580
5581      <listitem>
5582       <para>
5583        New system view <literal>pg_stat_bgwriter</literal> displays
5584        statistics about background writer activity (Magnus)
5585       </para>
5586      </listitem>
5587
5588      <listitem>
5589       <para>
5590        Add new columns for database-wide tuple statistics to
5591        <literal>pg_stat_database</literal> (Magnus)
5592       </para>
5593      </listitem>
5594
5595      <listitem>
5596       <para>
5597        Add an <literal>xact_start</literal> (transaction start time) column to
5598        <literal>pg_stat_activity</literal> (Neil)
5599       </para>
5600
5601       <para>
5602        This makes it easier to identify long-running transactions.
5603       </para>
5604      </listitem>
5605
5606      <listitem>
5607       <para>
5608        Add <literal>n_live_tuples</> and <literal>n_dead_tuples</> columns
5609        to <literal>pg_stat_all_tables</literal> and related views (Glen
5610        Parker)
5611       </para>
5612      </listitem>
5613
5614      <listitem>
5615       <para>
5616        Merge <varname>stats_block_level</> and <varname>stats_row_level</>
5617        parameters into a single parameter <varname>track_counts</>, which
5618        controls all messages sent to the statistics collector process
5619        (Tom)
5620       </para>
5621      </listitem>
5622
5623      <listitem>
5624       <para>
5625        Rename <varname>stats_command_string</varname> parameter to
5626        <varname>track_activities</varname> (Tom)
5627       </para>
5628      </listitem>
5629
5630      <listitem>
5631       <para>
5632        Fix statistical counting of live and dead tuples to recognize that
5633        committed and aborted transactions have different effects (Tom)
5634       </para>
5635      </listitem>
5636
5637     </itemizedlist>
5638
5639    </sect3>
5640
5641    <sect3>
5642     <title>Authentication</title>
5643     <itemizedlist>
5644
5645      <listitem>
5646       <para>
5647        Support Security Service Provider Interface (<acronym>SSPI</>) for
5648        authentication on Windows (Magnus)
5649       </para>
5650      </listitem>
5651
5652      <listitem>
5653       <para>
5654        Support GSSAPI authentication (Henry Hotz, Magnus)
5655       </para>
5656
5657       <para>
5658        This should be preferred to native Kerberos authentication because
5659        GSSAPI is an industry standard.
5660       </para>
5661      </listitem>
5662
5663      <listitem>
5664       <para>
5665        Support a global SSL configuration file (Victor Wagner)
5666       </para>
5667      </listitem>
5668
5669      <listitem>
5670       <para>
5671        Add <varname>ssl_ciphers</> parameter to control accepted SSL ciphers
5672        (Victor Wagner)
5673       </para>
5674      </listitem>
5675
5676      <listitem>
5677       <para>
5678        Add a Kerberos realm parameter, <varname>krb_realm</> (Magnus)
5679       </para>
5680      </listitem>
5681
5682     </itemizedlist>
5683
5684    </sect3>
5685
5686    <sect3>
5687     <title>Write-Ahead Log (<acronym>WAL</>) and Continuous Archiving</title>
5688     <itemizedlist>
5689
5690      <listitem>
5691       <para>
5692        Change the timestamps recorded in transaction WAL records from
5693        time_t to TimestampTz representation (Tom)
5694       </para>
5695
5696       <para>
5697        This provides sub-second resolution in WAL, which can be useful for
5698        point-in-time recovery.
5699       </para>
5700      </listitem>
5701
5702      <listitem>
5703       <para>
5704        Reduce WAL disk space needed by warm standby servers (Simon)
5705       </para>
5706
5707       <para>
5708        This change allows a warm standby server to pass the name of the earliest
5709        still-needed WAL file to the recovery script, allowing automatic removal
5710        of no-longer-needed WAL files.  This is done using <literal>%r</> in
5711        the <varname>restore_command</varname> parameter of
5712        <filename>recovery.conf</filename>.
5713       </para>
5714      </listitem>
5715
5716      <listitem>
5717       <para>
5718        New boolean configuration parameter, <varname>archive_mode</>,
5719        controls archiving (Simon)
5720       </para>
5721
5722       <para>
5723        Previously setting <varname>archive_command</> to an empty string
5724        turned off archiving. Now <varname>archive_mode</> turns archiving
5725        on and off, independently of <varname>archive_command</>. This is
5726        useful for stopping archiving temporarily.
5727       </para>
5728      </listitem>
5729
5730     </itemizedlist>
5731
5732    </sect3>
5733
5734    <sect3>
5735     <title>Queries</title>
5736     <itemizedlist>
5737
5738      <listitem>
5739       <para>
5740        Full text search is integrated into the core database
5741        system (Teodor, Oleg)
5742       </para>
5743
5744       <para>
5745        Text search has been improved, moved into the core code, and is now
5746        installed by default.  <filename>contrib/tsearch2</> now contains
5747        a compatibility interface.
5748       </para>
5749      </listitem>
5750
5751      <listitem>
5752       <para>
5753        Add control over whether <literal>NULL</>s sort first or last (Teodor, Tom)
5754       </para>
5755
5756       <para>
5757        The syntax is <literal>ORDER BY ... NULLS FIRST/LAST</>.
5758       </para>
5759      </listitem>
5760
5761      <listitem>
5762       <para>
5763        Allow per-column ascending/descending (<literal>ASC</>/<literal>DESC</>)
5764        ordering options for indexes (Teodor, Tom)
5765       </para>
5766
5767       <para>
5768        Previously a query using <literal>ORDER BY</> with mixed
5769        <literal>ASC</>/<literal>DESC</> specifiers could not fully use
5770        an index. Now an index can be fully used in such cases if the
5771        index was created with matching
5772        <literal>ASC</>/<literal>DESC</> specifications.
5773        <literal>NULL</> sort order within an index can be controlled, too.
5774       </para>
5775      </listitem>
5776
5777      <listitem>
5778       <para>
5779        Allow <literal>col IS NULL</> to use an index (Teodor)
5780       </para>
5781      </listitem>
5782
5783      <listitem>
5784       <para>
5785        Updatable cursors (Arul Shaji, Tom)
5786       </para>
5787
5788       <para>
5789        This eliminates the need to reference a primary key to
5790        <command>UPDATE</> or <command>DELETE</> rows returned by a cursor.
5791        The syntax is <literal>UPDATE/DELETE WHERE CURRENT OF</>.
5792       </para>
5793      </listitem>
5794
5795      <listitem>
5796       <para>
5797        Allow <literal>FOR UPDATE</literal> in cursors (Arul Shaji, Tom)
5798       </para>
5799      </listitem>
5800
5801      <listitem>
5802       <para>
5803        Create a general mechanism that supports casts to and from the
5804        standard string types (<type>TEXT</type>, <type>VARCHAR</type>,
5805        <type>CHAR</type>) for <emphasis>every</emphasis> datatype, by
5806        invoking the datatype's I/O functions (Tom)
5807       </para>
5808
5809       <para>
5810        Previously, such casts were available only for types that had
5811        specialized function(s) for the purpose.
5812        These new casts are assignment-only in the to-string direction,
5813        explicit-only in the other direction, and therefore should create no
5814        surprising behavior.
5815       </para>
5816      </listitem>
5817
5818      <listitem>
5819       <para>
5820        Allow <literal>UNION</> and related constructs to return a domain
5821        type, when all inputs are of that domain type (Tom)
5822       </para>
5823
5824       <para>
5825        Formerly, the output would be considered to be of the domain's base
5826        type.
5827       </para>
5828      </listitem>
5829
5830      <listitem>
5831       <para>
5832        Allow limited hashing when using two different data types (Tom)
5833       </para>
5834
5835       <para>
5836        This allows hash joins, hash indexes, hashed subplans, and hash
5837        aggregation to be used in situations involving cross-data-type
5838        comparisons, if the data types have compatible hash functions.
5839        Currently, cross-data-type hashing support exists for
5840        <type>smallint</type>/<type>integer</type>/<type>bigint</type>,
5841        and for <type>float4</type>/<type>float8</type>.
5842       </para>
5843      </listitem>
5844
5845      <listitem>
5846       <para>
5847        Improve optimizer logic for detecting when variables are equal
5848        in a <literal>WHERE</> clause (Tom)
5849       </para>
5850
5851       <para>
5852        This allows mergejoins to work with descending sort orders, and
5853        improves recognition of redundant sort columns.
5854       </para>
5855      </listitem>
5856
5857      <listitem>
5858       <para>
5859        Improve performance when planning large inheritance trees in
5860        cases where most tables are excluded by constraints (Tom)
5861       </para>
5862      </listitem>
5863
5864     </itemizedlist>
5865
5866    </sect3>
5867
5868    <sect3>
5869     <title>Object Manipulation</title>
5870     <itemizedlist>
5871
5872      <listitem>
5873
5874       <para>
5875        Arrays of composite types (David Fetter, Andrew, Tom)
5876       </para>
5877
5878       <para>
5879        In addition to arrays of explicitly-declared composite types,
5880        arrays of the rowtypes of regular tables and views are now
5881        supported, except for rowtypes of system catalogs, sequences, and TOAST
5882        tables.
5883       </para>
5884
5885      </listitem>
5886
5887      <listitem>
5888       <para>
5889        Server configuration parameters can now be set on a per-function
5890        basis (Tom)
5891       </para>
5892
5893       <para>
5894        For example, functions can now set their own
5895        <varname>search_path</> to prevent unexpected behavior if a
5896        different <varname>search_path</> exists at run-time.  Security
5897        definer functions should set <varname>search_path</varname> to
5898        avoid security loopholes.
5899       </para>
5900      </listitem>
5901
5902      <listitem>
5903       <para>
5904        <command>CREATE/ALTER FUNCTION</command> now supports
5905        <literal>COST</literal> and <literal>ROWS</literal> options (Tom)
5906       </para>
5907
5908       <para>
5909        <literal>COST</literal> allows specification of the cost of a
5910        function call.  <literal>ROWS</literal> allows specification of
5911        the average number or rows returned by a set-returning function.
5912        These values are used by the optimizer in choosing the best plan.
5913       </para>
5914      </listitem>
5915
5916      <listitem>
5917       <para>
5918        Implement <command>CREATE TABLE LIKE ...  INCLUDING
5919        INDEXES</command> (Trevor Hardcastle, Nikhil Sontakke, Neil)
5920       </para>
5921      </listitem>
5922
5923      <listitem>
5924       <para>
5925        Allow <command>CREATE INDEX CONCURRENTLY</command> to ignore
5926        transactions in other databases (Simon)
5927       </para>
5928      </listitem>
5929
5930      <listitem>
5931       <para>
5932        Add <command>ALTER VIEW ... RENAME TO</command> and <command>ALTER
5933        SEQUENCE ... RENAME TO</command> (David Fetter, Neil)
5934       </para>
5935
5936       <para>
5937        Previously this could only be done via <command>ALTER TABLE ...
5938        RENAME TO</command>.
5939       </para>
5940      </listitem>
5941
5942      <listitem>
5943       <para>
5944        Make <command>CREATE/DROP/RENAME DATABASE</> wait briefly for
5945        conflicting backends to exit before failing (Tom)
5946       </para>
5947
5948       <para>
5949        This increases the likelihood that these commands will succeed.
5950       </para>
5951      </listitem>
5952
5953      <listitem>
5954       <para>
5955        Allow triggers and rules to be deactivated in groups using a
5956        configuration parameter, for replication purposes (Jan)
5957       </para>
5958
5959       <para>
5960        This allows replication systems to disable triggers and rewrite
5961        rules as a group without modifying the system catalogs directly.
5962        The behavior is controlled by <command>ALTER TABLE</> and a new
5963        parameter <varname>session_replication_role</varname>.
5964       </para>
5965      </listitem>
5966
5967      <listitem>
5968       <para>
5969        User-defined types can now have type modifiers (Teodor, Tom)
5970       </para>
5971
5972       <para>
5973        This allows a user-defined type to take a modifier, like
5974        <type>ssnum(7)</>.  Previously only built-in
5975        data types could have modifiers.
5976       </para>
5977      </listitem>
5978
5979     </itemizedlist>
5980
5981    </sect3>
5982
5983    <sect3>
5984     <title>Utility Commands</title>
5985     <itemizedlist>
5986
5987      <listitem>
5988       <para>
5989        Non-superuser database owners now are able to add trusted procedural
5990        languages to their databases by default (Jeremy Drake)
5991       </para>
5992
5993       <para>
5994        While this is reasonably safe, some administrators might wish to
5995        revoke the privilege. It is controlled by
5996        <structname>pg_pltemplate</>.<structfield>tmpldbacreate</>.
5997       </para>
5998      </listitem>
5999
6000      <listitem>
6001       <para>
6002        Allow a session's current parameter setting to be used as the
6003        default for future sessions (Tom)
6004       </para>
6005
6006       <para>
6007        This is done with <literal>SET ... FROM CURRENT</literal> in
6008        <command>CREATE/ALTER FUNCTION</command>, <command>ALTER
6009        DATABASE</command>, or <command>ALTER ROLE</command>.
6010       </para>
6011      </listitem>
6012
6013      <listitem>
6014       <para>
6015        Implement new commands <command>DISCARD ALL</command>,
6016        <command>DISCARD PLANS</command>, <command>DISCARD
6017        TEMPORARY</command>, <command>CLOSE ALL</command>, and
6018        <command>DEALLOCATE ALL</command> (Marko Kreen, Neil)
6019       </para>
6020
6021       <para>
6022        These commands simplify resetting a database session to its initial
6023        state, and are particularly useful for connection-pooling software.
6024       </para>
6025      </listitem>
6026
6027      <listitem>
6028       <para>
6029        Make <command>CLUSTER</command> MVCC-safe (Heikki Linnakangas)
6030       </para>
6031
6032       <para>
6033        Formerly, <command>CLUSTER</command> would discard all tuples
6034        that were committed dead, even if there were still transactions
6035        that should be able to see them under MVCC visibility rules.
6036       </para>
6037      </listitem>
6038
6039      <listitem>
6040       <para>
6041        Add new <command>CLUSTER</command> syntax: <literal>CLUSTER
6042        <replaceable>table</> USING <replaceable>index</></literal>
6043        (Holger Schurig)
6044      </para>
6045
6046       <para>
6047        The old <command>CLUSTER</command> syntax is still supported, but
6048        the new form is considered more logical.
6049       </para>
6050      </listitem>
6051
6052      <listitem>
6053       <para>
6054        Fix <command>EXPLAIN</command> so it can show complex plans
6055        more accurately (Tom)
6056       </para>
6057
6058       <para>
6059        References to subplan outputs are now always shown correctly,
6060        instead of using <literal>?column<replaceable>N</>?</literal>
6061        for complicated cases.
6062       </para>
6063      </listitem>
6064
6065      <listitem>
6066       <para>
6067        Limit the amount of information reported when a user is dropped
6068        (Alvaro)
6069       </para>
6070
6071       <para>
6072        Previously, dropping (or attempting to drop) a user who owned many
6073        objects could result in large <literal>NOTICE</literal> or
6074        <literal>ERROR</literal> messages listing all these objects; this
6075        caused problems for some client applications.  The length of the
6076        message is now limited, although a full list is still sent to the
6077        server log.
6078       </para>
6079      </listitem>
6080
6081     </itemizedlist>
6082
6083    </sect3>
6084
6085    <sect3>
6086     <title>Data Types</title>
6087     <itemizedlist>
6088
6089      <listitem>
6090       <para>
6091        Support for the SQL/XML standard, including new operators and an
6092        <type>XML</type> data type (Nikolay Samokhvalov, Pavel Stehule, Peter)
6093       </para>
6094      </listitem>
6095
6096      <listitem>
6097       <para>
6098        Enumerated data types (<type>ENUM</type>) (Tom Dunstan)
6099       </para>
6100
6101       <para>
6102        This feature provides convenient support for fields that have a
6103        small, fixed set of allowed values.  An example of creating an
6104        <literal>ENUM</> type is
6105        <literal>CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy')</>.
6106       </para>
6107      </listitem>
6108
6109      <listitem>
6110       <para>
6111        Universally Unique Identifier (<type>UUID</>) data type (Gevik
6112        Babakhani, Neil)
6113       </para>
6114
6115       <para>
6116        This closely matches <acronym>RFC</> 4122.
6117       </para>
6118      </listitem>
6119
6120      <listitem>
6121       <para>
6122        Widen the <type>MONEY</type> data type to 64 bits (D'Arcy Cain)
6123       </para>
6124
6125       <para>
6126        This greatly increases the range of supported <type>MONEY</>
6127        values.
6128       </para>
6129      </listitem>
6130
6131      <listitem>
6132       <para>
6133        Fix <type>float4</type>/<type>float8</type> to handle
6134        <literal>Infinity</> and <literal>NAN</> (Not A Number)
6135        consistently (Bruce)
6136       </para>
6137
6138       <para>
6139        The code formerly was not consistent about distinguishing
6140        <literal>Infinity</> from overflow conditions.
6141       </para>
6142      </listitem>
6143
6144      <listitem>
6145       <para>
6146        Allow leading and trailing whitespace during input of
6147        <type>boolean</type> values (Neil)
6148       </para>
6149      </listitem>
6150
6151      <listitem>
6152       <para>
6153        Prevent <command>COPY</> from using digits and lowercase letters as
6154        delimiters (Tom)
6155       </para>
6156      </listitem>
6157
6158     </itemizedlist>
6159
6160    </sect3>
6161
6162    <sect3>
6163     <title>Functions</title>
6164     <itemizedlist>
6165
6166      <listitem>
6167       <para>
6168        Add new regular expression functions
6169        <function>regexp_matches()</function>,
6170        <function>regexp_split_to_array()</function>, and
6171        <function>regexp_split_to_table()</function> (Jeremy Drake, Neil)
6172       </para>
6173
6174       <para>
6175        These functions provide extraction of regular expression
6176        subexpressions and allow splitting a string using a POSIX regular
6177        expression.
6178       </para>
6179      </listitem>
6180
6181      <listitem>
6182       <para>
6183        Add <function>lo_truncate()</function> for large object truncation
6184        (Kris Jurka)
6185       </para>
6186      </listitem>
6187
6188      <listitem>
6189       <para>
6190        Implement <function>width_bucket()</function> for the <type>float8</>
6191        data type (Neil)
6192       </para>
6193      </listitem>
6194
6195      <listitem>
6196       <para>
6197        Add <function>pg_stat_clear_snapshot()</function> to discard
6198        statistics snapshots collected during the current transaction
6199        (Tom)
6200       </para>
6201
6202       <para>
6203        The first request for statistics in a transaction takes a statistics
6204        snapshot that does not change during the transaction.  This function
6205        allows the snapshot to be discarded and a new snapshot loaded during
6206        the next statistics query. This is particularly useful for PL/PgSQL
6207        functions, which are confined to a single transaction.
6208       </para>
6209      </listitem>
6210
6211      <listitem>
6212       <para>
6213        Add <literal>isodow</> option to <function>EXTRACT()</> and
6214        <function>date_part()</> (Bruce)
6215       </para>
6216
6217       <para>
6218        This returns the day of the week, with Sunday as seven.
6219        (<literal>dow</> returns Sunday as zero.)
6220       </para>
6221      </listitem>
6222
6223      <listitem>
6224       <para>
6225        Add <literal>ID</> (ISO day of week) and <literal>IDDD</> (ISO
6226        day of year) format codes for <function>to_char()</>,
6227        <function>to_date()</>, and <function>to_timestamp()</> (Brendan
6228        Jurd)
6229       </para>
6230      </listitem>
6231
6232      <listitem>
6233       <para>
6234        Make <function>to_timestamp()</> and <function>to_date()</>
6235        assume <literal>TM</literal> (trim) option for potentially
6236        variable-width fields (Bruce)
6237       </para>
6238
6239       <para>
6240        This matches <productname>Oracle</>'s behavior.
6241       </para>
6242      </listitem>
6243
6244      <listitem>
6245       <para>
6246        Fix off-by-one conversion error in
6247        <function>to_date()</function>/<function>to_timestamp()</function>
6248        <literal>D</> (non-ISO day of week) fields (Bruce)
6249       </para>
6250      </listitem>
6251
6252      <listitem>
6253       <para>
6254        Make <function>setseed()</function> return void, rather than a
6255        useless integer value (Neil)
6256       </para>
6257      </listitem>
6258
6259      <listitem>
6260       <para>
6261        Add a hash function for <type>NUMERIC</type> (Neil)
6262       </para>
6263
6264       <para>
6265        This allows hash indexes and hash-based plans to be used with
6266        <type>NUMERIC</type> columns.
6267       </para>
6268      </listitem>
6269
6270      <listitem>
6271       <para>
6272        Improve efficiency of
6273        <literal>LIKE</literal>/<literal>ILIKE</literal>, especially for
6274        multi-byte character sets like UTF-8 (Andrew, Itagaki Takahiro)
6275       </para>
6276      </listitem>
6277
6278      <listitem>
6279       <para>
6280        Make <function>currtid()</function> functions require
6281        <literal>SELECT</literal> privileges on the target table (Tom)
6282       </para>
6283      </listitem>
6284
6285      <listitem>
6286       <para>
6287        Add several <function>txid_*()</function> functions to query
6288        active transaction IDs (Jan)
6289       </para>
6290
6291       <para>
6292        This is useful for various replication solutions.
6293       </para>
6294      </listitem>
6295
6296     </itemizedlist>
6297
6298    </sect3>
6299
6300    <sect3>
6301     <title>PL/PgSQL Server-Side Language</title>
6302     <itemizedlist>
6303
6304      <listitem>
6305       <para>
6306        Add scrollable cursor support, including directional control in
6307        <command>FETCH</command> (Pavel Stehule)
6308       </para>
6309      </listitem>
6310
6311      <listitem>
6312       <para>
6313        Allow <literal>IN</literal> as an alternative to
6314        <literal>FROM</literal> in PL/PgSQL's <command>FETCH</command>
6315        statement, for consistency with the backend's
6316        <command>FETCH</command> command (Pavel Stehule)
6317       </para>
6318      </listitem>
6319
6320      <listitem>
6321       <para>
6322        Add <command>MOVE</command> to PL/PgSQL (Magnus, Pavel Stehule,
6323        Neil)
6324       </para>
6325      </listitem>
6326
6327      <listitem>
6328       <para>
6329        Implement <command>RETURN QUERY</command> (Pavel Stehule, Neil)
6330       </para>
6331
6332       <para>
6333        This adds convenient syntax for PL/PgSQL set-returning functions
6334        that want to return the result of a query.  <command>RETURN QUERY</>
6335        is easier and more efficient than a loop
6336        around <command>RETURN NEXT</command>.
6337       </para>
6338      </listitem>
6339
6340      <listitem>
6341       <para>
6342        Allow function parameter names to be qualified with the
6343        function's name (Tom)
6344       </para>
6345
6346       <para>
6347        For example, <literal>myfunc.myvar</>. This is particularly
6348        useful for specifying variables in a query where the variable
6349        name might match a column name.
6350       </para>
6351      </listitem>
6352
6353      <listitem>
6354       <para>
6355        Make qualification of variables with block labels work properly (Tom)
6356       </para>
6357
6358       <para>
6359        Formerly, outer-level block labels could unexpectedly interfere with
6360        recognition of inner-level record or row references.
6361       </para>
6362      </listitem>
6363
6364      <listitem>
6365       <para>
6366        Tighten requirements for <literal>FOR</literal> loop
6367        <literal>STEP</> values (Tom)
6368       </para>
6369
6370       <para>
6371        Prevent non-positive <literal>STEP</> values, and handle
6372        loop overflows.
6373       </para>
6374      </listitem>
6375
6376      <listitem>
6377       <para>
6378        Improve accuracy when reporting syntax error locations (Tom)
6379       </para>
6380      </listitem>
6381
6382     </itemizedlist>
6383
6384    </sect3>
6385
6386    <sect3>
6387     <title>Other Server-Side Languages</title>
6388     <itemizedlist>
6389
6390      <listitem>
6391       <para>
6392        Allow type-name arguments to PL/Perl
6393        <function>spi_prepare()</function> to be data type aliases in
6394        addition to names found in <literal>pg_type</literal> (Andrew)
6395       </para>
6396      </listitem>
6397
6398      <listitem>
6399       <para>
6400        Allow type-name arguments to PL/Python
6401        <function>plpy.prepare()</function> to be data type aliases in
6402        addition to names found in <literal>pg_type</literal> (Andrew)
6403       </para>
6404      </listitem>
6405
6406      <listitem>
6407       <para>
6408        Allow type-name arguments to PL/Tcl <function>spi_prepare</> to
6409        be data type aliases in addition to names found in
6410        <literal>pg_type</literal> (Andrew)
6411       </para>
6412      </listitem>
6413
6414      <listitem>
6415       <para>
6416        Enable PL/PythonU to compile on Python 2.5 (Marko Kreen)
6417       </para>
6418      </listitem>
6419
6420      <listitem>
6421       <para>
6422        Support a true PL/Python boolean type in compatible Python versions
6423        (Python 2.3 and later) (Marko Kreen)
6424       </para>
6425      </listitem>
6426
6427      <listitem>
6428       <para>
6429        Fix PL/Tcl problems with thread-enabled <filename>libtcl</> spawning
6430        multiple threads within the backend (Steve Marshall, Paul Bayer,
6431        Doug Knight)
6432       </para>
6433
6434       <para>
6435        This caused all sorts of unpleasantness.
6436       </para>
6437      </listitem>
6438
6439     </itemizedlist>
6440
6441    </sect3>
6442
6443    <sect3>
6444     <title><link linkend="APP-PSQL"><application>psql</></link></title>
6445     <itemizedlist>
6446
6447      <listitem>
6448       <para>
6449        List disabled triggers separately in <literal>\d</literal> output
6450        (Brendan Jurd)
6451       </para>
6452      </listitem>
6453
6454      <listitem>
6455       <para>
6456        In <literal>\d</literal> patterns, always match <literal>$</literal>
6457        literally (Tom)
6458       </para>
6459      </listitem>
6460
6461      <listitem>
6462       <para>
6463        Show aggregate return types in <literal>\da</literal> output
6464        (Greg Sabino Mullane)
6465       </para>
6466      </listitem>
6467
6468      <listitem>
6469       <para>
6470        Add the function's volatility status to the output of
6471        <literal>\df+</literal> (Neil)
6472       </para>
6473      </listitem>
6474
6475      <listitem>
6476       <para>
6477        Add <literal>\prompt</literal> capability (Chad Wagner)
6478       </para>
6479      </listitem>
6480
6481      <listitem>
6482       <para>
6483        Allow <literal>\pset</literal>, <literal>\t</literal>, and
6484        <literal>\x</literal> to specify <literal>on</> or <literal>off</>,
6485        rather than just toggling (Chad Wagner)
6486       </para>
6487      </listitem>
6488
6489      <listitem>
6490       <para>
6491        Add <literal>\sleep</> capability (Jan)
6492       </para>
6493      </listitem>
6494
6495      <listitem>
6496       <para>
6497        Enable <literal>\timing</> output for <literal>\copy</> (Andrew)
6498       </para>
6499      </listitem>
6500
6501      <listitem>
6502       <para>
6503        Improve <literal>\timing</literal> resolution on Windows
6504        (Itagaki Takahiro)
6505       </para>
6506      </listitem>
6507
6508      <listitem>
6509       <para>
6510        Flush <literal>\o</> output after each backslash command (Tom)
6511       </para>
6512      </listitem>
6513
6514      <listitem>
6515       <para>
6516        Correctly detect and report errors while reading a <literal>-f</>
6517        input file (Peter)
6518       </para>
6519      </listitem>
6520
6521      <listitem>
6522       <para>
6523        Remove <literal>-u</> option (this option has long been deprecated)
6524        (Tom)
6525       </para>
6526      </listitem>
6527
6528     </itemizedlist>
6529
6530    </sect3>
6531
6532    <sect3>
6533     <title><link linkend="APP-PGDUMP"><application>pg_dump</></link></title>
6534     <itemizedlist>
6535
6536      <listitem>
6537       <para>
6538        Add <literal>--tablespaces-only</> and <literal>--roles-only</>
6539        options to <application>pg_dumpall</application> (Dave Page)
6540       </para>
6541      </listitem>
6542
6543      <listitem>
6544       <para>
6545        Add an output file option to
6546        <application>pg_dumpall</application> (Dave Page)
6547       </para>
6548
6549       <para>
6550        This is primarily useful on Windows, where output redirection of
6551        child <application>pg_dump</application> processes does not work.
6552       </para>
6553      </listitem>
6554
6555      <listitem>
6556       <para>
6557        Allow <application>pg_dumpall</> to accept an initial-connection
6558        database name rather than the default
6559        <literal>template1</literal> (Dave Page)
6560       </para>
6561      </listitem>
6562
6563      <listitem>
6564       <para>
6565        In <literal>-n</> and <literal>-t</> switches, always match
6566        <literal>$</literal> literally (Tom)
6567       </para>
6568      </listitem>
6569
6570      <listitem>
6571       <para>
6572        Improve performance when a database has thousands of objects (Tom)
6573       </para>
6574      </listitem>
6575
6576      <listitem>
6577       <para>
6578        Remove <literal>-u</> option (this option has long been deprecated)
6579        (Tom)
6580       </para>
6581      </listitem>
6582
6583     </itemizedlist>
6584
6585    </sect3>
6586
6587    <sect3>
6588     <title>Other Client Applications</title>
6589     <itemizedlist>
6590
6591      <listitem>
6592       <para>
6593        In <application>initdb</>, allow the location of the
6594        <filename>pg_xlog</filename> directory to be specified
6595        (Euler Taveira de Oliveira)
6596       </para>
6597      </listitem>
6598
6599      <listitem>
6600       <para>
6601        Enable server core dump generation in <application>pg_regress</>
6602        on supported operating systems (Andrew)
6603       </para>
6604      </listitem>
6605
6606      <listitem>
6607       <para>
6608        Add a <literal>-t</> (timeout) parameter to <application>pg_ctl</>
6609        (Bruce)
6610       </para>
6611
6612       <para>
6613        This controls how long <application>pg_ctl</> will wait when waiting
6614        for server startup or shutdown.  Formerly the timeout was hard-wired
6615        as 60 seconds.
6616       </para>
6617      </listitem>
6618
6619      <listitem>
6620       <para>
6621        Add a <application>pg_ctl</> option to control generation
6622        of server core dumps (Andrew)
6623       </para>
6624      </listitem>
6625
6626      <listitem>
6627       <para>
6628        Allow Control-C to cancel <application>clusterdb</>,
6629        <application>reindexdb</>, and <application>vacuumdb</> (Itagaki
6630        Takahiro, Magnus)
6631       </para>
6632      </listitem>
6633
6634      <listitem>
6635       <para>
6636        Suppress command tag output for <application>createdb</>,
6637        <application>createuser</>, <application>dropdb</>, and
6638        <application>dropuser</> (Peter)
6639       </para>
6640
6641       <para>
6642        The <literal>--quiet</> option is ignored and will be removed in 8.4.
6643        Progress messages when acting on all databases now go to stdout
6644        instead of stderr because they are not actually errors.
6645       </para>
6646      </listitem>
6647
6648     </itemizedlist>
6649
6650    </sect3>
6651
6652    <sect3>
6653     <title><link linkend="libpq"><application>libpq</></link></title>
6654     <itemizedlist>
6655
6656      <listitem>
6657       <para>
6658        Interpret the <literal>dbName</> parameter of
6659        <function>PQsetdbLogin()</> as a <literal>conninfo</> string if
6660        it contains an equals sign (Andrew)
6661       </para>
6662
6663       <para>
6664        This allows use of <literal>conninfo</> strings in client
6665        programs that still use <literal>PQsetdbLogin()</>.
6666       </para>
6667      </listitem>
6668
6669      <listitem>
6670       <para>
6671        Support a global <acronym>SSL</> configuration file (Victor
6672        Wagner)
6673       </para>
6674      </listitem>
6675
6676      <listitem>
6677       <para>
6678        Add environment variable <varname>PGSSLKEY</> to control
6679        <acronym>SSL</> hardware keys (Victor Wagner)
6680       </para>
6681      </listitem>
6682
6683      <listitem>
6684       <para>
6685        Add <function>lo_truncate()</function> for large object
6686        truncation (Kris Jurka)
6687       </para>
6688      </listitem>
6689
6690      <listitem>
6691       <para>
6692        Add <function>PQconnectionNeedsPassword()</function> that returns
6693        true if the server required a password but none was supplied
6694        (Joe Conway, Tom)
6695       </para>
6696
6697       <para>
6698        If this returns true after a failed connection attempt, a client
6699        application should prompt the user for a password.  In the past
6700        applications have had to check for a specific error message string to
6701        decide whether a password is needed; that approach is now
6702        deprecated.
6703       </para>
6704      </listitem>
6705
6706      <listitem>
6707       <para>
6708        Add <function>PQconnectionUsedPassword()</function> that returns
6709        true if the supplied password was actually used
6710        (Joe Conway, Tom)
6711       </para>
6712
6713       <para>
6714        This is useful in some security contexts where it is important
6715        to know whether a user-supplied password is actually valid.
6716       </para>
6717      </listitem>
6718
6719     </itemizedlist>
6720
6721    </sect3>
6722
6723    <sect3>
6724     <title><link linkend="ecpg"><application>ecpg</></link></title>
6725     <itemizedlist>
6726
6727      <listitem>
6728       <para>
6729        Use V3 frontend/backend protocol (Michael)
6730       </para>
6731
6732       <para>
6733        This adds support for server-side prepared statements.
6734       </para>
6735      </listitem>
6736
6737      <listitem>
6738       <para>
6739        Use native threads, instead of pthreads, on Windows (Magnus)
6740       </para>
6741      </listitem>
6742
6743      <listitem>
6744       <para>
6745        Improve thread-safety of ecpglib (Itagaki Takahiro)
6746       </para>
6747      </listitem>
6748
6749      <listitem>
6750       <para>
6751        Make the ecpg libraries export only necessary API symbols (Michael)
6752       </para>
6753      </listitem>
6754
6755     </itemizedlist>
6756
6757    </sect3>
6758
6759    <sect3>
6760     <title><application>Windows</> Port</title>
6761     <itemizedlist>
6762
6763      <listitem>
6764       <para>
6765        Allow the whole <productname>PostgreSQL</> distribution to be compiled
6766        with <productname>Microsoft Visual C++</> (Magnus and others)
6767       </para>
6768
6769       <para>
6770        This allows Windows-based developers to use familiar development
6771        and debugging tools.
6772        Windows executables made with Visual C++ might also have better
6773        stability and performance than those made with other tool sets.
6774        The client-only Visual C++ build scripts have been removed.
6775       </para>
6776      </listitem>
6777
6778      <listitem>
6779       <para>
6780        Drastically reduce postmaster's memory usage when it has many child
6781        processes (Magnus)
6782       </para>
6783      </listitem>
6784
6785      <listitem>
6786       <para>
6787        Allow regression tests to be started by an administrative
6788        user (Magnus)
6789       </para>
6790      </listitem>
6791
6792      <listitem>
6793       <para>
6794        Add native shared memory implementation (Magnus)
6795       </para>
6796      </listitem>
6797
6798     </itemizedlist>
6799
6800    </sect3>
6801
6802    <sect3>
6803     <title>Server Programming Interface (<acronym>SPI</>)</title>
6804     <itemizedlist>
6805
6806      <listitem>
6807       <para>
6808        Add cursor-related functionality in SPI (Pavel Stehule)
6809       </para>
6810
6811       <para>
6812        Allow access to the cursor-related planning options, and add
6813        <command>FETCH</>/<command>MOVE</> routines.
6814       </para>
6815      </listitem>
6816
6817      <listitem>
6818       <para>
6819        Allow execution of cursor commands through
6820        <function>SPI_execute</function> (Tom)
6821       </para>
6822
6823       <para>
6824        The macro <literal>SPI_ERROR_CURSOR</> still exists but will
6825        never be returned.
6826       </para>
6827      </listitem>
6828
6829      <listitem>
6830       <para>
6831        SPI plan pointers are now declared as <literal>SPIPlanPtr</> instead of
6832        <literal>void *</> (Tom)
6833       </para>
6834
6835       <para>
6836        This does not break application code, but switching is
6837        recommended to help catch simple programming mistakes.
6838       </para>
6839      </listitem>
6840
6841     </itemizedlist>
6842
6843    </sect3>
6844
6845    <sect3>
6846     <title>Build Options</title>
6847     <itemizedlist>
6848
6849      <listitem>
6850       <para>
6851        Add <application>configure</> option <literal>--enable-profiling</>
6852        to enable code profiling (works only with <application>gcc</>)
6853        (Korry Douglas and Nikhil Sontakke)
6854       </para>
6855      </listitem>
6856
6857      <listitem>
6858       <para>
6859        Add <application>configure</> option <literal>--with-system-tzdata</>
6860        to use the operating system's time zone database (Peter)
6861       </para>
6862      </listitem>
6863
6864      <listitem>
6865       <para>
6866        Fix <acronym>PGXS</> so extensions can be built against PostgreSQL
6867        installations whose <application>pg_config</> program does not
6868        appear first in the <varname>PATH</> (Tom)
6869       </para>
6870      </listitem>
6871
6872      <listitem>
6873       <para>
6874        Support <command>gmake draft</command> when building the
6875        <acronym>SGML</> documentation (Bruce)
6876       </para>
6877
6878       <para>
6879        Unless <literal>draft</> is used, the documentation build will
6880        now be repeated if necessary to ensure the index is up-to-date.
6881       </para>
6882      </listitem>
6883
6884     </itemizedlist>
6885
6886    </sect3>
6887
6888    <sect3>
6889     <title>Source Code</title>
6890     <itemizedlist>
6891
6892      <listitem>
6893       <para>
6894        Rename macro <literal>DLLIMPORT</> to <literal>PGDLLIMPORT</> to
6895        avoid conflicting with third party includes (like Tcl) that
6896        define <literal>DLLIMPORT</> (Magnus)
6897       </para>
6898      </listitem>
6899
6900      <listitem>
6901       <para>
6902        Create <quote>operator families</quote> to improve planning of
6903        queries involving cross-data-type comparisons (Tom)
6904       </para>
6905      </listitem>
6906
6907      <listitem>
6908       <para>
6909        Update GIN <function>extractQuery()</> API to allow signalling
6910        that nothing can satisfy the query (Teodor)
6911       </para>
6912      </listitem>
6913
6914      <listitem>
6915       <para>
6916        Move <literal>NAMEDATALEN</> definition from
6917        <filename>postgres_ext.h</> to <filename>pg_config_manual.h</>
6918        (Peter)
6919       </para>
6920      </listitem>
6921
6922      <listitem>
6923       <para>
6924        Provide <function>strlcpy()</function> and
6925        <function>strlcat()</function> on all platforms, and replace
6926        error-prone uses of <function>strncpy()</function>,
6927        <function>strncat()</function>, etc (Peter)
6928       </para>
6929      </listitem>
6930
6931      <listitem>
6932       <para>
6933        Create hooks to let an external plugin monitor (or even replace) the
6934        planner and create plans for hypothetical situations (Gurjeet
6935        Singh, Tom)
6936       </para>
6937      </listitem>
6938
6939      <listitem>
6940       <para>
6941        Create a function variable <literal>join_search_hook</> to let plugins
6942        override the join search order portion of the planner (Julius
6943        Stroffek)
6944       </para>
6945      </listitem>
6946
6947      <listitem>
6948       <para>
6949        Add <function>tas()</> support for Renesas' M32R processor
6950        (Kazuhiro Inaoka)
6951       </para>
6952      </listitem>
6953
6954      <listitem>
6955       <para>
6956        <function>quote_identifier()</function> and
6957        <application>pg_dump</application> no longer quote keywords that are
6958        unreserved according to the grammar (Tom)
6959       </para>
6960      </listitem>
6961
6962      <listitem>
6963       <para>
6964        Change the on-disk representation of the <type>NUMERIC</type>
6965        data type so that the <structfield>sign_dscale</> word comes
6966        before the weight (Tom)
6967       </para>
6968      </listitem>
6969
6970      <listitem>
6971       <para>
6972        Use <acronym>SYSV</> semaphores rather than POSIX on Darwin
6973        &gt;= 6.0, i.e., OS X 10.2 and up (Chris Marcellino)
6974       </para>
6975      </listitem>
6976
6977      <listitem>
6978       <para>
6979        Add <link linkend="acronyms">acronym</link> and <link
6980        linkend="creating-cluster-nfs">NFS</link> documentation
6981        sections (Bruce)
6982       </para>
6983      </listitem>
6984
6985      <listitem>
6986       <para>
6987        "Postgres" is now documented as an accepted alias for
6988        "PostgreSQL" (Peter)
6989       </para>
6990      </listitem>
6991
6992      <listitem>
6993       <para>
6994        Add documentation about preventing database server spoofing when
6995        the server is down (Bruce)
6996       </para>
6997      </listitem>
6998
6999     </itemizedlist>
7000
7001    </sect3>
7002
7003    <sect3>
7004     <title>Contrib</title>
7005     <itemizedlist>
7006
7007      <listitem>
7008       <para>
7009        Move <filename>contrib</> <filename>README</> content into the
7010        main <productname>PostgreSQL</> documentation (Albert Cervera i
7011        Areny)
7012       </para>
7013      </listitem>
7014
7015      <listitem>
7016       <para>
7017        Add <filename>contrib/pageinspect</filename> module for low-level
7018        page inspection (Simon, Heikki)
7019       </para>
7020      </listitem>
7021
7022      <listitem>
7023       <para>
7024        Add <filename>contrib/pg_standby</filename> module for controlling
7025        warm standby operation (Simon)
7026       </para>
7027      </listitem>
7028
7029      <listitem>
7030       <para>
7031        Add <filename>contrib/uuid-ossp</filename> module for generating
7032        <type>UUID</> values using the OSSP UUID library (Peter)
7033       </para>
7034
7035       <para>
7036        Use <application>configure</>
7037        <literal>--with-ossp-uuid</literal> to activate. This takes
7038        advantage of the new <type>UUID</type> builtin type.
7039       </para>
7040      </listitem>
7041
7042      <listitem>
7043       <para>
7044        Add <filename>contrib/dict_int</filename>,
7045        <filename>contrib/dict_xsyn</filename>, and
7046        <filename>contrib/test_parser</filename> modules to provide
7047        sample add-on text search dictionary templates and parsers
7048        (Sergey Karpov)
7049       </para>
7050      </listitem>
7051
7052      <listitem>
7053       <para>
7054        Allow <application>contrib/pgbench</> to set the fillfactor (Pavan
7055        Deolasee)
7056       </para>
7057      </listitem>
7058
7059      <listitem>
7060       <para>
7061        Add timestamps to <application>contrib/pgbench</> <literal>-l</>
7062        (Greg Smith)
7063       </para>
7064      </listitem>
7065
7066      <listitem>
7067       <para>
7068        Add usage count statistics to
7069        <filename>contrib/pgbuffercache</filename> (Greg Smith)
7070       </para>
7071      </listitem>
7072
7073      <listitem>
7074       <para>
7075        Add GIN support for <filename>contrib/hstore</> (Teodor)
7076       </para>
7077      </listitem>
7078
7079      <listitem>
7080       <para>
7081        Add GIN support for <filename>contrib/pg_trgm</> (Guillaume Smet, Teodor)
7082       </para>
7083      </listitem>
7084
7085      <listitem>
7086       <para>
7087        Update OS/X startup scripts in
7088        <filename>contrib/start-scripts</filename> (Mark Cotner, David
7089        Fetter)
7090       </para>
7091      </listitem>
7092
7093      <listitem>
7094       <para>
7095        Restrict <function>pgrowlocks()</function> and
7096        <function>dblink_get_pkey()</function> to users who have
7097        <literal>SELECT</literal> privilege on the target table (Tom)
7098       </para>
7099      </listitem>
7100
7101      <listitem>
7102       <para>
7103        Restrict <filename>contrib/pgstattuple</filename> functions to
7104        superusers (Tom)
7105       </para>
7106      </listitem>
7107
7108      <listitem>
7109       <para>
7110        <filename>contrib/xml2</filename> is deprecated and planned for
7111        removal in 8.4 (Peter)
7112       </para>
7113
7114       <para>
7115        The new XML support in core PostgreSQL supersedes this module.
7116       </para>
7117      </listitem>
7118
7119     </itemizedlist>
7120
7121    </sect3>
7122   </sect2>
7123  </sect1>
7124
7125  <sect1 id="release-8-2-13">
7126   <title>Release 8.2.13</title>
7127
7128   <note>
7129   <title>Release date</title>
7130   <simpara>2009-03-16</simpara>
7131   </note>
7132
7133   <para>
7134    This release contains a variety of fixes from 8.2.12.
7135    For information about new features in the 8.2 major release, see
7136    <xref linkend="release-8-2">.
7137   </para>
7138
7139   <sect2>
7140    <title>Migration to Version 8.2.13</title>
7141
7142    <para>
7143     A dump/restore is not required for those running 8.2.X.
7144     However, if you are upgrading from a version earlier than 8.2.11,
7145     see the release notes for 8.2.11.
7146    </para>
7147
7148   </sect2>
7149
7150   <sect2>
7151    <title>Changes</title>
7152
7153    <itemizedlist>
7154
7155     <listitem>
7156      <para>
7157       Prevent error recursion crashes when encoding conversion fails (Tom)
7158      </para>
7159
7160      <para>
7161       This change extends fixes made in the last two minor releases for
7162       related failure scenarios.  The previous fixes were narrowly tailored
7163       for the original problem reports, but we have now recognized that
7164       <emphasis>any</> error thrown by an encoding conversion function could
7165       potentially lead to infinite recursion while trying to report the
7166       error.  The solution therefore is to disable translation and encoding
7167       conversion and report the plain-ASCII form of any error message,
7168       if we find we have gotten into a recursive error reporting situation.
7169       (CVE-2009-0922)
7170      </para>
7171     </listitem>
7172
7173     <listitem>
7174      <para>
7175       Disallow <command>CREATE CONVERSION</> with the wrong encodings
7176       for the specified conversion function (Heikki)
7177      </para>
7178
7179      <para>
7180       This prevents one possible scenario for encoding conversion failure.
7181       The previous change is a backstop to guard against other kinds of
7182       failures in the same area.
7183      </para>
7184     </listitem>
7185
7186     <listitem>
7187      <para>
7188       Fix core dump when <function>to_char()</> is given format codes that
7189       are inappropriate for the type of the data argument (Tom)
7190      </para>
7191     </listitem>
7192
7193     <listitem>
7194      <para>
7195       Fix possible failure in <filename>contrib/tsearch2</> when C locale is
7196       used with a multi-byte encoding (Teodor)
7197      </para>
7198
7199      <para>
7200       Crashes were possible on platforms where <type>wchar_t</> is narrower
7201       than <type>int</>; Windows in particular.
7202      </para>
7203     </listitem>
7204
7205     <listitem>
7206      <para>
7207       Fix extreme inefficiency in <filename>contrib/tsearch2</> parser's
7208       handling of an email-like string containing multiple <literal>@</>
7209       characters (Heikki)
7210      </para>
7211     </listitem>
7212
7213     <listitem>
7214      <para>
7215       Fix decompilation of <literal>CASE WHEN</> with an implicit coercion
7216       (Tom)
7217      </para>
7218
7219      <para>
7220       This mistake could lead to Assert failures in an Assert-enabled build,
7221       or an <quote>unexpected CASE WHEN clause</> error message in other
7222       cases, when trying to examine or dump a view.
7223      </para>
7224     </listitem>
7225
7226     <listitem>
7227      <para>
7228       Fix possible misassignment of the owner of a TOAST table's rowtype (Tom)
7229      </para>
7230
7231      <para>
7232       If <command>CLUSTER</> or a rewriting variant of <command>ALTER TABLE</>
7233       were executed by someone other than the table owner, the
7234       <structname>pg_type</> entry for the table's TOAST table would end up
7235       marked as owned by that someone.  This caused no immediate problems,
7236       since the permissions on the TOAST rowtype aren't examined by any
7237       ordinary database operation.  However, it could lead to unexpected
7238       failures if one later tried to drop the role that issued the command
7239       (in 8.1 or 8.2), or <quote>owner of data type appears to be invalid</>
7240       warnings from <application>pg_dump</> after having done so (in 8.3).
7241      </para>
7242     </listitem>
7243
7244     <listitem>
7245      <para>
7246       Fix PL/pgSQL to not treat <literal>INTO</> after <command>INSERT</> as
7247       an INTO-variables clause anywhere in the string, not only at the start;
7248       in particular, don't fail for <command>INSERT INTO</> within
7249       <command>CREATE RULE</> (Tom)
7250      </para>
7251     </listitem>
7252
7253     <listitem>
7254      <para>
7255       Clean up PL/pgSQL error status variables fully at block exit
7256       (Ashesh Vashi and Dave Page)
7257      </para>
7258
7259      <para>
7260       This is not a problem for PL/pgSQL itself, but the omission could cause
7261       the PL/pgSQL Debugger to crash while examining the state of a function.
7262      </para>
7263     </listitem>
7264
7265     <listitem>
7266      <para>
7267       Retry failed calls to <function>CallNamedPipe()</> on Windows
7268       (Steve Marshall, Magnus)
7269      </para>
7270
7271      <para>
7272       It appears that this function can sometimes fail transiently;
7273       we previously treated any failure as a hard error, which could
7274       confuse <command>LISTEN</>/<command>NOTIFY</> as well as other
7275       operations.
7276      </para>
7277     </listitem>
7278
7279     <listitem>
7280      <para>
7281       Add <literal>MUST</> (Mauritius Island Summer Time) to the default list
7282       of known timezone abbreviations (Xavier Bugaud)
7283      </para>
7284     </listitem>
7285
7286    </itemizedlist>
7287
7288   </sect2>
7289  </sect1>
7290
7291  <sect1 id="release-8-2-12">
7292   <title>Release 8.2.12</title>
7293
7294   <note>
7295   <title>Release date</title>
7296   <simpara>2009-02-02</simpara>
7297   </note>
7298
7299   <para>
7300    This release contains a variety of fixes from 8.2.11.
7301    For information about new features in the 8.2 major release, see
7302    <xref linkend="release-8-2">.
7303   </para>
7304
7305   <sect2>
7306    <title>Migration to Version 8.2.12</title>
7307
7308    <para>
7309     A dump/restore is not required for those running 8.2.X.
7310     However, if you are upgrading from a version earlier than 8.2.11,
7311     see the release notes for 8.2.11.
7312    </para>
7313
7314   </sect2>
7315
7316   <sect2>
7317    <title>Changes</title>
7318
7319    <itemizedlist>
7320
7321     <listitem>
7322      <para>
7323       Improve handling of URLs in <function>headline()</> function (Teodor)
7324      </para>
7325     </listitem>
7326
7327     <listitem>
7328      <para>
7329       Improve handling of overlength headlines in <function>headline()</>
7330       function (Teodor)
7331      </para>
7332     </listitem>
7333
7334     <listitem>
7335      <para>
7336       Prevent possible Assert failure or misconversion if an encoding
7337       conversion is created with the wrong conversion function for the
7338       specified pair of encodings (Tom, Heikki)
7339      </para>
7340     </listitem>
7341
7342     <listitem>
7343      <para>
7344       Fix possible Assert failure if a statement executed in PL/pgSQL is
7345       rewritten into another kind of statement, for example if an
7346       <command>INSERT</> is rewritten into an <command>UPDATE</> (Heikki)
7347      </para>
7348     </listitem>
7349
7350     <listitem>
7351      <para>
7352       Ensure that a snapshot is available to datatype input functions (Tom)
7353      </para>
7354
7355      <para>
7356       This primarily affects domains that are declared with <literal>CHECK</>
7357       constraints involving user-defined stable or immutable functions.  Such
7358       functions typically fail if no snapshot has been set.
7359      </para>
7360     </listitem>
7361
7362     <listitem>
7363      <para>
7364       Make it safer for SPI-using functions to be used within datatype I/O;
7365       in particular, to be used in domain check constraints (Tom)
7366      </para>
7367     </listitem>
7368
7369     <listitem>
7370      <para>
7371       Avoid unnecessary locking of small tables in <command>VACUUM</>
7372       (Heikki)
7373      </para>
7374     </listitem>
7375
7376     <listitem>
7377      <para>
7378       Fix a problem that made <literal>UPDATE RETURNING tableoid</>
7379       return zero instead of the correct OID (Tom)
7380      </para>
7381     </listitem>
7382
7383     <listitem>
7384      <para>
7385       Fix planner misestimation of selectivity when transitive equality
7386       is applied to an outer-join clause (Tom)
7387      </para>
7388
7389      <para>
7390       This could result in bad plans for queries like
7391       <literal>... from a left join b on a.a1 = b.b1 where a.a1 = 42 ...</>
7392      </para>
7393     </listitem>
7394
7395     <listitem>
7396      <para>
7397       Improve optimizer's handling of long <literal>IN</> lists (Tom)
7398      </para>
7399
7400      <para>
7401       This change avoids wasting large amounts of time on such lists
7402       when constraint exclusion is enabled.
7403      </para>
7404     </listitem>
7405
7406     <listitem>
7407      <para>
7408       Ensure that the contents of a holdable cursor don't depend on the
7409       contents of TOAST tables (Tom)
7410      </para>
7411
7412      <para>
7413       Previously, large field values in a cursor result might be represented
7414       as TOAST pointers, which would fail if the referenced table got dropped
7415       before the cursor is read, or if the large value is deleted and then
7416       vacuumed away.  This cannot happen with an ordinary cursor,
7417       but it could with a cursor that is held past its creating transaction.
7418      </para>
7419     </listitem>
7420
7421     <listitem>
7422      <para>
7423       Fix memory leak when a set-returning function is terminated without
7424       reading its whole result (Tom)
7425      </para>
7426     </listitem>
7427
7428     <listitem>
7429      <para>
7430       Fix <filename>contrib/dblink</>'s
7431       <function>dblink_get_result(text,bool)</> function (Joe)
7432      </para>
7433     </listitem>
7434
7435     <listitem>
7436      <para>
7437       Fix possible garbage output from <filename>contrib/sslinfo</> functions
7438       (Tom)
7439      </para>
7440     </listitem>
7441
7442     <listitem>
7443      <para>
7444       Fix <application>configure</> script to properly report failure when
7445       unable to obtain linkage information for PL/Perl (Andrew)
7446      </para>
7447     </listitem>
7448
7449     <listitem>
7450      <para>
7451       Make all documentation reference <literal>pgsql-bugs</> and/or
7452       <literal>pgsql-hackers</> as appropriate, instead of the
7453       now-decommissioned <literal>pgsql-ports</> and <literal>pgsql-patches</>
7454       mailing lists (Tom)
7455      </para>
7456     </listitem>
7457
7458     <listitem>
7459      <para>
7460       Update time zone data files to <application>tzdata</> release 2009a (for
7461       Kathmandu and historical DST corrections in Switzerland, Cuba)
7462      </para>
7463     </listitem>
7464
7465    </itemizedlist>
7466
7467   </sect2>
7468  </sect1>
7469
7470  <sect1 id="release-8-2-11">
7471   <title>Release 8.2.11</title>
7472
7473   <note>
7474   <title>Release date</title>
7475   <simpara>2008-11-03</simpara>
7476   </note>
7477
7478   <para>
7479    This release contains a variety of fixes from 8.2.10.
7480    For information about new features in the 8.2 major release, see
7481    <xref linkend="release-8-2">.
7482   </para>
7483
7484   <sect2>
7485    <title>Migration to Version 8.2.11</title>
7486
7487    <para>
7488     A dump/restore is not required for those running 8.2.X.
7489     However, if you are upgrading from a version earlier than 8.2.7,
7490     see the release notes for 8.2.7.  Also, if you were running a previous
7491     8.2.X release, it is recommended to <command>REINDEX</> all GiST
7492     indexes after the upgrade.
7493    </para>
7494
7495   </sect2>
7496
7497   <sect2>
7498    <title>Changes</title>
7499
7500    <itemizedlist>
7501
7502     <listitem>
7503      <para>
7504       Fix GiST index corruption due to marking the wrong index entry
7505       <quote>dead</> after a deletion (Teodor)
7506      </para>
7507
7508      <para>
7509       This would result in index searches failing to find rows they
7510       should have found.  Corrupted indexes can be fixed with
7511       <command>REINDEX</>.
7512      </para>
7513     </listitem>
7514
7515     <listitem>
7516      <para>
7517       Fix backend crash when the client encoding cannot represent a localized
7518       error message (Tom)
7519      </para>
7520
7521      <para>
7522       We have addressed similar issues before, but it would still fail if
7523       the <quote>character has no equivalent</> message itself couldn't
7524       be converted.  The fix is to disable localization and send the plain
7525       ASCII error message when we detect such a situation.
7526      </para>
7527     </listitem>
7528
7529     <listitem>
7530      <para>
7531       Fix possible crash when deeply nested functions are invoked from
7532       a trigger (Tom)
7533      </para>
7534     </listitem>
7535
7536     <listitem>
7537      <para>
7538       Improve optimization of <replaceable>expression</> <literal>IN</>
7539       (<replaceable>expression-list</>) queries (Tom, per an idea from Robert
7540       Haas)
7541      </para>
7542
7543      <para>
7544       Cases in which there are query variables on the right-hand side had been
7545       handled less efficiently in 8.2.x and 8.3.x than in prior versions.
7546       The fix restores 8.1 behavior for such cases.
7547      </para>
7548     </listitem>
7549
7550     <listitem>
7551      <para>
7552       Fix mis-expansion of rule queries when a sub-<literal>SELECT</> appears
7553       in a function call in <literal>FROM</>,  a multi-row <literal>VALUES</>
7554       list, or a <literal>RETURNING</> list (Tom)
7555      </para>
7556
7557      <para>
7558       The usual symptom of this problem is an <quote>unrecognized node type</>
7559       error.
7560      </para>
7561     </listitem>
7562
7563     <listitem>
7564      <para>
7565       Fix memory leak during rescan of a hashed aggregation plan (Neil)
7566      </para>
7567     </listitem>
7568
7569     <listitem>
7570      <para>
7571       Ensure an error is reported when a newly-defined PL/pgSQL trigger
7572       function is invoked as a normal function (Tom)
7573      </para>
7574     </listitem>
7575
7576     <listitem>
7577      <para>
7578       Prevent possible collision of <structfield>relfilenode</> numbers
7579       when moving a table to another tablespace with <command>ALTER SET
7580       TABLESPACE</> (Heikki)
7581      </para>
7582
7583      <para>
7584       The command tried to re-use the existing filename, instead of
7585       picking one that is known unused in the destination directory.
7586      </para>
7587     </listitem>
7588
7589     <listitem>
7590      <para>
7591       Fix incorrect tsearch2 headline generation when single query
7592       item matches first word of text (Sushant Sinha)
7593      </para>
7594     </listitem>
7595
7596     <listitem>
7597      <para>
7598       Fix improper display of fractional seconds in interval values when
7599       using a non-ISO datestyle in an <option>--enable-integer-datetimes</>
7600       build (Ron Mayer)
7601      </para>
7602     </listitem>
7603
7604     <listitem>
7605      <para>
7606       Ensure <function>SPI_getvalue</> and <function>SPI_getbinval</>
7607       behave correctly when the passed tuple and tuple descriptor have
7608       different numbers of columns (Tom)
7609      </para>
7610
7611      <para>
7612       This situation is normal when a table has had columns added or removed,
7613       but these two functions didn't handle it properly.
7614       The only likely consequence is an incorrect error indication.
7615      </para>
7616     </listitem>
7617
7618     <listitem>
7619      <para>
7620       Fix <application>ecpg</>'s parsing of <command>CREATE ROLE</> (Michael)
7621      </para>
7622     </listitem>
7623
7624     <listitem>
7625      <para>
7626       Fix recent breakage of <literal>pg_ctl restart</> (Tom)
7627      </para>
7628     </listitem>
7629
7630     <listitem>
7631      <para>
7632       Ensure <filename>pg_control</> is opened in binary mode
7633       (Itagaki Takahiro)
7634      </para>
7635
7636      <para>
7637       <application>pg_controldata</> and <application>pg_resetxlog</>
7638       did this incorrectly, and so could fail on Windows.
7639      </para>
7640     </listitem>
7641
7642     <listitem>
7643      <para>
7644       Update time zone data files to <application>tzdata</> release 2008i (for
7645       DST law changes in Argentina, Brazil, Mauritius, Syria)
7646      </para>
7647     </listitem>
7648
7649    </itemizedlist>
7650
7651   </sect2>
7652  </sect1>
7653
7654  <sect1 id="release-8-2-10">
7655   <title>Release 8.2.10</title>
7656
7657   <note>
7658   <title>Release date</title>
7659   <simpara>2008-09-22</simpara>
7660   </note>
7661
7662   <para>
7663    This release contains a variety of fixes from 8.2.9.
7664    For information about new features in the 8.2 major release, see
7665    <xref linkend="release-8-2">.
7666   </para>
7667
7668   <sect2>
7669    <title>Migration to Version 8.2.10</title>
7670
7671    <para>
7672     A dump/restore is not required for those running 8.2.X.
7673     However, if you are upgrading from a version earlier than 8.2.7,
7674     see the release notes for 8.2.7.
7675    </para>
7676
7677   </sect2>
7678
7679   <sect2>
7680    <title>Changes</title>
7681
7682    <itemizedlist>
7683
7684     <listitem>
7685      <para>
7686       Fix bug in btree WAL recovery code (Heikki)
7687      </para>
7688
7689      <para>
7690       Recovery failed if the WAL ended partway through a page split operation.
7691      </para>
7692     </listitem>
7693
7694     <listitem>
7695      <para>
7696       Fix potential miscalculation of <structfield>datfrozenxid</> (Alvaro)
7697      </para>
7698
7699      <para>
7700       This error may explain some recent reports of failure to remove old
7701       <structname>pg_clog</> data.
7702      </para>
7703     </listitem>
7704
7705     <listitem>
7706      <para>
7707       Widen local lock counters from 32 to 64 bits (Tom)
7708      </para>
7709
7710      <para>
7711       This responds to reports that the counters could overflow in
7712       sufficiently long transactions, leading to unexpected <quote>lock is
7713       already held</> errors.
7714      </para>
7715     </listitem>
7716
7717     <listitem>
7718      <para>
7719       Fix possible duplicate output of tuples during a GiST index scan (Teodor)
7720      </para>
7721     </listitem>
7722
7723     <listitem>
7724      <para>
7725       Fix missed permissions checks when a view contains a simple
7726       <literal>UNION ALL</> construct (Heikki)
7727      </para>
7728
7729      <para>
7730       Permissions for the referenced tables were checked properly, but not
7731       permissions for the view itself.
7732      </para>
7733     </listitem>
7734
7735     <listitem>
7736      <para>
7737       Add checks in executor startup to ensure that the tuples produced by an
7738       <command>INSERT</> or <command>UPDATE</> will match the target table's
7739       current rowtype (Tom)
7740      </para>
7741
7742      <para>
7743       <command>ALTER COLUMN TYPE</>, followed by re-use of a previously
7744       cached plan, could produce this type of situation.  The check protects
7745       against data corruption and/or crashes that could ensue.
7746      </para>
7747     </listitem>
7748
7749     <listitem>
7750      <para>
7751       Fix possible repeated drops during <command>DROP OWNED</> (Tom)
7752      </para>
7753
7754      <para>
7755       This would typically result in strange errors such as <quote>cache
7756       lookup failed for relation NNN</>.
7757      </para>
7758     </listitem>
7759
7760     <listitem>
7761      <para>
7762       Fix <literal>AT TIME ZONE</> to first try to interpret its timezone
7763       argument as a timezone abbreviation, and only try it as a full timezone
7764       name if that fails, rather than the other way around as formerly (Tom)
7765      </para>
7766
7767      <para>
7768       The timestamp input functions have always resolved ambiguous zone names
7769       in this order.  Making <literal>AT TIME ZONE</> do so as well improves
7770       consistency, and fixes a compatibility bug introduced in 8.1:
7771       in ambiguous cases we now behave the same as 8.0 and before did,
7772       since in the older versions <literal>AT TIME ZONE</> accepted
7773       <emphasis>only</> abbreviations.
7774      </para>
7775     </listitem>
7776
7777     <listitem>
7778      <para>
7779       Fix datetime input functions to correctly detect integer overflow when
7780       running on a 64-bit platform (Tom)
7781      </para>
7782     </listitem>
7783
7784     <listitem>
7785      <para>
7786       Prevent integer overflows during units conversion when displaying a
7787       configuration parameter that has units (Tom)
7788      </para>
7789     </listitem>
7790
7791     <listitem>
7792      <para>
7793       Improve performance of writing very long log messages to syslog (Tom)
7794      </para>
7795     </listitem>
7796
7797     <listitem>
7798      <para>
7799       Allow spaces in the suffix part of an LDAP URL in
7800       <filename>pg_hba.conf</> (Tom)
7801      </para>
7802     </listitem>
7803
7804     <listitem>
7805      <para>
7806       Fix bug in backwards scanning of a cursor on a <literal>SELECT DISTINCT
7807       ON</> query (Tom)
7808      </para>
7809     </listitem>
7810
7811     <listitem>
7812      <para>
7813       Fix planner bug with nested sub-select expressions (Tom)
7814      </para>
7815
7816      <para>
7817       If the outer sub-select has no direct dependency on the parent query,
7818       but the inner one does, the outer value might not get recalculated
7819       for new parent query rows.
7820      </para>
7821     </listitem>
7822
7823     <listitem>
7824      <para>
7825       Fix planner to estimate that <literal>GROUP BY</> expressions yielding
7826       boolean results always result in two groups, regardless of the
7827       expressions' contents (Tom)
7828      </para>
7829
7830      <para>
7831       This is very substantially more accurate than the regular <literal>GROUP
7832       BY</> estimate for certain boolean tests like <replaceable>col</>
7833       <literal>IS NULL</>.
7834      </para>
7835     </listitem>
7836
7837     <listitem>
7838      <para>
7839       Fix PL/PgSQL to not fail when a <literal>FOR</> loop's target variable
7840       is a record containing composite-type fields (Tom)
7841      </para>
7842     </listitem>
7843
7844     <listitem>
7845      <para>
7846       Fix PL/Tcl to behave correctly with Tcl 8.5, and to be more careful
7847       about the encoding of data sent to or from Tcl (Tom)
7848      </para>
7849     </listitem>
7850
7851     <listitem>
7852      <para>
7853       On Windows, work around a Microsoft bug by preventing
7854       <application>libpq</> from trying to send more than 64kB per system call
7855       (Magnus)
7856      </para>
7857     </listitem>
7858
7859     <listitem>
7860      <para>
7861       Improve <application>pg_dump</> and <application>pg_restore</>'s
7862       error reporting after failure to send a SQL command (Tom)
7863      </para>
7864     </listitem>
7865
7866     <listitem>
7867      <para>
7868       Fix <application>pg_ctl</> to properly preserve postmaster
7869       command-line arguments across a <literal>restart</> (Bruce)
7870      </para>
7871     </listitem>
7872
7873     <listitem>
7874      <para>
7875       Update time zone data files to <application>tzdata</> release 2008f (for
7876       DST law changes in Argentina, Bahamas, Brazil, Mauritius, Morocco,
7877       Pakistan, Palestine, and Paraguay)
7878      </para>
7879     </listitem>
7880
7881    </itemizedlist>
7882
7883   </sect2>
7884  </sect1>
7885
7886  <sect1 id="release-8-2-9">
7887   <title>Release 8.2.9</title>
7888
7889   <note>
7890   <title>Release date</title>
7891   <simpara>2008-06-12</simpara>
7892   </note>
7893
7894   <para>
7895    This release contains one serious and one minor bug fix over 8.2.8.
7896    For information about new features in the 8.2 major release, see
7897    <xref linkend="release-8-2">.
7898   </para>
7899
7900   <sect2>
7901    <title>Migration to Version 8.2.9</title>
7902
7903    <para>
7904     A dump/restore is not required for those running 8.2.X.
7905     However, if you are upgrading from a version earlier than 8.2.7,
7906     see the release notes for 8.2.7.
7907    </para>
7908
7909   </sect2>
7910
7911   <sect2>
7912    <title>Changes</title>
7913
7914    <itemizedlist>
7915
7916     <listitem>
7917      <para>
7918       Make <function>pg_get_ruledef()</> parenthesize negative constants (Tom)
7919      </para>
7920
7921      <para>
7922       Before this fix, a negative constant in a view or rule might be dumped
7923       as, say, <literal>-42::integer</>, which is subtly incorrect: it should
7924       be <literal>(-42)::integer</> due to operator precedence rules.
7925       Usually this would make little difference, but it could interact with
7926       another recent patch to cause
7927       <productname>PostgreSQL</> to reject what had been a valid
7928       <command>SELECT DISTINCT</> view query.  Since this could result in
7929       <application>pg_dump</> output failing to reload, it is being treated
7930       as a high-priority fix.  The only released versions in which dump
7931       output is actually incorrect are 8.3.1 and 8.2.7.
7932      </para>
7933     </listitem>
7934
7935     <listitem>
7936      <para>
7937       Make <command>ALTER AGGREGATE ... OWNER TO</> update
7938       <structname>pg_shdepend</> (Tom)
7939      </para>
7940
7941      <para>
7942       This oversight could lead to problems if the aggregate was later
7943       involved in a <command>DROP OWNED</> or <command>REASSIGN OWNED</>
7944       operation.
7945      </para>
7946     </listitem>
7947
7948    </itemizedlist>
7949
7950   </sect2>
7951  </sect1>
7952
7953  <sect1 id="release-8-2-8">
7954   <title>Release 8.2.8</title>
7955
7956   <note>
7957   <title>Release date</title>
7958   <simpara>never released</simpara>
7959   </note>
7960
7961   <para>
7962    This release contains a variety of fixes from 8.2.7.
7963    For information about new features in the 8.2 major release, see
7964    <xref linkend="release-8-2">.
7965   </para>
7966
7967   <sect2>
7968    <title>Migration to Version 8.2.8</title>
7969
7970    <para>
7971     A dump/restore is not required for those running 8.2.X.
7972     However, if you are upgrading from a version earlier than 8.2.7,
7973     see the release notes for 8.2.7.
7974    </para>
7975
7976   </sect2>
7977
7978   <sect2>
7979    <title>Changes</title>
7980
7981    <itemizedlist>
7982
7983     <listitem>
7984      <para>
7985       Fix <literal>ERRORDATA_STACK_SIZE exceeded</literal> crash that
7986       occurred on Windows when using UTF-8 database encoding and a different
7987       client encoding (Tom)
7988      </para>
7989     </listitem>
7990
7991     <listitem>
7992      <para>
7993       Fix <command>ALTER TABLE ADD COLUMN ... PRIMARY KEY</> so that the new
7994       column is correctly checked to see if it's been initialized to all
7995       non-nulls (Brendan Jurd)
7996      </para>
7997
7998      <para>
7999       Previous versions neglected to check this requirement at all.
8000      </para>
8001     </listitem>
8002
8003     <listitem>
8004      <para>
8005       Fix possible <command>CREATE TABLE</> failure when inheriting the
8006       <quote>same</> constraint from multiple parent relations that
8007       inherited that constraint from a common ancestor (Tom)
8008      </para>
8009     </listitem>
8010
8011     <listitem>
8012      <para>
8013       Fix <function>pg_get_ruledef()</> to show the alias, if any, attached
8014       to the target table of an <command>UPDATE</> or <command>DELETE</>
8015       (Tom)
8016      </para>
8017     </listitem>
8018
8019     <listitem>
8020      <para>
8021       Fix GIN bug that could result in a <literal>too many LWLocks
8022       taken</literal> failure (Teodor)
8023      </para>
8024     </listitem>
8025
8026     <listitem>
8027      <para>
8028       Avoid possible crash when decompressing corrupted data
8029       (Zdenek Kotala)
8030      </para>
8031     </listitem>
8032
8033     <listitem>
8034      <para>
8035       Repair two places where SIGTERM exit of a backend could leave corrupted
8036       state in shared memory (Tom)
8037      </para>
8038
8039      <para>
8040       Neither case is very important if SIGTERM is used to shut down the
8041       whole database cluster together, but there was a problem if someone
8042       tried to SIGTERM individual backends.
8043      </para>
8044     </listitem>
8045
8046     <listitem>
8047      <para>
8048       Fix conversions between ISO-8859-5 and other encodings to handle
8049       Cyrillic <quote>Yo</> characters (<literal>e</> and <literal>E</> with
8050       two dots) (Sergey Burladyan)
8051      </para>
8052     </listitem>
8053
8054     <listitem>
8055      <para>
8056       Fix several datatype input functions, notably <function>array_in()</>,
8057       that were allowing unused bytes in their results to contain
8058       uninitialized, unpredictable values (Tom)
8059      </para>
8060
8061      <para>
8062       This could lead to failures in which two apparently identical literal
8063       values were not seen as equal, resulting in the parser complaining
8064       about unmatched <literal>ORDER BY</> and <literal>DISTINCT</>
8065       expressions.
8066      </para>
8067     </listitem>
8068
8069     <listitem>
8070      <para>
8071       Fix a corner case in regular-expression substring matching
8072       (<literal>substring(<replaceable>string</> from
8073       <replaceable>pattern</>)</literal>) (Tom)
8074      </para>
8075
8076      <para>
8077       The problem occurs when there is a match to the pattern overall but
8078       the user has specified a parenthesized subexpression and that
8079       subexpression hasn't got a match.  An example is
8080       <literal>substring('foo' from 'foo(bar)?')</>.
8081       This should return NULL, since <literal>(bar)</> isn't matched, but
8082       it was mistakenly returning the whole-pattern match instead (ie,
8083       <literal>foo</>).
8084      </para>
8085     </listitem>
8086
8087     <listitem>
8088      <para>
8089       Update time zone data files to <application>tzdata</> release 2008c (for
8090       DST law changes in Morocco, Iraq, Choibalsan, Pakistan, Syria, Cuba, and
8091       Argentina/San_Luis)
8092      </para>
8093     </listitem>
8094
8095     <listitem>
8096      <para>
8097       Fix incorrect result from <application>ecpg</>'s
8098       <function>PGTYPEStimestamp_sub()</> function (Michael)
8099      </para>
8100     </listitem>
8101
8102     <listitem>
8103      <para>
8104       Fix broken GiST comparison function for <filename>contrib/tsearch2</>'s
8105       <type>tsquery</> type (Teodor)
8106      </para>
8107     </listitem>
8108
8109     <listitem>
8110      <para>
8111       Fix possible crashes in <filename>contrib/cube</> functions (Tom)
8112      </para>
8113     </listitem>
8114
8115     <listitem>
8116      <para>
8117       Fix core dump in <filename>contrib/xml2</>'s
8118       <function>xpath_table()</> function when the input query returns a
8119       NULL value (Tom)
8120      </para>
8121     </listitem>
8122
8123     <listitem>
8124      <para>
8125       Fix <filename>contrib/xml2</>'s makefile to not override
8126       <literal>CFLAGS</> (Tom)
8127      </para>
8128     </listitem>
8129
8130     <listitem>
8131      <para>
8132       Fix <literal>DatumGetBool</> macro to not fail with <application>gcc</>
8133       4.3 (Tom)
8134      </para>
8135
8136      <para>
8137       This problem affects <quote>old style</> (V0) C functions that
8138       return boolean.  The fix is already in 8.3, but the need to
8139       back-patch it was not realized at the time.
8140      </para>
8141     </listitem>
8142
8143    </itemizedlist>
8144
8145   </sect2>
8146  </sect1>
8147
8148  <sect1 id="release-8-2-7">
8149   <title>Release 8.2.7</title>
8150
8151   <note>
8152   <title>Release date</title>
8153   <simpara>2008-03-17</simpara>
8154   </note>
8155
8156   <para>
8157    This release contains a variety of fixes from 8.2.6.
8158    For information about new features in the 8.2 major release, see
8159    <xref linkend="release-8-2">.
8160   </para>
8161
8162   <sect2>
8163    <title>Migration to Version 8.2.7</title>
8164
8165    <para>
8166     A dump/restore is not required for those running 8.2.X.
8167     However, you might need to <command>REINDEX</> indexes on textual
8168     columns after updating, if you are affected by the Windows locale
8169     issue described below.
8170    </para>
8171
8172   </sect2>
8173
8174   <sect2>
8175    <title>Changes</title>
8176
8177    <itemizedlist>
8178
8179     <listitem>
8180      <para>
8181       Fix character string comparison for Windows locales that consider
8182       different character combinations as equal (Tom)
8183      </para>
8184
8185      <para>
8186       This fix applies only on Windows and only when using UTF-8
8187       database encoding.  The same fix was made for all other cases
8188       over two years ago, but Windows with UTF-8 uses a separate code
8189       path that was not updated.  If you are using a locale that
8190       considers some non-identical strings as equal, you may need to
8191       <command>REINDEX</> to fix existing indexes on textual columns.
8192      </para>
8193     </listitem>
8194
8195     <listitem>
8196      <para>
8197       Repair potential deadlock between concurrent <command>VACUUM FULL</>
8198       operations on different system catalogs (Tom)
8199      </para>
8200     </listitem>
8201
8202     <listitem>
8203      <para>
8204       Fix longstanding <command>LISTEN</>/<command>NOTIFY</>
8205       race condition (Tom)
8206      </para>
8207
8208      <para>
8209       In rare cases a session that had just executed a
8210       <command>LISTEN</> might not get a notification, even though
8211       one would be expected because the concurrent transaction executing
8212       <command>NOTIFY</> was observed to commit later.
8213      </para>
8214
8215      <para>
8216       A side effect of the fix is that a transaction that has executed
8217       a not-yet-committed <command>LISTEN</> command will not see any
8218       row in <structname>pg_listener</> for the <command>LISTEN</>,
8219       should it choose to look; formerly it would have.  This behavior
8220       was never documented one way or the other, but it is possible that
8221       some applications depend on the old behavior.
8222      </para>
8223     </listitem>
8224
8225     <listitem>
8226      <para>
8227       Disallow <command>LISTEN</> and <command>UNLISTEN</> within a
8228       prepared transaction (Tom)
8229      </para>
8230
8231      <para>
8232       This was formerly allowed but trying to do it had various unpleasant
8233       consequences, notably that the originating backend could not exit
8234       as long as an <command>UNLISTEN</> remained uncommitted.
8235      </para>
8236     </listitem>
8237
8238     <listitem>
8239      <para>
8240       Disallow dropping a temporary table within a
8241       prepared transaction (Heikki)
8242      </para>
8243
8244      <para>
8245       This was correctly disallowed by 8.1, but the check was inadvertently
8246       broken in 8.2.
8247      </para>
8248     </listitem>
8249
8250     <listitem>
8251      <para>
8252       Fix rare crash when an error occurs during a query using a hash index
8253       (Heikki)
8254      </para>
8255     </listitem>
8256
8257     <listitem>
8258      <para>
8259       Fix memory leaks in certain usages of set-returning functions (Neil)
8260      </para>
8261     </listitem>
8262
8263     <listitem>
8264      <para>
8265       Fix input of datetime values for February 29 in years BC (Tom)
8266      </para>
8267
8268      <para>
8269       The former coding was mistaken about which years were leap years.
8270      </para>
8271     </listitem>
8272
8273     <listitem>
8274      <para>
8275       Fix <quote>unrecognized node type</> error in some variants of
8276       <command>ALTER OWNER</> (Tom)
8277      </para>
8278     </listitem>
8279
8280     <listitem>
8281      <para>
8282       Ensure <structname>pg_stat_activity</>.<structfield>waiting</> flag
8283       is cleared when a lock wait is aborted (Tom)
8284      </para>
8285     </listitem>
8286
8287     <listitem>
8288      <para>
8289       Fix handling of process permissions on Windows Vista (Dave, Magnus)
8290      </para>
8291
8292      <para>
8293       In particular, this fix allows starting the server as the Administrator
8294       user.
8295      </para>
8296     </listitem>
8297
8298     <listitem>
8299      <para>
8300       Update time zone data files to <application>tzdata</> release 2008a
8301       (in particular, recent Chile changes); adjust timezone abbreviation
8302       <literal>VET</> (Venezuela) to mean UTC-4:30, not UTC-4:00 (Tom)
8303      </para>
8304     </listitem>
8305
8306     <listitem>
8307      <para>
8308       Fix <application>pg_ctl</> to correctly extract the postmaster's port
8309       number from command-line options (Itagaki Takahiro, Tom)
8310      </para>
8311
8312      <para>
8313       Previously, <literal>pg_ctl start -w</> could try to contact the
8314       postmaster on the wrong port, leading to bogus reports of startup
8315       failure.
8316      </para>
8317     </listitem>
8318
8319     <listitem>
8320      <para>
8321       Use <option>-fwrapv</> to defend against possible misoptimization
8322       in recent <application>gcc</> versions (Tom)
8323      </para>
8324
8325      <para>
8326       This is known to be necessary when building <productname>PostgreSQL</>
8327       with <application>gcc</> 4.3 or later.
8328      </para>
8329     </listitem>
8330
8331
8332     <listitem>
8333      <para>
8334       Correctly enforce <varname>statement_timeout</> values longer
8335       than <literal>INT_MAX</> microseconds (about 35 minutes) (Tom)
8336      </para>
8337
8338      <para>
8339       This bug affects only builds with <option>--enable-integer-datetimes</>.
8340      </para>
8341     </listitem>
8342
8343     <listitem>
8344      <para>
8345       Fix <quote>unexpected PARAM_SUBLINK ID</> planner error when
8346       constant-folding simplifies a sub-select (Tom)
8347      </para>
8348     </listitem>
8349
8350     <listitem>
8351      <para>
8352       Fix logical errors in constraint-exclusion handling of <literal>IS
8353       NULL</> and <literal>NOT</> expressions (Tom)
8354      </para>
8355
8356      <para>
8357       The planner would sometimes exclude partitions that should not
8358       have been excluded because of the possibility of NULL results.
8359      </para>
8360     </listitem>
8361
8362     <listitem>
8363      <para>
8364       Fix another cause of <quote>failed to build any N-way joins</>
8365       planner errors (Tom)
8366      </para>
8367
8368      <para>
8369       This could happen in cases where a clauseless join needed to be
8370       forced before a join clause could be exploited.
8371      </para>
8372     </listitem>
8373
8374     <listitem>
8375      <para>
8376       Fix incorrect constant propagation in outer-join planning (Tom)
8377      </para>
8378
8379      <para>
8380       The planner could sometimes incorrectly conclude that a variable
8381       could be constrained to be equal to a constant, leading
8382       to wrong query results.
8383      </para>
8384     </listitem>
8385
8386     <listitem>
8387      <para>
8388       Fix display of constant expressions in <literal>ORDER BY</>
8389       and <literal>GROUP BY</> (Tom)
8390      </para>
8391
8392      <para>
8393       An explictly casted constant would be shown incorrectly.  This could
8394       for example lead to corruption of a view definition during
8395       dump and reload.
8396      </para>
8397     </listitem>
8398
8399     <listitem>
8400      <para>
8401       Fix <application>libpq</> to handle NOTICE messages correctly
8402       during COPY OUT (Tom)
8403      </para>
8404
8405      <para>
8406       This failure has only been observed to occur when a user-defined
8407       datatype's output routine issues a NOTICE, but there is no
8408       guarantee it couldn't happen due to other causes.
8409      </para>
8410     </listitem>
8411
8412    </itemizedlist>
8413
8414   </sect2>
8415  </sect1>
8416
8417  <sect1 id="release-8-2-6">
8418   <title>Release 8.2.6</title>
8419
8420   <note>
8421   <title>Release date</title>
8422   <simpara>2008-01-07</simpara>
8423   </note>
8424
8425   <para>
8426    This release contains a variety of fixes from 8.2.5,
8427    including fixes for significant security issues.
8428    For information about new features in the 8.2 major release, see
8429    <xref linkend="release-8-2">.
8430   </para>
8431
8432   <sect2>
8433    <title>Migration to Version 8.2.6</title>
8434
8435    <para>
8436     A dump/restore is not required for those running 8.2.X.
8437    </para>
8438
8439   </sect2>
8440
8441   <sect2>
8442    <title>Changes</title>
8443
8444    <itemizedlist>
8445
8446     <listitem>
8447      <para>
8448       Prevent functions in indexes from executing with the privileges of
8449       the user running <command>VACUUM</>, <command>ANALYZE</>, etc (Tom)
8450      </para>
8451
8452      <para>
8453       Functions used in index expressions and partial-index
8454       predicates are evaluated whenever a new table entry is made.  It has
8455       long been understood that this poses a risk of trojan-horse code
8456       execution if one modifies a table owned by an untrustworthy user.
8457       (Note that triggers, defaults, check constraints, etc. pose the
8458       same type of risk.)  But functions in indexes pose extra danger
8459       because they will be executed by routine maintenance operations
8460       such as <command>VACUUM FULL</>, which are commonly performed
8461       automatically under a superuser account.  For example, a nefarious user
8462       can execute code with superuser privileges by setting up a
8463       trojan-horse index definition and waiting for the next routine vacuum.
8464       The fix arranges for standard maintenance operations
8465       (including <command>VACUUM</>, <command>ANALYZE</>, <command>REINDEX</>,
8466       and <command>CLUSTER</>) to execute as the table owner rather than
8467       the calling user, using the same privilege-switching mechanism already
8468       used for <literal>SECURITY DEFINER</> functions.  To prevent bypassing
8469       this security measure, execution of <command>SET SESSION
8470       AUTHORIZATION</> and <command>SET ROLE</> is now forbidden within a
8471       <literal>SECURITY DEFINER</> context.  (CVE-2007-6600)
8472      </para>
8473     </listitem>
8474
8475     <listitem>
8476      <para>
8477       Repair assorted bugs in the regular-expression package (Tom, Will Drewry)
8478      </para>
8479
8480      <para>
8481       Suitably crafted regular-expression patterns could cause crashes,
8482       infinite or near-infinite looping, and/or massive memory consumption,
8483       all of which pose denial-of-service hazards for applications that
8484       accept regex search patterns from untrustworthy sources.
8485       (CVE-2007-4769, CVE-2007-4772, CVE-2007-6067)
8486      </para>
8487     </listitem>
8488
8489     <listitem>
8490      <para>
8491       Require non-superusers who use <filename>/contrib/dblink</> to use only
8492       password authentication, as a security measure (Joe)
8493      </para>
8494
8495      <para>
8496       The fix that appeared for this in 8.2.5 was incomplete, as it plugged
8497       the hole for only some <filename>dblink</> functions.  (CVE-2007-6601,
8498       CVE-2007-3278)
8499      </para>
8500     </listitem>
8501
8502     <listitem>
8503      <para>
8504       Fix bugs in WAL replay for GIN indexes (Teodor)
8505      </para>
8506     </listitem>
8507
8508     <listitem>
8509      <para>
8510       Fix GIN index build to work properly when
8511       <varname>maintenance_work_mem</> is 4GB or more (Tom)
8512      </para>
8513     </listitem>
8514
8515     <listitem>
8516      <para>
8517       Update time zone data files to <application>tzdata</> release 2007k
8518       (in particular, recent Argentina changes) (Tom)
8519      </para>
8520     </listitem>
8521
8522     <listitem>
8523      <para>
8524       Improve planner's handling of LIKE/regex estimation in non-C locales
8525       (Tom)
8526      </para>
8527     </listitem>
8528
8529     <listitem>
8530      <para>
8531       Fix planning-speed problem for deep outer-join nests, as well as
8532       possible poor choice of join order (Tom)
8533      </para>
8534     </listitem>
8535
8536     <listitem>
8537      <para>
8538       Fix planner failure in some cases of <literal>WHERE false AND var IN
8539       (SELECT ...)</> (Tom)
8540      </para>
8541     </listitem>
8542
8543     <listitem>
8544      <para>
8545       Make <command>CREATE TABLE ... SERIAL</> and
8546       <command>ALTER SEQUENCE ... OWNED BY</> not change the
8547       <function>currval()</> state of the sequence (Tom)
8548      </para>
8549     </listitem>
8550
8551     <listitem>
8552      <para>
8553       Preserve the tablespace and storage parameters of indexes that are
8554       rebuilt by <command>ALTER TABLE ... ALTER COLUMN TYPE</> (Tom)
8555      </para>
8556     </listitem>
8557
8558     <listitem>
8559      <para>
8560       Make archive recovery always start a new WAL timeline, rather than only
8561       when a recovery stop time was used (Simon)
8562      </para>
8563
8564      <para>
8565       This avoids a corner-case risk of trying to overwrite an existing
8566       archived copy of the last WAL segment, and seems simpler and cleaner
8567       than the original definition.
8568      </para>
8569     </listitem>
8570
8571     <listitem>
8572      <para>
8573       Make <command>VACUUM</> not use all of <varname>maintenance_work_mem</>
8574       when the table is too small for it to be useful (Alvaro)
8575      </para>
8576     </listitem>
8577
8578     <listitem>
8579      <para>
8580       Fix potential crash in <function>translate()</> when using a multibyte
8581       database encoding (Tom)
8582      </para>
8583     </listitem>
8584
8585     <listitem>
8586      <para>
8587       Make <function>corr()</> return the correct result for negative
8588       correlation values (Neil)
8589      </para>
8590     </listitem>
8591
8592     <listitem>
8593      <para>
8594       Fix overflow in <literal>extract(epoch from interval)</> for intervals
8595       exceeding 68 years (Tom)
8596      </para>
8597     </listitem>
8598
8599     <listitem>
8600      <para>
8601       Fix PL/Perl to not fail when a UTF-8 regular expression is used
8602       in a trusted function (Andrew)
8603      </para>
8604     </listitem>
8605
8606     <listitem>
8607      <para>
8608       Fix PL/Perl to cope when platform's Perl defines type <literal>bool</>
8609       as <literal>int</> rather than <literal>char</> (Tom)
8610      </para>
8611
8612      <para>
8613       While this could theoretically happen anywhere, no standard build of
8614       Perl did things this way ... until <productname>Mac OS X</> 10.5.
8615      </para>
8616     </listitem>
8617
8618     <listitem>
8619      <para>
8620       Fix PL/Python to work correctly with Python 2.5 on 64-bit machines
8621       (Marko Kreen)
8622      </para>
8623     </listitem>
8624
8625     <listitem>
8626      <para>
8627       Fix PL/Python to not crash on long exception messages (Alvaro)
8628      </para>
8629     </listitem>
8630
8631     <listitem>
8632      <para>
8633       Fix <application>pg_dump</> to correctly handle inheritance child tables
8634       that have default expressions different from their parent's (Tom)
8635      </para>
8636     </listitem>
8637
8638     <listitem>
8639      <para>
8640       Fix <application>libpq</> crash when <varname>PGPASSFILE</> refers
8641       to a file that is not a plain file (Martin Pitt)
8642      </para>
8643     </listitem>
8644
8645     <listitem>
8646      <para>
8647       <application>ecpg</> parser fixes (Michael)
8648      </para>
8649     </listitem>
8650
8651     <listitem>
8652      <para>
8653       Make <filename>contrib/pgcrypto</> defend against
8654       <application>OpenSSL</> libraries that fail on keys longer than 128
8655       bits; which is the case at least on some Solaris versions (Marko Kreen)
8656      </para>
8657     </listitem>
8658
8659     <listitem>
8660      <para>
8661       Make <filename>contrib/tablefunc</>'s <function>crosstab()</> handle
8662       NULL rowid as a category in its own right, rather than crashing (Joe)
8663      </para>
8664     </listitem>
8665
8666     <listitem>
8667      <para>
8668       Fix <type>tsvector</> and <type>tsquery</> output routines to
8669       escape backslashes correctly (Teodor, Bruce)
8670      </para>
8671     </listitem>
8672
8673     <listitem>
8674      <para>
8675       Fix crash of <function>to_tsvector()</> on huge input strings (Teodor)
8676      </para>
8677     </listitem>
8678
8679     <listitem>
8680      <para>
8681       Require a specific version of <productname>Autoconf</> to be used
8682       when re-generating the <command>configure</> script (Peter)
8683      </para>
8684
8685      <para>
8686       This affects developers and packagers only.  The change was made
8687       to prevent accidental use of untested combinations of
8688       <productname>Autoconf</> and <productname>PostgreSQL</> versions.
8689       You can remove the version check if you really want to use a
8690       different <productname>Autoconf</> version, but it's
8691       your responsibility whether the result works or not.
8692      </para>
8693     </listitem>
8694
8695     <listitem>
8696      <para>
8697       Update <function>gettimeofday</> configuration check so that
8698       <productname>PostgreSQL</> can be built on newer versions of
8699       <productname>MinGW</> (Magnus)
8700      </para>
8701     </listitem>
8702
8703    </itemizedlist>
8704
8705   </sect2>
8706  </sect1>
8707
8708  <sect1 id="release-8-2-5">
8709   <title>Release 8.2.5</title>
8710
8711   <note>
8712   <title>Release date</title>
8713   <simpara>2007-09-17</simpara>
8714   </note>
8715
8716   <para>
8717    This release contains a variety of fixes from 8.2.4.
8718    For information about new features in the 8.2 major release, see
8719    <xref linkend="release-8-2">.
8720   </para>
8721
8722   <sect2>
8723    <title>Migration to Version 8.2.5</title>
8724
8725    <para>
8726     A dump/restore is not required for those running 8.2.X.
8727    </para>
8728
8729   </sect2>
8730
8731   <sect2>
8732    <title>Changes</title>
8733
8734    <itemizedlist>
8735
8736     <listitem>
8737      <para>
8738       Prevent index corruption when a transaction inserts rows and
8739       then aborts close to the end of a concurrent <command>VACUUM</>
8740       on the same table (Tom)
8741      </para>
8742     </listitem>
8743
8744     <listitem>
8745      <para>
8746       Fix <literal>ALTER DOMAIN ADD CONSTRAINT</> for cases involving
8747       domains over domains (Tom)
8748      </para>
8749     </listitem>
8750
8751     <listitem>
8752      <para>
8753       Make <command>CREATE DOMAIN ... DEFAULT NULL</> work properly (Tom)
8754      </para>
8755     </listitem>
8756
8757     <listitem>
8758      <para>
8759       Fix some planner problems with outer joins, notably poor
8760       size estimation for <literal>t1 LEFT JOIN t2 WHERE t2.col IS NULL</>
8761       (Tom)
8762      </para>
8763     </listitem>
8764
8765     <listitem>
8766      <para>
8767       Allow the <type>interval</> data type to accept input consisting only of
8768       milliseconds or microseconds (Neil)
8769      </para>
8770     </listitem>
8771
8772     <listitem>
8773      <para>
8774       Allow timezone name to appear before the year in <type>timestamp</> input (Tom)
8775      </para>
8776     </listitem>
8777
8778     <listitem>
8779      <para>
8780       Fixes for <acronym>GIN</> indexes used by <filename>/contrib/tsearch2</> (Teodor)
8781      </para>
8782     </listitem>
8783
8784     <listitem>
8785      <para>
8786       Speed up rtree index insertion (Teodor)
8787      </para>
8788     </listitem>
8789
8790     <listitem>
8791      <para>
8792       Fix excessive logging of <acronym>SSL</> error messages (Tom)
8793      </para>
8794     </listitem>
8795
8796     <listitem>
8797      <para>
8798       Fix logging so that log messages are never interleaved when using
8799       the syslogger process (Andrew)
8800      </para>
8801     </listitem>
8802
8803     <listitem>
8804      <para>
8805       Fix crash when <varname>log_min_error_statement</> logging runs out
8806       of memory (Tom)
8807      </para>
8808     </listitem>
8809
8810     <listitem>
8811      <para>
8812       Fix incorrect handling of some foreign-key corner cases (Tom)
8813      </para>
8814     </listitem>
8815
8816     <listitem>
8817      <para>
8818       Fix <function>stddev_pop(numeric)</> and <function>var_pop(numeric)</> (Tom)
8819      </para>
8820     </listitem>
8821
8822     <listitem>
8823      <para>
8824       Prevent <command>REINDEX</> and <command>CLUSTER</> from failing
8825       due to attempting to process temporary tables of other sessions (Alvaro)
8826      </para>
8827     </listitem>
8828
8829     <listitem>
8830      <para>
8831       Update the time zone database rules, particularly New Zealand's upcoming changes (Tom)
8832      </para>
8833     </listitem>
8834
8835     <listitem>
8836      <para>
8837       Windows socket and semaphore improvements (Magnus)
8838      </para>
8839     </listitem>
8840
8841     <listitem>
8842      <para>
8843       Make <command>pg_ctl -w</> work properly in Windows service mode (Dave Page)
8844      </para>
8845     </listitem>
8846
8847     <listitem>
8848      <para>
8849       Fix memory allocation bug when using <application>MIT Kerberos</> on Windows (Magnus)
8850      </para>
8851     </listitem>
8852
8853     <listitem>
8854      <para>
8855       Suppress timezone name (<literal>%Z</>) in log timestamps on Windows
8856       because of possible encoding mismatches (Tom)
8857      </para>
8858     </listitem>
8859
8860     <listitem>
8861      <para>
8862       Require non-superusers who use <filename>/contrib/dblink</> to use only
8863       password authentication, as a security measure (Joe)
8864      </para>
8865     </listitem>
8866
8867     <listitem>
8868      <para>
8869       Restrict <filename>/contrib/pgstattuple</> functions to superusers, for security reasons (Tom)
8870      </para>
8871     </listitem>
8872
8873     <listitem>
8874      <para>
8875       Do not let <filename>/contrib/intarray</> try to make its GIN opclass
8876       the default (this caused problems at dump/restore) (Tom)
8877      </para>
8878     </listitem>
8879
8880    </itemizedlist>
8881
8882   </sect2>
8883  </sect1>
8884
8885  <sect1 id="release-8-2-4">
8886   <title>Release 8.2.4</title>
8887
8888   <note>
8889   <title>Release date</title>
8890   <simpara>2007-04-23</simpara>
8891   </note>
8892
8893   <para>
8894    This release contains a variety of fixes from 8.2.3,
8895    including a security fix.
8896    For information about new features in the 8.2 major release, see
8897    <xref linkend="release-8-2">.
8898   </para>
8899
8900   <sect2>
8901    <title>Migration to Version 8.2.4</title>
8902
8903    <para>
8904     A dump/restore is not required for those running 8.2.X.
8905    </para>
8906
8907   </sect2>
8908
8909   <sect2>
8910    <title>Changes</title>
8911
8912    <itemizedlist>
8913
8914     <listitem>
8915      <para>
8916       Support explicit placement of the temporary-table schema within
8917       <varname>search_path</>, and disable searching it for functions
8918       and operators (Tom)
8919      </para>
8920
8921      <para>
8922       This is needed to allow a security-definer function to set a
8923       truly secure value of <varname>search_path</>.  Without it,
8924       an unprivileged SQL user can use temporary objects to execute code
8925       with the privileges of the security-definer function (CVE-2007-2138).
8926       See <command>CREATE FUNCTION</> for more information.
8927      </para>
8928     </listitem>
8929
8930     <listitem>
8931      <para>
8932       Fix <varname>shared_preload_libraries</> for Windows
8933       by forcing reload in each backend (Korry Douglas)
8934      </para>
8935     </listitem>
8936
8937     <listitem>
8938      <para>
8939       Fix <function>to_char()</> so it properly upper/lower cases localized day or month
8940       names (Pavel Stehule)
8941      </para>
8942     </listitem>
8943
8944     <listitem>
8945      <para>
8946       <filename>/contrib/tsearch2</> crash fixes (Teodor)
8947      </para>
8948     </listitem>
8949
8950     <listitem>
8951      <para>
8952       Require <command>COMMIT PREPARED</> to be executed in the same
8953       database as the transaction was prepared in (Heikki)
8954      </para>
8955     </listitem>
8956
8957     <listitem>
8958      <para>
8959       Allow <command>pg_dump</> to do binary backups larger than two gigabytes
8960       on Windows (Magnus)
8961      </para>
8962     </listitem>
8963
8964     <listitem>
8965      <para>
8966       New traditional (Taiwan) Chinese <acronym>FAQ</> (Zhou Daojing)
8967      </para>
8968     </listitem>
8969
8970     <listitem>
8971      <para>
8972       Prevent the statistics collector from writing to disk too frequently (Tom)
8973      </para>
8974     </listitem>
8975
8976     <listitem>
8977      <para>
8978       Fix potential-data-corruption bug in how <command>VACUUM FULL</> handles
8979       <command>UPDATE</> chains (Tom, Pavan Deolasee)
8980      </para>
8981     </listitem>
8982
8983     <listitem>
8984      <para>
8985       Fix bug in domains that use array types (Tom)
8986      </para>
8987     </listitem>
8988
8989     <listitem>
8990      <para>
8991       Fix <command>pg_dump</> so it can dump a serial column's sequence
8992       using <option>-t</> when not also dumping the owning table
8993       (Tom)
8994      </para>
8995     </listitem>
8996
8997     <listitem>
8998      <para>
8999       Planner fixes, including improving outer join and bitmap scan
9000       selection logic (Tom)
9001      </para>
9002     </listitem>
9003
9004     <listitem>
9005      <para>
9006       Fix possible wrong answers or crash when a PL/pgSQL function tries
9007       to <literal>RETURN</> from within an <literal>EXCEPTION</> block
9008       (Tom)
9009      </para>
9010     </listitem>
9011
9012     <listitem>
9013      <para>
9014       Fix PANIC during enlargement of a hash index (Tom)
9015      </para>
9016     </listitem>
9017
9018     <listitem>
9019      <para>
9020       Fix POSIX-style timezone specs to follow new USA DST rules (Tom)
9021      </para>
9022     </listitem>
9023
9024    </itemizedlist>
9025
9026   </sect2>
9027  </sect1>
9028
9029  <sect1 id="release-8-2-3">
9030   <title>Release 8.2.3</title>
9031
9032   <note>
9033   <title>Release date</title>
9034   <simpara>2007-02-07</simpara>
9035   </note>
9036
9037   <para>
9038    This release contains two fixes from 8.2.2.
9039    For information about new features in the 8.2 major release, see
9040    <xref linkend="release-8-2">.
9041   </para>
9042
9043   <sect2>
9044    <title>Migration to Version 8.2.3</title>
9045
9046    <para>
9047     A dump/restore is not required for those running 8.2.X.
9048    </para>
9049
9050   </sect2>
9051
9052   <sect2>
9053    <title>Changes</title>
9054
9055    <itemizedlist>
9056
9057     <listitem>
9058      <para>
9059       Remove overly-restrictive check for type length in constraints and
9060       functional indexes(Tom)
9061      </para>
9062     </listitem>
9063
9064     <listitem>
9065      <para>
9066       Fix optimization so MIN/MAX in subqueries can again use indexes (Tom)
9067      </para>
9068     </listitem>
9069
9070    </itemizedlist>
9071
9072   </sect2>
9073  </sect1>
9074
9075  <sect1 id="release-8-2-2">
9076   <title>Release 8.2.2</title>
9077
9078   <note>
9079   <title>Release date</title>
9080   <simpara>2007-02-05</simpara>
9081   </note>
9082
9083   <para>
9084    This release contains a variety of fixes from 8.2.1, including
9085    a security fix.
9086    For information about new features in the 8.2 major release, see
9087    <xref linkend="release-8-2">.
9088   </para>
9089
9090   <sect2>
9091    <title>Migration to Version 8.2.2</title>
9092
9093    <para>
9094     A dump/restore is not required for those running 8.2.X.
9095    </para>
9096
9097   </sect2>
9098
9099   <sect2>
9100    <title>Changes</title>
9101
9102    <itemizedlist>
9103
9104     <listitem>
9105      <para>
9106       Remove security vulnerabilities that allowed connected users
9107       to read backend memory (Tom)
9108      </para>
9109
9110      <para>
9111       The vulnerabilities involve suppressing the normal check that a SQL
9112       function returns the data type it's declared to, and changing the
9113       data type of a table column (CVE-2007-0555, CVE-2007-0556).  These
9114       errors can easily be exploited to cause a backend crash, and in
9115       principle might be used to read database content that the user
9116       should not be able to access.
9117      </para>
9118     </listitem>
9119
9120     <listitem>
9121      <para>
9122       Fix not-so-rare-anymore bug wherein btree index page splits could fail
9123       due to choosing an infeasible split point (Heikki Linnakangas)
9124      </para>
9125     </listitem>
9126
9127     <listitem>
9128      <para>
9129       Fix Borland C compile scripts (L Bayuk)
9130      </para>
9131     </listitem>
9132
9133     <listitem>
9134      <para>
9135       Properly handle <function>to_char('CC')</> for years ending in
9136       <literal>00</> (Tom)
9137      </para>
9138
9139      <para>
9140       Year 2000 is in the twentieth century, not the twenty-first.
9141      </para>
9142     </listitem>
9143
9144     <listitem>
9145      <para>
9146       <filename>/contrib/tsearch2</> localization improvements (Tatsuo, Teodor)
9147      </para>
9148     </listitem>
9149
9150     <listitem>
9151      <para>
9152       Fix incorrect permission check in
9153       <literal>information_schema.key_column_usage</> view (Tom)
9154      </para>
9155
9156      <para>
9157       The symptom is <quote>relation with OID nnnnn does not exist</> errors.
9158       To get this fix without using <command>initdb</>, use <command>CREATE OR
9159       REPLACE VIEW</> to install the corrected definition found in
9160       <filename>share/information_schema.sql</>.  Note you will need to do
9161       this in each database.
9162      </para>
9163     </listitem>
9164
9165     <listitem>
9166      <para>
9167       Improve <command>VACUUM</> performance for databases with many tables (Tom)
9168      </para>
9169     </listitem>
9170
9171     <listitem>
9172      <para>
9173       Fix for rare Assert() crash triggered by <literal>UNION</> (Tom)
9174      </para>
9175     </listitem>
9176
9177     <listitem>
9178      <para>
9179       Fix potentially incorrect results from index searches using
9180       <literal>ROW</> inequality conditions (Tom)
9181      </para>
9182     </listitem>
9183
9184     <listitem>
9185      <para>
9186       Tighten security of multi-byte character processing for UTF8 sequences
9187       over three bytes long (Tom)
9188      </para>
9189     </listitem>
9190
9191     <listitem>
9192      <para>
9193       Fix bogus <quote>permission denied</> failures occurring on Windows
9194       due to attempts to fsync already-deleted files (Magnus, Tom)
9195      </para>
9196     </listitem>
9197
9198     <listitem>
9199      <para>
9200       Fix bug that could cause the statistics collector
9201       to hang on Windows (Magnus)
9202      </para>
9203
9204      <para>
9205       This would in turn lead to autovacuum not working.
9206      </para>
9207     </listitem>
9208
9209     <listitem>
9210      <para>
9211       Fix possible crashes when an already-in-use PL/pgSQL function is
9212       updated (Tom)
9213      </para>
9214     </listitem>
9215
9216     <listitem>
9217      <para>
9218       Improve PL/pgSQL handling of domain types (Sergiy Vyshnevetskiy, Tom)
9219      </para>
9220     </listitem>
9221
9222     <listitem>
9223      <para>
9224       Fix possible errors in processing PL/pgSQL exception blocks (Tom)
9225      </para>
9226     </listitem>
9227
9228    </itemizedlist>
9229
9230   </sect2>
9231  </sect1>
9232
9233  <sect1 id="release-8-2-1">
9234   <title>Release 8.2.1</title>
9235
9236   <note>
9237   <title>Release date</title>
9238   <simpara>2007-01-08</simpara>
9239   </note>
9240
9241   <para>
9242    This release contains a variety of fixes from 8.2.
9243    For information about new features in the 8.2 major release, see
9244    <xref linkend="release-8-2">.
9245   </para>
9246
9247   <sect2>
9248    <title>Migration to Version 8.2.1</title>
9249
9250    <para>
9251     A dump/restore is not required for those running 8.2.
9252    </para>
9253
9254   </sect2>
9255
9256   <sect2>
9257    <title>Changes</title>
9258
9259    <itemizedlist>
9260
9261     <listitem>
9262      <para>
9263       Fix crash with <literal>SELECT</> ... <literal>LIMIT ALL</> (also
9264       <literal>LIMIT NULL</>) (Tom)
9265      </para>
9266     </listitem>
9267
9268     <listitem>
9269      <para>
9270       <filename>Several /contrib/tsearch2</> fixes (Teodor)
9271      </para>
9272     </listitem>
9273
9274     <listitem>
9275      <para>
9276       On Windows, make log messages coming from the operating system use
9277       <acronym>ASCII</> encoding (Hiroshi Saito)
9278      </para>
9279
9280      <para>
9281       This fixes a conversion problem when there is a mismatch between
9282       the encoding of the operating system and database server.
9283      </para>
9284     </listitem>
9285
9286     <listitem>
9287      <para>
9288       Fix Windows linking of <application>pg_dump</> using
9289       <filename>win32.mak</>
9290       (Hiroshi Saito)
9291      </para>
9292     </listitem>
9293
9294     <listitem>
9295      <para>
9296       Fix planner mistakes for outer join queries (Tom)
9297      </para>
9298     </listitem>
9299
9300     <listitem>
9301      <para>
9302       Fix several problems in queries involving sub-SELECTs (Tom)
9303      </para>
9304     </listitem>
9305
9306     <listitem>
9307      <para>
9308       Fix potential crash in SPI during subtransaction abort (Tom)
9309      </para>
9310
9311      <para>
9312       This affects all PL functions since they all use SPI.
9313      </para>
9314     </listitem>
9315
9316     <listitem>
9317      <para>
9318       Improve build speed of <acronym>PDF</> documentation (Peter)
9319      </para>
9320     </listitem>
9321
9322     <listitem>
9323      <para>
9324       Re-add <acronym>JST</> (Japan) timezone abbreviation (Tom)
9325      </para>
9326     </listitem>
9327
9328     <listitem>
9329      <para>
9330       Improve optimization decisions related to index scans (Tom)
9331      </para>
9332     </listitem>
9333
9334     <listitem>
9335      <para>
9336       Have <application>psql</> print multi-byte combining characters as
9337       before, rather than output as <literal>\u</> (Tom)
9338      </para>
9339     </listitem>
9340
9341     <listitem>
9342      <para>
9343       Improve index usage of regular expressions that use parentheses (Tom)
9344      </para>
9345
9346      <para>
9347       This improves <application>psql</> <literal>\d</> performance also.
9348      </para>
9349     </listitem>
9350
9351     <listitem>
9352      <para>
9353       Make <application>pg_dumpall</> assume that databases have public
9354       <literal>CONNECT</> privilege, when dumping from a pre-8.2 server (Tom)
9355      </para>
9356
9357      <para>
9358       This preserves the previous behavior that anyone can connect to a
9359       database if allowed by <filename>pg_hba.conf</>.
9360      </para>
9361     </listitem>
9362
9363    </itemizedlist>
9364
9365   </sect2>
9366  </sect1>
9367
9368  <sect1 id="release-8-2">
9369   <title>Release 8.2</title>
9370
9371   <note>
9372    <title>Release date</title>
9373    <simpara>2006-12-05</simpara>
9374   </note>
9375
9376   <sect2>
9377    <title>Overview</title>
9378
9379    <para>
9380     This release adds many functionality and performance improvements that
9381     were requested by users, including:
9382
9383    <itemizedlist>
9384
9385      <listitem>
9386       <para>
9387        Query language enhancements including <command>INSERT/UPDATE/DELETE
9388        RETURNING</command>, multirow <literal>VALUES</literal> lists, and
9389        optional target-table alias in
9390        <command>UPDATE</>/<command>DELETE</command>
9391       </para>
9392      </listitem>
9393
9394      <listitem>
9395       <para>
9396        Index creation without blocking concurrent
9397        <command>INSERT</>/<command>UPDATE</>/<command>DELETE</>
9398        operations
9399       </para>
9400      </listitem>
9401
9402      <listitem>
9403       <para>
9404        Many query optimization improvements, including support for
9405        reordering outer joins
9406       </para>
9407      </listitem>
9408
9409      <listitem>
9410       <para>
9411        Improved sorting performance with lower memory usage
9412       </para>
9413      </listitem>
9414
9415      <listitem>
9416       <para>
9417        More efficient locking with better concurrency
9418       </para>
9419      </listitem>
9420
9421      <listitem>
9422       <para>
9423        More efficient vacuuming
9424       </para>
9425      </listitem>
9426
9427      <listitem>
9428       <para>
9429        Easier administration of warm standby servers
9430       </para>
9431      </listitem>
9432
9433      <listitem>
9434       <para>
9435        New <literal>FILLFACTOR</literal> support for tables and indexes
9436       </para>
9437      </listitem>
9438
9439      <listitem>
9440       <para>
9441        Monitoring, logging, and performance tuning additions
9442       </para>
9443      </listitem>
9444
9445      <listitem>
9446       <para>
9447        More control over creating and dropping objects
9448       </para>
9449      </listitem>
9450
9451      <listitem>
9452       <para>
9453        Table inheritance relationships can be defined
9454        for and removed from pre-existing tables
9455       </para>
9456      </listitem>
9457
9458      <listitem>
9459       <para>
9460        <command>COPY TO</command> can copy the output of an arbitrary
9461        <command>SELECT</command> statement
9462       </para>
9463      </listitem>
9464
9465      <listitem>
9466       <para>
9467        Array improvements, including nulls in arrays
9468       </para>
9469      </listitem>
9470
9471      <listitem>
9472       <para>
9473        Aggregate-function improvements, including multiple-input
9474        aggregates and SQL:2003 statistical functions
9475       </para>
9476      </listitem>
9477
9478      <listitem>
9479       <para>
9480        Many <filename>contrib/</filename> improvements
9481       </para>
9482      </listitem>
9483
9484     </itemizedlist>
9485
9486    </para>
9487
9488   </sect2>
9489
9490   <sect2>
9491    <title>Migration to Version 8.2</title>
9492
9493    <para>
9494     A dump/restore using <application>pg_dump</application> is
9495     required for those wishing to migrate data from any previous
9496     release.
9497    </para>
9498
9499    <para>
9500     Observe the following incompatibilities:
9501    </para>
9502
9503    <itemizedlist>
9504
9505      <listitem>
9506       <para>
9507        Set <link
9508        linkend="guc-escape-string-warning"><varname>escape_string_warning</></link>
9509        to <literal>on</> by default (Bruce)
9510       </para>
9511
9512       <para>
9513        This issues a warning if backslash escapes are used in
9514        <link linkend="sql-syntax-strings">non-escape (non-<literal>E''</>)
9515        strings</link>.
9516       </para>
9517      </listitem>
9518
9519      <listitem>
9520       <para>
9521        Change the <link linkend="sql-syntax-row-constructors">row
9522        constructor syntax</link> (<literal>ROW(...)</>) so that
9523        list elements <literal>foo.*</> will be expanded to a list
9524        of their member fields, rather than creating a nested
9525        row type field as formerly (Tom)
9526       </para>
9527
9528       <para>
9529        The new behavior is substantially more useful since it
9530        allows, for example, triggers to check for data changes
9531        with <literal>IF row(new.*) IS DISTINCT FROM row(old.*)</>.
9532        The old behavior is still available by omitting <literal>.*</>.
9533       </para>
9534      </listitem>
9535
9536      <listitem>
9537       <para>
9538        Make <link linkend="row-wise-comparison">row comparisons</link>
9539        follow <acronym>SQL</> standard semantics and allow them
9540        to be used in index scans (Tom)
9541       </para>
9542
9543       <para>
9544        Previously, row = and &lt;&gt; comparisons followed the
9545        standard but &lt; &lt;= &gt; &gt;= did not.  A row comparison
9546        can now be used as an index constraint for a multicolumn
9547        index matching the row value.
9548       </para>
9549      </listitem>
9550
9551      <listitem>
9552       <para>
9553        Make <link linkend="functions-comparison">row <literal>IS <optional>NOT</> NULL</literal></link>
9554        tests follow <acronym>SQL</> standard semantics (Tom)
9555       </para>
9556
9557       <para>
9558        The former behavior conformed to the standard for simple cases
9559        with <literal>IS NULL</>, but <literal>IS NOT NULL</> would return
9560        true if any row field was non-null, whereas the standard says it
9561        should return true only when all fields are non-null.
9562       </para>
9563      </listitem>
9564
9565      <listitem>
9566       <para>
9567        Make <link linkend="SQL-SET-CONSTRAINTS"><command>SET
9568        CONSTRAINT</></link> affect only one constraint (Kris Jurka)
9569       </para>
9570
9571       <para>
9572        In previous releases, <command>SET CONSTRAINT</> modified
9573        all constraints with a matching name.  In this release,
9574        the schema search path is used to modify only the first
9575        matching constraint.  A schema specification is also
9576        supported.  This more nearly conforms to the SQL standard.
9577       </para>
9578      </listitem>
9579
9580      <listitem>
9581       <para>
9582        Remove <literal>RULE</> permission for tables, for security reasons
9583        (Tom)
9584       </para>
9585
9586       <para>
9587        As of this release, only a table's owner can create or modify
9588        rules for the table.  For backwards compatibility,
9589        <command>GRANT</>/<command>REVOKE RULE</> is still accepted,
9590        but it does nothing.
9591       </para>
9592      </listitem>
9593
9594      <listitem>
9595       <para>
9596        Array comparison improvements (Tom)
9597       </para>
9598
9599       <para>
9600        Now array dimensions are also compared.
9601       </para>
9602      </listitem>
9603
9604      <listitem>
9605       <para>
9606        Change <link linkend="functions-array">array concatenation</link>
9607        to match documented behavior (Tom)
9608       </para>
9609
9610       <para>
9611        This changes the previous behavior where concatenation
9612        would modify the array lower bound.
9613       </para>
9614      </listitem>
9615
9616      <listitem>
9617       <para>
9618        Make command-line options of <application>postmaster</>
9619        and <link linkend="app-postgres"><application>postgres</></link>
9620        identical (Peter)
9621       </para>
9622
9623       <para>
9624        This allows the postmaster to pass arguments to each backend
9625        without using <literal>-o</>.  Note that some options are now
9626        only available as long-form options, because there were conflicting
9627        single-letter options.
9628       </para>
9629      </listitem>
9630
9631      <listitem>
9632       <para>
9633        Deprecate use of <application>postmaster</> symbolic link (Peter)
9634       </para>
9635
9636       <para>
9637        <application>postmaster</> and <application>postgres</>
9638        commands now act identically, with the behavior determined
9639        by command-line options.  The <application>postmaster</> symbolic link is
9640        kept for compatibility, but is not really needed.
9641       </para>
9642      </listitem>
9643
9644      <listitem>
9645       <para>
9646        Change <link
9647        linkend="guc-log-duration"><varname>log_duration</></link>
9648        to output even if the query is not output (Tom)
9649       </para>
9650
9651       <para>
9652        In prior releases, <varname>log_duration</> only printed if
9653        the query appeared earlier in the log.
9654       </para>
9655      </listitem>
9656
9657      <listitem>
9658       <para>
9659        Make <link
9660        linkend="functions-formatting"><function>to_char(time)</></link>
9661        and <link
9662        linkend="functions-formatting"><function>to_char(interval)</></link>
9663        treat <literal>HH</> and <literal>HH12</> as 12-hour
9664        intervals
9665       </para>
9666
9667       <para>
9668        Most applications should use <literal>HH24</> unless they
9669        want a 12-hour display.
9670       </para>
9671      </listitem>
9672
9673      <listitem>
9674       <para>
9675        Zero unmasked bits in conversion from <link
9676        linkend="datatype-inet"><type>INET</></link> to <link
9677        linkend="datatype-inet"><type>CIDR</></link> (Tom)
9678       </para>
9679
9680       <para>
9681        This ensures that the converted value is actually valid for
9682        <type>CIDR</>.
9683       </para>
9684      </listitem>
9685
9686      <listitem>
9687       <para>
9688        Remove <varname>australian_timezones</> configuration variable
9689        (Joachim Wieland)
9690       </para>
9691
9692       <para>
9693        This variable has been superseded by a more general facility
9694        for configuring timezone abbreviations.
9695       </para>
9696      </listitem>
9697
9698      <listitem>
9699       <para>
9700        Improve cost estimation for nested-loop index scans (Tom)
9701       </para>
9702
9703       <para>
9704        This might eliminate the need to set unrealistically small
9705        values of <link
9706        linkend="guc-random-page-cost"><varname>random_page_cost</></link>.
9707        If you have been using a very small <varname>random_page_cost</>,
9708        please recheck your test cases.
9709       </para>
9710      </listitem>
9711
9712      <listitem>
9713       <para>
9714        Change behavior of <command>pg_dump</> <literal>-n</> and
9715        <literal>-t</> options.  (Greg Sabino Mullane)
9716       </para>
9717       <para>
9718        See the <command>pg_dump</> manual page for details.
9719       </para>
9720      </listitem>
9721
9722      <listitem>
9723       <para>
9724        Change <link linkend="libpq"><application>libpq</></link>
9725        <function>PQdsplen()</> to return a useful value (Martijn
9726        van Oosterhout)
9727       </para>
9728      </listitem>
9729
9730      <listitem>
9731       <para>
9732        Declare <link linkend="libpq"><application>libpq</></link>
9733        <function>PQgetssl()</> as returning <literal>void *</>,
9734        rather than <literal>SSL *</> (Martijn van Oosterhout)
9735       </para>
9736
9737       <para>
9738        This allows applications to use the function without including
9739        the OpenSSL headers.
9740       </para>
9741      </listitem>
9742
9743      <listitem>
9744       <para>
9745        C-language loadable modules must now include a
9746        <link linkend="xfunc-c-dynload"><literal>PG_MODULE_MAGIC</></link>
9747        macro call for version compatibility checking
9748        (Martijn van Oosterhout)
9749       </para>
9750      </listitem>
9751
9752      <listitem>
9753       <para>
9754        For security's sake, modules used by a PL/PerlU function are no
9755        longer available to PL/Perl functions (Andrew)
9756       </para>
9757       <note>
9758        <para>
9759         This also implies that data can no longer be shared between a PL/Perl
9760         function and a PL/PerlU function.
9761         Some Perl installations have not been compiled with the correct flags
9762         to allow multiple interpreters to exist within a single process.
9763         In this situation PL/Perl and PL/PerlU cannot both be used in a
9764         single backend. The solution is to get a Perl installation which
9765         supports multiple interpreters.
9766        </para>
9767       </note>
9768      </listitem>
9769
9770      <listitem>
9771       <para>
9772        In <filename>contrib/xml2/</>, rename <function>xml_valid()</> to
9773        <function>xml_is_well_formed()</> (Tom)
9774       </para>
9775
9776       <para>
9777        <function>xml_valid()</> will remain for backward compatibility,
9778        but its behavior will change to do schema checking in a future
9779        release.
9780       </para>
9781      </listitem>
9782
9783      <listitem>
9784       <para>
9785        Remove <filename>contrib/ora2pg/</>, now at <ulink
9786        url="http://www.samse.fr/GPL/ora2pg"></ulink>
9787       </para>
9788      </listitem>
9789
9790      <listitem>
9791       <para>
9792        Remove contrib modules that have been migrated to PgFoundry:
9793        <filename>adddepend</>, <filename>dbase</>, <filename>dbmirror</>,
9794        <filename>fulltextindex</>, <filename>mac</>, <filename>userlock</>
9795       </para>
9796      </listitem>
9797
9798      <listitem>
9799       <para>
9800        Remove abandoned contrib modules:
9801        <filename>mSQL-interface</>, <filename>tips</>
9802       </para>
9803      </listitem>
9804
9805      <listitem>
9806       <para>
9807        Remove <acronym>QNX</> and <acronym>BEOS</> ports (Bruce)
9808       </para>
9809
9810       <para>
9811        These ports no longer had active maintainers.
9812       </para>
9813      </listitem>
9814
9815    </itemizedlist>
9816   </sect2>
9817
9818   <sect2>
9819    <title>Changes</title>
9820
9821    <para>
9822     Below you will find a detailed account of the
9823     changes between <productname>PostgreSQL</productname> 8.2 and
9824     the previous major release.
9825    </para>
9826
9827    <sect3>
9828     <title>Performance Improvements</title>
9829     <itemizedlist>
9830
9831      <listitem>
9832       <para>
9833        Allow the planner to reorder <link linkend="queries-join">outer
9834        joins</link> in some circumstances (Tom)
9835       </para>
9836
9837       <para>
9838        In previous releases, outer joins would always be evaluated in
9839        the order written in the query. This change allows the
9840        query optimizer to consider reordering outer joins, in cases where
9841        it can determine that the join order can be changed without
9842        altering the meaning of the query.  This can make a
9843        considerable performance difference for queries involving
9844        multiple outer joins or mixed inner and outer joins.
9845       </para>
9846      </listitem>
9847
9848      <listitem>
9849       <para>
9850        Improve efficiency of <link
9851        linkend="functions-comparisons"><literal>IN</>
9852        (list-of-expressions)</link> clauses (Tom)
9853       </para>
9854      </listitem>
9855
9856      <listitem>
9857       <para>
9858        Improve sorting speed and reduce memory usage (Simon, Tom)
9859       </para>
9860      </listitem>
9861
9862      <listitem>
9863       <para>
9864        Improve subtransaction performance (Alvaro, Itagaki Takahiro,
9865        Tom)
9866       </para>
9867      </listitem>
9868
9869      <listitem>
9870       <para>
9871        Add <literal>FILLFACTOR</> to <link
9872        linkend="SQL-CREATETABLE">table</link> and <link
9873        linkend="SQL-CREATEINDEX">index</link> creation (ITAGAKI
9874        Takahiro)
9875       </para>
9876
9877       <para>
9878        This leaves extra free space in each table or index page,
9879        allowing improved performance as the database grows.  This
9880        is particularly valuable to maintain clustering.
9881       </para>
9882      </listitem>
9883
9884      <listitem>
9885       <para>
9886        Increase default values for <link
9887        linkend="guc-shared-buffers"><varname>shared_buffers</></link>
9888        and <varname>max_fsm_pages</>
9889        (Andrew)
9890       </para>
9891      </listitem>
9892
9893      <listitem>
9894       <para>
9895        Improve locking performance by breaking the lock manager tables into
9896        sections
9897        (Tom)
9898       </para>
9899
9900       <para>
9901        This allows locking to be more fine-grained, reducing
9902        contention.
9903       </para>
9904      </listitem>
9905
9906      <listitem>
9907       <para>
9908        Reduce locking requirements of sequential scans (Qingqing
9909        Zhou)
9910       </para>
9911      </listitem>
9912
9913      <listitem>
9914       <para>
9915        Reduce locking required for database creation and destruction
9916        (Tom)
9917       </para>
9918      </listitem>
9919
9920      <listitem>
9921       <para>
9922        Improve the optimizer's selectivity estimates for <link
9923        linkend="functions-like"><literal>LIKE</></link>, <link
9924        linkend="functions-like"><literal>ILIKE</></link>, and
9925        <link linkend="functions-posix-regexp">regular expression</link>
9926        operations (Tom)
9927       </para>
9928      </listitem>
9929
9930      <listitem>
9931       <para>
9932        Improve planning of joins to <link linkend="ddl-inherit">inherited
9933        tables</link> and <link linkend="queries-union"><literal>UNION
9934        ALL</></link> views (Tom)
9935       </para>
9936      </listitem>
9937
9938      <listitem>
9939       <para>
9940        Allow <link linkend="guc-constraint-exclusion">constraint
9941        exclusion</link> to be applied to <link
9942        linkend="ddl-inherit">inherited</link> <command>UPDATE</> and
9943        <command>DELETE</> queries (Tom)
9944       </para>
9945
9946       <para>
9947        <command>SELECT</> already honored constraint exclusion.
9948       </para>
9949      </listitem>
9950
9951      <listitem>
9952       <para>
9953        Improve planning of constant <literal>WHERE</> clauses, such as
9954        a condition that depends only on variables inherited from an
9955        outer query level (Tom)
9956       </para>
9957      </listitem>
9958
9959      <listitem>
9960       <para>
9961        Protocol-level unnamed prepared statements are re-planned
9962        for each set of <literal>BIND</> values (Tom)
9963       </para>
9964
9965       <para>
9966        This improves performance because the exact parameter values
9967        can be used in the plan.
9968       </para>
9969      </listitem>
9970
9971      <listitem>
9972       <para>
9973        Speed up vacuuming of B-Tree indexes (Heikki Linnakangas,
9974        Tom)
9975       </para>
9976      </listitem>
9977
9978      <listitem>
9979       <para>
9980        Avoid extra scan of tables without indexes during <link
9981        linkend="SQL-VACUUM"><command>VACUUM</></link> (Greg Stark)
9982       </para>
9983      </listitem>
9984
9985      <listitem>
9986       <para>
9987        Improve multicolumn <link linkend="GiST"><acronym>GiST</></link>
9988        indexing (Oleg, Teodor)
9989       </para>
9990      </listitem>
9991
9992      <listitem>
9993       <para>
9994        Remove dead index entries before B-Tree page split (Junji
9995        Teramoto)
9996       </para>
9997      </listitem>
9998
9999     </itemizedlist>
10000
10001    </sect3>
10002
10003    <sect3>
10004     <title>Server Changes</title>
10005     <itemizedlist>
10006
10007      <listitem>
10008       <para>
10009        Allow a forced switch to a new transaction log file (Simon, Tom)
10010       </para>
10011
10012       <para>
10013        This is valuable for keeping warm standby slave servers
10014        in sync with the master.  Transaction log file switching now also happens
10015        automatically during <link
10016        linkend="functions-admin"><function>pg_stop_backup()</></link>.
10017        This ensures that all
10018        transaction log files needed for recovery can be archived immediately.
10019       </para>
10020      </listitem>
10021
10022      <listitem>
10023       <para>
10024        Add <acronym>WAL</> informational functions (Simon)
10025       </para>
10026
10027       <para>
10028        Add functions for interrogating the current transaction log insertion
10029        point and determining <acronym>WAL</> filenames from the
10030        hex <acronym>WAL</> locations displayed by <link
10031        linkend="functions-admin"><function>pg_stop_backup()</></link>
10032        and related functions.
10033       </para>
10034      </listitem>
10035
10036      <listitem>
10037       <para>
10038        Improve recovery from a crash during <acronym>WAL</> replay (Simon)
10039       </para>
10040
10041       <para>
10042        The server now does periodic checkpoints during <acronym>WAL</>
10043        recovery, so if there is a crash, future <acronym>WAL</>
10044        recovery is shortened.  This also eliminates the need for
10045        warm standby servers to replay the entire log since the
10046        base backup if they crash.
10047       </para>
10048      </listitem>
10049
10050      <listitem>
10051       <para>
10052        Improve reliability of long-term <acronym>WAL</> replay
10053        (Heikki, Simon, Tom)
10054       </para>
10055
10056       <para>
10057        Formerly, trying to roll forward through more than 2 billion
10058        transactions would not work due to XID wraparound.  This meant
10059        warm standby servers had to be reloaded
10060        from fresh base backups periodically.
10061       </para>
10062      </listitem>
10063
10064      <listitem>
10065       <para>
10066        Add <link
10067        linkend="guc-archive-timeout"><varname>archive_timeout</></link>
10068        to force transaction log file switches at a given interval (Simon)
10069       </para>
10070
10071       <para>
10072        This enforces a maximum replication delay for warm standby servers.
10073       </para>
10074      </listitem>
10075
10076      <listitem>
10077       <para>
10078        Add native <link linkend="auth-ldap"><acronym>LDAP</></link>
10079        authentication (Magnus Hagander)
10080       </para>
10081
10082       <para>
10083        This is particularly useful for platforms that do not
10084        support <acronym>PAM</>, such as Windows.
10085       </para>
10086      </listitem>
10087
10088      <listitem>
10089       <para>
10090        Add <link linkend="sql-grant-description-objects"><literal>GRANT
10091        CONNECT ON DATABASE</></link> (Gevik Babakhani)
10092       </para>
10093
10094       <para>
10095        This gives SQL-level control over database access.  It works as
10096        an additional filter on top of the existing
10097        <link linkend="auth-pg-hba-conf"><filename>pg_hba.conf</></link>
10098        controls.
10099       </para>
10100      </listitem>
10101
10102      <listitem>
10103       <para>
10104        Add support for <link linkend="ssl-tcp"><acronym>SSL</>
10105        Certificate Revocation List</link> (<acronym>CRL</>) files
10106        (Libor Hoho&scaron;)
10107       </para>
10108
10109       <para>
10110        The server and <application>libpq</> both recognize <acronym>CRL</>
10111        files now.
10112       </para>
10113      </listitem>
10114
10115      <listitem>
10116       <para>
10117        <link linkend="GiST"><acronym>GiST</></link> indexes are
10118        now clusterable (Teodor)
10119       </para>
10120      </listitem>
10121
10122      <listitem>
10123       <para>
10124        Remove routine autovacuum server log entries (Bruce)
10125       </para>
10126
10127       <para>
10128        <link
10129        linkend="monitoring-stats-views-table"><literal>pg_stat_activity</></link>
10130        now shows autovacuum activity.
10131       </para>
10132      </listitem>
10133
10134      <listitem>
10135       <para>
10136        Track maximum XID age within individual tables, instead of whole databases (Alvaro)
10137       </para>
10138
10139       <para>
10140        This reduces the overhead involved in preventing transaction
10141        ID wraparound, by avoiding unnecessary VACUUMs.
10142       </para>
10143      </listitem>
10144
10145      <listitem>
10146       <para>
10147        Add last vacuum and analyze timestamp columns to the stats
10148        collector (Larry Rosenman)
10149       </para>
10150
10151       <para>
10152        These values now appear in the <link
10153        linkend="monitoring-stats-views-table"><literal>pg_stat_*_tables</></link>
10154        system views.
10155       </para>
10156      </listitem>
10157
10158      <listitem>
10159       <para>
10160        Improve performance of statistics monitoring, especially
10161        <varname>stats_command_string</>
10162        (Tom, Bruce)
10163       </para>
10164
10165       <para>
10166        This release enables <varname>stats_command_string</> by
10167        default, now that its overhead is minimal.  This means
10168        <link
10169        linkend="monitoring-stats-views-table"><literal>pg_stat_activity</></link>
10170        will now show all active queries by default.
10171       </para>
10172      </listitem>
10173
10174      <listitem>
10175       <para>
10176        Add a <literal>waiting</> column to <link
10177        linkend="monitoring-stats-views-table"><literal>pg_stat_activity</></link>
10178        (Tom)
10179       </para>
10180
10181       <para>
10182        This allows <structname>pg_stat_activity</> to show all the
10183        information included in the <application>ps</> display.
10184       </para>
10185      </listitem>
10186
10187      <listitem>
10188       <para>
10189        Add configuration parameter <link
10190        linkend="guc-update-process-title"><varname>update_process_title</></link>
10191        to control whether the <application>ps</> display is updated
10192        for every command (Bruce)
10193       </para>
10194
10195       <para>
10196        On platforms where it is expensive to update the <application>ps</>
10197        display, it might be worthwhile to turn this off and rely solely on
10198        <structname>pg_stat_activity</> for status information.
10199       </para>
10200      </listitem>
10201
10202      <listitem>
10203       <para>
10204        Allow units to be specified in configuration settings
10205        (Peter)
10206       </para>
10207
10208       <para>
10209        For example, you can now set <link
10210        linkend="guc-shared-buffers"><varname>shared_buffers</></link>
10211        to <literal>32MB</> rather than mentally converting sizes.
10212       </para>
10213      </listitem>
10214
10215      <listitem>
10216       <para>
10217        Add support for <link linkend="config-setting">include
10218        directives</link> in <filename>postgresql.conf</> (Joachim
10219        Wieland)
10220       </para>
10221      </listitem>
10222
10223      <listitem>
10224       <para>
10225        Improve logging of protocol-level prepare/bind/execute
10226        messages (Bruce, Tom)
10227       </para>
10228
10229       <para>
10230        Such logging now shows statement names, bind parameter
10231        values, and the text of the query being executed.  Also,
10232        the query text is properly included in logged error messages
10233        when enabled by <varname>log_min_error_statement</>.
10234       </para>
10235      </listitem>
10236
10237      <listitem>
10238       <para>
10239        Prevent <link
10240        linkend="guc-max-stack-depth"><varname>max_stack_depth</></link>
10241        from being set to unsafe values
10242       </para>
10243
10244       <para>
10245        On platforms where we can determine the actual kernel stack depth
10246        limit (which is most), make sure that the initial default value of
10247        <varname>max_stack_depth</> is safe, and reject attempts to set it
10248        to unsafely large values.
10249       </para>
10250      </listitem>
10251
10252      <listitem>
10253       <para>
10254        Enable highlighting of error location in query in more
10255        cases (Tom)
10256       </para>
10257
10258       <para>
10259        The server is now able to report a specific error location for
10260        some semantic errors (such as unrecognized column name), rather
10261        than just for basic syntax errors as before.
10262       </para>
10263      </listitem>
10264
10265      <listitem>
10266       <para>
10267        Fix <quote>failed to re-find parent key</> errors in
10268        <command>VACUUM</> (Tom)
10269       </para>
10270      </listitem>
10271
10272      <listitem>
10273       <para>
10274        Clean out <filename>pg_internal.init</> cache files during server
10275        restart (Simon)
10276       </para>
10277
10278       <para>
10279        This avoids a hazard that the cache files might contain stale
10280        data after PITR recovery.
10281       </para>
10282      </listitem>
10283
10284      <listitem>
10285       <para>
10286        Fix race condition for truncation of a large relation across a
10287        gigabyte boundary by <command>VACUUM</> (Tom)
10288       </para>
10289      </listitem>
10290
10291      <listitem>
10292       <para>
10293        Fix bug causing needless deadlock errors on row-level locks (Tom)
10294       </para>
10295      </listitem>
10296
10297      <listitem>
10298       <para>
10299        Fix bugs affecting multi-gigabyte hash indexes (Tom)
10300       </para>
10301      </listitem>
10302
10303      <listitem>
10304       <para>
10305        Each backend process is now its own process group leader (Tom)
10306       </para>
10307
10308       <para>
10309        This allows query cancel to abort subprocesses invoked from a
10310        backend or archive/recovery process.
10311       </para>
10312      </listitem>
10313
10314     </itemizedlist>
10315
10316    </sect3>
10317
10318    <sect3>
10319     <title>Query Changes</title>
10320     <itemizedlist>
10321
10322      <listitem>
10323       <para>
10324        Add <link linkend="SQL-INSERT"><command>INSERT</></link>/<link
10325        linkend="SQL-UPDATE"><command>UPDATE</></link>/<link
10326        linkend="SQL-DELETE"><command>DELETE</></link>
10327        <literal>RETURNING</> (Jonah Harris, Tom)
10328       </para>
10329
10330       <para>
10331        This allows these commands to return values, such as the
10332        computed serial key for a new row.  In the <command>UPDATE</>
10333        case, values from the updated version of the row are returned.
10334       </para>
10335      </listitem>
10336
10337      <listitem>
10338       <para>
10339        Add support for multiple-row <link
10340        linkend="queries-values"><literal>VALUES</></link> clauses,
10341        per SQL standard (Joe, Tom)
10342       </para>
10343
10344       <para>
10345        This allows <command>INSERT</> to insert multiple rows of
10346        constants, or queries to generate result sets using constants.
10347        For example, <literal>INSERT ...  VALUES (...), (...),
10348        ....</>, and <literal>SELECT * FROM (VALUES (...), (...),
10349        ....) AS alias(f1, ...)</>.
10350       </para>
10351      </listitem>
10352
10353      <listitem>
10354       <para>
10355        Allow <link linkend="SQL-UPDATE"><command>UPDATE</></link>
10356        and <link linkend="SQL-DELETE"><command>DELETE</></link>
10357        to use an alias for the target table (Atsushi Ogawa)
10358       </para>
10359
10360       <para>
10361        The SQL standard does not permit an alias in these commands, but
10362        many database systems allow one anyway for notational convenience.
10363       </para>
10364      </listitem>
10365
10366      <listitem>
10367       <para>
10368        Allow <link linkend="SQL-UPDATE"><command>UPDATE</></link>
10369        to set multiple columns with a list of values (Susanne
10370        Ebrecht)
10371       </para>
10372
10373       <para>
10374        This is basically a short-hand for assigning the columns
10375        and values in pairs.  The syntax is <literal>UPDATE tab
10376        SET (<replaceable>column</>, ...) = (<replaceable>val</>, ...)</>.
10377       </para>
10378      </listitem>
10379
10380      <listitem>
10381       <para>
10382        Make row comparisons work per standard (Tom)
10383       </para>
10384
10385       <para>
10386        The forms &lt;, &lt;=, &gt;, &gt;= now compare rows lexicographically,
10387        that is, compare the first elements, if equal compare the second
10388        elements, and so on.  Formerly they expanded to an AND condition
10389        across all the elements, which was neither standard nor very useful.
10390       </para>
10391      </listitem>
10392
10393      <listitem>
10394       <para>
10395        Add <link linkend="SQL-TRUNCATE"><literal>CASCADE</></link>
10396        option to <command>TRUNCATE</> (Joachim Wieland)
10397       </para>
10398
10399       <para>
10400        This causes <command>TRUNCATE</> to automatically include all tables
10401        that reference the specified table(s) via foreign keys.  While
10402        convenient, this is a dangerous tool &mdash; use with caution!
10403       </para>
10404      </listitem>
10405
10406      <listitem>
10407       <para>
10408        Support <literal>FOR UPDATE</> and <literal>FOR SHARE</>
10409        in the same <link linkend="SQL-INSERT"><literal>SELECT</></link>
10410        command (Tom)
10411       </para>
10412      </listitem>
10413
10414      <listitem>
10415       <para>
10416        Add <link linkend="functions-comparisons"><literal>IS NOT
10417        DISTINCT FROM</></link> (Pavel Stehule)
10418       </para>
10419
10420       <para>
10421        This operator is similar to equality (<literal>=</>), but
10422        evaluates to true when both left and right operands are
10423        <literal>NULL</>, and to false when just one is, rather than
10424        yielding <literal>NULL</> in these cases.
10425       </para>
10426      </listitem>
10427
10428      <listitem>
10429       <para>
10430        Improve the length output used by <link
10431        linkend="queries-union"><literal>UNION</></link>/<literal>INTERSECT</>/<literal>EXCEPT</>
10432        (Tom)
10433       </para>
10434
10435       <para>
10436        When all corresponding columns are of the same defined length, that
10437        length is used for the result, rather than a generic length.
10438       </para>
10439      </listitem>
10440
10441      <listitem>
10442       <para>
10443        Allow <link linkend="functions-like"><literal>ILIKE</></link>
10444        to work for multi-byte encodings (Tom)
10445       </para>
10446
10447       <para>
10448        Internally, <literal>ILIKE</> now calls <function>lower()</>
10449        and then uses <literal>LIKE</>.  Locale-specific regular
10450        expression patterns still do not work in these encodings.
10451       </para>
10452      </listitem>
10453
10454      <listitem>
10455       <para>
10456        Enable <link
10457        linkend="guc-standard-conforming-strings"><varname>standard_conforming_strings</></link>
10458        to be turned <literal>on</> (Kevin Grittner)
10459       </para>
10460
10461       <para>
10462        This allows backslash escaping in strings to be disabled,
10463        making <productname>PostgreSQL</> more
10464        standards-compliant.  The default is <literal>off</> for backwards
10465        compatibility, but future releases will default this to <literal>on</>.
10466       </para>
10467      </listitem>
10468
10469      <listitem>
10470       <para>
10471        Do not flatten subqueries that contain <literal>volatile</>
10472        functions in their target lists (Jaime Casanova)
10473       </para>
10474
10475       <para>
10476        This prevents surprising behavior due to multiple evaluation
10477        of a <literal>volatile</> function (such as <function>random()</>
10478        or <function>nextval()</>).  It might cause performance
10479        degradation in the presence of functions that are unnecessarily
10480        marked as <literal>volatile</>.
10481       </para>
10482      </listitem>
10483
10484      <listitem>
10485       <para>
10486        Add system views <link
10487        linkend="view-pg-prepared-statements"><literal>pg_prepared_statements</></link>
10488        and <link
10489        linkend="view-pg-cursors"><literal>pg_cursors</></link>
10490        to show prepared statements and open cursors (Joachim Wieland, Neil)
10491       </para>
10492
10493       <para>
10494        These are very useful in pooled connection setups.
10495       </para>
10496      </listitem>
10497
10498      <listitem>
10499       <para>
10500        Support portal parameters in <link
10501        linkend="SQL-EXPLAIN"><command>EXPLAIN</></link> and <link
10502        linkend="SQL-EXECUTE"><command>EXECUTE</></link> (Tom)
10503       </para>
10504
10505       <para>
10506        This allows, for example, <acronym>JDBC</> <literal>?</> parameters to
10507        work in these commands.
10508       </para>
10509      </listitem>
10510
10511      <listitem>
10512       <para>
10513        If <acronym>SQL</>-level <link
10514        linkend="SQL-PREPARE"><command>PREPARE</></link> parameters
10515        are unspecified, infer their types from the content of the
10516        query (Neil)
10517       </para>
10518
10519       <para>
10520        Protocol-level <command>PREPARE</> already did this.
10521       </para>
10522      </listitem>
10523
10524      <listitem>
10525       <para>
10526        Allow <literal>LIMIT</> and <literal>OFFSET</> to exceed
10527        two billion (Dhanaraj M)
10528       </para>
10529      </listitem>
10530
10531     </itemizedlist>
10532
10533    </sect3>
10534
10535    <sect3>
10536     <title>Object Manipulation Changes</title>
10537     <itemizedlist>
10538
10539      <listitem>
10540       <para>
10541        Add <literal>TABLESPACE</> clause to <link
10542        linkend="SQL-CREATETABLEAS"><command>CREATE TABLE AS</></link>
10543        (Neil)
10544       </para>
10545
10546       <para>
10547        This allows a tablespace to be specified for the new table.
10548       </para>
10549      </listitem>
10550
10551      <listitem>
10552       <para>
10553        Add <literal>ON COMMIT</> clause to <link
10554        linkend="SQL-CREATETABLEAS"><command>CREATE TABLE AS</></link>
10555        (Neil)
10556       </para>
10557
10558       <para>
10559        This allows temporary tables to be truncated or dropped on
10560        transaction commit.  The default behavior is for the table
10561        to remain until the session ends.
10562       </para>
10563      </listitem>
10564
10565      <listitem>
10566       <para>
10567        Add <literal>INCLUDING CONSTRAINTS</> to <link
10568        linkend="SQL-CREATETABLE"><command>CREATE TABLE LIKE</></link>
10569        (Greg Stark)
10570       </para>
10571
10572       <para>
10573        This allows easy copying of <literal>CHECK</> constraints to a new
10574        table.
10575       </para>
10576      </listitem>
10577
10578      <listitem>
10579       <para>
10580        Allow the creation of placeholder (shell) <link
10581        linkend="SQL-CREATETYPE">types</link> (Martijn van Oosterhout)
10582       </para>
10583
10584       <para>
10585        A shell type declaration creates a type name, without specifying
10586        any of the details of the type.  Making a shell type is useful
10587        because it allows cleaner declaration of the type's input/output
10588        functions, which must exist before the type can be defined <quote>for
10589        real</>.  The syntax is <command>CREATE TYPE <replaceable
10590        class="parameter">typename</replaceable></>.
10591       </para>
10592      </listitem>
10593
10594      <listitem>
10595       <para>
10596        <link linkend="SQL-CREATEAGGREGATE">Aggregate functions</link>
10597        now support multiple input parameters (Sergey Koposov, Tom)
10598       </para>
10599      </listitem>
10600
10601      <listitem>
10602       <para>
10603        Add new aggregate creation <link
10604        linkend="SQL-CREATEAGGREGATE">syntax</link> (Tom)
10605       </para>
10606
10607       <para>
10608        The new syntax is <command>CREATE AGGREGATE
10609        <replaceable>aggname</> (<replaceable>input_type</>)
10610        (<replaceable>parameter_list</>)</command>.  This more
10611        naturally supports the new multi-parameter aggregate
10612        functionality.  The previous syntax is still supported.
10613       </para>
10614      </listitem>
10615
10616      <listitem>
10617       <para>
10618        Add <link
10619        linkend="SQL-ALTERROLE"><command>ALTER ROLE PASSWORD NULL</></link>
10620        to remove a previously set role password (Peter)
10621       </para>
10622      </listitem>
10623
10624      <listitem>
10625       <para>
10626        Add <command>DROP</> object <literal>IF EXISTS</> for many
10627        object types (Andrew)
10628       </para>
10629
10630       <para>
10631        This allows <command>DROP</> operations on non-existent
10632        objects without generating an error.
10633       </para>
10634      </listitem>
10635
10636      <listitem>
10637       <para>
10638        Add <link linkend="SQL-DROP-OWNED"><literal>DROP OWNED</></link>
10639        to drop all objects owned by a role (Alvaro)
10640       </para>
10641      </listitem>
10642
10643      <listitem>
10644       <para>
10645        Add <link linkend="SQL-REASSIGN-OWNED"><literal>REASSIGN
10646        OWNED</></link> to reassign ownership of all objects owned
10647        by a role (Alvaro)
10648       </para>
10649
10650       <para>
10651        This, and <literal>DROP OWNED</> above, facilitate dropping
10652        roles.
10653       </para>
10654      </listitem>
10655
10656      <listitem>
10657       <para>
10658        Add <link linkend="SQL-GRANT"><command>GRANT ON SEQUENCE</></link>
10659        syntax (Bruce)
10660       </para>
10661
10662       <para>
10663        This was added for setting sequence-specific permissions.
10664        <literal>GRANT ON TABLE</> for sequences is still supported
10665        for backward compatibility.
10666       </para>
10667      </listitem>
10668
10669      <listitem>
10670       <para>
10671        Add <link linkend="SQL-GRANT"><literal>USAGE</></link>
10672        permission for sequences that allows only <function>currval()</>
10673        and <function>nextval()</>, not <function>setval()</>
10674        (Bruce)
10675       </para>
10676
10677       <para>
10678        <literal>USAGE</> permission allows more fine-grained
10679        control over sequence access.  Granting <literal>USAGE</>
10680        allows users to increment
10681        a sequence, but prevents them from setting the sequence to
10682        an arbitrary value using <function>setval()</>.
10683       </para>
10684      </listitem>
10685
10686      <listitem>
10687       <para>
10688        Add <link linkend="SQL-ALTERTABLE"><literal>ALTER TABLE
10689        [ NO ] INHERIT</></link> (Greg Stark)
10690       </para>
10691
10692       <para>
10693        This allows inheritance to be adjusted dynamically, rather than
10694        just at table creation and destruction.  This is very valuable
10695        when using inheritance to implement table partitioning.
10696       </para>
10697      </listitem>
10698
10699      <listitem>
10700       <para>
10701        Allow <link linkend="SQL-COMMENT">comments</link> on global
10702        objects to be stored globally (Kris Jurka)
10703       </para>
10704
10705       <para>
10706        Previously, comments attached to databases were stored in individual
10707        databases, making them ineffective, and there was no provision
10708        at all for comments on roles or tablespaces.  This change adds a new
10709        shared catalog <link
10710        linkend="catalog-pg-shdescription"><structname>pg_shdescription</structname></link>
10711        and stores comments on databases, roles, and tablespaces therein.
10712       </para>
10713      </listitem>
10714
10715     </itemizedlist>
10716
10717    </sect3>
10718
10719    <sect3>
10720     <title>Utility Command Changes</title>
10721     <itemizedlist>
10722
10723      <listitem>
10724       <para>
10725        Add option to allow indexes to be created without blocking
10726        concurrent writes to the table (Greg Stark, Tom)
10727       </para>
10728
10729       <para>
10730        The new syntax is <link linkend="SQL-CREATEINDEX"><command>CREATE
10731        INDEX CONCURRENTLY</></link>.  The default behavior is
10732        still to block table modification while a index is being
10733        created.
10734       </para>
10735      </listitem>
10736
10737      <listitem>
10738       <para>
10739        Provide <link linkend="functions-advisory-locks">advisory
10740        locking</link> functionality (Abhijit Menon-Sen, Tom)
10741       </para>
10742
10743       <para>
10744        This is a new locking API designed to replace what used to be
10745        in /contrib/userlock.  The userlock code is now on pgfoundry.
10746       </para>
10747      </listitem>
10748
10749      <listitem>
10750       <para>
10751        Allow <link linkend="SQL-COPY"><command>COPY</></link> to
10752        dump a <command>SELECT</> query (Zoltan Boszormenyi, Karel
10753        Zak)
10754       </para>
10755
10756       <para>
10757        This allows <command>COPY</> to dump arbitrary <acronym>SQL</>
10758        queries. The syntax is <literal>COPY (SELECT ...) TO</>.
10759       </para>
10760      </listitem>
10761
10762      <listitem>
10763       <para>
10764        Make the <link linkend="SQL-COPY"><command>COPY</></link>
10765        command return a command tag that includes the number of
10766        rows copied (Volkan YAZICI)
10767       </para>
10768      </listitem>
10769
10770      <listitem>
10771       <para>
10772        Allow <link linkend="SQL-VACUUM"><command>VACUUM</></link>
10773        to expire rows without being affected by other concurrent
10774        <command>VACUUM</> operations (Hannu Krossing, Alvaro, Tom)
10775       </para>
10776      </listitem>
10777
10778      <listitem>
10779       <para>
10780        Make <link linkend="APP-INITDB"><application>initdb</></link>
10781        detect the operating system locale and set the default
10782        <varname>DateStyle</> accordingly (Peter)
10783       </para>
10784
10785       <para>
10786        This makes it more likely that the installed
10787        <filename>postgresql.conf</> <varname>DateStyle</> value will
10788        be as desired.
10789       </para>
10790      </listitem>
10791
10792      <listitem>
10793       <para>
10794        Reduce number of progress messages displayed by <application>initdb</> (Tom)
10795       </para>
10796      </listitem>
10797
10798     </itemizedlist>
10799
10800    </sect3>
10801
10802    <sect3>
10803     <title>Date/Time Changes</title>
10804     <itemizedlist>
10805
10806      <listitem>
10807       <para>
10808        Allow full timezone names in <link
10809        linkend="datatype-datetime"><type>timestamp</></link> input values
10810        (Joachim Wieland)
10811       </para>
10812
10813       <para>
10814        For example, <literal>'2006-05-24 21:11
10815        America/New_York'::timestamptz</>.
10816       </para>
10817      </listitem>
10818
10819      <listitem>
10820       <para>
10821        Support configurable timezone abbreviations (Joachim Wieland)
10822       </para>
10823
10824       <para>
10825        A desired set of timezone abbreviations can be chosen via the
10826        configuration parameter <link
10827        linkend="guc-timezone-abbreviations"><varname>timezone_abbreviations</></link>.
10828       </para>
10829      </listitem>
10830
10831      <listitem>
10832       <para>
10833        Add <link
10834        linkend="view-pg-timezone-abbrevs"><varname>pg_timezone_abbrevs</></link>
10835        and <link
10836        linkend="view-pg-timezone-names"><varname>pg_timezone_names</></link>
10837        views to show supported timezones (Magnus Hagander)
10838       </para>
10839      </listitem>
10840
10841      <listitem>
10842       <para>
10843        Add <link
10844        linkend="functions-datetime-table"><function>clock_timestamp()</></link>,
10845        <link
10846        linkend="functions-datetime-table"><function>statement_timestamp()</></link>,
10847        and <link
10848        linkend="functions-datetime-table"><function>transaction_timestamp()</></link>
10849        (Bruce)
10850       </para>
10851
10852       <para>
10853        <function>clock_timestamp()</> is the current wall-clock time,
10854        <function>statement_timestamp()</> is the time the current
10855        statement arrived at the server, and
10856        <function>transaction_timestamp()</> is an alias for
10857        <function>now()</>.
10858       </para>
10859      </listitem>
10860
10861      <listitem>
10862       <para>
10863        Allow <link
10864        linkend="functions-formatting"><function>to_char()</></link>
10865        to print localized month and day names (Euler Taveira de
10866        Oliveira)
10867       </para>
10868      </listitem>
10869
10870      <listitem>
10871       <para>
10872        Allow <link
10873        linkend="functions-formatting"><function>to_char(time)</></link>
10874        and <link
10875        linkend="functions-formatting"><function>to_char(interval)</></link>
10876        to output <acronym>AM</>/<acronym>PM</> specifications
10877        (Bruce)
10878       </para>
10879
10880       <para>
10881        Intervals and times are treated as 24-hour periods, e.g.
10882        <literal>25 hours</> is considered <acronym>AM</>.
10883       </para>
10884      </listitem>
10885
10886      <listitem>
10887       <para>
10888        Add new function <link
10889        linkend="functions-datetime-table"><function>justify_interval()</></link>
10890        to adjust interval units (Mark Dilger)
10891       </para>
10892      </listitem>
10893
10894      <listitem>
10895       <para>
10896        Allow timezone offsets up to 14:59 away from GMT
10897       </para>
10898
10899       <para>
10900        Kiribati uses GMT+14, so we'd better accept that.
10901       </para>
10902      </listitem>
10903
10904      <listitem>
10905       <para>
10906        Interval computation improvements (Michael Glaesemann, Bruce)
10907       </para>
10908      </listitem>
10909
10910     </itemizedlist>
10911
10912    </sect3>
10913
10914    <sect3>
10915     <title>Other Data Type and Function Changes</title>
10916     <itemizedlist>
10917
10918      <listitem>
10919       <para>
10920        Allow arrays to contain <literal>NULL</> elements (Tom)
10921       </para>
10922      </listitem>
10923
10924      <listitem>
10925       <para>
10926        Allow assignment to array elements not contiguous with the existing
10927        entries (Tom)
10928       </para>
10929
10930       <para>
10931        The intervening array positions will be filled with nulls.
10932        This is per SQL standard.
10933       </para>
10934      </listitem>
10935
10936      <listitem>
10937       <para>
10938        New built-in <link linkend="functions-array">operators</link>
10939        for array-subset comparisons (<literal>@&gt;</>,
10940        <literal>&lt;@</>, <literal>&amp;&amp;</>) (Teodor, Tom)
10941       </para>
10942
10943       <para>
10944        These operators can be indexed for many data types using
10945        <acronym>GiST</> or <acronym>GIN</> indexes.
10946       </para>
10947      </listitem>
10948
10949      <listitem>
10950       <para>
10951        Add convenient arithmetic <link
10952        linkend="cidr-inet-operators-table">operations</link> on
10953        <type>INET</>/<type>CIDR</> values (Stephen R. van den
10954        Berg)
10955       </para>
10956
10957       <para>
10958        The new operators are <literal>&amp;</> (and), <literal>|</>
10959        (or), <literal>~</> (not), <type>inet</> <literal>+</> <type>int8</>,
10960        <type>inet</> <literal>-</> <type>int8</>, and
10961        <type>inet</> <literal>-</> <type>inet</>.
10962       </para>
10963      </listitem>
10964
10965      <listitem>
10966       <para>
10967        Add new <link
10968        linkend="functions-aggregate-statistics-table">aggregate functions</link>
10969        from SQL:2003 (Neil)
10970       </para>
10971
10972       <para>
10973        The new functions are <function>var_pop()</>,
10974        <function>var_samp()</>, <function>stddev_pop()</>, and
10975        <function>stddev_samp()</>.  <function>var_samp()</> and
10976        <function>stddev_samp()</> are merely renamings of the
10977        existing aggregates <function>variance()</> and
10978        <function>stddev()</>.  The latter names remain available
10979        for backward compatibility.
10980       </para>
10981      </listitem>
10982
10983      <listitem>
10984       <para>
10985        Add SQL:2003 statistical <link
10986        linkend="functions-aggregate-statistics-table">aggregates</link>
10987        (Sergey Koposov)
10988       </para>
10989
10990       <para>
10991        New functions:  <function>regr_intercept()</>,
10992        <function>regr_slope()</>, <function>regr_r2()</>,
10993        <function>corr()</>, <function>covar_samp()</>,
10994        <function>covar_pop()</>, <function>regr_avgx()</>,
10995        <function>regr_avgy()</>, <function>regr_sxy()</>,
10996        <function>regr_sxx()</>, <function>regr_syy()</>,
10997        <function>regr_count()</>.
10998       </para>
10999      </listitem>
11000
11001      <listitem>
11002       <para>
11003        Allow <link linkend="SQL-CREATEDOMAIN">domains</link> to be
11004        based on other domains (Tom)
11005       </para>
11006      </listitem>
11007
11008      <listitem>
11009       <para>
11010        Properly enforce domain <link
11011        linkend="ddl-constraints"><literal>CHECK</></link> constraints
11012        everywhere (Neil, Tom)
11013       </para>
11014
11015       <para>
11016        For example, the result of a user-defined function that is
11017        declared to return a domain type is now checked against the
11018        domain's constraints. This closes a significant hole in the domain
11019        implementation.
11020       </para>
11021      </listitem>
11022
11023      <listitem>
11024       <para>
11025        Fix problems with dumping renamed <link
11026        linkend="datatype-serial"><type>SERIAL</></link> columns
11027        (Tom)
11028       </para>
11029
11030       <para>
11031        The fix is to dump a <type>SERIAL</> column by explicitly
11032        specifying its <literal>DEFAULT</> and sequence elements,
11033        and reconstructing the <type>SERIAL</> column on reload
11034        using a new <link linkend="SQL-ALTERSEQUENCE"><command>ALTER
11035        SEQUENCE OWNED BY</></link> command.  This also allows
11036        dropping a <type>SERIAL</> column specification.
11037       </para>
11038      </listitem>
11039
11040      <listitem>
11041       <para>
11042        Add a server-side sleep function <link
11043        linkend="functions-datetime-delay"><function>pg_sleep()</></link>
11044        (Joachim Wieland)
11045       </para>
11046      </listitem>
11047
11048      <listitem>
11049       <para>
11050        Add all comparison operators for the <link
11051        linkend="datatype-oid"><type>tid</></link> (tuple id) data
11052        type (Mark Kirkwood, Greg Stark, Tom)
11053       </para>
11054      </listitem>
11055
11056     </itemizedlist>
11057
11058    </sect3>
11059
11060    <sect3>
11061     <title>PL/PgSQL Server-Side Language Changes</title>
11062     <itemizedlist>
11063
11064      <listitem>
11065       <para>
11066        Add <literal>TG_table_name</> and <literal>TG_table_schema</> to
11067        trigger parameters (Andrew)
11068       </para>
11069
11070       <para>
11071        <literal>TG_relname</> is now deprecated.  Comparable
11072        changes have been made in the trigger parameters for the other
11073        PLs as well.
11074       </para>
11075      </listitem>
11076
11077      <listitem>
11078       <para>
11079        Allow <literal>FOR</> statements to return values to scalars
11080        as well as records and row types (Pavel Stehule)
11081       </para>
11082      </listitem>
11083
11084      <listitem>
11085       <para>
11086        Add a <literal>BY</> clause to the <literal>FOR</> loop,
11087        to control the iteration increment (Jaime Casanova)
11088       </para>
11089      </listitem>
11090
11091      <listitem>
11092       <para>
11093        Add <literal>STRICT</> to <link
11094        linkend="plpgsql-statements-sql-onerow"><command>SELECT
11095        INTO</></link> (Matt Miller)
11096       </para>
11097
11098       <para>
11099        <literal>STRICT</> mode throws an exception if more or less
11100        than one row is returned by the <command>SELECT</>, for
11101        <productname>Oracle PL/SQL</> compatibility.
11102       </para>
11103      </listitem>
11104
11105     </itemizedlist>
11106
11107    </sect3>
11108
11109    <sect3>
11110     <title>PL/Perl Server-Side Language Changes</title>
11111     <itemizedlist>
11112
11113      <listitem>
11114       <para>
11115        Add <literal>table_name</> and <literal>table_schema</> to
11116        trigger parameters (Adam Sj&oslash;gren)
11117       </para>
11118      </listitem>
11119
11120      <listitem>
11121       <para>
11122        Add prepared queries (Dmitry Karasik)
11123       </para>
11124      </listitem>
11125
11126      <listitem>
11127       <para>
11128        Make <literal>$_TD</> trigger data a global variable (Andrew)
11129       </para>
11130
11131       <para>
11132        Previously, it was lexical, which caused unexpected sharing
11133        violations.
11134       </para>
11135      </listitem>
11136
11137      <listitem>
11138       <para>
11139        Run PL/Perl and PL/PerlU in separate interpreters, for security
11140        reasons (Andrew)
11141       </para>
11142       <para>
11143        In consequence, they can no longer share data nor loaded modules.
11144        Also, if Perl has not been compiled with the requisite flags to
11145        allow multiple interpreters, only one of these languages can be used
11146        in any given backend process.
11147       </para>
11148      </listitem>
11149
11150     </itemizedlist>
11151
11152    </sect3>
11153
11154    <sect3>
11155     <title>PL/Python Server-Side Language Changes</title>
11156     <itemizedlist>
11157
11158      <listitem>
11159       <para>
11160        Named parameters are passed as ordinary variables, as well as in the
11161        <literal>args[]</> array (Sven Suursoho)
11162       </para>
11163      </listitem>
11164
11165      <listitem>
11166       <para>
11167        Add <literal>table_name</> and <literal>table_schema</> to
11168        trigger parameters (Andrew)
11169       </para>
11170      </listitem>
11171
11172      <listitem>
11173       <para>
11174        Allow returning of composite types and result sets (Sven Suursoho)
11175       </para>
11176      </listitem>
11177
11178      <listitem>
11179       <para>
11180        Return result-set as <literal>list</>, <literal>iterator</>,
11181        or <literal>generator </>(Sven Suursoho)
11182       </para>
11183      </listitem>
11184
11185      <listitem>
11186       <para>
11187        Allow functions to return <literal>void</> (Neil)
11188       </para>
11189      </listitem>
11190
11191      <listitem>
11192       <para>
11193        Python 2.5 is now supported (Tom)
11194       </para>
11195      </listitem>
11196
11197     </itemizedlist>
11198
11199    </sect3>
11200
11201    <sect3>
11202     <title><link linkend="APP-PSQL"><application>psql</></link> Changes</title>
11203     <itemizedlist>
11204
11205      <listitem>
11206       <para>
11207        Add new command <literal>\password</> for changing role
11208        password with client-side password encryption (Peter)
11209       </para>
11210      </listitem>
11211
11212      <listitem>
11213       <para>
11214        Allow <literal>\c</> to connect to a new host and port
11215        number (David, Volkan YAZICI)
11216       </para>
11217      </listitem>
11218
11219      <listitem>
11220       <para>
11221        Add tablespace display to <literal>\l+</> (Philip Yarra)
11222       </para>
11223      </listitem>
11224
11225      <listitem>
11226       <para>
11227        Improve <literal>\df</> slash command to include the argument
11228        names and modes (<literal>OUT</> or <literal>INOUT</>) of
11229        the function (David Fetter)
11230       </para>
11231      </listitem>
11232
11233      <listitem>
11234       <para>
11235        Support binary <command>COPY</> (Andreas Pflug)
11236       </para>
11237      </listitem>
11238
11239      <listitem>
11240       <para>
11241        Add option to run the entire session in a single transaction
11242        (Simon)
11243       </para>
11244
11245       <para>
11246        Use option <literal>-1</> or <literal>--single-transaction</>.
11247       </para>
11248      </listitem>
11249
11250      <listitem>
11251       <para>
11252        Support for automatically retrieving <command>SELECT</>
11253        results in batches using a cursor (Chris Mair)
11254       </para>
11255
11256       <para>
11257        This is enabled using <command>\set FETCH_COUNT
11258        <replaceable>n</></command>. This
11259        feature allows large result sets to be retrieved in
11260        <application>psql</> without attempting to buffer the entire
11261        result set in memory.
11262       </para>
11263      </listitem>
11264
11265      <listitem>
11266       <para>
11267        Make multi-line values align in the proper column
11268        (Martijn van Oosterhout)
11269       </para>
11270
11271       <para>
11272        Field values containing newlines are now displayed in a more
11273        readable fashion.
11274       </para>
11275      </listitem>
11276
11277      <listitem>
11278       <para>
11279        Save multi-line statements as a single entry, rather than
11280        one line at a time (Sergey E. Koposov)
11281       </para>
11282
11283       <para>
11284        This makes up-arrow recall of queries easier.  (This is
11285        not available on Windows, because that platform uses the native
11286        command-line editing present in the operating system.)
11287       </para>
11288      </listitem>
11289
11290      <listitem>
11291       <para>
11292        Make the line counter 64-bit so it can handle files with more
11293        than two billion lines (David Fetter)
11294       </para>
11295      </listitem>
11296
11297      <listitem>
11298       <para>
11299        Report both the returned data and the command status tag
11300        for <command>INSERT</>/<command>UPDATE</>/<command>DELETE
11301        RETURNING</> (Tom)
11302       </para>
11303      </listitem>
11304
11305     </itemizedlist>
11306
11307    </sect3>
11308
11309    <sect3>
11310     <title><link linkend="APP-PGDUMP"><application>pg_dump</></link> Changes</title>
11311     <itemizedlist>
11312
11313      <listitem>
11314       <para>
11315        Allow complex selection of objects to be included or excluded
11316        by <application>pg_dump</> (Greg Sabino Mullane)
11317       </para>
11318
11319       <para>
11320        <application>pg_dump</> now supports multiple <literal>-n</>
11321        (schema) and <literal>-t</> (table) options, and adds
11322        <literal>-N</> and <literal>-T</> options to exclude objects.
11323        Also, the arguments of these switches can now be wild-card expressions
11324        rather than single object names, for example
11325        <literal>-t 'foo*'</>, and a schema can be part of
11326        a <literal>-t</> or <literal>-T</> switch, for example
11327        <literal>-t schema1.table1</>.
11328       </para>
11329      </listitem>
11330
11331      <listitem>
11332       <para>
11333        Add <link linkend="APP-PGRESTORE"><application>pg_restore</></link>
11334        <literal>--no-data-for-failed-tables</> option to suppress
11335        loading data if table creation failed (i.e., the table already
11336        exists) (Martin Pitt)
11337       </para>
11338      </listitem>
11339
11340      <listitem>
11341       <para>
11342        Add <link linkend="APP-PGRESTORE"><application>pg_restore</></link>
11343        option to run the entire session in a single transaction
11344        (Simon)
11345       </para>
11346
11347       <para>
11348        Use option <literal>-1</> or <literal>--single-transaction</>.
11349       </para>
11350      </listitem>
11351
11352     </itemizedlist>
11353
11354    </sect3>
11355
11356    <sect3>
11357     <title><link linkend="libpq"><application>libpq</></link> Changes</title>
11358     <itemizedlist>
11359
11360      <listitem>
11361       <para>
11362        Add <link
11363        linkend="libpq-misc"><function>PQencryptPassword()</></link>
11364        to encrypt passwords (Tom)
11365       </para>
11366
11367       <para>
11368        This allows passwords to be sent pre-encrypted for commands
11369        like <link linkend="SQL-ALTERROLE"><command>ALTER ROLE ...
11370        PASSWORD</></link>.
11371       </para>
11372      </listitem>
11373
11374      <listitem>
11375       <para>
11376        Add function <link
11377        linkend="libpq-threading"><function>PQisthreadsafe()</></link>
11378        (Bruce)
11379       </para>
11380
11381       <para>
11382        This allows applications to query the thread-safety status
11383        of the library.
11384       </para>
11385      </listitem>
11386
11387      <listitem>
11388       <para>
11389        Add <link
11390        linkend="libpq-exec-main"><function>PQdescribePrepared()</></link>,
11391        <link
11392        linkend="libpq-exec-main"><function>PQdescribePortal()</></link>,
11393        and related functions to return information about previously
11394        prepared statements and open cursors (Volkan YAZICI)
11395       </para>
11396      </listitem>
11397
11398      <listitem>
11399       <para>
11400        Allow <link linkend="libpq-ldap"><acronym>LDAP</></link> lookups
11401        from <link
11402        linkend="libpq-pgservice"><filename>pg_service.conf</></link>
11403        (Laurenz Albe)
11404       </para>
11405      </listitem>
11406
11407      <listitem>
11408       <para>
11409        Allow a hostname in <link
11410        linkend="libpq-pgpass"><filename>~/.pgpass</></link>
11411        to match the default socket directory (Bruce)
11412       </para>
11413
11414       <para>
11415        A blank hostname continues to match any Unix-socket connection,
11416        but this addition allows entries that are specific to one of
11417        several postmasters on the machine.
11418       </para>
11419      </listitem>
11420
11421     </itemizedlist>
11422
11423    </sect3>
11424
11425    <sect3>
11426     <title><link linkend="ecpg"><application>ecpg</></link> Changes</title>
11427     <itemizedlist>
11428
11429      <listitem>
11430       <para>
11431        Allow <link linkend="SQL-SHOW"><command>SHOW</></link> to
11432        put its result into a variable (Joachim Wieland)
11433       </para>
11434      </listitem>
11435
11436      <listitem>
11437       <para>
11438        Add <link linkend="SQL-COPY"><command>COPY TO STDOUT</></link>
11439        (Joachim Wieland)
11440       </para>
11441      </listitem>
11442
11443      <listitem>
11444       <para>
11445        Add regression tests (Joachim Wieland, Michael)
11446       </para>
11447      </listitem>
11448
11449      <listitem>
11450       <para>
11451        Major source code cleanups (Joachim Wieland, Michael)
11452       </para>
11453      </listitem>
11454
11455     </itemizedlist>
11456
11457    </sect3>
11458
11459    <sect3>
11460     <title><application>Windows</> Port</title>
11461     <itemizedlist>
11462
11463      <listitem>
11464       <para>
11465        Allow <acronym>MSVC</> to compile the <productname>PostgreSQL</>
11466        server (Magnus, Hiroshi Saito)
11467       </para>
11468      </listitem>
11469
11470      <listitem>
11471       <para>
11472        Add <acronym>MSVC</> support for utility commands and <link
11473        linkend="APP-PGDUMP"><application>pg_dump</></link> (Hiroshi
11474        Saito)
11475       </para>
11476      </listitem>
11477
11478      <listitem>
11479       <para>
11480        Add support for Windows code pages <literal>1253</>,
11481        <literal>1254</>, <literal>1255</>, and <literal>1257</>
11482        (Kris Jurka)
11483       </para>
11484      </listitem>
11485
11486      <listitem>
11487       <para>
11488        Drop privileges on startup, so that the server can be started from
11489        an administrative account (Magnus)
11490       </para>
11491      </listitem>
11492
11493      <listitem>
11494       <para>
11495        Stability fixes (Qingqing Zhou, Magnus)
11496       </para>
11497      </listitem>
11498
11499      <listitem>
11500       <para>
11501        Add native semaphore implementation (Qingqing Zhou)
11502       </para>
11503
11504       <para>
11505        The previous code mimicked SysV semaphores.
11506       </para>
11507      </listitem>
11508
11509     </itemizedlist>
11510
11511    </sect3>
11512
11513    <sect3>
11514     <title>Source Code Changes</title>
11515     <itemizedlist>
11516
11517      <listitem>
11518       <para>
11519        Add <link linkend="GIN"><acronym>GIN</></link> (Generalized
11520        Inverted iNdex) index access method (Teodor, Oleg)
11521       </para>
11522      </listitem>
11523
11524      <listitem>
11525       <para>
11526        Remove R-tree indexing (Tom)
11527       </para>
11528
11529       <para>
11530        Rtree has been re-implemented using <link
11531        linkend="GiST"><acronym>GiST</></link>. Among other
11532        differences, this means that rtree indexes now have support
11533        for crash recovery via write-ahead logging (WAL).
11534       </para>
11535      </listitem>
11536
11537      <listitem>
11538       <para>
11539        Reduce libraries needlessly linked into the backend (Martijn
11540        van Oosterhout, Tom)
11541       </para>
11542      </listitem>
11543
11544      <listitem>
11545       <para>
11546        Add a configure flag to allow libedit to be preferred over
11547        <acronym>GNU</> readline (Bruce)
11548       </para>
11549
11550       <para>
11551        Use configure <link
11552        linkend="configure"><literal>--with-libedit-preferred</></link>.
11553       </para>
11554      </listitem>
11555
11556      <listitem>
11557       <para>
11558        Allow installation into directories containing spaces
11559        (Peter)
11560       </para>
11561      </listitem>
11562
11563      <listitem>
11564       <para>
11565        Improve ability to relocate installation directories (Tom)
11566       </para>
11567      </listitem>
11568
11569      <listitem>
11570       <para>
11571        Add support for <productname>Solaris x86_64</> using the
11572        <productname>Solaris</> compiler (Pierre Girard, Theo
11573        Schlossnagle, Bruce)
11574       </para>
11575      </listitem>
11576
11577      <listitem>
11578       <para>
11579        Add <application>DTrace</> support (Robert Lor)
11580       </para>
11581      </listitem>
11582
11583      <listitem>
11584       <para>
11585        Add <literal>PG_VERSION_NUM</> for use by third-party
11586        applications wanting to test the backend version in C using &gt;
11587        and &lt; comparisons (Bruce)
11588       </para>
11589      </listitem>
11590
11591      <listitem>
11592       <para>
11593        Add <literal>XLOG_BLCKSZ</> as independent from <literal>BLCKSZ</>
11594        (Mark Wong)
11595       </para>
11596      </listitem>
11597
11598      <listitem>
11599       <para>
11600        Add <literal>LWLOCK_STATS</> define to report locking
11601        activity (Tom)
11602       </para>
11603      </listitem>
11604
11605      <listitem>
11606       <para>
11607        Emit warnings for unknown <application>configure</> options
11608        (Martijn van Oosterhout)
11609       </para>
11610      </listitem>
11611
11612      <listitem>
11613       <para>
11614        Add server support for <quote>plugin</> libraries
11615        that can be used for add-on tasks such as debugging and performance
11616        measurement (Korry Douglas)
11617       </para>
11618
11619       <para>
11620        This consists of two features: a table of <quote>rendezvous
11621        variables</> that allows separately-loaded shared libraries to
11622        communicate, and a new configuration parameter <link
11623        linkend="guc-local-preload-libraries"><varname>local_preload_libraries</></link>
11624        that allows libraries to be loaded into specific sessions without
11625        explicit cooperation from the client application.  This allows
11626        external add-ons to implement features such as a PL/PgSQL debugger.
11627       </para>
11628      </listitem>
11629
11630      <listitem>
11631       <para>
11632        Rename existing configuration parameter
11633        <varname>preload_libraries</> to <link
11634        linkend="guc-shared-preload-libraries"><varname>shared_preload_libraries</></link>
11635        (Tom)
11636       </para>
11637
11638       <para>
11639        This was done for clarity in comparison to
11640        <varname>local_preload_libraries</>.
11641       </para>
11642      </listitem>
11643
11644      <listitem>
11645       <para>
11646        Add new configuration parameter <link
11647        linkend="guc-server-version-num"><varname>server_version_num</></link>
11648        (Greg Sabino Mullane)
11649       </para>
11650
11651       <para>
11652        This is like <varname>server_version</varname>, but is an
11653        integer, e.g.  <literal>80200</>. This allows applications to
11654        make version checks more easily.
11655       </para>
11656      </listitem>
11657
11658      <listitem>
11659       <para>
11660        Add a configuration parameter <link
11661        linkend="guc-seq-page-cost"><varname>seq_page_cost</></link>
11662        (Tom)
11663       </para>
11664      </listitem>
11665
11666      <listitem>
11667       <para>
11668        Re-implement the <link linkend="regress">regression test</link> script as a C program
11669        (Magnus, Tom)
11670       </para>
11671      </listitem>
11672
11673      <listitem>
11674       <para>
11675        Allow loadable modules to allocate shared memory and
11676        lightweight locks (Marc Munro)
11677       </para>
11678      </listitem>
11679
11680      <listitem>
11681       <para>
11682        Add automatic initialization and finalization of dynamically
11683        loaded libraries (Ralf Engelschall, Tom)
11684       </para>
11685
11686       <para>
11687        New <link linkend="xfunc-c-dynload">functions</link>
11688        <function>_PG_init()</> and <function>_PG_fini()</> are
11689        called if the library defines such symbols.  Hence we no
11690        longer need to specify an initialization function in
11691        <varname>shared_preload_libraries</>; we can assume that
11692        the library used the <function>_PG_init()</> convention
11693        instead.
11694       </para>
11695      </listitem>
11696
11697      <listitem>
11698       <para>
11699        Add <link
11700        linkend="xfunc-c-dynload"><literal>PG_MODULE_MAGIC</></link>
11701        header block to all shared object files (Martijn van
11702        Oosterhout)
11703       </para>
11704
11705       <para>
11706        The magic block prevents version mismatches between loadable object
11707        files and servers.
11708       </para>
11709      </listitem>
11710
11711      <listitem>
11712       <para>
11713         Add shared library support for AIX (Laurenz Albe)
11714       </para>
11715      </listitem>
11716
11717      <listitem>
11718       <para>
11719        New <link linkend="datatype-xml"><acronym>XML</></link>
11720        documentation section (Bruce)
11721       </para>
11722      </listitem>
11723
11724     </itemizedlist>
11725
11726    </sect3>
11727
11728    <sect3>
11729     <title>Contrib Changes</title>
11730     <itemizedlist>
11731
11732      <listitem>
11733       <para>
11734        Major tsearch2 improvements (Oleg, Teodor)
11735       </para>
11736
11737       <itemizedlist>
11738
11739        <listitem>
11740         <para>
11741          multibyte encoding support, including <acronym>UTF8</>
11742         </para>
11743        </listitem>
11744        <listitem>
11745         <para>
11746          query rewriting support
11747         </para>
11748        </listitem>
11749        <listitem>
11750         <para>
11751          improved ranking functions
11752         </para>
11753        </listitem>
11754        <listitem>
11755         <para>
11756          thesaurus dictionary support
11757         </para>
11758        </listitem>
11759        <listitem>
11760         <para>
11761          Ispell dictionaries now recognize <application>MySpell</>
11762          format, used by <application>OpenOffice</>
11763         </para>
11764        </listitem>
11765        <listitem>
11766         <para>
11767          <acronym>GIN</> support
11768         </para>
11769        </listitem>
11770
11771       </itemizedlist>
11772
11773      </listitem>
11774
11775      <listitem>
11776       <para>
11777        Add adminpack module containing <application>Pgadmin</> administration
11778        functions (Dave)
11779       </para>
11780
11781       <para>
11782        These functions provide additional file system access
11783        routines not present in the default <productname>PostgreSQL</>
11784        server.
11785       </para>
11786      </listitem>
11787
11788      <listitem>
11789       <para>
11790        Add sslinfo module (Victor Wagner)
11791       </para>
11792
11793       <para>
11794        Reports information about the current connection's <acronym>SSL</>
11795        certificate.
11796       </para>
11797      </listitem>
11798
11799      <listitem>
11800       <para>
11801        Add pgrowlocks module (Tatsuo)
11802       </para>
11803
11804       <para>
11805        This shows row locking information for a specified table.
11806       </para>
11807      </listitem>
11808
11809      <listitem>
11810       <para>
11811        Add hstore module (Oleg, Teodor)
11812       </para>
11813      </listitem>
11814
11815      <listitem>
11816       <para>
11817        Add isn module, replacing isbn_issn (Jeremy Kronuz)
11818       </para>
11819
11820       <para>
11821        This new implementation supports <acronym>EAN13</>, <acronym>UPC</>,
11822        <acronym>ISBN</> (books), <acronym>ISMN</> (music), and
11823        <acronym>ISSN</> (serials).
11824       </para>
11825      </listitem>
11826
11827      <listitem>
11828       <para>
11829        Add index information functions to pgstattuple (ITAGAKI Takahiro,
11830        Satoshi Nagayasu)
11831       </para>
11832      </listitem>
11833
11834      <listitem>
11835       <para>
11836        Add pg_freespacemap module to display free space map information
11837        (Mark Kirkwood)
11838       </para>
11839      </listitem>
11840
11841      <listitem>
11842       <para>
11843        pgcrypto now has all planned functionality (Marko Kreen)
11844       </para>
11845       <itemizedlist>
11846        <listitem>
11847         <para>
11848          Include iMath library in pgcrypto to have the public-key encryption
11849          functions always available.
11850         </para>
11851        </listitem>
11852        <listitem>
11853         <para>
11854          Add SHA224 algorithm that was missing in OpenBSD code.
11855         </para>
11856        </listitem>
11857        <listitem>
11858         <para>
11859          Activate builtin code for SHA224/256/384/512 hashes on older
11860          OpenSSL to have those algorithms always available.
11861         </para>
11862        </listitem>
11863        <listitem>
11864         <para>
11865          New function gen_random_bytes() that returns cryptographically strong
11866          randomness.  Useful for generating encryption keys.
11867         </para>
11868        </listitem>
11869        <listitem>
11870         <para>
11871          Remove digest_exists(), hmac_exists() and cipher_exists() functions.
11872         </para>
11873        </listitem>
11874       </itemizedlist>
11875      </listitem>
11876
11877      <listitem>
11878       <para>
11879        Improvements to cube module (Joshua Reich)
11880       </para>
11881
11882       <para>
11883        New functions are <function>cube(float[])</>,
11884        <function>cube(float[], float[])</>, and
11885        <function>cube_subset(cube, int4[])</>.
11886       </para>
11887      </listitem>
11888
11889      <listitem>
11890       <para>
11891        Add async query capability to dblink (Kai Londenberg,
11892        Joe Conway)
11893       </para>
11894      </listitem>
11895
11896      <listitem>
11897       <para>
11898        New operators for array-subset comparisons (<literal>@&gt;</>,
11899        <literal>&lt;@</>, <literal>&amp;&amp;</>) (Tom)
11900       </para>
11901
11902       <para>
11903        Various contrib packages already had these operators for their
11904        datatypes, but the naming wasn't consistent.  We have now added
11905        consistently named array-subset comparison operators to the core code
11906        and all the contrib packages that have such functionality.
11907        (The old names remain available, but are deprecated.)
11908       </para>
11909      </listitem>
11910
11911      <listitem>
11912       <para>
11913        Add uninstall scripts for all contrib packages that have install
11914        scripts (David, Josh Drake)
11915       </para>
11916      </listitem>
11917
11918     </itemizedlist>
11919
11920    </sect3>
11921
11922   </sect2>
11923  </sect1>
11924
11925  <sect1 id="release-8-1-17">
11926   <title>Release 8.1.17</title>
11927
11928   <note>
11929   <title>Release date</title>
11930   <simpara>2009-03-16</simpara>
11931   </note>
11932
11933   <para>
11934    This release contains a variety of fixes from 8.1.16.
11935    For information about new features in the 8.1 major release, see
11936    <xref linkend="release-8-1">.
11937   </para>
11938
11939   <sect2>
11940    <title>Migration to Version 8.1.17</title>
11941
11942    <para>
11943     A dump/restore is not required for those running 8.1.X.
11944     However, if you are upgrading from a version earlier than 8.1.15,
11945     see the release notes for 8.1.15.
11946    </para>
11947
11948   </sect2>
11949
11950   <sect2>
11951    <title>Changes</title>
11952
11953    <itemizedlist>
11954
11955     <listitem>
11956      <para>
11957       Prevent error recursion crashes when encoding conversion fails (Tom)
11958      </para>
11959
11960      <para>
11961       This change extends fixes made in the last two minor releases for
11962       related failure scenarios.  The previous fixes were narrowly tailored
11963       for the original problem reports, but we have now recognized that
11964       <emphasis>any</> error thrown by an encoding conversion function could
11965       potentially lead to infinite recursion while trying to report the
11966       error.  The solution therefore is to disable translation and encoding
11967       conversion and report the plain-ASCII form of any error message,
11968       if we find we have gotten into a recursive error reporting situation.
11969       (CVE-2009-0922)
11970      </para>
11971     </listitem>
11972
11973     <listitem>
11974      <para>
11975       Disallow <command>CREATE CONVERSION</> with the wrong encodings
11976       for the specified conversion function (Heikki)
11977      </para>
11978
11979      <para>
11980       This prevents one possible scenario for encoding conversion failure.
11981       The previous change is a backstop to guard against other kinds of
11982       failures in the same area.
11983      </para>
11984     </listitem>
11985
11986     <listitem>
11987      <para>
11988       Fix core dump when <function>to_char()</> is given format codes that
11989       are inappropriate for the type of the data argument (Tom)
11990      </para>
11991     </listitem>
11992
11993     <listitem>
11994      <para>
11995       Fix decompilation of <literal>CASE WHEN</> with an implicit coercion
11996       (Tom)
11997      </para>
11998
11999      <para>
12000       This mistake could lead to Assert failures in an Assert-enabled build,
12001       or an <quote>unexpected CASE WHEN clause</> error message in other
12002       cases, when trying to examine or dump a view.
12003      </para>
12004     </listitem>
12005
12006     <listitem>
12007      <para>
12008       Fix possible misassignment of the owner of a TOAST table's rowtype (Tom)
12009      </para>
12010
12011      <para>
12012       If <command>CLUSTER</> or a rewriting variant of <command>ALTER TABLE</>
12013       were executed by someone other than the table owner, the
12014       <structname>pg_type</> entry for the table's TOAST table would end up
12015       marked as owned by that someone.  This caused no immediate problems,
12016       since the permissions on the TOAST rowtype aren't examined by any
12017       ordinary database operation.  However, it could lead to unexpected
12018       failures if one later tried to drop the role that issued the command
12019       (in 8.1 or 8.2), or <quote>owner of data type appears to be invalid</>
12020       warnings from <application>pg_dump</> after having done so (in 8.3).
12021      </para>
12022     </listitem>
12023
12024     <listitem>
12025      <para>
12026       Clean up PL/pgSQL error status variables fully at block exit
12027       (Ashesh Vashi and Dave Page)
12028      </para>
12029
12030      <para>
12031       This is not a problem for PL/pgSQL itself, but the omission could cause
12032       the PL/pgSQL Debugger to crash while examining the state of a function.
12033      </para>
12034     </listitem>
12035
12036     <listitem>
12037      <para>
12038       Add <literal>MUST</> (Mauritius Island Summer Time) to the default list
12039       of known timezone abbreviations (Xavier Bugaud)
12040      </para>
12041     </listitem>
12042
12043    </itemizedlist>
12044
12045   </sect2>
12046  </sect1>
12047
12048  <sect1 id="release-8-1-16">
12049   <title>Release 8.1.16</title>
12050
12051   <note>
12052   <title>Release date</title>
12053   <simpara>2009-02-02</simpara>
12054   </note>
12055
12056   <para>
12057    This release contains a variety of fixes from 8.1.15.
12058    For information about new features in the 8.1 major release, see
12059    <xref linkend="release-8-1">.
12060   </para>
12061
12062   <sect2>
12063    <title>Migration to Version 8.1.16</title>
12064
12065    <para>
12066     A dump/restore is not required for those running 8.1.X.
12067     However, if you are upgrading from a version earlier than 8.1.15,
12068     see the release notes for 8.1.15.
12069    </para>
12070
12071   </sect2>
12072
12073   <sect2>
12074    <title>Changes</title>
12075
12076    <itemizedlist>
12077
12078     <listitem>
12079      <para>
12080       Fix crash in autovacuum (Alvaro)
12081      </para>
12082
12083      <para>
12084       The crash occurs only after vacuuming a whole database for
12085       anti-transaction-wraparound purposes, which means that it occurs
12086       infrequently and is hard to track down.
12087      </para>
12088     </listitem>
12089
12090     <listitem>
12091      <para>
12092       Improve handling of URLs in <function>headline()</> function (Teodor)
12093      </para>
12094     </listitem>
12095
12096     <listitem>
12097      <para>
12098       Improve handling of overlength headlines in <function>headline()</>
12099       function (Teodor)
12100      </para>
12101     </listitem>
12102
12103     <listitem>
12104      <para>
12105       Prevent possible Assert failure or misconversion if an encoding
12106       conversion is created with the wrong conversion function for the
12107       specified pair of encodings (Tom, Heikki)
12108      </para>
12109     </listitem>
12110
12111     <listitem>
12112      <para>
12113       Avoid unnecessary locking of small tables in <command>VACUUM</>
12114       (Heikki)
12115      </para>
12116     </listitem>
12117
12118     <listitem>
12119      <para>
12120       Ensure that the contents of a holdable cursor don't depend on the
12121       contents of TOAST tables (Tom)
12122      </para>
12123
12124      <para>
12125       Previously, large field values in a cursor result might be represented
12126       as TOAST pointers, which would fail if the referenced table got dropped
12127       before the cursor is read, or if the large value is deleted and then
12128       vacuumed away.  This cannot happen with an ordinary cursor,
12129       but it could with a cursor that is held past its creating transaction.
12130      </para>
12131     </listitem>
12132
12133     <listitem>
12134      <para>
12135       Fix uninitialized variables in <filename>contrib/tsearch2</>'s
12136       <function>get_covers()</> function (Teodor)
12137      </para>
12138     </listitem>
12139
12140     <listitem>
12141      <para>
12142       Fix <application>configure</> script to properly report failure when
12143       unable to obtain linkage information for PL/Perl (Andrew)
12144      </para>
12145     </listitem>
12146
12147     <listitem>
12148      <para>
12149       Make all documentation reference <literal>pgsql-bugs</> and/or
12150       <literal>pgsql-hackers</> as appropriate, instead of the
12151       now-decommissioned <literal>pgsql-ports</> and <literal>pgsql-patches</>
12152       mailing lists (Tom)
12153      </para>
12154     </listitem>
12155
12156     <listitem>
12157      <para>
12158       Update time zone data files to <application>tzdata</> release 2009a (for
12159       Kathmandu and historical DST corrections in Switzerland, Cuba)
12160      </para>
12161     </listitem>
12162
12163    </itemizedlist>
12164
12165   </sect2>
12166  </sect1>
12167
12168  <sect1 id="release-8-1-15">
12169   <title>Release 8.1.15</title>
12170
12171   <note>
12172   <title>Release date</title>
12173   <simpara>2008-11-03</simpara>
12174   </note>
12175
12176   <para>
12177    This release contains a variety of fixes from 8.1.14.
12178    For information about new features in the 8.1 major release, see
12179    <xref linkend="release-8-1">.
12180   </para>
12181
12182   <sect2>
12183    <title>Migration to Version 8.1.15</title>
12184
12185    <para>
12186     A dump/restore is not required for those running 8.1.X.
12187     However, if you are upgrading from a version earlier than 8.1.2,
12188     see the release notes for 8.1.2.  Also, if you were running a previous
12189     8.1.X release, it is recommended to <command>REINDEX</> all GiST
12190     indexes after the upgrade.
12191    </para>
12192
12193   </sect2>
12194
12195   <sect2>
12196    <title>Changes</title>
12197
12198    <itemizedlist>
12199
12200     <listitem>
12201      <para>
12202       Fix GiST index corruption due to marking the wrong index entry
12203       <quote>dead</> after a deletion (Teodor)
12204      </para>
12205
12206      <para>
12207       This would result in index searches failing to find rows they
12208       should have found.  Corrupted indexes can be fixed with
12209       <command>REINDEX</>.
12210      </para>
12211     </listitem>
12212
12213     <listitem>
12214      <para>
12215       Fix backend crash when the client encoding cannot represent a localized
12216       error message (Tom)
12217      </para>
12218
12219      <para>
12220       We have addressed similar issues before, but it would still fail if
12221       the <quote>character has no equivalent</> message itself couldn't
12222       be converted.  The fix is to disable localization and send the plain
12223       ASCII error message when we detect such a situation.
12224      </para>
12225     </listitem>
12226
12227     <listitem>
12228      <para>
12229       Fix possible crash when deeply nested functions are invoked from
12230       a trigger (Tom)
12231      </para>
12232     </listitem>
12233
12234     <listitem>
12235      <para>
12236       Fix mis-expansion of rule queries when a sub-<literal>SELECT</> appears
12237       in a function call in <literal>FROM</>,  a multi-row <literal>VALUES</>
12238       list, or a <literal>RETURNING</> list (Tom)
12239      </para>
12240
12241      <para>
12242       The usual symptom of this problem is an <quote>unrecognized node type</>
12243       error.
12244      </para>
12245     </listitem>
12246
12247     <listitem>
12248      <para>
12249       Ensure an error is reported when a newly-defined PL/pgSQL trigger
12250       function is invoked as a normal function (Tom)
12251      </para>
12252     </listitem>
12253
12254     <listitem>
12255      <para>
12256       Prevent possible collision of <structfield>relfilenode</> numbers
12257       when moving a table to another tablespace with <command>ALTER SET
12258       TABLESPACE</> (Heikki)
12259      </para>
12260
12261      <para>
12262       The command tried to re-use the existing filename, instead of
12263       picking one that is known unused in the destination directory.
12264      </para>
12265     </listitem>
12266
12267     <listitem>
12268      <para>
12269       Fix incorrect tsearch2 headline generation when single query
12270       item matches first word of text (Sushant Sinha)
12271      </para>
12272     </listitem>
12273
12274     <listitem>
12275      <para>
12276       Fix improper display of fractional seconds in interval values when
12277       using a non-ISO datestyle in an <option>--enable-integer-datetimes</>
12278       build (Ron Mayer)
12279      </para>
12280     </listitem>
12281
12282     <listitem>
12283      <para>
12284       Ensure <function>SPI_getvalue</> and <function>SPI_getbinval</>
12285       behave correctly when the passed tuple and tuple descriptor have
12286       different numbers of columns (Tom)
12287      </para>
12288
12289      <para>
12290       This situation is normal when a table has had columns added or removed,
12291       but these two functions didn't handle it properly.
12292       The only likely consequence is an incorrect error indication.
12293      </para>
12294     </listitem>
12295
12296     <listitem>
12297      <para>
12298       Fix <application>ecpg</>'s parsing of <command>CREATE ROLE</> (Michael)
12299      </para>
12300     </listitem>
12301
12302     <listitem>
12303      <para>
12304       Fix recent breakage of <literal>pg_ctl restart</> (Tom)
12305      </para>
12306     </listitem>
12307
12308     <listitem>
12309      <para>
12310       Update time zone data files to <application>tzdata</> release 2008i (for
12311       DST law changes in Argentina, Brazil, Mauritius, Syria)
12312      </para>
12313     </listitem>
12314
12315    </itemizedlist>
12316
12317   </sect2>
12318  </sect1>
12319
12320  <sect1 id="release-8-1-14">
12321   <title>Release 8.1.14</title>
12322
12323   <note>
12324   <title>Release date</title>
12325   <simpara>2008-09-22</simpara>
12326   </note>
12327
12328   <para>
12329    This release contains a variety of fixes from 8.1.13.
12330    For information about new features in the 8.1 major release, see
12331    <xref linkend="release-8-1">.
12332   </para>
12333
12334   <sect2>
12335    <title>Migration to Version 8.1.14</title>
12336
12337    <para>
12338     A dump/restore is not required for those running 8.1.X.
12339     However, if you are upgrading from a version earlier than 8.1.2,
12340     see the release notes for 8.1.2.
12341    </para>
12342
12343   </sect2>
12344
12345   <sect2>
12346    <title>Changes</title>
12347
12348    <itemizedlist>
12349
12350     <listitem>
12351      <para>
12352       Widen local lock counters from 32 to 64 bits (Tom)
12353      </para>
12354
12355      <para>
12356       This responds to reports that the counters could overflow in
12357       sufficiently long transactions, leading to unexpected <quote>lock is
12358       already held</> errors.
12359      </para>
12360     </listitem>
12361
12362     <listitem>
12363      <para>
12364       Fix possible duplicate output of tuples during a GiST index scan (Teodor)
12365      </para>
12366     </listitem>
12367
12368     <listitem>
12369      <para>
12370       Add checks in executor startup to ensure that the tuples produced by an
12371       <command>INSERT</> or <command>UPDATE</> will match the target table's
12372       current rowtype (Tom)
12373      </para>
12374
12375      <para>
12376       <command>ALTER COLUMN TYPE</>, followed by re-use of a previously
12377       cached plan, could produce this type of situation.  The check protects
12378       against data corruption and/or crashes that could ensue.
12379      </para>
12380     </listitem>
12381
12382     <listitem>
12383      <para>
12384       Fix <literal>AT TIME ZONE</> to first try to interpret its timezone
12385       argument as a timezone abbreviation, and only try it as a full timezone
12386       name if that fails, rather than the other way around as formerly (Tom)
12387      </para>
12388
12389      <para>
12390       The timestamp input functions have always resolved ambiguous zone names
12391       in this order.  Making <literal>AT TIME ZONE</> do so as well improves
12392       consistency, and fixes a compatibility bug introduced in 8.1:
12393       in ambiguous cases we now behave the same as 8.0 and before did,
12394       since in the older versions <literal>AT TIME ZONE</> accepted
12395       <emphasis>only</> abbreviations.
12396      </para>
12397     </listitem>
12398
12399     <listitem>
12400      <para>
12401       Fix datetime input functions to correctly detect integer overflow when
12402       running on a 64-bit platform (Tom)
12403      </para>
12404     </listitem>
12405
12406     <listitem>
12407      <para>
12408       Improve performance of writing very long log messages to syslog (Tom)
12409      </para>
12410     </listitem>
12411
12412     <listitem>
12413      <para>
12414       Fix bug in backwards scanning of a cursor on a <literal>SELECT DISTINCT
12415       ON</> query (Tom)
12416      </para>
12417     </listitem>
12418
12419     <listitem>
12420      <para>
12421       Fix planner bug with nested sub-select expressions (Tom)
12422      </para>
12423
12424      <para>
12425       If the outer sub-select has no direct dependency on the parent query,
12426       but the inner one does, the outer value might not get recalculated
12427       for new parent query rows.
12428      </para>
12429     </listitem>
12430
12431     <listitem>
12432      <para>
12433       Fix planner to estimate that <literal>GROUP BY</> expressions yielding
12434       boolean results always result in two groups, regardless of the
12435       expressions' contents (Tom)
12436      </para>
12437
12438      <para>
12439       This is very substantially more accurate than the regular <literal>GROUP
12440       BY</> estimate for certain boolean tests like <replaceable>col</>
12441       <literal>IS NULL</>.
12442      </para>
12443     </listitem>
12444
12445     <listitem>
12446      <para>
12447       Fix PL/PgSQL to not fail when a <literal>FOR</> loop's target variable
12448       is a record containing composite-type fields (Tom)
12449      </para>
12450     </listitem>
12451
12452     <listitem>
12453      <para>
12454       Fix PL/Tcl to behave correctly with Tcl 8.5, and to be more careful
12455       about the encoding of data sent to or from Tcl (Tom)
12456      </para>
12457     </listitem>
12458
12459     <listitem>
12460      <para>
12461       Fix PL/Python to work with Python 2.5
12462      </para>
12463
12464      <para>
12465       This is a back-port of fixes made during the 8.2 development cycle.
12466      </para>
12467     </listitem>
12468
12469     <listitem>
12470      <para>
12471       Improve <application>pg_dump</> and <application>pg_restore</>'s
12472       error reporting after failure to send a SQL command (Tom)
12473      </para>
12474     </listitem>
12475
12476     <listitem>
12477      <para>
12478       Fix <application>pg_ctl</> to properly preserve postmaster
12479       command-line arguments across a <literal>restart</> (Bruce)
12480      </para>
12481     </listitem>
12482
12483     <listitem>
12484      <para>
12485       Update time zone data files to <application>tzdata</> release 2008f (for
12486       DST law changes in Argentina, Bahamas, Brazil, Mauritius, Morocco,
12487       Pakistan, Palestine, and Paraguay)
12488      </para>
12489     </listitem>
12490
12491    </itemizedlist>
12492
12493   </sect2>
12494  </sect1>
12495
12496  <sect1 id="release-8-1-13">
12497   <title>Release 8.1.13</title>
12498
12499   <note>
12500   <title>Release date</title>
12501   <simpara>2008-06-12</simpara>
12502   </note>
12503
12504   <para>
12505    This release contains one serious and one minor bug fix over 8.1.12.
12506    For information about new features in the 8.1 major release, see
12507    <xref linkend="release-8-1">.
12508   </para>
12509
12510   <sect2>
12511    <title>Migration to Version 8.1.13</title>
12512
12513    <para>
12514     A dump/restore is not required for those running 8.1.X.
12515     However, if you are upgrading from a version earlier than 8.1.2,
12516     see the release notes for 8.1.2.
12517    </para>
12518
12519   </sect2>
12520
12521   <sect2>
12522    <title>Changes</title>
12523
12524    <itemizedlist>
12525
12526     <listitem>
12527      <para>
12528       Make <function>pg_get_ruledef()</> parenthesize negative constants (Tom)
12529      </para>
12530
12531      <para>
12532       Before this fix, a negative constant in a view or rule might be dumped
12533       as, say, <literal>-42::integer</>, which is subtly incorrect: it should
12534       be <literal>(-42)::integer</> due to operator precedence rules.
12535       Usually this would make little difference, but it could interact with
12536       another recent patch to cause
12537       <productname>PostgreSQL</> to reject what had been a valid
12538       <command>SELECT DISTINCT</> view query.  Since this could result in
12539       <application>pg_dump</> output failing to reload, it is being treated
12540       as a high-priority fix.  The only released versions in which dump
12541       output is actually incorrect are 8.3.1 and 8.2.7.
12542      </para>
12543     </listitem>
12544
12545     <listitem>
12546      <para>
12547       Make <command>ALTER AGGREGATE ... OWNER TO</> update
12548       <structname>pg_shdepend</> (Tom)
12549      </para>
12550
12551      <para>
12552       This oversight could lead to problems if the aggregate was later
12553       involved in a <command>DROP OWNED</> or <command>REASSIGN OWNED</>
12554       operation.
12555      </para>
12556     </listitem>
12557
12558    </itemizedlist>
12559
12560   </sect2>
12561  </sect1>
12562
12563  <sect1 id="release-8-1-12">
12564   <title>Release 8.1.12</title>
12565
12566   <note>
12567   <title>Release date</title>
12568   <simpara>never released</simpara>
12569   </note>
12570
12571   <para>
12572    This release contains a variety of fixes from 8.1.11.
12573    For information about new features in the 8.1 major release, see
12574    <xref linkend="release-8-1">.
12575   </para>
12576
12577   <sect2>
12578    <title>Migration to Version 8.1.12</title>
12579
12580    <para>
12581     A dump/restore is not required for those running 8.1.X.
12582     However, if you are upgrading from a version earlier than 8.1.2,
12583     see the release notes for 8.1.2.
12584    </para>
12585
12586   </sect2>
12587
12588   <sect2>
12589    <title>Changes</title>
12590
12591    <itemizedlist>
12592
12593     <listitem>
12594      <para>
12595       Fix <command>ALTER TABLE ADD COLUMN ... PRIMARY KEY</> so that the new
12596       column is correctly checked to see if it's been initialized to all
12597       non-nulls (Brendan Jurd)
12598      </para>
12599
12600      <para>
12601       Previous versions neglected to check this requirement at all.
12602      </para>
12603     </listitem>
12604
12605     <listitem>
12606      <para>
12607       Fix possible <command>CREATE TABLE</> failure when inheriting the
12608       <quote>same</> constraint from multiple parent relations that
12609       inherited that constraint from a common ancestor (Tom)
12610      </para>
12611     </listitem>
12612
12613     <listitem>
12614      <para>
12615       Fix conversions between ISO-8859-5 and other encodings to handle
12616       Cyrillic <quote>Yo</> characters (<literal>e</> and <literal>E</> with
12617       two dots) (Sergey Burladyan)
12618      </para>
12619     </listitem>
12620
12621     <listitem>
12622      <para>
12623       Fix a few datatype input functions
12624       that were allowing unused bytes in their results to contain
12625       uninitialized, unpredictable values (Tom)
12626      </para>
12627
12628      <para>
12629       This could lead to failures in which two apparently identical literal
12630       values were not seen as equal, resulting in the parser complaining
12631       about unmatched <literal>ORDER BY</> and <literal>DISTINCT</>
12632       expressions.
12633      </para>
12634     </listitem>
12635
12636     <listitem>
12637      <para>
12638       Fix a corner case in regular-expression substring matching
12639       (<literal>substring(<replaceable>string</> from
12640       <replaceable>pattern</>)</literal>) (Tom)
12641      </para>
12642
12643      <para>
12644       The problem occurs when there is a match to the pattern overall but
12645       the user has specified a parenthesized subexpression and that
12646       subexpression hasn't got a match.  An example is
12647       <literal>substring('foo' from 'foo(bar)?')</>.
12648       This should return NULL, since <literal>(bar)</> isn't matched, but
12649       it was mistakenly returning the whole-pattern match instead (ie,
12650       <literal>foo</>).
12651      </para>
12652     </listitem>
12653
12654     <listitem>
12655      <para>
12656       Update time zone data files to <application>tzdata</> release 2008c (for
12657       DST law changes in Morocco, Iraq, Choibalsan, Pakistan, Syria, Cuba,
12658       Argentina/San_Luis, and Chile)
12659      </para>
12660     </listitem>
12661
12662     <listitem>
12663      <para>
12664       Fix incorrect result from <application>ecpg</>'s
12665       <function>PGTYPEStimestamp_sub()</> function (Michael)
12666      </para>
12667     </listitem>
12668
12669     <listitem>
12670      <para>
12671       Fix core dump in <filename>contrib/xml2</>'s
12672       <function>xpath_table()</> function when the input query returns a
12673       NULL value (Tom)
12674      </para>
12675     </listitem>
12676
12677     <listitem>
12678      <para>
12679       Fix <filename>contrib/xml2</>'s makefile to not override
12680       <literal>CFLAGS</> (Tom)
12681      </para>
12682     </listitem>
12683
12684     <listitem>
12685      <para>
12686       Fix <literal>DatumGetBool</> macro to not fail with <application>gcc</>
12687       4.3 (Tom)
12688      </para>
12689
12690      <para>
12691       This problem affects <quote>old style</> (V0) C functions that
12692       return boolean.  The fix is already in 8.3, but the need to
12693       back-patch it was not realized at the time.
12694      </para>
12695     </listitem>
12696
12697     <listitem>
12698      <para>
12699       Fix longstanding <command>LISTEN</>/<command>NOTIFY</>
12700       race condition (Tom)
12701      </para>
12702
12703      <para>
12704       In rare cases a session that had just executed a
12705       <command>LISTEN</> might not get a notification, even though
12706       one would be expected because the concurrent transaction executing
12707       <command>NOTIFY</> was observed to commit later.
12708      </para>
12709
12710      <para>
12711       A side effect of the fix is that a transaction that has executed
12712       a not-yet-committed <command>LISTEN</> command will not see any
12713       row in <structname>pg_listener</> for the <command>LISTEN</>,
12714       should it choose to look; formerly it would have.  This behavior
12715       was never documented one way or the other, but it is possible that
12716       some applications depend on the old behavior.
12717      </para>
12718     </listitem>
12719
12720     <listitem>
12721      <para>
12722       Disallow <command>LISTEN</> and <command>UNLISTEN</> within a
12723       prepared transaction (Tom)
12724      </para>
12725
12726      <para>
12727       This was formerly allowed but trying to do it had various unpleasant
12728       consequences, notably that the originating backend could not exit
12729       as long as an <command>UNLISTEN</> remained uncommitted.
12730      </para>
12731     </listitem>
12732
12733     <listitem>
12734      <para>
12735       Fix rare crash when an error occurs during a query using a hash index
12736       (Heikki)
12737      </para>
12738     </listitem>
12739
12740     <listitem>
12741      <para>
12742       Fix input of datetime values for February 29 in years BC (Tom)
12743      </para>
12744
12745      <para>
12746       The former coding was mistaken about which years were leap years.
12747      </para>
12748     </listitem>
12749
12750     <listitem>
12751      <para>
12752       Fix <quote>unrecognized node type</> error in some variants of
12753       <command>ALTER OWNER</> (Tom)
12754      </para>
12755     </listitem>
12756
12757     <listitem>
12758      <para>
12759       Fix <application>pg_ctl</> to correctly extract the postmaster's port
12760       number from command-line options (Itagaki Takahiro, Tom)
12761      </para>
12762
12763      <para>
12764       Previously, <literal>pg_ctl start -w</> could try to contact the
12765       postmaster on the wrong port, leading to bogus reports of startup
12766       failure.
12767      </para>
12768     </listitem>
12769
12770     <listitem>
12771      <para>
12772       Use <option>-fwrapv</> to defend against possible misoptimization
12773       in recent <application>gcc</> versions (Tom)
12774      </para>
12775
12776      <para>
12777       This is known to be necessary when building <productname>PostgreSQL</>
12778       with <application>gcc</> 4.3 or later.
12779      </para>
12780     </listitem>
12781
12782     <listitem>
12783      <para>
12784       Fix display of constant expressions in <literal>ORDER BY</>
12785       and <literal>GROUP BY</> (Tom)
12786      </para>
12787
12788      <para>
12789       An explictly casted constant would be shown incorrectly.  This could
12790       for example lead to corruption of a view definition during
12791       dump and reload.
12792      </para>
12793     </listitem>
12794
12795     <listitem>
12796      <para>
12797       Fix <application>libpq</> to handle NOTICE messages correctly
12798       during COPY OUT (Tom)
12799      </para>
12800
12801      <para>
12802       This failure has only been observed to occur when a user-defined
12803       datatype's output routine issues a NOTICE, but there is no
12804       guarantee it couldn't happen due to other causes.
12805      </para>
12806     </listitem>
12807
12808    </itemizedlist>
12809
12810   </sect2>
12811  </sect1>
12812
12813  <sect1 id="release-8-1-11">
12814   <title>Release 8.1.11</title>
12815
12816   <note>
12817   <title>Release date</title>
12818   <simpara>2008-01-07</simpara>
12819   </note>
12820
12821   <para>
12822    This release contains a variety of fixes from 8.1.10,
12823    including fixes for significant security issues.
12824    For information about new features in the 8.1 major release, see
12825    <xref linkend="release-8-1">.
12826   </para>
12827
12828   <para>
12829    This is the last 8.1.X release for which the <productname>PostgreSQL</>
12830    community will produce binary packages for <productname>Windows</>.
12831    Windows users are encouraged to move to 8.2.X or later,
12832    since there are Windows-specific fixes in 8.2.X that
12833    are impractical to back-port.  8.1.X will continue to
12834    be supported on other platforms.
12835   </para>
12836
12837   <sect2>
12838    <title>Migration to Version 8.1.11</title>
12839
12840    <para>
12841     A dump/restore is not required for those running 8.1.X.
12842     However, if you are upgrading from a version earlier than 8.1.2,
12843     see the release notes for 8.1.2.
12844    </para>
12845
12846   </sect2>
12847
12848   <sect2>
12849    <title>Changes</title>
12850
12851    <itemizedlist>
12852
12853     <listitem>
12854      <para>
12855       Prevent functions in indexes from executing with the privileges of
12856       the user running <command>VACUUM</>, <command>ANALYZE</>, etc (Tom)
12857      </para>
12858
12859      <para>
12860       Functions used in index expressions and partial-index
12861       predicates are evaluated whenever a new table entry is made.  It has
12862       long been understood that this poses a risk of trojan-horse code
12863       execution if one modifies a table owned by an untrustworthy user.
12864       (Note that triggers, defaults, check constraints, etc. pose the
12865       same type of risk.)  But functions in indexes pose extra danger
12866       because they will be executed by routine maintenance operations
12867       such as <command>VACUUM FULL</>, which are commonly performed
12868       automatically under a superuser account.  For example, a nefarious user
12869       can execute code with superuser privileges by setting up a
12870       trojan-horse index definition and waiting for the next routine vacuum.
12871       The fix arranges for standard maintenance operations
12872       (including <command>VACUUM</>, <command>ANALYZE</>, <command>REINDEX</>,
12873       and <command>CLUSTER</>) to execute as the table owner rather than
12874       the calling user, using the same privilege-switching mechanism already
12875       used for <literal>SECURITY DEFINER</> functions.  To prevent bypassing
12876       this security measure, execution of <command>SET SESSION
12877       AUTHORIZATION</> and <command>SET ROLE</> is now forbidden within a
12878       <literal>SECURITY DEFINER</> context.  (CVE-2007-6600)
12879      </para>
12880     </listitem>
12881
12882     <listitem>
12883      <para>
12884       Repair assorted bugs in the regular-expression package (Tom, Will Drewry)
12885      </para>
12886
12887      <para>
12888       Suitably crafted regular-expression patterns could cause crashes,
12889       infinite or near-infinite looping, and/or massive memory consumption,
12890       all of which pose denial-of-service hazards for applications that
12891       accept regex search patterns from untrustworthy sources.
12892       (CVE-2007-4769, CVE-2007-4772, CVE-2007-6067)
12893      </para>
12894     </listitem>
12895
12896     <listitem>
12897      <para>
12898       Require non-superusers who use <filename>/contrib/dblink</> to use only
12899       password authentication, as a security measure (Joe)
12900      </para>
12901
12902      <para>
12903       The fix that appeared for this in 8.1.10 was incomplete, as it plugged
12904       the hole for only some <filename>dblink</> functions.  (CVE-2007-6601,
12905       CVE-2007-3278)
12906      </para>
12907     </listitem>
12908
12909     <listitem>
12910      <para>
12911       Update time zone data files to <application>tzdata</> release 2007k
12912       (in particular, recent Argentina changes) (Tom)
12913      </para>
12914     </listitem>
12915
12916     <listitem>
12917      <para>
12918       Improve planner's handling of LIKE/regex estimation in non-C locales
12919       (Tom)
12920      </para>
12921     </listitem>
12922
12923     <listitem>
12924      <para>
12925       Fix planner failure in some cases of <literal>WHERE false AND var IN
12926       (SELECT ...)</> (Tom)
12927      </para>
12928     </listitem>
12929
12930     <listitem>
12931      <para>
12932       Preserve the tablespace of indexes that are
12933       rebuilt by <command>ALTER TABLE ... ALTER COLUMN TYPE</> (Tom)
12934      </para>
12935     </listitem>
12936
12937     <listitem>
12938      <para>
12939       Make archive recovery always start a new WAL timeline, rather than only
12940       when a recovery stop time was used (Simon)
12941      </para>
12942
12943      <para>
12944       This avoids a corner-case risk of trying to overwrite an existing
12945       archived copy of the last WAL segment, and seems simpler and cleaner
12946       than the original definition.
12947      </para>
12948     </listitem>
12949
12950     <listitem>
12951      <para>
12952       Make <command>VACUUM</> not use all of <varname>maintenance_work_mem</>
12953       when the table is too small for it to be useful (Alvaro)
12954      </para>
12955     </listitem>
12956
12957     <listitem>
12958      <para>
12959       Fix potential crash in <function>translate()</> when using a multibyte
12960       database encoding (Tom)
12961      </para>
12962     </listitem>
12963
12964     <listitem>
12965      <para>
12966       Fix overflow in <literal>extract(epoch from interval)</> for intervals
12967       exceeding 68 years (Tom)
12968      </para>
12969     </listitem>
12970
12971     <listitem>
12972      <para>
12973       Fix PL/Perl to not fail when a UTF-8 regular expression is used
12974       in a trusted function (Andrew)
12975      </para>
12976     </listitem>
12977
12978     <listitem>
12979      <para>
12980       Fix PL/Perl to cope when platform's Perl defines type <literal>bool</>
12981       as <literal>int</> rather than <literal>char</> (Tom)
12982      </para>
12983
12984      <para>
12985       While this could theoretically happen anywhere, no standard build of
12986       Perl did things this way ... until <productname>Mac OS X</> 10.5.
12987      </para>
12988     </listitem>
12989
12990     <listitem>
12991      <para>
12992       Fix PL/Python to not crash on long exception messages (Alvaro)
12993      </para>
12994     </listitem>
12995
12996     <listitem>
12997      <para>
12998       Fix <application>pg_dump</> to correctly handle inheritance child tables
12999       that have default expressions different from their parent's (Tom)
13000      </para>
13001     </listitem>
13002
13003     <listitem>
13004      <para>
13005       Fix <application>libpq</> crash when <varname>PGPASSFILE</> refers
13006       to a file that is not a plain file (Martin Pitt)
13007      </para>
13008     </listitem>
13009
13010     <listitem>
13011      <para>
13012       <application>ecpg</> parser fixes (Michael)
13013      </para>
13014     </listitem>
13015
13016     <listitem>
13017      <para>
13018       Make <filename>contrib/pgcrypto</> defend against
13019       <application>OpenSSL</> libraries that fail on keys longer than 128
13020       bits; which is the case at least on some Solaris versions (Marko Kreen)
13021      </para>
13022     </listitem>
13023
13024     <listitem>
13025      <para>
13026       Make <filename>contrib/tablefunc</>'s <function>crosstab()</> handle
13027       NULL rowid as a category in its own right, rather than crashing (Joe)
13028      </para>
13029     </listitem>
13030
13031     <listitem>
13032      <para>
13033       Fix <type>tsvector</> and <type>tsquery</> output routines to
13034       escape backslashes correctly (Teodor, Bruce)
13035      </para>
13036     </listitem>
13037
13038     <listitem>
13039      <para>
13040       Fix crash of <function>to_tsvector()</> on huge input strings (Teodor)
13041      </para>
13042     </listitem>
13043
13044     <listitem>
13045      <para>
13046       Require a specific version of <productname>Autoconf</> to be used
13047       when re-generating the <command>configure</> script (Peter)
13048      </para>
13049
13050      <para>
13051       This affects developers and packagers only.  The change was made
13052       to prevent accidental use of untested combinations of
13053       <productname>Autoconf</> and <productname>PostgreSQL</> versions.
13054       You can remove the version check if you really want to use a
13055       different <productname>Autoconf</> version, but it's
13056       your responsibility whether the result works or not.
13057      </para>
13058     </listitem>
13059
13060    </itemizedlist>
13061
13062   </sect2>
13063  </sect1>
13064
13065  <sect1 id="release-8-1-10">
13066   <title>Release 8.1.10</title>
13067
13068   <note>
13069   <title>Release date</title>
13070   <simpara>2007-09-17</simpara>
13071   </note>
13072
13073   <para>
13074    This release contains a variety of fixes from 8.1.9.
13075    For information about new features in the 8.1 major release, see
13076    <xref linkend="release-8-1">.
13077   </para>
13078
13079   <sect2>
13080    <title>Migration to Version 8.1.10</title>
13081
13082    <para>
13083     A dump/restore is not required for those running 8.1.X.
13084     However, if you are upgrading from a version earlier than 8.1.2,
13085     see the release notes for 8.1.2.
13086    </para>
13087
13088   </sect2>
13089
13090   <sect2>
13091    <title>Changes</title>
13092
13093    <itemizedlist>
13094
13095     <listitem>
13096      <para>
13097       Prevent index corruption when a transaction inserts rows and
13098       then aborts close to the end of a concurrent <command>VACUUM</>
13099       on the same table (Tom)
13100      </para>
13101     </listitem>
13102
13103     <listitem>
13104      <para>
13105       Make <command>CREATE DOMAIN ... DEFAULT NULL</> work properly (Tom)
13106      </para>
13107     </listitem>
13108
13109     <listitem>
13110      <para>
13111       Allow the <type>interval</> data type to accept input consisting only of
13112       milliseconds or microseconds (Neil)
13113      </para>
13114     </listitem>
13115
13116     <listitem>
13117      <para>
13118       Speed up rtree index insertion (Teodor)
13119      </para>
13120     </listitem>
13121
13122     <listitem>
13123      <para>
13124       Fix excessive logging of <acronym>SSL</> error messages (Tom)
13125      </para>
13126     </listitem>
13127
13128     <listitem>
13129      <para>
13130       Fix logging so that log messages are never interleaved when using
13131       the syslogger process (Andrew)
13132      </para>
13133     </listitem>
13134
13135     <listitem>
13136      <para>
13137       Fix crash when <varname>log_min_error_statement</> logging runs out
13138       of memory (Tom)
13139      </para>
13140     </listitem>
13141
13142     <listitem>
13143      <para>
13144       Fix incorrect handling of some foreign-key corner cases (Tom)
13145      </para>
13146     </listitem>
13147
13148     <listitem>
13149      <para>
13150       Prevent <command>REINDEX</> and <command>CLUSTER</> from failing
13151       due to attempting to process temporary tables of other sessions (Alvaro)
13152      </para>
13153     </listitem>
13154
13155     <listitem>
13156      <para>
13157       Update the time zone database rules, particularly New Zealand's upcoming changes (Tom)
13158      </para>
13159     </listitem>
13160
13161     <listitem>
13162      <para>
13163       Windows socket improvements (Magnus)
13164      </para>
13165     </listitem>
13166
13167     <listitem>
13168      <para>
13169       Suppress timezone name (<literal>%Z</>) in log timestamps on Windows
13170       because of possible encoding mismatches (Tom)
13171      </para>
13172     </listitem>
13173
13174     <listitem>
13175      <para>
13176       Require non-superusers who use <filename>/contrib/dblink</> to use only
13177       password authentication, as a security measure (Joe)
13178      </para>
13179     </listitem>
13180
13181    </itemizedlist>
13182
13183   </sect2>
13184  </sect1>
13185
13186  <sect1 id="release-8-1-9">
13187   <title>Release 8.1.9</title>
13188
13189   <note>
13190   <title>Release date</title>
13191   <simpara>2007-04-23</simpara>
13192   </note>
13193
13194   <para>
13195    This release contains a variety of fixes from 8.1.8,
13196    including a security fix.
13197    For information about new features in the 8.1 major release, see
13198    <xref linkend="release-8-1">.
13199   </para>
13200
13201   <sect2>
13202    <title>Migration to Version 8.1.9</title>
13203
13204    <para>
13205     A dump/restore is not required for those running 8.1.X.
13206     However, if you are upgrading from a version earlier than 8.1.2,
13207     see the release notes for 8.1.2.
13208    </para>
13209
13210   </sect2>
13211
13212   <sect2>
13213    <title>Changes</title>
13214
13215    <itemizedlist>
13216
13217     <listitem>
13218     <para>
13219      Support explicit placement of the temporary-table schema within
13220      <varname>search_path</>, and disable searching it for functions
13221      and operators (Tom)
13222     </para>
13223     <para>
13224      This is needed to allow a security-definer function to set a
13225      truly secure value of <varname>search_path</>.  Without it,
13226      an unprivileged SQL user can use temporary objects to execute code
13227      with the privileges of the security-definer function (CVE-2007-2138).
13228      See <command>CREATE FUNCTION</> for more information.
13229     </para>
13230     </listitem>
13231
13232     <listitem>
13233     <para>
13234      <filename>/contrib/tsearch2</> crash fixes (Teodor)
13235     </para>
13236     </listitem>
13237
13238     <listitem>
13239     <para>
13240      Require <command>COMMIT PREPARED</> to be executed in the same
13241      database as the transaction was prepared in (Heikki)
13242     </para>
13243     </listitem>
13244
13245     <listitem>
13246     <para>
13247      Fix potential-data-corruption bug in how <command>VACUUM FULL</> handles
13248      <command>UPDATE</> chains (Tom, Pavan Deolasee)
13249     </para>
13250     </listitem>
13251
13252     <listitem>
13253     <para>
13254      Planner fixes, including improving outer join and bitmap scan
13255      selection logic (Tom)
13256     </para>
13257     </listitem>
13258
13259     <listitem>
13260     <para>
13261      Fix PANIC during enlargement of a hash index (bug introduced in 8.1.6)
13262      (Tom)
13263     </para>
13264     </listitem>
13265
13266     <listitem>
13267     <para>
13268      Fix POSIX-style timezone specs to follow new USA DST rules (Tom)
13269     </para>
13270     </listitem>
13271
13272    </itemizedlist>
13273
13274   </sect2>
13275  </sect1>
13276
13277  <sect1 id="release-8-1-8">
13278   <title>Release 8.1.8</title>
13279
13280   <note>
13281   <title>Release date</title>
13282   <simpara>2007-02-07</simpara>
13283   </note>
13284
13285   <para>
13286    This release contains one fix from 8.1.7.
13287    For information about new features in the 8.1 major release, see
13288    <xref linkend="release-8-1">.
13289   </para>
13290
13291   <sect2>
13292    <title>Migration to Version 8.1.8</title>
13293
13294    <para>
13295     A dump/restore is not required for those running 8.1.X.
13296     However, if you are upgrading from a version earlier than 8.1.2,
13297     see the release notes for 8.1.2.
13298    </para>
13299
13300   </sect2>
13301
13302   <sect2>
13303    <title>Changes</title>
13304
13305    <itemizedlist>
13306
13307     <listitem>
13308     <para>
13309      Remove overly-restrictive check for type length in constraints and
13310      functional indexes(Tom)
13311     </para>
13312     </listitem>
13313
13314    </itemizedlist>
13315
13316   </sect2>
13317  </sect1>
13318
13319  <sect1 id="release-8-1-7">
13320   <title>Release 8.1.7</title>
13321
13322   <note>
13323   <title>Release date</title>
13324   <simpara>2007-02-05</simpara>
13325   </note>
13326
13327   <para>
13328    This release contains a variety of fixes from 8.1.6, including
13329    a security fix.
13330    For information about new features in the 8.1 major release, see
13331    <xref linkend="release-8-1">.
13332   </para>
13333
13334   <sect2>
13335    <title>Migration to Version 8.1.7</title>
13336
13337    <para>
13338     A dump/restore is not required for those running 8.1.X.
13339     However, if you are upgrading from a version earlier than 8.1.2,
13340     see the release notes for 8.1.2.
13341    </para>
13342
13343   </sect2>
13344
13345   <sect2>
13346    <title>Changes</title>
13347
13348    <itemizedlist>
13349
13350     <listitem>
13351     <para>
13352      Remove security vulnerabilities that allowed connected users
13353      to read backend memory (Tom)
13354     </para>
13355     <para>
13356      The vulnerabilities involve suppressing the normal check that a SQL
13357      function returns the data type it's declared to, and changing the
13358      data type of a table column (CVE-2007-0555, CVE-2007-0556).  These
13359      errors can easily be exploited to cause a backend crash, and in
13360      principle might be used to read database content that the user
13361      should not be able to access.
13362     </para>
13363     </listitem>
13364
13365     <listitem>
13366     <para>
13367      Fix rare bug wherein btree index page splits could fail
13368      due to choosing an infeasible split point (Heikki Linnakangas)
13369     </para>
13370     </listitem>
13371
13372     <listitem>
13373     <para>
13374      Improve <command>VACUUM</> performance for databases with many tables (Tom)
13375     </para>
13376     </listitem>
13377
13378     <listitem>
13379     <para>
13380      Fix autovacuum to avoid leaving non-permanent transaction IDs in
13381      non-connectable databases (Alvaro)
13382     </para>
13383
13384     <para>
13385      This bug affects the 8.1 branch only.
13386     </para>
13387     </listitem>
13388
13389     <listitem>
13390     <para>
13391      Fix for rare Assert() crash triggered by <literal>UNION</> (Tom)
13392     </para>
13393     </listitem>
13394
13395     <listitem>
13396     <para>
13397      Tighten security of multi-byte character processing for UTF8 sequences
13398      over three bytes long (Tom)
13399     </para>
13400     </listitem>
13401
13402     <listitem>
13403     <para>
13404      Fix bogus <quote>permission denied</> failures occurring on Windows
13405      due to attempts to fsync already-deleted files (Magnus, Tom)
13406     </para>
13407     </listitem>
13408
13409     <listitem>
13410     <para>
13411      Fix possible crashes when an already-in-use PL/pgSQL function is
13412      updated (Tom)
13413     </para>
13414     </listitem>
13415
13416    </itemizedlist>
13417
13418   </sect2>
13419  </sect1>
13420
13421  <sect1 id="release-8-1-6">
13422   <title>Release 8.1.6</title>
13423
13424   <note>
13425   <title>Release date</title>
13426   <simpara>2007-01-08</simpara>
13427   </note>
13428
13429   <para>
13430    This release contains a variety of fixes from 8.1.5.
13431    For information about new features in the 8.1 major release, see
13432    <xref linkend="release-8-1">.
13433   </para>
13434
13435   <sect2>
13436    <title>Migration to Version 8.1.6</title>
13437
13438    <para>
13439     A dump/restore is not required for those running 8.1.X.
13440     However, if you are upgrading from a version earlier than 8.1.2,
13441     see the release notes for 8.1.2.
13442    </para>
13443
13444   </sect2>
13445
13446   <sect2>
13447    <title>Changes</title>
13448
13449    <itemizedlist>
13450
13451     <listitem>
13452      <para>
13453       Improve handling of <function>getaddrinfo()</> on AIX (Tom)
13454      </para>
13455
13456      <para>
13457       This fixes a problem with starting the statistics collector,
13458       among other things.
13459      </para>
13460     </listitem>
13461
13462     <listitem>
13463      <para>
13464       Fix <application>pg_restore</> to handle a tar-format backup
13465       that contains large objects (blobs) with comments (Tom)
13466      </para>
13467     </listitem>
13468
13469      <listitem>
13470       <para>
13471        Fix <quote>failed to re-find parent key</> errors in
13472        <command>VACUUM</> (Tom)
13473       </para>
13474      </listitem>
13475
13476      <listitem>
13477       <para>
13478        Clean out <filename>pg_internal.init</> cache files during server
13479        restart (Simon)
13480       </para>
13481
13482       <para>
13483        This avoids a hazard that the cache files might contain stale
13484        data after PITR recovery.
13485       </para>
13486      </listitem>
13487
13488      <listitem>
13489       <para>
13490        Fix race condition for truncation of a large relation across a
13491        gigabyte boundary by <command>VACUUM</> (Tom)
13492       </para>
13493      </listitem>
13494
13495      <listitem>
13496       <para>
13497        Fix bug causing needless deadlock errors on row-level locks (Tom)
13498       </para>
13499      </listitem>
13500
13501      <listitem>
13502       <para>
13503        Fix bugs affecting multi-gigabyte hash indexes (Tom)
13504       </para>
13505      </listitem>
13506
13507     <listitem>
13508      <para>
13509       Fix possible deadlock in Windows signal handling (Teodor)
13510      </para>
13511     </listitem>
13512
13513     <listitem>
13514      <para>
13515       Fix error when constructing an <literal>ARRAY[]</> made up of multiple
13516       empty elements (Tom)
13517      </para>
13518     </listitem>
13519
13520     <listitem>
13521      <para>
13522       Fix ecpg memory leak during connection (Michael)
13523      </para>
13524     </listitem>
13525
13526     <listitem>
13527      <para>
13528       Fix for Darwin (OS X) compilation (Tom)
13529      </para>
13530     </listitem>
13531
13532     <listitem>
13533      <para>
13534       <function>to_number()</> and <function>to_char(numeric)</>
13535       are now <literal>STABLE</>, not <literal>IMMUTABLE</>, for
13536       new <application>initdb</> installs (Tom)
13537      </para>
13538
13539      <para>
13540       This is because <varname>lc_numeric</> can potentially
13541       change the output of these functions.
13542      </para>
13543     </listitem>
13544
13545     <listitem>
13546      <para>
13547       Improve index usage of regular expressions that use parentheses (Tom)
13548      </para>
13549
13550      <para>
13551       This improves <application>psql</> <literal>\d</> performance also.
13552      </para>
13553     </listitem>
13554
13555     <listitem>
13556      <para>
13557       Update timezone database
13558      </para>
13559
13560      <para>
13561       This affects Australian and Canadian daylight-savings rules in
13562       particular.
13563      </para>
13564     </listitem>
13565
13566    </itemizedlist>
13567
13568   </sect2>
13569  </sect1>
13570
13571  <sect1 id="release-8-1-5">
13572   <title>Release 8.1.5</title>
13573
13574   <note>
13575   <title>Release date</title>
13576   <simpara>2006-10-16</simpara>
13577   </note>
13578
13579   <para>
13580    This release contains a variety of fixes from 8.1.4.
13581    For information about new features in the 8.1 major release, see
13582    <xref linkend="release-8-1">.
13583   </para>
13584
13585   <sect2>
13586    <title>Migration to Version 8.1.5</title>
13587
13588    <para>
13589     A dump/restore is not required for those running 8.1.X.
13590     However, if you are upgrading from a version earlier than 8.1.2,
13591     see the release notes for 8.1.2.
13592    </para>
13593
13594   </sect2>
13595
13596   <sect2>
13597    <title>Changes</title>
13598
13599 <itemizedlist>
13600 <listitem><para>Disallow aggregate functions in <command>UPDATE</>
13601 commands, except within sub-SELECTs (Tom)</para>
13602 <para>The behavior of such an aggregate was unpredictable, and in 8.1.X
13603 could cause a crash, so it has been disabled.  The SQL standard does not allow
13604 this either.</para></listitem>
13605 <listitem><para>Fix core dump when an untyped literal is taken as
13606 ANYARRAY</para></listitem>
13607 <listitem><para>Fix core dump in duration logging for extended query protocol
13608 when a <command>COMMIT</> or <command>ROLLBACK</> is
13609 executed</para></listitem>
13610 <listitem><para>Fix mishandling of AFTER triggers when query contains a SQL
13611 function returning multiple rows (Tom)</para></listitem>
13612 <listitem><para>Fix <command>ALTER TABLE ... TYPE</> to recheck
13613 <literal>NOT NULL</> for <literal>USING</> clause (Tom)</para></listitem>
13614 <listitem><para>Fix <function>string_to_array()</> to handle overlapping
13615  matches for the separator string</para>
13616 <para>For example, <literal>string_to_array('123xx456xxx789', 'xx')</>.
13617 </para></listitem>
13618 <listitem><para>Fix <function>to_timestamp()</> for
13619 <literal>AM</>/<literal>PM</> formats (Bruce)</para></listitem>
13620 <listitem><para>Fix autovacuum's calculation that decides whether
13621  <command>ANALYZE</> is needed (Alvaro)</para></listitem>
13622 <listitem><para>Fix corner cases in pattern matching for
13623  <application>psql</>'s <literal>\d</> commands</para></listitem>
13624 <listitem><para>Fix index-corrupting bugs in /contrib/ltree
13625  (Teodor)</para></listitem>
13626 <listitem><para>Numerous robustness fixes in <application>ecpg</> (Joachim
13627 Wieland)</para></listitem>
13628 <listitem><para>Fix backslash escaping in /contrib/dbmirror</para></listitem>
13629 <listitem><para>Minor fixes in /contrib/dblink and /contrib/tsearch2</para>
13630 </listitem>
13631 <listitem><para>Efficiency improvements in hash tables and bitmap index scans
13632 (Tom)</para></listitem>
13633 <listitem><para>Fix instability of statistics collection on Windows (Tom, Andrew)</para></listitem>
13634 <listitem><para>Fix <varname>statement_timeout</> to use the proper
13635 units on Win32 (Bruce)</para>
13636 <para>In previous Win32 8.1.X versions, the delay was off by a factor of
13637 100.</para></listitem>
13638 <listitem><para>Fixes for <acronym>MSVC</> and <productname>Borland C++</>
13639 compilers (Hiroshi Saito)</para></listitem>
13640 <listitem><para>Fixes for <systemitem class="osname">AIX</> and
13641 <productname>Intel</> compilers (Tom)</para></listitem>
13642 <listitem><para>Fix rare bug in continuous archiving (Tom)</para></listitem>
13643 </itemizedlist>
13644
13645   </sect2>
13646  </sect1>
13647
13648  <sect1 id="release-8-1-4">
13649   <title>Release 8.1.4</title>
13650
13651   <note>
13652   <title>Release date</title>
13653   <simpara>2006-05-23</simpara>
13654   </note>
13655
13656   <para>
13657    This release contains a variety of fixes from 8.1.3,
13658    including patches for extremely serious security issues.
13659    For information about new features in the 8.1 major release, see
13660    <xref linkend="release-8-1">.
13661   </para>
13662
13663   <sect2>
13664    <title>Migration to Version 8.1.4</title>
13665
13666    <para>
13667     A dump/restore is not required for those running 8.1.X.
13668     However, if you are upgrading from a version earlier than 8.1.2,
13669     see the release notes for 8.1.2.
13670    </para>
13671
13672    <para>
13673     Full security against the SQL-injection attacks described in
13674     CVE-2006-2313 and CVE-2006-2314 might require changes in application
13675     code.  If you have applications that embed untrustworthy strings
13676     into SQL commands, you should examine them as soon as possible to
13677     ensure that they are using recommended escaping techniques.  In
13678     most cases, applications should be using subroutines provided by
13679     libraries or drivers (such as <application>libpq</>'s
13680     <function>PQescapeStringConn()</>) to perform string escaping,
13681     rather than relying on <foreignphrase>ad hoc</> code to do it.
13682    </para>
13683   </sect2>
13684
13685   <sect2>
13686    <title>Changes</title>
13687
13688 <itemizedlist>
13689 <listitem><para>Change the server to reject invalidly-encoded multibyte
13690 characters in all cases (Tatsuo, Tom)</para>
13691 <para>While <productname>PostgreSQL</> has been moving in this direction for
13692 some time, the checks are now applied uniformly to all encodings and all
13693 textual input, and are now always errors not merely warnings.  This change
13694 defends against SQL-injection attacks of the type described in CVE-2006-2313.
13695 </para></listitem>
13696
13697 <listitem><para>Reject unsafe uses of <literal>\'</> in string literals</para>
13698 <para>As a server-side defense against SQL-injection attacks of the type
13699 described in CVE-2006-2314, the server now only accepts <literal>''</> and not
13700 <literal>\'</> as a representation of ASCII single quote in SQL string
13701 literals.  By default, <literal>\'</> is rejected only when
13702 <varname>client_encoding</> is set to a client-only encoding (SJIS, BIG5, GBK,
13703 GB18030, or UHC), which is the scenario in which SQL injection is possible.
13704 A new configuration parameter <varname>backslash_quote</> is available to
13705 adjust this behavior when needed.  Note that full security against
13706 CVE-2006-2314 might require client-side changes; the purpose of
13707 <varname>backslash_quote</> is in part to make it obvious that insecure
13708 clients are insecure.
13709 </para></listitem>
13710
13711 <listitem><para>Modify <application>libpq</>'s string-escaping routines to be
13712 aware of encoding considerations and
13713 <varname>standard_conforming_strings</></para>
13714 <para>This fixes <application>libpq</>-using applications for the security
13715 issues described in CVE-2006-2313 and CVE-2006-2314, and also future-proofs
13716 them against the planned changeover to SQL-standard string literal syntax.
13717 Applications that use multiple <productname>PostgreSQL</> connections
13718 concurrently should migrate to <function>PQescapeStringConn()</> and
13719 <function>PQescapeByteaConn()</> to ensure that escaping is done correctly
13720 for the settings in use in each database connection.  Applications that
13721 do string escaping <quote>by hand</> should be modified to rely on library
13722 routines instead.
13723 </para></listitem>
13724
13725 <listitem><para>Fix weak key selection in pgcrypto (Marko Kreen)</para>
13726 <para>Errors in fortuna PRNG reseeding logic could cause a predictable
13727 session key to be selected by <function>pgp_sym_encrypt()</> in some cases.
13728 This only affects non-OpenSSL-using builds.
13729 </para></listitem>
13730
13731 <listitem><para>Fix some incorrect encoding conversion functions</para>
13732 <para><function>win1251_to_iso</>, <function>win866_to_iso</>,
13733 <function>euc_tw_to_big5</>, <function>euc_tw_to_mic</>,
13734 <function>mic_to_euc_tw</> were all broken to varying
13735 extents.
13736 </para></listitem>
13737
13738 <listitem><para>Clean up stray remaining uses of <literal>\'</> in strings
13739 (Bruce, Jan)</para></listitem>
13740
13741 <listitem><para>Make autovacuum visible in <structname>pg_stat_activity</>
13742 (Alvaro)</para></listitem>
13743
13744 <listitem><para>Disable <literal>full_page_writes</> (Tom)</para>
13745 <para>In certain cases, having <literal>full_page_writes</> off would cause
13746 crash recovery to fail.  A proper fix will appear in 8.2; for now it's just
13747 disabled.
13748 </para></listitem>
13749
13750 <listitem><para>Various planner fixes, particularly for bitmap index scans and
13751 MIN/MAX optimization (Tom)</para></listitem>
13752
13753 <listitem><para>Fix incorrect optimization in merge join (Tom)</para>
13754 <para>Outer joins could sometimes emit multiple copies of unmatched rows.
13755 </para></listitem>
13756
13757 <listitem><para>Fix crash from using and modifying a plpgsql function in the
13758 same transaction</para></listitem>
13759
13760 <listitem><para>Fix WAL replay for case where a B-Tree index has been
13761 truncated</para></listitem>
13762
13763 <listitem><para>Fix <literal>SIMILAR TO</> for patterns involving
13764 <literal>|</> (Tom)</para></listitem>
13765
13766 <listitem><para>Fix <command>SELECT INTO</> and <command>CREATE TABLE AS</> to
13767 create tables in the default tablespace, not the base directory (Kris
13768 Jurka)</para></listitem>
13769
13770 <listitem><para>Fix server to use custom DH SSL parameters correctly (Michael
13771 Fuhr)</para></listitem>
13772
13773 <listitem><para>Improve qsort performance (Dann Corbit)</para>
13774 <para>Currently this code is only used on Solaris.
13775 </para></listitem>
13776
13777 <listitem><para>Fix for OS/X Bonjour on x86 systems (Ashley Clark)</para></listitem>
13778
13779 <listitem><para>Fix various minor memory leaks</para></listitem>
13780
13781 <listitem><para>Fix problem with password prompting on some Win32 systems
13782 (Robert Kinberg)</para></listitem>
13783
13784 <listitem><para>Improve <application>pg_dump</>'s handling of default values
13785 for domains</para></listitem>
13786
13787 <listitem><para>Fix <application>pg_dumpall</> to handle identically-named
13788 users and groups reasonably (only possible when dumping from a pre-8.1 server)
13789 (Tom)</para>
13790 <para>The user and group will be merged into a single role with
13791 <literal>LOGIN</> permission.  Formerly the merged role wouldn't have
13792 <literal>LOGIN</> permission, making it unusable as a user.
13793 </para></listitem>
13794
13795 <listitem><para>Fix <application>pg_restore</> <literal>-n</> to work as
13796 documented (Tom)</para></listitem>
13797 </itemizedlist>
13798
13799   </sect2>
13800  </sect1>
13801
13802  <sect1 id="release-8-1-3">
13803   <title>Release 8.1.3</title>
13804
13805   <note>
13806   <title>Release date</title>
13807   <simpara>2006-02-14</simpara>
13808   </note>
13809
13810   <para>
13811    This release contains a variety of fixes from 8.1.2,
13812    including one very serious security issue.
13813    For information about new features in the 8.1 major release, see
13814    <xref linkend="release-8-1">.
13815   </para>
13816
13817   <sect2>
13818    <title>Migration to Version 8.1.3</title>
13819
13820    <para>
13821     A dump/restore is not required for those running 8.1.X.
13822     However, if you are upgrading from a version earlier than 8.1.2,
13823     see the release notes for 8.1.2.
13824    </para>
13825   </sect2>
13826
13827   <sect2>
13828    <title>Changes</title>
13829
13830 <itemizedlist>
13831
13832 <listitem><para>Fix bug that allowed any logged-in user to <command>SET
13833 ROLE</> to any other database user id (CVE-2006-0553)</para>
13834 <para>Due to inadequate validity checking, a user could exploit the special
13835 case that <command>SET ROLE</> normally uses to restore the previous role
13836 setting after an error.  This allowed ordinary users to acquire superuser
13837 status, for example.
13838 The escalation-of-privilege risk exists only in 8.1.0-8.1.2.
13839 However, in all releases back to 7.3 there is a related bug in <command>SET
13840 SESSION AUTHORIZATION</> that allows unprivileged users to crash the server,
13841 if it has been compiled with Asserts enabled (which is not the default).
13842 Thanks to Akio Ishida for reporting this problem.
13843 </para></listitem>
13844
13845 <listitem><para>Fix bug with row visibility logic in self-inserted
13846 rows (Tom)</para>
13847 <para>Under rare circumstances a row inserted by the current command
13848 could be seen as already valid, when it should not be.  Repairs bug
13849 created in 8.0.4, 7.4.9, and 7.3.11 releases.
13850 </para></listitem>
13851
13852 <listitem><para>Fix race condition that could lead to <quote>file already
13853 exists</> errors during pg_clog and pg_subtrans file creation
13854 (Tom)</para></listitem>
13855
13856 <listitem><para>Fix cases that could lead to crashes if a cache-invalidation
13857 message arrives at just the wrong time (Tom)</para></listitem>
13858
13859 <listitem><para>Properly check <literal>DOMAIN</> constraints for
13860 <literal>UNKNOWN</> parameters in prepared statements
13861 (Neil)</para></listitem>
13862
13863 <listitem><para>Ensure <command>ALTER COLUMN TYPE</> will process
13864 <literal>FOREIGN KEY</>, <literal>UNIQUE</>, and <literal>PRIMARY KEY</>
13865 constraints in the proper order (Nakano Yoshihisa)</para></listitem>
13866
13867 <listitem><para>Fixes to allow restoring dumps that have cross-schema
13868 references to custom operators or operator classes (Tom)</para></listitem>
13869
13870 <listitem><para>Allow <application>pg_restore</> to continue properly after a
13871 <command>COPY</> failure; formerly it tried to treat the remaining
13872 <command>COPY</> data as SQL commands (Stephen Frost)</para></listitem>
13873
13874 <listitem><para>Fix <application>pg_ctl</> <literal>unregister</> crash
13875 when the  data directory is not specified (Magnus)</para></listitem>
13876
13877 <listitem><para>Fix <application>libpq</> <function>PQprint</> HTML tags
13878 (Christoph Zwerschke)</para></listitem>
13879
13880 <listitem><para>Fix <application>ecpg</> crash on AMD64 and PPC
13881 (Neil)</para></listitem>
13882
13883 <listitem><para>Allow <literal>SETOF</> and <literal>%TYPE</> to be used
13884 together in function result type declarations</para></listitem>
13885
13886 <listitem><para>Recover properly if error occurs during argument passing
13887 in <application>PL/python</> (Neil)</para></listitem>
13888
13889 <listitem><para>Fix memory leak in <function>plperl_return_next</>
13890 (Neil)</para></listitem>
13891
13892 <listitem><para>Fix <application>PL/perl</>'s handling of locales on
13893 Win32 to match the backend (Andrew)</para></listitem>
13894
13895 <listitem><para>Various optimizer fixes (Tom)</para></listitem>
13896
13897 <listitem><para>Fix crash when <literal>log_min_messages</> is set to
13898 <literal>DEBUG3</> or above in <filename>postgresql.conf</> on Win32
13899 (Bruce)</para></listitem>
13900
13901 <listitem><para>Fix <application>pgxs</> <literal>-L</> library path
13902 specification for Win32, Cygwin, OS X, AIX (Bruce)</para></listitem>
13903
13904 <listitem><para>Check that SID is enabled while checking for Win32 admin
13905 privileges (Magnus)</para></listitem>
13906
13907 <listitem><para>Properly reject out-of-range date inputs (Kris
13908 Jurka)</para></listitem>
13909
13910 <listitem><para>Portability fix for testing presence of <function>finite</>
13911 and <function>isinf</> during configure (Tom)</para></listitem>
13912
13913 <listitem><para>Improve speed of <command>COPY IN</> via libpq, by
13914 avoiding a kernel call per data line (Alon Goldshuv)</para></listitem>
13915
13916 <listitem><para>Improve speed of <filename>/contrib/tsearch2</> index
13917 creation (Tom)</para></listitem>
13918
13919 </itemizedlist>
13920
13921   </sect2>
13922  </sect1>
13923
13924  <sect1 id="release-8-1-2">
13925   <title>Release 8.1.2</title>
13926
13927   <note>
13928   <title>Release date</title>
13929   <simpara>2006-01-09</simpara>
13930   </note>
13931
13932   <para>
13933    This release contains a variety of fixes from 8.1.1.
13934    For information about new features in the 8.1 major release, see
13935    <xref linkend="release-8-1">.
13936   </para>
13937
13938   <sect2>
13939    <title>Migration to Version 8.1.2</title>
13940
13941    <para>
13942     A dump/restore is not required for those running 8.1.X.
13943     However, you might need to <command>REINDEX</> indexes on textual
13944     columns after updating, if you are affected by the locale or
13945     <application>plperl</> issues described below.
13946    </para>
13947   </sect2>
13948
13949   <sect2>
13950    <title>Changes</title>
13951
13952 <itemizedlist>
13953
13954 <listitem><para>Fix Windows code so that postmaster will continue rather
13955 than exit if there is no more room in ShmemBackendArray (Magnus)</para>
13956 <para>The previous behavior could lead to a denial-of-service situation if too
13957 many connection requests arrive close together.  This applies
13958 <emphasis>only</> to the Windows port.</para></listitem>
13959
13960 <listitem><para>Fix bug introduced in 8.0 that could allow ReadBuffer
13961 to return an already-used page as new, potentially causing loss of
13962 recently-committed data (Tom)</para></listitem>
13963
13964 <listitem><para>Fix for protocol-level Describe messages issued
13965 outside a transaction or in a failed transaction (Tom)</para></listitem>
13966
13967 <listitem><para>Fix character string comparison for locales that consider
13968 different character combinations as equal, such as Hungarian (Tom)</para>
13969 <para>This might require <command>REINDEX</> to fix existing indexes on
13970 textual columns.</para></listitem>
13971
13972 <listitem><para>Set locale environment variables during postmaster startup
13973 to ensure that <application>plperl</> won't change the locale later</para>
13974 <para>This fixes a problem that occurred if the <application>postmaster</> was
13975 started with environment variables specifying a different locale than what
13976 <application>initdb</> had been told.  Under these conditions, any use of
13977 <application>plperl</> was likely to lead to corrupt indexes.  You might need
13978 <command>REINDEX</> to fix existing indexes on
13979 textual columns if this has happened to you.</para></listitem>
13980
13981 <listitem><para>Allow more flexible relocation of installation
13982 directories (Tom)</para>
13983 <para>Previous releases supported relocation only if all installation
13984 directory paths were the same except for the last component.</para></listitem>
13985
13986 <listitem><para>Prevent crashes caused by the use of
13987 <literal>ISO-8859-5</> and <literal>ISO-8859-9</> encodings
13988 (Tatsuo)</para></listitem>
13989
13990 <listitem><para>Fix longstanding bug in strpos() and regular expression
13991 handling in certain rarely used Asian multi-byte character sets (Tatsuo)
13992 </para></listitem>
13993
13994 <listitem><para>Fix bug where COPY CSV mode considered any
13995 <literal>\.</> to terminate the copy data</para> <para>The new code
13996 requires <literal>\.</> to appear alone on a line, as per
13997 documentation.</para></listitem>
13998
13999 <listitem><para>Make COPY CSV mode quote a literal data value of
14000 <literal>\.</> to ensure it cannot be interpreted as the
14001 end-of-data marker (Bruce)</para></listitem>
14002
14003 <listitem><para>Various fixes for functions returning <literal>RECORD</>s
14004 (Tom) </para></listitem>
14005
14006 <listitem><para>Fix processing of <filename>postgresql.conf</> so a
14007 final line with no newline is processed properly (Tom)
14008 </para></listitem>
14009
14010 <listitem><para>Fix bug in <filename>/contrib/pgcrypto</> gen_salt,
14011 which caused it not to use all available salt space for MD5 and
14012 XDES algorithms (Marko Kreen, Solar Designer)</para>
14013 <para>Salts for Blowfish and standard DES are unaffected.</para></listitem>
14014
14015 <listitem><para>Fix autovacuum crash when processing expression indexes
14016 </para></listitem>
14017
14018 <listitem><para>Fix <filename>/contrib/dblink</> to throw an error,
14019 rather than crashing, when the number of columns specified is different from
14020 what's actually returned by the query (Joe)</para></listitem>
14021
14022 </itemizedlist>
14023
14024   </sect2>
14025  </sect1>
14026
14027  <sect1 id="release-8-1-1">
14028   <title>Release 8.1.1</title>
14029
14030   <note>
14031   <title>Release date</title>
14032   <simpara>2005-12-12</simpara>
14033   </note>
14034
14035   <para>
14036    This release contains a variety of fixes from 8.1.0.
14037    For information about new features in the 8.1 major release, see
14038    <xref linkend="release-8-1">.
14039   </para>
14040
14041   <sect2>
14042    <title>Migration to Version 8.1.1</title>
14043
14044    <para>
14045     A dump/restore is not required for those running 8.1.X.
14046    </para>
14047   </sect2>
14048
14049   <sect2>
14050    <title>Changes</title>
14051
14052 <itemizedlist>
14053 <listitem><para>Fix incorrect optimizations of outer-join conditions
14054 (Tom)</para></listitem>
14055
14056 <listitem><para>Fix problems with wrong reported column names in cases
14057 involving sub-selects flattened by the optimizer (Tom)</para></listitem>
14058
14059 <listitem><para>Fix update failures in scenarios involving CHECK constraints,
14060 toasted columns, <emphasis>and</> indexes (Tom)</para></listitem>
14061
14062 <listitem><para>Fix bgwriter problems after recovering from errors
14063 (Tom)</para>
14064 <para>
14065 The background writer was found to leak buffer pins after write errors.
14066 While not fatal in itself, this might lead to mysterious blockages of
14067 later VACUUM commands.
14068 </para>
14069 </listitem>
14070
14071 <listitem><para>Prevent failure if client sends Bind protocol message
14072 when current transaction is already aborted</para></listitem>
14073
14074 <listitem><para><filename>/contrib/tsearch2</> and <filename>/contrib/ltree</>
14075 fixes (Teodor)</para></listitem>
14076
14077 <listitem><para>Fix problems with translated error messages in
14078 languages that require word reordering, such as Turkish; also problems with
14079 unexpected truncation of output strings and wrong display of the smallest
14080 possible bigint value (Andrew, Tom)</para>
14081 <para>
14082 These problems only appeared on platforms that were using our
14083 <filename>port/snprintf.c</> code, which includes BSD variants if
14084 <literal>--enable-nls</> was given, and perhaps others.  In addition,
14085 a different form of the translated-error-message problem could appear
14086 on Windows depending on which version of <filename>libintl</> was used.
14087 </para></listitem>
14088
14089 <listitem><para>Re-allow <literal>AM</>/<literal>PM</>, <literal>HH</>,
14090 <literal>HH12</>, and <literal>D</> format specifiers for
14091 <function>to_char(time)</> and <function>to_char(interval)</>.
14092 (<function>to_char(interval)</> should probably use
14093 <literal>HH24</>.) (Bruce)</para></listitem>
14094
14095 <listitem><para>AIX, HPUX, and MSVC compile fixes (Tom, Hiroshi
14096 Saito)</para></listitem>
14097
14098 <listitem><para>Optimizer improvements (Tom)</para></listitem>
14099
14100 <listitem><para>Retry file reads and writes after Windows
14101 NO_SYSTEM_RESOURCES error (Qingqing Zhou)</para></listitem>
14102
14103 <listitem><para>Prevent <application>autovacuum</> from crashing during
14104 ANALYZE of expression index (Alvaro)</para></listitem>
14105
14106 <listitem><para>Fix problems with ON COMMIT DELETE ROWS temp
14107 tables</para></listitem>
14108
14109 <listitem><para>Fix problems when a trigger alters the output of a SELECT
14110 DISTINCT query</para></listitem>
14111
14112 <listitem><para>Add 8.1.0 release note item on how to migrate invalid
14113 <literal>UTF-8</> byte sequences (Paul Lindner)</para></listitem>
14114 </itemizedlist>
14115
14116   </sect2>
14117  </sect1>
14118
14119  <sect1 id="release-8-1">
14120   <title>Release 8.1</title>
14121
14122   <note>
14123    <title>Release date</title>
14124    <simpara>2005-11-08</simpara>
14125   </note>
14126
14127   <sect2>
14128    <title>Overview</title>
14129
14130    <para>
14131     Major changes in this release:
14132    </para>
14133
14134    <variablelist>
14135
14136     <varlistentry>
14137      <term>
14138       Improve concurrent access to the shared buffer cache (Tom)
14139      </term>
14140
14141      <listitem>
14142       <para>
14143        Access to the shared buffer cache was identified as a
14144        significant scalability problem, particularly on multi-CPU
14145        systems. In this release, the way that locking is done in the
14146        buffer manager has been overhauled to reduce lock contention
14147        and improve scalability. The buffer manager has also been
14148        changed to use a <quote>clock sweep</quote> replacement
14149        policy.
14150       </para>
14151      </listitem>
14152     </varlistentry>
14153
14154     <varlistentry>
14155      <term>
14156       Allow index scans to use an intermediate in-memory bitmap (Tom)
14157      </term>
14158
14159      <listitem>
14160       <para>
14161        In previous releases, only a single index could be used to do
14162        lookups on a table. With this feature, if a query has
14163        <command>WHERE tab.col1 = 4 and tab.col2 = 9</>, and there is
14164        no multicolumn index on <literal>col1</> and <literal>col2</>,
14165        but there is an index on <literal>col1</> and another on
14166        <literal>col2</>, it is possible to search both indexes and
14167        combine the results in memory, then do heap fetches for only
14168        the rows matching both the <literal>col1</> and
14169        <literal>col2</> restrictions. This is very useful in
14170        environments that have a lot of unstructured queries where it
14171        is impossible to create indexes that match all possible access
14172        conditions.  Bitmap scans are useful even with a single index,
14173        as they reduce the amount of random access needed; a bitmap
14174        index scan is efficient for retrieving fairly large fractions
14175        of the complete table, whereas plain index scans are not.
14176       </para>
14177      </listitem>
14178     </varlistentry>
14179
14180     <varlistentry>
14181      <term>
14182       Add two-phase commit (Heikki Linnakangas, Alvaro, Tom)
14183      </term>
14184
14185      <listitem>
14186       <para>
14187        Two-phase commit allows transactions to be "prepared" on several
14188        computers, and once all computers have successfully prepared
14189        their transactions (none failed), all transactions can be
14190        committed. Even if a machine crashes after a prepare, the
14191        prepared transaction can be committed after the machine is
14192        restarted. New syntax includes <command>PREPARE TRANSACTION</> and
14193        <command>COMMIT/ROLLBACK PREPARED</>. A new system view
14194        <literal>pg_prepared_xacts</> has also been added.
14195       </para>
14196      </listitem>
14197     </varlistentry>
14198
14199     <varlistentry>
14200      <term>
14201       Create a new role system that replaces users and groups
14202       (Stephen Frost)
14203      </term>
14204
14205      <listitem>
14206       <para>
14207        Roles are a combination of users and groups. Like users, they
14208        can have login capability, and like groups, a role can have
14209        other roles as members. Roles basically remove the distinction
14210        between users and groups. For example, a role can:
14211       </para>
14212
14213       <itemizedlist>
14214
14215        <listitem>
14216         <para>
14217           Have login capability (optionally)
14218         </para>
14219        </listitem>
14220
14221        <listitem>
14222         <para>
14223          Own objects
14224         </para>
14225        </listitem>
14226
14227        <listitem>
14228         <para>
14229          Hold access permissions for database objects
14230         </para>
14231        </listitem>
14232
14233        <listitem>
14234         <para>
14235          Inherit permissions from other roles it is a member of
14236         </para>
14237        </listitem>
14238
14239       </itemizedlist>
14240       <para>
14241        Once a user logs into a role, she obtains capabilities of
14242        the login role plus any inherited roles, and can use
14243        <command>SET ROLE</> to switch to other roles she is a member of.
14244        This feature is a generalization of the SQL standard's concept of
14245        roles.
14246        This change also replaces <structname>pg_shadow</> and
14247        <structname>pg_group</> by new role-capable catalogs
14248        <structname>pg_authid</> and <structname>pg_auth_members</>. The old
14249        tables are redefined as read-only views on the new role tables.
14250       </para>
14251      </listitem>
14252     </varlistentry>
14253
14254     <varlistentry>
14255      <term>
14256       Automatically use indexes for <function>MIN()</> and
14257       <function>MAX()</> (Tom)
14258      </term>
14259
14260      <listitem>
14261       <para>
14262        In previous releases, the only way to use an index for
14263        <function>MIN()</> or <function>MAX()</> was to rewrite the
14264        query as <command>SELECT col FROM tab ORDER BY col LIMIT 1</>.
14265        Index usage now happens automatically.
14266       </para>
14267      </listitem>
14268     </varlistentry>
14269
14270     <varlistentry>
14271      <term>
14272       Move <filename>/contrib/pg_autovacuum</> into the main server
14273       (Alvaro)
14274      </term>
14275
14276      <listitem>
14277       <para>
14278        Integrating autovacuum into the server allows it to be
14279        automatically started and stopped in sync with the database
14280        server, and allows autovacuum to be configured from
14281        <filename>postgresql.conf</>.
14282       </para>
14283      </listitem>
14284     </varlistentry>
14285
14286     <varlistentry>
14287      <term>
14288       Add shared row level locks using <command>SELECT ... FOR SHARE</>
14289       (Alvaro)
14290      </term>
14291
14292      <listitem>
14293       <para>
14294        While <productname>PostgreSQL</productname>'s MVCC locking
14295        allows <command>SELECT</> to never be blocked by writers and
14296        therefore does not need shared row locks for typical operations,
14297        shared locks are useful for applications that require shared row
14298        locking.  In particular this reduces the locking requirements
14299        imposed by referential integrity checks.
14300       </para>
14301      </listitem>
14302     </varlistentry>
14303
14304     <varlistentry>
14305      <term>
14306       Add dependencies on shared objects, specifically roles
14307       (Alvaro)
14308      </term>
14309
14310      <listitem>
14311       <para>
14312        This extension of the dependency mechanism prevents roles from
14313        being dropped while there are still database objects they own.
14314        Formerly it was possible to accidentally <quote>orphan</> objects by
14315        deleting their owner.  While this could be recovered from, it
14316        was messy and unpleasant.
14317       </para>
14318      </listitem>
14319     </varlistentry>
14320
14321     <varlistentry>
14322      <term>
14323       Improve performance for partitioned tables (Simon)
14324      </term>
14325
14326      <listitem>
14327       <para>
14328        The new <varname>constraint_exclusion</varname> configuration
14329        parameter avoids lookups on child tables where constraints indicate
14330        that no matching rows exist in the child table.
14331       </para>
14332       <para>
14333        This allows for a basic type of table partitioning. If child tables
14334        store separate key ranges and this is enforced using appropriate
14335        <command>CHECK</> constraints, the optimizer will skip child
14336        table accesses when the constraint guarantees no matching rows
14337        exist in the child table.
14338       </para>
14339      </listitem>
14340     </varlistentry>
14341
14342    </variablelist>
14343   </sect2>
14344
14345   <sect2>
14346    <title>Migration to Version 8.1</title>
14347
14348    <para>
14349     A dump/restore using <application>pg_dump</application> is required
14350     for those wishing to migrate data from any previous release.
14351    </para>
14352
14353    <para>
14354     The 8.0 release announced that the <function>to_char()</> function
14355     for intervals would be removed in 8.1. However, since no better API
14356     has been suggested, <function>to_char(interval)</> has been enhanced in
14357     8.1 and will remain in the server.
14358    </para>
14359
14360    <para>
14361     Observe the following incompatibilities:
14362    </para>
14363
14364    <itemizedlist>
14365
14366     <listitem>
14367      <para>
14368       <varname>add_missing_from</> is now false by default (Neil)
14369      </para>
14370      <para>
14371       By default, we now generate an error if a table is used in a query
14372       without a <literal>FROM</> reference.  The old behavior is still
14373       available, but the parameter must be set to 'true' to obtain it.
14374      </para>
14375
14376      <para>
14377       It might be necessary to set <varname>add_missing_from</> to true
14378       in order to load an existing dump file, if the dump contains any
14379       views or rules created using the implicit-<literal>FROM</> syntax.
14380       This should be a one-time annoyance, because
14381       <productname>PostgreSQL</productname> 8.1 will convert
14382       such views and rules to standard explicit-<literal>FROM</> syntax.
14383       Subsequent dumps will therefore not have the problem.
14384      </para>
14385     </listitem>
14386
14387     <listitem>
14388      <para>
14389       Cause input of a zero-length string (<literal>''</literal>) for
14390       <type>float4</type>/<type>float8</type>/<type>oid</type>
14391       to throw an error, rather than treating it as a zero (Neil)
14392      </para>
14393      <para>
14394       This change is consistent with the current handling of
14395       zero-length strings for integers. The schedule for this change
14396       was announced in 8.0.
14397      </para>
14398     </listitem>
14399
14400     <listitem>
14401      <para>
14402       <varname>default_with_oids</> is now false by default (Neil)
14403      </para>
14404      <para>
14405       With this option set to false, user-created tables no longer
14406       have an OID column unless <command>WITH OIDS</> is specified in
14407       <command>CREATE TABLE</>. Though OIDs have existed in all
14408       releases of <productname>PostgreSQL</>, their use is limited
14409       because they are only four bytes long and the counter is shared
14410       across all installed databases. The preferred way of uniquely
14411       identifying rows is via sequences and the <type>SERIAL</> type,
14412       which have been supported since <productname>PostgreSQL</> 6.4.
14413      </para>
14414     </listitem>
14415
14416     <listitem>
14417      <para>
14418       Add <literal>E''</> syntax so eventually ordinary strings can
14419       treat backslashes literally (Bruce)
14420      </para>
14421      <para>
14422       Currently <productname>PostgreSQL</productname> processes a
14423       backslash in a string literal as introducing a special escape sequence,
14424       e.g. <literal>\n</> or <literal>\010</>.
14425       While this allows easy entry of special values, it is
14426       nonstandard and makes porting of applications from other
14427       databases more difficult. For this reason, the
14428       <productname>PostgreSQL</productname> project is planning to
14429       remove the special meaning of backslashes in strings. For
14430       backward compatibility and for users who want special backslash
14431       processing, a new string syntax has been created. This new string
14432       syntax is formed by writing an <literal>E</> immediately preceding the
14433       single quote that starts the string, e.g. <literal>E'hi\n'</>. While
14434       this release does not change the handling of backslashes in strings, it
14435       does add new configuration parameters to help users migrate applications
14436       for future releases:
14437      </para>
14438      <itemizedlist>
14439
14440       <listitem>
14441        <para>
14442         <varname>standard_conforming_strings</> &mdash; does this release
14443         treat backslashes literally in ordinary strings?
14444        </para>
14445       </listitem>
14446
14447       <listitem>
14448       <para>
14449        <varname>escape_string_warning</> &mdash; warn about backslashes in
14450        ordinary (non-E) strings
14451       </para>
14452      </listitem>
14453
14454      </itemizedlist>
14455
14456      <para>
14457       The <varname>standard_conforming_strings</> value is read-only.
14458       Applications can retrieve the value to know how backslashes are
14459       processed.  (Presence of the parameter can also be taken as an
14460       indication that <literal>E''</> string syntax is supported.)
14461       In a future release, <varname>standard_conforming_strings</>
14462       will be true, meaning backslashes will be treated literally in
14463       non-E strings. To prepare for this change, use <literal>E''</>
14464       strings in places that need special backslash processing, and
14465       turn on <varname>escape_string_warning</> to find additional
14466       strings that need to be converted to use <literal>E''</>.
14467       Also, use two single-quotes (<literal>''</>) to embed a literal
14468       single-quote in a string, rather than the
14469       <productname>PostgreSQL</productname>-supported syntax of
14470       backslash single-quote (<literal>\'</>).  The former is
14471       standards-conforming and does not require the use of the
14472       <literal>E''</> string syntax.  You can also use the
14473       <literal>$$</> string syntax, which does not treat backslashes
14474       specially.
14475      </para>
14476     </listitem>
14477
14478     <listitem>
14479      <para>
14480       Make <command>REINDEX DATABASE</> reindex all indexes in the
14481       database (Tom)
14482      </para>
14483      <para>
14484       Formerly, <command>REINDEX DATABASE</> reindexed only
14485       system tables. This new behavior seems more intuitive. A new
14486       command <command>REINDEX SYSTEM</> provides the old functionality
14487       of reindexing just the system tables.
14488      </para>
14489     </listitem>
14490
14491     <listitem>
14492      <para>
14493       Read-only large object descriptors now obey MVCC snapshot semantics
14494      </para>
14495      <para>
14496       When a large object is opened with <literal>INV_READ</> (and not
14497       <literal>INV_WRITE</>), the data read from the descriptor will now
14498       reflect a <quote>snapshot</> of the large object's state at the
14499       time of the transaction snapshot in use by the query that called
14500       <function>lo_open()</>.  To obtain the old behavior of always
14501       returning the latest committed data, include <literal>INV_WRITE</>
14502       in the mode flags for <function>lo_open()</>.
14503      </para>
14504     </listitem>
14505
14506     <listitem>
14507      <para>
14508       Add proper dependencies for arguments of sequence functions (Tom)
14509      </para>
14510      <para>
14511       In previous releases, sequence names passed to <function>nextval()</>,
14512       <function>currval()</>, and <function>setval()</> were stored as
14513       simple text strings, meaning that renaming or dropping a
14514       sequence used in a <literal>DEFAULT</> clause made the clause
14515       invalid. This release stores all newly-created sequence function
14516       arguments as internal OIDs, allowing them to track sequence
14517       renaming, and adding dependency information that prevents
14518       improper sequence removal. It also makes such <literal>DEFAULT</>
14519       clauses immune to schema renaming and search path changes.
14520      </para>
14521      <para>
14522       Some applications might rely on the old behavior of
14523       run-time lookup for sequence names. This can still be done by
14524       explicitly casting the argument to <type>text</>, for example
14525       <literal>nextval('myseq'::text)</>.
14526      </para>
14527      <para>
14528       Pre-8.1 database dumps loaded into 8.1 will use the old text-based
14529       representation and therefore will not have the features of
14530       OID-stored arguments. However, it is possible to update a
14531       database containing text-based <literal>DEFAULT</> clauses.
14532       First, save this query into a file, such as <filename>fixseq.sql</>:
14533 <programlisting>
14534 SELECT  'ALTER TABLE ' ||
14535    pg_catalog.quote_ident(n.nspname) || '.' ||
14536    pg_catalog.quote_ident(c.relname) ||
14537    ' ALTER COLUMN ' || pg_catalog.quote_ident(a.attname) ||
14538    ' SET DEFAULT ' ||
14539    regexp_replace(d.adsrc,
14540                   $$val\(\(('[^']*')::text\)::regclass$$,
14541                   $$val(\1$$,
14542                   'g') ||
14543    ';'
14544 FROM    pg_namespace n, pg_class c, pg_attribute a, pg_attrdef d
14545 WHERE   n.oid = c.relnamespace AND
14546    c.oid = a.attrelid AND
14547    a.attrelid = d.adrelid AND
14548    a.attnum = d.adnum AND
14549    d.adsrc ~ $$val\(\('[^']*'::text\)::regclass$$;
14550 </programlisting>
14551       Next, run the query against a database to find what
14552       adjustments are required, like this for database <literal>db1</>:
14553 <programlisting>
14554 psql -t -f fixseq.sql db1
14555 </programlisting>
14556       This will show the <command>ALTER TABLE</> commands needed to
14557       convert the database to the newer OID-based representation.
14558       If the commands look reasonable, run this to update the database:
14559 <programlisting>
14560 psql -t -f fixseq.sql db1 | psql -e db1
14561 </programlisting>
14562       This process must be repeated in each database to be updated.
14563      </para>
14564     </listitem>
14565
14566     <listitem>
14567      <para>
14568       In <application>psql</application>, treat unquoted
14569       <literal>\{digit}+</> sequences as octal (Bruce)
14570      </para>
14571      <para>
14572       In previous releases, <literal>\{digit}+</> sequences were
14573       treated as decimal, and only <literal>\0{digit}+</> were treated
14574       as octal. This change was made for consistency.
14575      </para>
14576     </listitem>
14577
14578     <listitem>
14579      <para>
14580       Remove grammar productions for prefix and postfix <literal>%</>
14581       and <literal>^</> operators
14582       (Tom)
14583      </para>
14584      <para>
14585       These have never been documented and complicated the use of the
14586       modulus operator (<literal>%</>) with negative numbers.
14587      </para>
14588     </listitem>
14589
14590     <listitem>
14591      <para>
14592       Make <literal>&amp;&lt;</> and <literal>&amp;&gt;</> for polygons
14593       consistent with the box "over" operators (Tom)
14594      </para>
14595     </listitem>
14596
14597     <listitem>
14598      <para>
14599       <command>CREATE LANGUAGE</> can ignore the provided arguments
14600       in favor of information from <structname>pg_pltemplate</>
14601       (Tom)
14602      </para>
14603      <para>
14604       A new system catalog <structname>pg_pltemplate</> has been defined
14605       to carry information about the preferred definitions of procedural
14606       languages (such as whether they have validator functions).  When
14607       an entry exists in this catalog for the language being created,
14608       <command>CREATE LANGUAGE</> will ignore all its parameters except the
14609       language name and instead use the catalog information.  This measure
14610       was taken because of increasing problems with obsolete language
14611       definitions being loaded by old dump files.  As of 8.1,
14612       <application>pg_dump</> will dump procedural language definitions as
14613       just <command>CREATE LANGUAGE <replaceable>name</></command>, relying
14614       on a template entry to exist at load time.  We expect this will be a
14615       more future-proof representation.
14616      </para>
14617     </listitem>
14618
14619     <listitem>
14620      <para>
14621       Make <function>pg_cancel_backend(int)</function> return a
14622       <type>boolean</type> rather than an <type>integer</type> (Neil)
14623      </para>
14624     </listitem>
14625
14626     <listitem>
14627      <para>
14628       Some users are having problems loading UTF-8 data into 8.1.X.
14629       This is because previous versions allowed invalid UTF-8 byte
14630       sequences to be entered into the database, and this release
14631       properly accepts only valid UTF-8 sequences. One way to correct a
14632       dumpfile is to run the command <command>iconv -c -f UTF-8 -t
14633       UTF-8 -o cleanfile.sql dumpfile.sql</>. The <literal>-c</> option
14634       removes invalid character sequences. A diff of the two files will
14635       show the sequences that are invalid. <command>iconv</> reads the
14636       entire input file into memory so it might be necessary to use
14637       <application>split</> to break up the dump into multiple smaller
14638       files for processing.
14639      </para>
14640     </listitem>
14641
14642    </itemizedlist>
14643   </sect2>
14644
14645   <sect2>
14646    <title>Additional Changes</title>
14647
14648    <para>
14649     Below you will find a detailed account of the additional changes
14650     between <productname>PostgreSQL</productname> 8.1 and the
14651     previous major release.
14652    </para>
14653
14654    <sect3>
14655     <title>Performance Improvements</title>
14656     <itemizedlist>
14657
14658      <listitem>
14659       <para>
14660        Improve GiST and R-tree index performance (Neil)
14661       </para>
14662      </listitem>
14663
14664      <listitem>
14665       <para>
14666        Improve the optimizer, including auto-resizing of hash joins
14667        (Tom)
14668       </para>
14669      </listitem>
14670
14671      <listitem>
14672       <para>
14673        Overhaul internal API in several areas
14674       </para>
14675      </listitem>
14676
14677      <listitem>
14678       <para>
14679        Change WAL record CRCs from 64-bit to 32-bit (Tom)
14680       </para>
14681       <para>
14682        We determined that the extra cost of computing 64-bit CRCs was
14683        significant, and the gain in reliability too marginal to justify it.
14684       </para>
14685      </listitem>
14686
14687      <listitem>
14688       <para>
14689        Prevent writing large empty gaps in WAL pages (Tom)
14690       </para>
14691      </listitem>
14692
14693      <listitem>
14694       <para>
14695        Improve spinlock behavior on SMP machines, particularly Opterons (Tom)
14696       </para>
14697      </listitem>
14698
14699      <listitem>
14700       <para>
14701        Allow nonconsecutive index columns to be used in a multicolumn
14702        index (Tom)
14703       </para>
14704       <para>
14705        For example, this allows an index on columns a,b,c to be used in
14706        a query with <command>WHERE a = 4 and c = 10</>.
14707       </para>
14708      </listitem>
14709
14710      <listitem>
14711       <para>
14712        Skip WAL logging for <command>CREATE TABLE AS</> /
14713        <command>SELECT INTO</> (Simon)
14714       </para>
14715       <para>
14716        Since a crash during <command>CREATE TABLE AS</> would cause the
14717        table to be dropped during recovery, there is no reason to WAL
14718        log as the table is loaded.  (Logging still happens if WAL
14719        archiving is enabled, however.)
14720       </para>
14721      </listitem>
14722
14723      <listitem>
14724       <para>
14725        Allow concurrent GiST index access (Teodor, Oleg)
14726       </para>
14727      </listitem>
14728
14729      <listitem>
14730       <para>
14731        Add configuration parameter <varname>full_page_writes</> to
14732        control writing full pages to WAL (Bruce)
14733       </para>
14734       <para>
14735        To prevent partial disk writes from corrupting the database,
14736        <productname>PostgreSQL</productname> writes a complete copy of
14737        each database disk page to WAL the first time it is modified
14738        after a checkpoint. This option turns off that functionality for more
14739        speed.  This is safe to use with battery-backed disk caches where
14740        partial page writes cannot happen.
14741       </para>
14742      </listitem>
14743
14744      <listitem>
14745       <para>
14746        Use <literal>O_DIRECT</> if available when using
14747        <literal>O_SYNC</> for <varname>wal_sync_method</varname>
14748        (Itagaki Takahiro)
14749       </para>
14750       <para>
14751        <literal>O_DIRECT</> causes disk writes to bypass the kernel
14752        cache, and for WAL writes, this improves performance.
14753       </para>
14754      </listitem>
14755
14756      <listitem>
14757       <para>
14758        Improve <command>COPY FROM</> performance (Alon Goldshuv)
14759       </para>
14760       <para>
14761        This was accomplished by reading <command>COPY</> input in
14762        larger chunks, rather than character by character.
14763       </para>
14764      </listitem>
14765
14766      <listitem>
14767       <para>
14768        Improve the performance of <function>COUNT()</function>,
14769        <function>SUM</function>, <function>AVG()</function>,
14770        <function>STDDEV()</function>, and
14771        <function>VARIANCE()</function> (Neil, Tom)
14772       </para>
14773      </listitem>
14774     </itemizedlist>
14775    </sect3>
14776
14777    <sect3>
14778     <title>Server Changes</title>
14779     <itemizedlist>
14780
14781      <listitem>
14782       <para>
14783        Prevent problems due to transaction ID (XID) wraparound (Tom)
14784       </para>
14785       <para>
14786        The server will now warn when the transaction counter approaches
14787        the wraparound point.  If the counter becomes too close to wraparound,
14788        the server will stop accepting queries.  This ensures that data is
14789        not lost before needed vacuuming is performed.
14790       </para>
14791      </listitem>
14792
14793      <listitem>
14794       <para>
14795        Fix problems with object IDs (OIDs) conflicting with existing system
14796        objects after the OID counter has wrapped around (Tom)
14797       </para>
14798      </listitem>
14799
14800      <listitem>
14801       <para>
14802        Add warning about the need to increase
14803        <varname>max_fsm_relations</> and <varname>max_fsm_pages</>
14804        during <command>VACUUM</> (Ron Mayer)
14805       </para>
14806      </listitem>
14807
14808      <listitem>
14809       <para>
14810        Add <varname>temp_buffers</> configuration parameter to allow
14811        users to determine the size of the local buffer area for
14812        temporary table access (Tom)
14813       </para>
14814      </listitem>
14815
14816      <listitem>
14817       <para>
14818        Add session start time and client IP address to
14819        <literal>pg_stat_activity</> (Magnus)
14820       </para>
14821      </listitem>
14822
14823      <listitem>
14824       <para>
14825        Adjust <literal>pg_stat</> views for bitmap scans (Tom)
14826       </para>
14827       <para>
14828        The meanings of some of the fields have changed slightly.
14829       </para>
14830      </listitem>
14831
14832      <listitem>
14833       <para>
14834        Enhance <literal>pg_locks</> view (Tom)
14835       </para>
14836      </listitem>
14837
14838      <listitem>
14839       <para>
14840        Log queries for client-side <command>PREPARE</> and
14841        <command>EXECUTE</> (Simon)
14842       </para>
14843      </listitem>
14844
14845      <listitem>
14846       <para>
14847        Allow Kerberos name and user name case sensitivity to be
14848        specified in <filename>postgresql.conf</> (Magnus)
14849       </para>
14850      </listitem>
14851
14852      <listitem>
14853       <para>
14854        Add configuration parameter <varname>krb_server_hostname</> so
14855        that the server host name can be specified as part of service
14856        principal (Todd Kover)
14857       </para>
14858       <para>
14859        If not set, any service principal matching an entry in the
14860        keytab can be used. This is new Kerberos matching behavior in
14861        this release.
14862       </para>
14863      </listitem>
14864
14865      <listitem>
14866       <para>
14867        Add <varname>log_line_prefix</> options for millisecond
14868        timestamps (<literal>%m</>) and remote host (<literal>%h</>) (Ed
14869        L.)
14870       </para>
14871      </listitem>
14872
14873      <listitem>
14874       <para>
14875        Add WAL logging for GiST indexes (Teodor, Oleg)
14876       </para>
14877       <para>
14878        GiST indexes are now safe for crash and point-in-time recovery.
14879       </para>
14880      </listitem>
14881
14882      <listitem>
14883       <para>
14884        Remove old <filename>*.backup</> files when we do
14885        <function>pg_stop_backup()</> (Bruce)
14886       </para>
14887       <para>
14888        This prevents a large number of <filename>*.backup</> files from
14889        existing in <filename>pg_xlog/</>.
14890       </para>
14891      </listitem>
14892
14893      <listitem>
14894       <para>
14895        Add configuration parameters to control TCP/IP keep-alive
14896        times for idle, interval, and count (Oliver Jowett)
14897       </para>
14898
14899       <para>
14900        These values can be changed to allow more rapid detection of
14901        lost client connections.
14902       </para>
14903      </listitem>
14904
14905      <listitem>
14906       <para>
14907        Add per-user and per-database connection limits (Petr Jelinek)
14908       </para>
14909       <para>
14910        Using <command>ALTER USER</> and <command>ALTER DATABASE</>,
14911        limits can now be enforced on the maximum number of sessions that
14912        can concurrently connect as a specific user or to a specific database.
14913        Setting the limit to zero disables user or database connections.
14914       </para>
14915      </listitem>
14916
14917      <listitem>
14918       <para>
14919        Allow more than two gigabytes of shared memory and per-backend
14920        work memory on 64-bit machines (Koichi Suzuki)
14921       </para>
14922      </listitem>
14923
14924      <listitem>
14925       <para>
14926        New system catalog <structname>pg_pltemplate</> allows overriding
14927        obsolete procedural-language definitions in dump files (Tom)
14928       </para>
14929      </listitem>
14930
14931     </itemizedlist>
14932    </sect3>
14933
14934
14935    <sect3>
14936     <title>Query Changes</title>
14937     <itemizedlist>
14938
14939      <listitem>
14940       <para>
14941        Add temporary views (Koju Iijima, Neil)
14942       </para>
14943      </listitem>
14944
14945      <listitem>
14946       <para>
14947        Fix <command>HAVING</> without any aggregate functions or
14948        <command>GROUP BY</> so that the query returns a single group (Tom)
14949       </para>
14950       <para>
14951        Previously, such a case would treat the <command>HAVING</>
14952        clause the same as a <command>WHERE</> clause.  This was not per spec.
14953       </para>
14954      </listitem>
14955
14956      <listitem>
14957       <para>
14958        Add <command>USING</> clause to allow additional tables to be
14959        specified to <command>DELETE</> (Euler Taveira de Oliveira, Neil)
14960       </para>
14961       <para>
14962        In prior releases, there was no clear method for specifying
14963        additional tables to be used for joins in a <command>DELETE</>
14964        statement. <command>UPDATE</> already has a <literal>FROM</>
14965        clause for this purpose.
14966       </para>
14967      </listitem>
14968
14969      <listitem>
14970       <para>
14971        Add support for <literal>\x</> hex escapes in backend and ecpg
14972        strings (Bruce)
14973       </para>
14974       <para>
14975        This is just like the standard C <literal>\x</> escape syntax.
14976        Octal escapes were already supported.
14977       </para>
14978      </listitem>
14979
14980      <listitem>
14981       <para>
14982        Add <command>BETWEEN SYMMETRIC</> query syntax (Pavel Stehule)
14983       </para>
14984       <para>
14985        This feature allows <command>BETWEEN</> comparisons without
14986        requiring the first value to be less than the second. For
14987        example, <command>2 BETWEEN [ASYMMETRIC] 3 AND 1</> returns
14988        false, while <command>2 BETWEEN SYMMETRIC 3 AND 1</> returns
14989        true. <command>BETWEEN ASYMMETRIC</> was already supported.
14990       </para>
14991      </listitem>
14992
14993      <listitem>
14994       <para>
14995        Add <command>NOWAIT</> option to <command>SELECT ... FOR
14996        UPDATE/SHARE</> (Hans-Juergen Schoenig)
14997       </para>
14998       <para>
14999        While the <varname>statement_timeout</> configuration
15000        parameter allows a query taking more than a certain amount of
15001        time to be cancelled, the <command>NOWAIT</> option allows a
15002        query to be canceled as soon as a <command>SELECT ... FOR
15003        UPDATE/SHARE</> command cannot immediately acquire a row lock.
15004       </para>
15005      </listitem>
15006     </itemizedlist>
15007    </sect3>
15008
15009
15010    <sect3>
15011     <title>Object Manipulation Changes</title>
15012     <itemizedlist>
15013
15014      <listitem>
15015       <para>
15016        Track dependencies of shared objects (Alvaro)
15017       </para>
15018       <para>
15019        <productname>PostgreSQL</productname> allows global tables
15020        (users, databases, tablespaces) to reference information in
15021        multiple databases. This addition adds dependency information
15022        for global tables, so, for example, user ownership can be
15023        tracked across databases, so a user who owns something in any
15024        database can no longer be removed. Dependency tracking already
15025        existed for database-local objects.
15026       </para>
15027      </listitem>
15028
15029      <listitem>
15030       <para>
15031        Allow limited <command>ALTER OWNER</> commands to be performed
15032        by the object owner (Stephen Frost)
15033       </para>
15034       <para>
15035        Prior releases allowed only superusers to change object owners.
15036        Now, ownership can be transferred if the user executing the command
15037        owns the object and would be able to create it as the new owner
15038        (that is, the user is a member of the new owning role and that role
15039        has the CREATE permission that would be needed to create the object
15040        afresh).
15041       </para>
15042      </listitem>
15043
15044      <listitem>
15045       <para>
15046        Add <command>ALTER</> object <command>SET SCHEMA</> capability
15047        for some object types (tables, functions, types) (Bernd Helmle)
15048       </para>
15049       <para>
15050        This allows objects to be moved to different schemas.
15051       </para>
15052      </listitem>
15053
15054      <listitem>
15055       <para>
15056        Add <command>ALTER TABLE ENABLE/DISABLE TRIGGER</command> to
15057        disable triggers (Satoshi Nagayasu)
15058       </para>
15059      </listitem>
15060
15061     </itemizedlist>
15062    </sect3>
15063
15064
15065    <sect3>
15066     <title>Utility Command Changes</title>
15067     <itemizedlist>
15068
15069      <listitem>
15070       <para>
15071        Allow <command>TRUNCATE</> to truncate multiple tables in a
15072        single command (Alvaro)
15073       </para>
15074       <para>
15075        Because of referential integrity checks, it is not allowed to
15076        truncate a table that is part of a referential integrity
15077        constraint. Using this new functionality, <command>TRUNCATE</>
15078        can be used to truncate such tables, if both tables involved in
15079        a referential integrity constraint are truncated in a single
15080        <command>TRUNCATE</> command.
15081       </para>
15082      </listitem>
15083
15084      <listitem>
15085       <para>
15086        Properly process carriage returns and line feeds in
15087        <command>COPY CSV</> mode (Andrew)
15088       </para>
15089       <para>
15090        In release 8.0, carriage returns and line feeds in <command>CSV
15091        COPY TO</> were processed in an inconsistent manner. (This was
15092        documented on the TODO list.)
15093       </para>
15094      </listitem>
15095
15096      <listitem>
15097       <para>
15098        Add <command>COPY WITH CSV HEADER</> to allow a header line as
15099        the first line in <command>COPY</> (Andrew)
15100       </para>
15101       <para>
15102        This allows handling of the common <command>CSV</> usage of
15103        placing the column names on the first line of the data file. For
15104        <command>COPY TO</>, the first line contains the column names,
15105        and for <command>COPY FROM</>, the first line is ignored.
15106       </para>
15107      </listitem>
15108
15109      <listitem>
15110       <para>
15111        On Windows, display better sub-second precision in
15112        <command>EXPLAIN ANALYZE</> (Magnus)
15113       </para>
15114      </listitem>
15115
15116      <listitem>
15117       <para>
15118        Add trigger duration display to <command>EXPLAIN ANALYZE</>
15119        (Tom)
15120       </para>
15121       <para>
15122        Prior releases included trigger execution time as part of the
15123        total execution time, but did not show it separately.  It is now
15124        possible to see how much time is spent in each trigger.
15125       </para>
15126      </listitem>
15127
15128      <listitem>
15129       <para>
15130        Add support for <literal>\x</> hex escapes in <command>COPY</>
15131        (Sergey Ten)
15132       </para>
15133       <para>
15134        Previous releases only supported octal escapes.
15135       </para>
15136      </listitem>
15137
15138      <listitem>
15139       <para>
15140        Make <command>SHOW ALL</> include variable descriptions
15141        (Matthias Schmidt)
15142       </para>
15143       <para>
15144        <command>SHOW</> varname still only displays the variable's
15145        value and does not include the description.
15146       </para>
15147      </listitem>
15148
15149      <listitem>
15150       <para>
15151        Make <application>initdb</application> create a new standard
15152        database called <literal>postgres</>, and convert utilities to
15153        use <literal>postgres</> rather than <literal>template1</> for
15154        standard lookups (Dave)
15155       </para>
15156       <para>
15157        In prior releases, <literal>template1</> was used both as a
15158        default connection for utilities like
15159        <application>createuser</application>, and as a template for
15160        new databases. This caused <command>CREATE DATABASE</> to
15161        sometimes fail, because a new database cannot be created if
15162        anyone else is in the template database. With this change, the
15163        default connection database is now <literal>postgres</>,
15164        meaning it is much less likely someone will be using
15165        <literal>template1</> during <command>CREATE DATABASE</>.
15166       </para>
15167      </listitem>
15168
15169      <listitem>
15170       <para>
15171        Create new <application>reindexdb</application> command-line
15172        utility by moving <filename>/contrib/reindexdb</> into the
15173        server (Euler Taveira de Oliveira)
15174       </para>
15175      </listitem>
15176
15177     </itemizedlist>
15178    </sect3>
15179
15180
15181    <sect3>
15182     <title>Data Type and Function Changes</title>
15183     <itemizedlist>
15184
15185      <listitem>
15186       <para>
15187        Add <function>MAX()</> and <function>MIN()</> aggregates for
15188        array types (Koju Iijima)
15189       </para>
15190      </listitem>
15191
15192      <listitem>
15193       <para>
15194        Fix <function>to_date()</> and <function>to_timestamp()</> to
15195        behave reasonably when <literal>CC</> and <literal>YY</> fields
15196        are both used (Karel Zak)
15197       </para>
15198       <para>
15199        If the format specification contains <literal>CC</> and a year
15200        specification is <literal>YYY</> or longer, ignore the
15201        <literal>CC</>. If the year specification is <literal>YY</> or
15202        shorter, interpret <literal>CC</> as the previous century.
15203       </para>
15204      </listitem>
15205
15206      <listitem>
15207       <para>
15208        Add <function>md5(bytea)</> (Abhijit Menon-Sen)
15209       </para>
15210       <para>
15211        <function>md5(text)</> already existed.
15212       </para>
15213      </listitem>
15214
15215      <listitem>
15216       <para>
15217        Add support for <command>numeric ^ numeric</> based on
15218        <function>power(numeric, numeric)</>
15219       </para>
15220       <para>
15221        The function already existed, but there was no operator assigned
15222        to it.
15223       </para>
15224      </listitem>
15225
15226      <listitem>
15227       <para>
15228        Fix <type>NUMERIC</> modulus by properly truncating the quotient
15229        during computation (Bruce)
15230       </para>
15231       <para>
15232        In previous releases, modulus for large values sometimes
15233        returned negative results due to rounding of the quotient.
15234       </para>
15235      </listitem>
15236
15237      <listitem>
15238       <para>
15239        Add a function <function>lastval()</> (Dennis Bj&ouml;rklund)
15240       </para>
15241       <para>
15242        <function>lastval()</> is a simplified version of
15243        <function>currval()</>. It automatically determines the proper
15244        sequence name based on the most recent <function>nextval()</> or
15245        <function>setval()</> call performed by the current session.
15246       </para>
15247      </listitem>
15248
15249      <listitem>
15250       <para>
15251        Add <function>to_timestamp(DOUBLE PRECISION) (Michael Glaesemann)</>
15252       </para>
15253       <para>
15254        Converts Unix seconds since 1970 to a <type>TIMESTAMP WITH
15255        TIMEZONE</>.
15256       </para>
15257      </listitem>
15258
15259      <listitem>
15260       <para>
15261        Add <function>pg_postmaster_start_time()</> function (Euler
15262        Taveira de Oliveira, Matthias Schmidt)
15263       </para>
15264      </listitem>
15265
15266      <listitem>
15267       <para>
15268        Allow the full use of time zone names in <command>AT TIME
15269        ZONE</>, not just the short list previously available (Magnus)
15270       </para>
15271       <para>
15272        Previously, only a predefined list of time zone names were
15273        supported by <command>AT TIME ZONE</>. Now any supported time
15274        zone name can be used, e.g.:
15275        <programlisting>
15276         SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London';
15277        </programlisting>
15278        In the above query, the time zone used is adjusted based on the
15279        daylight saving time rules that were in effect on the supplied
15280        date.
15281       </para>
15282      </listitem>
15283
15284      <listitem>
15285       <para>
15286        Add <function>GREATEST()</> and <function>LEAST()</> variadic
15287        functions (Pavel Stehule)
15288       </para>
15289       <para>
15290        These functions take a variable number of arguments and return
15291        the greatest or least value among the arguments.
15292       </para>
15293      </listitem>
15294
15295      <listitem>
15296       <para>
15297        Add <function>pg_column_size()</> (Mark Kirkwood)
15298       </para>
15299       <para>
15300        This returns storage size of a column, which might be compressed.
15301       </para>
15302      </listitem>
15303
15304      <listitem>
15305       <para>
15306        Add <function>regexp_replace()</> (Atsushi Ogawa)
15307       </para>
15308       <para>
15309        This allows regular expression replacement, like sed. An optional
15310        flag argument allows selection of global (replace all) and
15311        case-insensitive modes.
15312       </para>
15313      </listitem>
15314
15315      <listitem>
15316       <para>
15317        Fix interval division and multiplication (Bruce)
15318       </para>
15319       <para>
15320        Previous versions sometimes returned unjustified results, like
15321        <command>'4 months'::interval / 5</> returning <command>'1 mon
15322        -6 days'</>.
15323       </para>
15324      </listitem>
15325
15326      <listitem>
15327       <para>
15328        Fix roundoff behavior in timestamp, time, and interval output (Tom)
15329       </para>
15330       <para>
15331        This fixes some cases in which the seconds field would be shown as
15332        <literal>60</> instead of incrementing the higher-order fields.
15333       </para>
15334      </listitem>
15335
15336      <listitem>
15337       <para>
15338        Add a separate day field to type <type>interval</> so a one day
15339        interval can be distinguished from a 24 hour interval (Michael
15340        Glaesemann)
15341       </para>
15342       <para>
15343        Days that contain a daylight saving time adjustment are not 24
15344        hours long, but typically 23 or 25 hours.  This change creates a
15345        conceptual distinction between intervals of <quote>so many days</>
15346        and intervals of <quote>so many hours</>.  Adding
15347        <literal>1 day</> to a timestamp now gives the same local time on
15348        the next day even if a daylight saving time adjustment occurs
15349        between, whereas adding <literal>24 hours</> will give a different
15350        local time when this happens.  For example, under US DST rules:
15351        <programlisting>
15352         '2005-04-03 00:00:00-05' + '1 day' = '2005-04-04 00:00:00-04'
15353         '2005-04-03 00:00:00-05' + '24 hours' = '2005-04-04 01:00:00-04'
15354        </programlisting>
15355       </para>
15356      </listitem>
15357
15358      <listitem>
15359       <para>
15360        Add <function>justify_days()</> and <function>justify_hours()</>
15361        (Michael Glaesemann)
15362       </para>
15363       <para>
15364        These functions, respectively, adjust days to an appropriate
15365        number of full months and days, and adjust hours to an
15366        appropriate number of full days and hours.
15367       </para>
15368      </listitem>
15369
15370      <listitem>
15371       <para>
15372        Move <filename>/contrib/dbsize</> into the backend, and rename
15373        some of the functions (Dave Page, Andreas Pflug)
15374       </para>
15375       <para>
15376        <itemizedlist>
15377
15378         <listitem>
15379          <para>
15380            <function>pg_tablespace_size()</>
15381          </para>
15382         </listitem>
15383
15384         <listitem>
15385          <para>
15386           <function>pg_database_size()</>
15387          </para>
15388         </listitem>
15389
15390         <listitem>
15391          <para>
15392           <function>pg_relation_size()</>
15393          </para>
15394         </listitem>
15395
15396         <listitem>
15397          <para>
15398           <function>pg_total_relation_size()</>
15399          </para>
15400         </listitem>
15401
15402         <listitem>
15403          <para>
15404           <function>pg_size_pretty()</>
15405          </para>
15406         </listitem>
15407
15408        </itemizedlist>
15409       </para>
15410       <para>
15411        <function>pg_total_relation_size()</> includes indexes and TOAST
15412        tables.
15413       </para>
15414      </listitem>
15415
15416      <listitem>
15417       <para>
15418        Add functions for read-only file access to the cluster directory
15419        (Dave Page, Andreas Pflug)
15420       </para>
15421       <para>
15422        <itemizedlist>
15423
15424         <listitem>
15425          <para>
15426           <function>pg_stat_file()</>
15427          </para>
15428         </listitem>
15429
15430         <listitem>
15431          <para>
15432           <function>pg_read_file()</>
15433          </para>
15434         </listitem>
15435
15436         <listitem>
15437          <para>
15438           <function>pg_ls_dir()</>
15439          </para>
15440         </listitem>
15441
15442        </itemizedlist>
15443       </para>
15444      </listitem>
15445
15446      <listitem>
15447       <para>
15448        Add <function>pg_reload_conf()</> to force reloading of the
15449        configuration files (Dave Page, Andreas Pflug)
15450       </para>
15451      </listitem>
15452
15453      <listitem>
15454       <para>
15455        Add <function>pg_rotate_logfile()</> to force rotation of the
15456        server log file (Dave Page, Andreas Pflug)
15457       </para>
15458      </listitem>
15459
15460      <listitem>
15461       <para>
15462        Change <literal>pg_stat_*</> views to include TOAST tables (Tom)
15463       </para>
15464      </listitem>
15465
15466     </itemizedlist>
15467    </sect3>
15468
15469
15470    <sect3>
15471     <title>Encoding and Locale Changes</title>
15472     <itemizedlist>
15473
15474      <listitem>
15475       <para>
15476        Rename some encodings to be more consistent and to follow
15477        international standards (Bruce)
15478       </para>
15479       <para>
15480        <itemizedlist>
15481
15482         <listitem>
15483          <para>
15484           <literal>UNICODE</> is now <literal>UTF8</>
15485          </para>
15486         </listitem>
15487
15488         <listitem>
15489          <para>
15490           <literal>ALT</> is now <literal>WIN866</>
15491          </para>
15492         </listitem>
15493
15494         <listitem>
15495          <para>
15496           <literal>WIN</> is now <literal>WIN1251</>
15497          </para>
15498         </listitem>
15499
15500         <listitem>
15501          <para>
15502          <literal>TCVN</> is now <literal>WIN1258</>
15503          </para>
15504         </listitem>
15505
15506        </itemizedlist>
15507       </para>
15508
15509       <para>
15510        The original names still work.
15511       </para>
15512      </listitem>
15513
15514      <listitem>
15515       <para>
15516        Add support for <literal>WIN1252</> encoding (Roland Volkmann)
15517       </para>
15518      </listitem>
15519
15520      <listitem>
15521       <para>
15522        Add support for four-byte <literal>UTF8</> characters (John
15523        Hansen)
15524       </para>
15525       <para>
15526        Previously only one, two, and three-byte <literal>UTF8</> characters
15527        were supported. This is particularly important for support for
15528        some Chinese character sets.
15529       </para>
15530      </listitem>
15531
15532      <listitem>
15533       <para>
15534        Allow direct conversion between <literal>EUC_JP</> and
15535        <literal>SJIS</> to improve performance (Atsushi Ogawa)
15536       </para>
15537      </listitem>
15538
15539      <listitem>
15540       <para>
15541        Allow the UTF8 encoding to work on Windows (Magnus)
15542       </para>
15543       <para>
15544        This is done by mapping UTF8 to the Windows-native UTF16
15545        implementation.
15546       </para>
15547      </listitem>
15548
15549     </itemizedlist>
15550    </sect3>
15551
15552
15553    <sect3>
15554     <title>General Server-Side Language Changes</title>
15555     <itemizedlist>
15556
15557      <listitem>
15558       <para>
15559        Fix <command>ALTER LANGUAGE RENAME</> (Sergey Yatskevich)
15560       </para>
15561      </listitem>
15562
15563      <listitem>
15564       <para>
15565        Allow function characteristics, like strictness and volatility,
15566        to be modified via <command>ALTER FUNCTION</> (Neil)
15567       </para>
15568      </listitem>
15569
15570      <listitem>
15571       <para>
15572        Increase the maximum number of function arguments to 100 (Tom)
15573       </para>
15574      </listitem>
15575
15576      <listitem>
15577       <para>
15578        Allow SQL and PL/PgSQL functions to use <command>OUT</> and
15579        <command>INOUT</> parameters (Tom)
15580       </para>
15581       <para>
15582        <command>OUT</> is an alternate way for a function to return
15583        values. Instead of using <command>RETURN</>, values can be
15584        returned by assigning to parameters declared as <command>OUT</> or
15585        <command>INOUT</>.  This is notationally simpler in some cases,
15586        particularly so when multiple values need to be returned.
15587        While returning multiple values from a function
15588        was possible in previous releases, this greatly simplifies the
15589        process.  (The feature will be extended to other server-side
15590        languages in future releases.)
15591       </para>
15592      </listitem>
15593
15594      <listitem>
15595       <para>
15596        Move language handler functions into the <literal>pg_catalog</> schema
15597       </para>
15598       <para>
15599        This makes it easier to drop the public schema if desired.
15600       </para>
15601      </listitem>
15602
15603      <listitem>
15604       <para>
15605        Add <function>SPI_getnspname()</function> to SPI (Neil)
15606       </para>
15607      </listitem>
15608
15609     </itemizedlist>
15610    </sect3>
15611
15612    <sect3>
15613     <title>PL/PgSQL Server-Side Language Changes</title>
15614     <itemizedlist>
15615
15616      <listitem>
15617       <para>
15618        Overhaul the memory management of PL/PgSQL functions (Neil)
15619       </para>
15620       <para>
15621        The parsetree of each function is now stored in a separate
15622        memory context. This allows this memory to be easily reclaimed
15623        when it is no longer needed.
15624       </para>
15625      </listitem>
15626
15627      <listitem>
15628       <para>
15629        Check function syntax at <command>CREATE FUNCTION</> time,
15630        rather than at runtime (Neil)
15631       </para>
15632       <para>
15633        Previously, most syntax errors were reported only when the
15634        function was executed.
15635       </para>
15636      </listitem>
15637
15638      <listitem>
15639       <para>
15640        Allow <command>OPEN</> to open non-<command>SELECT</> queries
15641        like <command>EXPLAIN</> and <command>SHOW</> (Tom)
15642       </para>
15643      </listitem>
15644
15645      <listitem>
15646       <para>
15647        No longer require functions to issue a <command>RETURN</>
15648        statement (Tom)
15649       </para>
15650       <para>
15651        This is a byproduct of the newly added <command>OUT</> and
15652        <command>INOUT</> functionality.  <command>RETURN</> can
15653        be omitted when it is not needed to provide the function's
15654        return value.
15655       </para>
15656      </listitem>
15657
15658      <listitem>
15659       <para>
15660        Add support for an optional <command>INTO</> clause to
15661        PL/PgSQL's <command>EXECUTE</> statement (Pavel Stehule, Neil)
15662       </para>
15663      </listitem>
15664
15665      <listitem>
15666       <para>
15667        Make <command>CREATE TABLE AS</> set <command>ROW_COUNT</> (Tom)
15668       </para>
15669      </listitem>
15670
15671      <listitem>
15672       <para>
15673        Define <literal>SQLSTATE</> and <literal>SQLERRM</> to return
15674        the <literal>SQLSTATE</> and error message of the current
15675        exception (Pavel Stehule, Neil)
15676       </para>
15677       <para>
15678        These variables are only defined inside exception blocks.
15679       </para>
15680      </listitem>
15681
15682      <listitem>
15683       <para>
15684        Allow the parameters to the <command>RAISE</> statement to be
15685        expressions (Pavel Stehule, Neil)
15686       </para>
15687      </listitem>
15688
15689      <listitem>
15690       <para>
15691        Add a loop <command>CONTINUE</> statement (Pavel Stehule, Neil)
15692       </para>
15693      </listitem>
15694
15695      <listitem>
15696       <para>
15697        Allow block and loop labels (Pavel Stehule)
15698       </para>
15699      </listitem>
15700
15701     </itemizedlist>
15702    </sect3>
15703
15704
15705    <sect3>
15706     <title>PL/Perl Server-Side Language Changes</title>
15707     <itemizedlist>
15708
15709      <listitem>
15710       <para>
15711        Allow large result sets to be returned efficiently (Abhijit
15712        Menon-Sen)
15713       </para>
15714       <para>
15715        This allows functions to use <function>return_next()</> to avoid
15716        building the entire result set in memory.
15717       </para>
15718      </listitem>
15719
15720      <listitem>
15721       <para>
15722        Allow one-row-at-a-time retrieval of query results (Abhijit Menon-Sen)
15723       </para>
15724       <para>
15725        This allows functions to use <function>spi_query()</> and
15726        <function>spi_fetchrow()</> to avoid accumulating the entire
15727        result set in memory.
15728       </para>
15729      </listitem>
15730
15731      <listitem>
15732       <para>
15733        Force PL/Perl to handle strings as <literal>UTF8</> if the
15734        server encoding is <literal>UTF8</> (David Kamholz)
15735       </para>
15736      </listitem>
15737
15738      <listitem>
15739       <para>
15740        Add a validator function for PL/Perl (Andrew)
15741       </para>
15742       <para>
15743        This allows syntax errors to be reported at definition time,
15744        rather than execution time.
15745       </para>
15746      </listitem>
15747
15748      <listitem>
15749       <para>
15750        Allow PL/Perl to return a Perl array when the function returns
15751        an array type (Andrew)
15752       </para>
15753       <para>
15754        This basically maps <productname>PostgreSQL</productname> arrays
15755        to Perl arrays.
15756       </para>
15757      </listitem>
15758
15759      <listitem>
15760       <para>
15761        Allow Perl nonfatal warnings to generate <command>NOTICE</>
15762        messages (Andrew)
15763       </para>
15764      </listitem>
15765
15766      <listitem>
15767       <para>
15768        Allow Perl's <literal>strict</> mode to be enabled (Andrew)
15769       </para>
15770      </listitem>
15771
15772     </itemizedlist>
15773    </sect3>
15774
15775
15776    <sect3>
15777     <title><application>psql</> Changes</title>
15778     <itemizedlist>
15779
15780      <listitem>
15781       <para>
15782        Add <command>\set ON_ERROR_ROLLBACK</> to allow statements in
15783        a transaction to error without affecting the rest of the
15784        transaction (Greg Sabino Mullane)
15785       </para>
15786       <para>
15787        This is basically implemented by wrapping every statement in a
15788        sub-transaction.
15789       </para>
15790      </listitem>
15791
15792      <listitem>
15793       <para>
15794        Add support for <literal>\x</> hex strings in
15795        <application>psql</> variables (Bruce)
15796       </para>
15797       <para>
15798        Octal escapes were already supported.
15799       </para>
15800      </listitem>
15801
15802      <listitem>
15803       <para>
15804        Add support for <command>troff -ms</> output format (Roger
15805        Leigh)
15806       </para>
15807      </listitem>
15808
15809      <listitem>
15810       <para>
15811        Allow the history file location to be controlled by
15812        <envar>HISTFILE</> (Andreas Seltenreich)
15813       </para>
15814       <para>
15815        This allows configuration of per-database history storage.
15816       </para>
15817      </listitem>
15818
15819      <listitem>
15820       <para>
15821        Prevent <command>\x</> (expanded mode) from affecting
15822        the output of <command>\d tablename</> (Neil)
15823       </para>
15824      </listitem>
15825
15826      <listitem>
15827       <para>
15828        Add <option>-L</> option to <application>psql</application> to
15829        log sessions (Lorne Sunley)
15830       </para>
15831       <para>
15832        This option was added because some operating systems do not have
15833        simple command-line activity logging functionality.
15834       </para>
15835      </listitem>
15836
15837      <listitem>
15838       <para>
15839        Make <command>\d</> show the tablespaces of indexes (Qingqing
15840        Zhou)
15841       </para>
15842      </listitem>
15843
15844      <listitem>
15845       <para>
15846        Allow <application>psql</application> help (<command>\h</>) to
15847        make a best guess on the proper help information (Greg Sabino
15848        Mullane)
15849       </para>
15850       <para>
15851        This allows the user to just add <command>\h</> to the front of
15852        the syntax error query and get help on the supported syntax.
15853        Previously any additional query text beyond the command name
15854        had to be removed to use <command>\h</>.
15855       </para>
15856      </listitem>
15857
15858      <listitem>
15859       <para>
15860        Add <command>\pset numericlocale</> to allow numbers to be
15861        output in a locale-aware format (Eugen Nedelcu)
15862       </para>
15863       <para>
15864        For example, using <literal>C</> locale <literal>100000</> would
15865        be output as <literal>100,000.0</> while a European locale might
15866        output this value as <literal>100.000,0</>.
15867       </para>
15868      </listitem>
15869
15870      <listitem>
15871       <para>
15872        Make startup banner show both server version number and
15873        <application>psql</>'s version number, when they are different (Bruce)
15874       </para>
15875       <para>
15876        Also, a warning will be shown if the server and <application>psql</>
15877        are from different major releases.
15878       </para>
15879      </listitem>
15880
15881     </itemizedlist>
15882    </sect3>
15883
15884
15885    <sect3>
15886     <title><application>pg_dump</> Changes</title>
15887     <itemizedlist>
15888
15889      <listitem>
15890       <para>
15891        Add <option>-n</> / <option>--schema</> switch to
15892        <application>pg_restore</> (Richard van den Berg)
15893       </para>
15894       <para>
15895        This allows just the objects in a specified schema to be restored.
15896       </para>
15897      </listitem>
15898
15899      <listitem>
15900       <para>
15901        Allow <application>pg_dump</> to dump large objects even in
15902        text mode (Tom)
15903       </para>
15904       <para>
15905        With this change, large objects are now always dumped; the former
15906        <option>-b</> switch is a no-op.
15907       </para>
15908      </listitem>
15909
15910      <listitem>
15911       <para>
15912        Allow <application>pg_dump</> to dump a consistent snapshot of
15913        large objects (Tom)
15914       </para>
15915      </listitem>
15916
15917      <listitem>
15918       <para>
15919        Dump comments for large objects (Tom)
15920       </para>
15921      </listitem>
15922
15923      <listitem>
15924       <para>
15925        Add <option>--encoding</> to <application>pg_dump</>
15926        (Magnus Hagander)
15927       </para>
15928       <para>
15929        This allows a database to be dumped in an encoding that is
15930        different from the server's encoding. This is valuable when
15931        transferring the dump to a machine with a different encoding.
15932       </para>
15933      </listitem>
15934
15935      <listitem>
15936       <para>
15937        Rely on <structname>pg_pltemplate</> for procedural languages (Tom)
15938       </para>
15939       <para>
15940        If the call handler for a procedural language is in the
15941        <literal>pg_catalog</> schema, <application>pg_dump</> does not
15942        dump the handler.  Instead, it dumps the language using just
15943        <command>CREATE LANGUAGE <replaceable>name</></command>,
15944        relying on the <structname>pg_pltemplate</> catalog to provide
15945        the language's creation parameters at load time.
15946       </para>
15947      </listitem>
15948
15949     </itemizedlist>
15950    </sect3>
15951
15952
15953    <sect3>
15954     <title><application>libpq</application> Changes</title>
15955     <itemizedlist>
15956
15957      <listitem>
15958       <para>
15959        Add a <envar>PGPASSFILE</> environment variable to specify the
15960        password file's filename (Andrew)
15961       </para>
15962      </listitem>
15963
15964      <listitem>
15965       <para>
15966        Add <function>lo_create()</>, that is similar to
15967        <function>lo_creat()</> but allows the OID of the large object
15968        to be specified (Tom)
15969       </para>
15970      </listitem>
15971
15972      <listitem>
15973       <para>
15974        Make <application>libpq</application> consistently return an error
15975        to the client application on <function>malloc()</function>
15976        failure (Neil)
15977       </para>
15978      </listitem>
15979     </itemizedlist>
15980    </sect3>
15981
15982
15983    <sect3>
15984     <title>Source Code Changes</title>
15985     <itemizedlist>
15986
15987      <listitem>
15988       <para>
15989        Fix <application>pgxs</> to support building against a relocated
15990        installation
15991       </para>
15992      </listitem>
15993
15994      <listitem>
15995       <para>
15996        Add spinlock support for the Itanium processor using Intel
15997        compiler (Vikram Kalsi)
15998       </para>
15999      </listitem>
16000
16001      <listitem>
16002       <para>
16003        Add Kerberos 5 support for Windows (Magnus)
16004       </para>
16005      </listitem>
16006
16007      <listitem>
16008       <para>
16009        Add Chinese FAQ (laser@pgsqldb.com)
16010       </para>
16011      </listitem>
16012
16013      <listitem>
16014       <para>
16015        Rename Rendezvous to Bonjour to match OS/X feature renaming
16016        (Bruce)
16017       </para>
16018      </listitem>
16019
16020      <listitem>
16021       <para>
16022        Add support for <literal>fsync_writethrough</literal> on
16023        Darwin (Chris Campbell)
16024       </para>
16025      </listitem>
16026
16027      <listitem>
16028       <para>
16029        Streamline the passing of information within the server, the
16030        optimizer, and the lock system (Tom)
16031       </para>
16032      </listitem>
16033
16034      <listitem>
16035       <para>
16036        Allow <application>pg_config</> to be compiled using MSVC (Andrew)
16037       </para>
16038       <para>
16039        This is required to build DBD::Pg using <application>MSVC</>.
16040       </para>
16041      </listitem>
16042
16043      <listitem>
16044       <para>
16045        Remove support for Kerberos V4 (Magnus)
16046       </para>
16047       <para>
16048        Kerberos 4 had security vulnerabilities and is no longer
16049        maintained.
16050       </para>
16051      </listitem>
16052
16053      <listitem>
16054       <para>
16055        Code cleanups (Coverity static analysis performed by
16056        EnterpriseDB)
16057       </para>
16058      </listitem>
16059
16060      <listitem>
16061       <para>
16062        Modify <filename>postgresql.conf</> to use documentation defaults
16063        <literal>on</>/<literal>off</> rather than
16064        <literal>true</>/<literal>false</> (Bruce)
16065       </para>
16066      </listitem>
16067
16068      <listitem>
16069       <para>
16070        Enhance <application>pg_config</> to be able to report more
16071        build-time values (Tom)
16072       </para>
16073      </listitem>
16074
16075      <listitem>
16076       <para>
16077        Allow <application>libpq</application> to be built thread-safe
16078        on Windows (Dave Page)
16079       </para>
16080      </listitem>
16081
16082      <listitem>
16083       <para>
16084        Allow IPv6 connections to be used on Windows (Andrew)
16085       </para>
16086      </listitem>
16087
16088      <listitem>
16089       <para>
16090        Add Server Administration documentation about I/O subsystem
16091        reliability (Bruce)
16092       </para>
16093      </listitem>
16094
16095      <listitem>
16096       <para>
16097        Move private declarations from <filename>gist.h</filename> to
16098        <filename>gist_private.h</filename> (Neil)
16099       </para>
16100
16101       <para>
16102        In previous releases, <filename>gist.h</> contained both the
16103        public GiST API (intended for use by authors of GiST index
16104        implementations) as well as some private declarations used by
16105        the implementation of GiST itself. The latter have been moved
16106        to a separate file, <filename>gist_private.h</>. Most GiST
16107        index implementations should be unaffected.
16108       </para>
16109      </listitem>
16110
16111      <listitem>
16112       <para>
16113        Overhaul GiST memory management (Neil)
16114       </para>
16115
16116       <para>
16117        GiST methods are now always invoked in a short-lived memory
16118        context. Therefore, memory allocated via <function>palloc()</>
16119        will be reclaimed automatically, so GiST index implementations
16120        do not need to manually release allocated memory via
16121        <function>pfree()</>.
16122       </para>
16123      </listitem>
16124     </itemizedlist>
16125    </sect3>
16126
16127
16128    <sect3>
16129     <title>Contrib Changes</title>
16130     <itemizedlist>
16131
16132      <listitem>
16133       <para>
16134        Add <filename>/contrib/pg_buffercache</> contrib module (Mark
16135        Kirkwood)
16136       </para>
16137       <para>
16138        This displays the contents of the buffer cache, for debugging and
16139        performance tuning purposes.
16140       </para>
16141      </listitem>
16142
16143      <listitem>
16144       <para>
16145        Remove <filename>/contrib/array</> because it is obsolete (Tom)
16146       </para>
16147      </listitem>
16148
16149      <listitem>
16150       <para>
16151        Clean up the <filename>/contrib/lo</> module (Tom)
16152       </para>
16153      </listitem>
16154
16155      <listitem>
16156       <para>
16157        Move <filename>/contrib/findoidjoins</> to
16158        <filename>/src/tools</> (Tom)
16159       </para>
16160      </listitem>
16161
16162      <listitem>
16163       <para>
16164        Remove the <literal>&lt;&lt;</>, <literal>&gt;&gt;</>,
16165        <literal>&amp;&lt;</>, and <literal>&amp;&gt;</> operators from
16166        <filename>/contrib/cube</>
16167       </para>
16168       <para>
16169        These operators were not useful.
16170       </para>
16171      </listitem>
16172
16173      <listitem>
16174       <para>
16175        Improve <filename>/contrib/btree_gist</> (Janko Richter)
16176       </para>
16177      </listitem>
16178
16179      <listitem>
16180       <para>
16181        Improve <filename>/contrib/pgbench</> (Tomoaki Sato, Tatsuo)
16182       </para>
16183       <para>
16184        There is now a facility for testing with SQL command scripts given
16185        by the user, instead of only a hard-wired command sequence.
16186       </para>
16187      </listitem>
16188
16189      <listitem>
16190       <para>
16191        Improve <filename>/contrib/pgcrypto</> (Marko Kreen)
16192       </para>
16193
16194       <itemizedlist>
16195
16196        <listitem>
16197         <para>
16198          Implementation of OpenPGP symmetric-key and public-key encryption
16199         </para>
16200         <para>
16201          Both RSA and Elgamal public-key algorithms are supported.
16202         </para>
16203        </listitem>
16204
16205        <listitem>
16206         <para>
16207          Stand alone build: include SHA256/384/512 hashes, Fortuna PRNG
16208         </para>
16209        </listitem>
16210
16211        <listitem>
16212         <para>
16213          OpenSSL build: support 3DES, use internal AES with OpenSSL &lt; 0.9.7
16214         </para>
16215        </listitem>
16216
16217        <listitem>
16218         <para>
16219          Take build parameters (OpenSSL, zlib) from <filename>configure</> result
16220         </para>
16221         <para>
16222          There is no need to edit the <filename>Makefile</> anymore.
16223         </para>
16224        </listitem>
16225
16226        <listitem>
16227         <para>
16228          Remove support for <filename>libmhash</> and <filename>libmcrypt</>
16229         </para>
16230        </listitem>
16231
16232       </itemizedlist>
16233      </listitem>
16234
16235     </itemizedlist>
16236    </sect3>
16237
16238   </sect2>
16239  </sect1>
16240
16241  <sect1 id="release-8-0-21">
16242   <title>Release 8.0.21</title>
16243
16244   <note>
16245   <title>Release date</title>
16246   <simpara>2009-03-16</simpara>
16247   </note>
16248
16249   <para>
16250    This release contains a variety of fixes from 8.0.20.
16251    For information about new features in the 8.0 major release, see
16252    <xref linkend="release-8-0">.
16253   </para>
16254
16255   <sect2>
16256    <title>Migration to Version 8.0.21</title>
16257
16258    <para>
16259     A dump/restore is not required for those running 8.0.X.
16260     However, if you are upgrading from a version earlier than 8.0.6,
16261     see the release notes for 8.0.6.
16262    </para>
16263
16264   </sect2>
16265
16266   <sect2>
16267    <title>Changes</title>
16268
16269    <itemizedlist>
16270
16271     <listitem>
16272      <para>
16273       Prevent error recursion crashes when encoding conversion fails (Tom)
16274      </para>
16275
16276      <para>
16277       This change extends fixes made in the last two minor releases for
16278       related failure scenarios.  The previous fixes were narrowly tailored
16279       for the original problem reports, but we have now recognized that
16280       <emphasis>any</> error thrown by an encoding conversion function could
16281       potentially lead to infinite recursion while trying to report the
16282       error.  The solution therefore is to disable translation and encoding
16283       conversion and report the plain-ASCII form of any error message,
16284       if we find we have gotten into a recursive error reporting situation.
16285       (CVE-2009-0922)
16286      </para>
16287     </listitem>
16288
16289     <listitem>
16290      <para>
16291       Disallow <command>CREATE CONVERSION</> with the wrong encodings
16292       for the specified conversion function (Heikki)
16293      </para>
16294
16295      <para>
16296       This prevents one possible scenario for encoding conversion failure.
16297       The previous change is a backstop to guard against other kinds of
16298       failures in the same area.
16299      </para>
16300     </listitem>
16301
16302     <listitem>
16303      <para>
16304       Fix core dump when <function>to_char()</> is given format codes that
16305       are inappropriate for the type of the data argument (Tom)
16306      </para>
16307     </listitem>
16308
16309     <listitem>
16310      <para>
16311       Add <literal>MUST</> (Mauritius Island Summer Time) to the default list
16312       of known timezone abbreviations (Xavier Bugaud)
16313      </para>
16314     </listitem>
16315
16316    </itemizedlist>
16317
16318   </sect2>
16319  </sect1>
16320
16321  <sect1 id="release-8-0-20">
16322   <title>Release 8.0.20</title>
16323
16324   <note>
16325   <title>Release date</title>
16326   <simpara>2009-02-02</simpara>
16327   </note>
16328
16329   <para>
16330    This release contains a variety of fixes from 8.0.19.
16331    For information about new features in the 8.0 major release, see
16332    <xref linkend="release-8-0">.
16333   </para>
16334
16335   <sect2>
16336    <title>Migration to Version 8.0.20</title>
16337
16338    <para>
16339     A dump/restore is not required for those running 8.0.X.
16340     However, if you are upgrading from a version earlier than 8.0.6,
16341     see the release notes for 8.0.6.
16342    </para>
16343
16344   </sect2>
16345
16346   <sect2>
16347    <title>Changes</title>
16348
16349    <itemizedlist>
16350
16351     <listitem>
16352      <para>
16353       Improve handling of URLs in <function>headline()</> function (Teodor)
16354      </para>
16355     </listitem>
16356
16357     <listitem>
16358      <para>
16359       Improve handling of overlength headlines in <function>headline()</>
16360       function (Teodor)
16361      </para>
16362     </listitem>
16363
16364     <listitem>
16365      <para>
16366       Prevent possible Assert failure or misconversion if an encoding
16367       conversion is created with the wrong conversion function for the
16368       specified pair of encodings (Tom, Heikki)
16369      </para>
16370     </listitem>
16371
16372     <listitem>
16373      <para>
16374       Avoid unnecessary locking of small tables in <command>VACUUM</>
16375       (Heikki)
16376      </para>
16377     </listitem>
16378
16379     <listitem>
16380      <para>
16381       Fix uninitialized variables in <filename>contrib/tsearch2</>'s
16382       <function>get_covers()</> function (Teodor)
16383      </para>
16384     </listitem>
16385
16386     <listitem>
16387      <para>
16388       Make all documentation reference <literal>pgsql-bugs</> and/or
16389       <literal>pgsql-hackers</> as appropriate, instead of the
16390       now-decommissioned <literal>pgsql-ports</> and <literal>pgsql-patches</>
16391       mailing lists (Tom)
16392      </para>
16393     </listitem>
16394
16395     <listitem>
16396      <para>
16397       Update time zone data files to <application>tzdata</> release 2009a (for
16398       Kathmandu and historical DST corrections in Switzerland, Cuba)
16399      </para>
16400     </listitem>
16401
16402    </itemizedlist>
16403
16404   </sect2>
16405  </sect1>
16406
16407  <sect1 id="release-8-0-19">
16408   <title>Release 8.0.19</title>
16409
16410   <note>
16411   <title>Release date</title>
16412   <simpara>2008-11-03</simpara>
16413   </note>
16414
16415   <para>
16416    This release contains a variety of fixes from 8.0.18.
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.19</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       Fix backend crash when the client encoding cannot represent a localized
16440       error message (Tom)
16441      </para>
16442
16443      <para>
16444       We have addressed similar issues before, but it would still fail if
16445       the <quote>character has no equivalent</> message itself couldn't
16446       be converted.  The fix is to disable localization and send the plain
16447       ASCII error message when we detect such a situation.
16448      </para>
16449     </listitem>
16450
16451     <listitem>
16452      <para>
16453       Fix possible crash when deeply nested functions are invoked from
16454       a trigger (Tom)
16455      </para>
16456     </listitem>
16457
16458     <listitem>
16459      <para>
16460       Ensure an error is reported when a newly-defined PL/pgSQL trigger
16461       function is invoked as a normal function (Tom)
16462      </para>
16463     </listitem>
16464
16465     <listitem>
16466      <para>
16467       Fix incorrect tsearch2 headline generation when single query
16468       item matches first word of text (Sushant Sinha)
16469      </para>
16470     </listitem>
16471
16472     <listitem>
16473      <para>
16474       Fix improper display of fractional seconds in interval values when
16475       using a non-ISO datestyle in an <option>--enable-integer-datetimes</>
16476       build (Ron Mayer)
16477      </para>
16478     </listitem>
16479
16480     <listitem>
16481      <para>
16482       Ensure <function>SPI_getvalue</> and <function>SPI_getbinval</>
16483       behave correctly when the passed tuple and tuple descriptor have
16484       different numbers of columns (Tom)
16485      </para>
16486
16487      <para>
16488       This situation is normal when a table has had columns added or removed,
16489       but these two functions didn't handle it properly.
16490       The only likely consequence is an incorrect error indication.
16491      </para>
16492     </listitem>
16493
16494     <listitem>
16495      <para>
16496       Fix <application>ecpg</>'s parsing of <command>CREATE USER</> (Michael)
16497      </para>
16498     </listitem>
16499
16500     <listitem>
16501      <para>
16502       Fix recent breakage of <literal>pg_ctl restart</> (Tom)
16503      </para>
16504     </listitem>
16505
16506     <listitem>
16507      <para>
16508       Update time zone data files to <application>tzdata</> release 2008i (for
16509       DST law changes in Argentina, Brazil, Mauritius, Syria)
16510      </para>
16511     </listitem>
16512
16513    </itemizedlist>
16514
16515   </sect2>
16516  </sect1>
16517
16518  <sect1 id="release-8-0-18">
16519   <title>Release 8.0.18</title>
16520
16521   <note>
16522   <title>Release date</title>
16523   <simpara>2008-09-22</simpara>
16524   </note>
16525
16526   <para>
16527    This release contains a variety of fixes from 8.0.17.
16528    For information about new features in the 8.0 major release, see
16529    <xref linkend="release-8-0">.
16530   </para>
16531
16532   <sect2>
16533    <title>Migration to Version 8.0.18</title>
16534
16535    <para>
16536     A dump/restore is not required for those running 8.0.X.
16537     However, if you are upgrading from a version earlier than 8.0.6,
16538     see the release notes for 8.0.6.
16539    </para>
16540
16541   </sect2>
16542
16543   <sect2>
16544    <title>Changes</title>
16545
16546    <itemizedlist>
16547
16548     <listitem>
16549      <para>
16550       Widen local lock counters from 32 to 64 bits (Tom)
16551      </para>
16552
16553      <para>
16554       This responds to reports that the counters could overflow in
16555       sufficiently long transactions, leading to unexpected <quote>lock is
16556       already held</> errors.
16557      </para>
16558     </listitem>
16559
16560     <listitem>
16561      <para>
16562       Add checks in executor startup to ensure that the tuples produced by an
16563       <command>INSERT</> or <command>UPDATE</> will match the target table's
16564       current rowtype (Tom)
16565      </para>
16566
16567      <para>
16568       <command>ALTER COLUMN TYPE</>, followed by re-use of a previously
16569       cached plan, could produce this type of situation.  The check protects
16570       against data corruption and/or crashes that could ensue.
16571      </para>
16572     </listitem>
16573
16574     <listitem>
16575      <para>
16576       Fix datetime input functions to correctly detect integer overflow when
16577       running on a 64-bit platform (Tom)
16578      </para>
16579     </listitem>
16580
16581     <listitem>
16582      <para>
16583       Improve performance of writing very long log messages to syslog (Tom)
16584      </para>
16585     </listitem>
16586
16587     <listitem>
16588      <para>
16589       Fix bug in backwards scanning of a cursor on a <literal>SELECT DISTINCT
16590       ON</> query (Tom)
16591      </para>
16592     </listitem>
16593
16594     <listitem>
16595      <para>
16596       Fix planner to estimate that <literal>GROUP BY</> expressions yielding
16597       boolean results always result in two groups, regardless of the
16598       expressions' contents (Tom)
16599      </para>
16600
16601      <para>
16602       This is very substantially more accurate than the regular <literal>GROUP
16603       BY</> estimate for certain boolean tests like <replaceable>col</>
16604       <literal>IS NULL</>.
16605      </para>
16606     </listitem>
16607
16608     <listitem>
16609      <para>
16610       Fix PL/Tcl to behave correctly with Tcl 8.5, and to be more careful
16611       about the encoding of data sent to or from Tcl (Tom)
16612      </para>
16613     </listitem>
16614
16615     <listitem>
16616      <para>
16617       Fix PL/Python to work with Python 2.5
16618      </para>
16619
16620      <para>
16621       This is a back-port of fixes made during the 8.2 development cycle.
16622      </para>
16623     </listitem>
16624
16625     <listitem>
16626      <para>
16627       Improve <application>pg_dump</> and <application>pg_restore</>'s
16628       error reporting after failure to send a SQL command (Tom)
16629      </para>
16630     </listitem>
16631
16632     <listitem>
16633      <para>
16634       Fix <application>pg_ctl</> to properly preserve postmaster
16635       command-line arguments across a <literal>restart</> (Bruce)
16636      </para>
16637     </listitem>
16638
16639     <listitem>
16640      <para>
16641       Update time zone data files to <application>tzdata</> release 2008f (for
16642       DST law changes in Argentina, Bahamas, Brazil, Mauritius, Morocco,
16643       Pakistan, Palestine, and Paraguay)
16644      </para>
16645     </listitem>
16646
16647    </itemizedlist>
16648
16649   </sect2>
16650  </sect1>
16651
16652  <sect1 id="release-8-0-17">
16653   <title>Release 8.0.17</title>
16654
16655   <note>
16656   <title>Release date</title>
16657   <simpara>2008-06-12</simpara>
16658   </note>
16659
16660   <para>
16661    This release contains one serious bug fix over 8.0.16.
16662    For information about new features in the 8.0 major release, see
16663    <xref linkend="release-8-0">.
16664   </para>
16665
16666   <sect2>
16667    <title>Migration to Version 8.0.17</title>
16668
16669    <para>
16670     A dump/restore is not required for those running 8.0.X.
16671     However, if you are upgrading from a version earlier than 8.0.6,
16672     see the release notes for 8.0.6.
16673    </para>
16674
16675   </sect2>
16676
16677   <sect2>
16678    <title>Changes</title>
16679
16680    <itemizedlist>
16681
16682     <listitem>
16683      <para>
16684       Make <function>pg_get_ruledef()</> parenthesize negative constants (Tom)
16685      </para>
16686
16687      <para>
16688       Before this fix, a negative constant in a view or rule might be dumped
16689       as, say, <literal>-42::integer</>, which is subtly incorrect: it should
16690       be <literal>(-42)::integer</> due to operator precedence rules.
16691       Usually this would make little difference, but it could interact with
16692       another recent patch to cause
16693       <productname>PostgreSQL</> to reject what had been a valid
16694       <command>SELECT DISTINCT</> view query.  Since this could result in
16695       <application>pg_dump</> output failing to reload, it is being treated
16696       as a high-priority fix.  The only released versions in which dump
16697       output is actually incorrect are 8.3.1 and 8.2.7.
16698      </para>
16699     </listitem>
16700
16701    </itemizedlist>
16702
16703   </sect2>
16704  </sect1>
16705
16706  <sect1 id="release-8-0-16">
16707   <title>Release 8.0.16</title>
16708
16709   <note>
16710   <title>Release date</title>
16711   <simpara>never released</simpara>
16712   </note>
16713
16714   <para>
16715    This release contains a variety of fixes from 8.0.15.
16716    For information about new features in the 8.0 major release, see
16717    <xref linkend="release-8-0">.
16718   </para>
16719
16720   <sect2>
16721    <title>Migration to Version 8.0.16</title>
16722
16723    <para>
16724     A dump/restore is not required for those running 8.0.X.
16725     However, if you are upgrading from a version earlier than 8.0.6,
16726     see the release notes for 8.0.6.
16727    </para>
16728
16729   </sect2>
16730
16731   <sect2>
16732    <title>Changes</title>
16733
16734    <itemizedlist>
16735
16736     <listitem>
16737      <para>
16738       Fix <command>ALTER TABLE ADD COLUMN ... PRIMARY KEY</> so that the new
16739       column is correctly checked to see if it's been initialized to all
16740       non-nulls (Brendan Jurd)
16741      </para>
16742
16743      <para>
16744       Previous versions neglected to check this requirement at all.
16745      </para>
16746     </listitem>
16747
16748     <listitem>
16749      <para>
16750       Fix possible <command>CREATE TABLE</> failure when inheriting the
16751       <quote>same</> constraint from multiple parent relations that
16752       inherited that constraint from a common ancestor (Tom)
16753      </para>
16754     </listitem>
16755
16756     <listitem>
16757      <para>
16758       Fix conversions between ISO-8859-5 and other encodings to handle
16759       Cyrillic <quote>Yo</> characters (<literal>e</> and <literal>E</> with
16760       two dots) (Sergey Burladyan)
16761      </para>
16762     </listitem>
16763
16764     <listitem>
16765      <para>
16766       Fix a few datatype input functions
16767       that were allowing unused bytes in their results to contain
16768       uninitialized, unpredictable values (Tom)
16769      </para>
16770
16771      <para>
16772       This could lead to failures in which two apparently identical literal
16773       values were not seen as equal, resulting in the parser complaining
16774       about unmatched <literal>ORDER BY</> and <literal>DISTINCT</>
16775       expressions.
16776      </para>
16777     </listitem>
16778
16779     <listitem>
16780      <para>
16781       Fix a corner case in regular-expression substring matching
16782       (<literal>substring(<replaceable>string</> from
16783       <replaceable>pattern</>)</literal>) (Tom)
16784      </para>
16785
16786      <para>
16787       The problem occurs when there is a match to the pattern overall but
16788       the user has specified a parenthesized subexpression and that
16789       subexpression hasn't got a match.  An example is
16790       <literal>substring('foo' from 'foo(bar)?')</>.
16791       This should return NULL, since <literal>(bar)</> isn't matched, but
16792       it was mistakenly returning the whole-pattern match instead (ie,
16793       <literal>foo</>).
16794      </para>
16795     </listitem>
16796
16797     <listitem>
16798      <para>
16799       Update time zone data files to <application>tzdata</> release 2008c (for
16800       DST law changes in Morocco, Iraq, Choibalsan, Pakistan, Syria, Cuba,
16801       Argentina/San_Luis, and Chile)
16802      </para>
16803     </listitem>
16804
16805     <listitem>
16806      <para>
16807       Fix incorrect result from <application>ecpg</>'s
16808       <function>PGTYPEStimestamp_sub()</> function (Michael)
16809      </para>
16810     </listitem>
16811
16812     <listitem>
16813      <para>
16814       Fix core dump in <filename>contrib/xml2</>'s
16815       <function>xpath_table()</> function when the input query returns a
16816       NULL value (Tom)
16817      </para>
16818     </listitem>
16819
16820     <listitem>
16821      <para>
16822       Fix <filename>contrib/xml2</>'s makefile to not override
16823       <literal>CFLAGS</> (Tom)
16824      </para>
16825     </listitem>
16826
16827     <listitem>
16828      <para>
16829       Fix <literal>DatumGetBool</> macro to not fail with <application>gcc</>
16830       4.3 (Tom)
16831      </para>
16832
16833      <para>
16834       This problem affects <quote>old style</> (V0) C functions that
16835       return boolean.  The fix is already in 8.3, but the need to
16836       back-patch it was not realized at the time.
16837      </para>
16838     </listitem>
16839
16840     <listitem>
16841      <para>
16842       Fix longstanding <command>LISTEN</>/<command>NOTIFY</>
16843       race condition (Tom)
16844      </para>
16845
16846      <para>
16847       In rare cases a session that had just executed a
16848       <command>LISTEN</> might not get a notification, even though
16849       one would be expected because the concurrent transaction executing
16850       <command>NOTIFY</> was observed to commit later.
16851      </para>
16852
16853      <para>
16854       A side effect of the fix is that a transaction that has executed
16855       a not-yet-committed <command>LISTEN</> command will not see any
16856       row in <structname>pg_listener</> for the <command>LISTEN</>,
16857       should it choose to look; formerly it would have.  This behavior
16858       was never documented one way or the other, but it is possible that
16859       some applications depend on the old behavior.
16860      </para>
16861     </listitem>
16862
16863     <listitem>
16864      <para>
16865       Fix rare crash when an error occurs during a query using a hash index
16866       (Heikki)
16867      </para>
16868     </listitem>
16869
16870     <listitem>
16871      <para>
16872       Fix input of datetime values for February 29 in years BC (Tom)
16873      </para>
16874
16875      <para>
16876       The former coding was mistaken about which years were leap years.
16877      </para>
16878     </listitem>
16879
16880     <listitem>
16881      <para>
16882       Fix <quote>unrecognized node type</> error in some variants of
16883       <command>ALTER OWNER</> (Tom)
16884      </para>
16885     </listitem>
16886
16887     <listitem>
16888      <para>
16889       Fix <application>pg_ctl</> to correctly extract the postmaster's port
16890       number from command-line options (Itagaki Takahiro, Tom)
16891      </para>
16892
16893      <para>
16894       Previously, <literal>pg_ctl start -w</> could try to contact the
16895       postmaster on the wrong port, leading to bogus reports of startup
16896       failure.
16897      </para>
16898     </listitem>
16899
16900     <listitem>
16901      <para>
16902       Use <option>-fwrapv</> to defend against possible misoptimization
16903       in recent <application>gcc</> versions (Tom)
16904      </para>
16905
16906      <para>
16907       This is known to be necessary when building <productname>PostgreSQL</>
16908       with <application>gcc</> 4.3 or later.
16909      </para>
16910     </listitem>
16911
16912     <listitem>
16913      <para>
16914       Fix display of constant expressions in <literal>ORDER BY</>
16915       and <literal>GROUP BY</> (Tom)
16916      </para>
16917
16918      <para>
16919       An explictly casted constant would be shown incorrectly.  This could
16920       for example lead to corruption of a view definition during
16921       dump and reload.
16922      </para>
16923     </listitem>
16924
16925     <listitem>
16926      <para>
16927       Fix <application>libpq</> to handle NOTICE messages correctly
16928       during COPY OUT (Tom)
16929      </para>
16930
16931      <para>
16932       This failure has only been observed to occur when a user-defined
16933       datatype's output routine issues a NOTICE, but there is no
16934       guarantee it couldn't happen due to other causes.
16935      </para>
16936     </listitem>
16937
16938    </itemizedlist>
16939
16940   </sect2>
16941  </sect1>
16942
16943  <sect1 id="release-8-0-15">
16944   <title>Release 8.0.15</title>
16945
16946   <note>
16947   <title>Release date</title>
16948   <simpara>2008-01-07</simpara>
16949   </note>
16950
16951   <para>
16952    This release contains a variety of fixes from 8.0.14,
16953    including fixes for significant security issues.
16954    For information about new features in the 8.0 major release, see
16955    <xref linkend="release-8-0">.
16956   </para>
16957
16958   <para>
16959    This is the last 8.0.X release for which the <productname>PostgreSQL</>
16960    community will produce binary packages for <productname>Windows</>.
16961    Windows users are encouraged to move to 8.2.X or later,
16962    since there are Windows-specific fixes in 8.2.X that
16963    are impractical to back-port.  8.0.X will continue to
16964    be supported on other platforms.
16965   </para>
16966
16967   <sect2>
16968    <title>Migration to Version 8.0.15</title>
16969
16970    <para>
16971     A dump/restore is not required for those running 8.0.X.  However,
16972     if you are upgrading from a version earlier than 8.0.6, see the release
16973     notes for 8.0.6.
16974    </para>
16975
16976   </sect2>
16977
16978   <sect2>
16979    <title>Changes</title>
16980
16981    <itemizedlist>
16982
16983     <listitem>
16984      <para>
16985       Prevent functions in indexes from executing with the privileges of
16986       the user running <command>VACUUM</>, <command>ANALYZE</>, etc (Tom)
16987      </para>
16988
16989      <para>
16990       Functions used in index expressions and partial-index
16991       predicates are evaluated whenever a new table entry is made.  It has
16992       long been understood that this poses a risk of trojan-horse code
16993       execution if one modifies a table owned by an untrustworthy user.
16994       (Note that triggers, defaults, check constraints, etc. pose the
16995       same type of risk.)  But functions in indexes pose extra danger
16996       because they will be executed by routine maintenance operations
16997       such as <command>VACUUM FULL</>, which are commonly performed
16998       automatically under a superuser account.  For example, a nefarious user
16999       can execute code with superuser privileges by setting up a
17000       trojan-horse index definition and waiting for the next routine vacuum.
17001       The fix arranges for standard maintenance operations
17002       (including <command>VACUUM</>, <command>ANALYZE</>, <command>REINDEX</>,
17003       and <command>CLUSTER</>) to execute as the table owner rather than
17004       the calling user, using the same privilege-switching mechanism already
17005       used for <literal>SECURITY DEFINER</> functions.  To prevent bypassing
17006       this security measure, execution of <command>SET SESSION
17007       AUTHORIZATION</> and <command>SET ROLE</> is now forbidden within a
17008       <literal>SECURITY DEFINER</> context.  (CVE-2007-6600)
17009      </para>
17010     </listitem>
17011
17012     <listitem>
17013      <para>
17014       Repair assorted bugs in the regular-expression package (Tom, Will Drewry)
17015      </para>
17016
17017      <para>
17018       Suitably crafted regular-expression patterns could cause crashes,
17019       infinite or near-infinite looping, and/or massive memory consumption,
17020       all of which pose denial-of-service hazards for applications that
17021       accept regex search patterns from untrustworthy sources.
17022       (CVE-2007-4769, CVE-2007-4772, CVE-2007-6067)
17023      </para>
17024     </listitem>
17025
17026     <listitem>
17027      <para>
17028       Require non-superusers who use <filename>/contrib/dblink</> to use only
17029       password authentication, as a security measure (Joe)
17030      </para>
17031
17032      <para>
17033       The fix that appeared for this in 8.0.14 was incomplete, as it plugged
17034       the hole for only some <filename>dblink</> functions.  (CVE-2007-6601,
17035       CVE-2007-3278)
17036      </para>
17037     </listitem>
17038
17039     <listitem>
17040      <para>
17041       Update time zone data files to <application>tzdata</> release 2007k
17042       (in particular, recent Argentina changes) (Tom)
17043      </para>
17044     </listitem>
17045
17046     <listitem>
17047      <para>
17048       Fix planner failure in some cases of <literal>WHERE false AND var IN
17049       (SELECT ...)</> (Tom)
17050      </para>
17051     </listitem>
17052
17053     <listitem>
17054      <para>
17055       Preserve the tablespace of indexes that are
17056       rebuilt by <command>ALTER TABLE ... ALTER COLUMN TYPE</> (Tom)
17057      </para>
17058     </listitem>
17059
17060     <listitem>
17061      <para>
17062       Make archive recovery always start a new WAL timeline, rather than only
17063       when a recovery stop time was used (Simon)
17064      </para>
17065
17066      <para>
17067       This avoids a corner-case risk of trying to overwrite an existing
17068       archived copy of the last WAL segment, and seems simpler and cleaner
17069       than the original definition.
17070      </para>
17071     </listitem>
17072
17073     <listitem>
17074      <para>
17075       Make <command>VACUUM</> not use all of <varname>maintenance_work_mem</>
17076       when the table is too small for it to be useful (Alvaro)
17077      </para>
17078     </listitem>
17079
17080     <listitem>
17081      <para>
17082       Fix potential crash in <function>translate()</> when using a multibyte
17083       database encoding (Tom)
17084      </para>
17085     </listitem>
17086
17087     <listitem>
17088      <para>
17089       Fix PL/Perl to cope when platform's Perl defines type <literal>bool</>
17090       as <literal>int</> rather than <literal>char</> (Tom)
17091      </para>
17092
17093      <para>
17094       While this could theoretically happen anywhere, no standard build of
17095       Perl did things this way ... until <productname>Mac OS X</> 10.5.
17096      </para>
17097     </listitem>
17098
17099     <listitem>
17100      <para>
17101       Fix PL/Python to not crash on long exception messages (Alvaro)
17102      </para>
17103     </listitem>
17104
17105     <listitem>
17106      <para>
17107       Fix <application>pg_dump</> to correctly handle inheritance child tables
17108       that have default expressions different from their parent's (Tom)
17109      </para>
17110     </listitem>
17111
17112     <listitem>
17113      <para>
17114       <application>ecpg</> parser fixes (Michael)
17115      </para>
17116     </listitem>
17117
17118     <listitem>
17119      <para>
17120       Make <filename>contrib/tablefunc</>'s <function>crosstab()</> handle
17121       NULL rowid as a category in its own right, rather than crashing (Joe)
17122      </para>
17123     </listitem>
17124
17125     <listitem>
17126      <para>
17127       Fix <type>tsvector</> and <type>tsquery</> output routines to
17128       escape backslashes correctly (Teodor, Bruce)
17129      </para>
17130     </listitem>
17131
17132     <listitem>
17133      <para>
17134       Fix crash of <function>to_tsvector()</> on huge input strings (Teodor)
17135      </para>
17136     </listitem>
17137
17138     <listitem>
17139      <para>
17140       Require a specific version of <productname>Autoconf</> to be used
17141       when re-generating the <command>configure</> script (Peter)
17142      </para>
17143
17144      <para>
17145       This affects developers and packagers only.  The change was made
17146       to prevent accidental use of untested combinations of
17147       <productname>Autoconf</> and <productname>PostgreSQL</> versions.
17148       You can remove the version check if you really want to use a
17149       different <productname>Autoconf</> version, but it's
17150       your responsibility whether the result works or not.
17151      </para>
17152     </listitem>
17153
17154    </itemizedlist>
17155
17156   </sect2>
17157  </sect1>
17158
17159  <sect1 id="release-8-0-14">
17160   <title>Release 8.0.14</title>
17161
17162   <note>
17163   <title>Release date</title>
17164   <simpara>2007-09-17</simpara>
17165   </note>
17166
17167   <para>
17168    This release contains a variety of fixes from 8.0.13.
17169    For information about new features in the 8.0 major release, see
17170    <xref linkend="release-8-0">.
17171   </para>
17172
17173   <sect2>
17174    <title>Migration to Version 8.0.14</title>
17175
17176    <para>
17177     A dump/restore is not required for those running 8.0.X.  However,
17178     if you are upgrading from a version earlier than 8.0.6, see the release
17179     notes for 8.0.6.
17180    </para>
17181
17182   </sect2>
17183
17184   <sect2>
17185    <title>Changes</title>
17186
17187    <itemizedlist>
17188
17189     <listitem>
17190      <para>
17191       Prevent index corruption when a transaction inserts rows and
17192       then aborts close to the end of a concurrent <command>VACUUM</>
17193       on the same table (Tom)
17194      </para>
17195     </listitem>
17196
17197     <listitem>
17198      <para>
17199       Make <command>CREATE DOMAIN ... DEFAULT NULL</> work properly (Tom)
17200      </para>
17201     </listitem>
17202
17203     <listitem>
17204      <para>
17205       Fix excessive logging of <acronym>SSL</> error messages (Tom)
17206      </para>
17207     </listitem>
17208
17209     <listitem>
17210      <para>
17211       Fix logging so that log messages are never interleaved when using
17212       the syslogger process (Andrew)
17213      </para>
17214     </listitem>
17215
17216     <listitem>
17217      <para>
17218       Fix crash when <varname>log_min_error_statement</> logging runs out
17219       of memory (Tom)
17220      </para>
17221     </listitem>
17222
17223     <listitem>
17224      <para>
17225       Fix incorrect handling of some foreign-key corner cases (Tom)
17226      </para>
17227     </listitem>
17228
17229     <listitem>
17230      <para>
17231       Prevent <command>CLUSTER</> from failing
17232       due to attempting to process temporary tables of other sessions (Alvaro)
17233      </para>
17234     </listitem>
17235
17236     <listitem>
17237      <para>
17238       Update the time zone database rules, particularly New Zealand's upcoming changes (Tom)
17239      </para>
17240     </listitem>
17241
17242     <listitem>
17243      <para>
17244       Windows socket improvements (Magnus)
17245      </para>
17246     </listitem>
17247
17248     <listitem>
17249      <para>
17250       Suppress timezone name (<literal>%Z</>) in log timestamps on Windows
17251       because of possible encoding mismatches (Tom)
17252      </para>
17253     </listitem>
17254
17255     <listitem>
17256      <para>
17257       Require non-superusers who use <filename>/contrib/dblink</> to use only
17258       password authentication, as a security measure (Joe)
17259      </para>
17260     </listitem>
17261
17262    </itemizedlist>
17263
17264   </sect2>
17265  </sect1>
17266
17267  <sect1 id="release-8-0-13">
17268   <title>Release 8.0.13</title>
17269
17270   <note>
17271   <title>Release date</title>
17272   <simpara>2007-04-23</simpara>
17273   </note>
17274
17275   <para>
17276    This release contains a variety of fixes from 8.0.12,
17277    including a security fix.
17278    For information about new features in the 8.0 major release, see
17279    <xref linkend="release-8-0">.
17280   </para>
17281
17282   <sect2>
17283    <title>Migration to Version 8.0.13</title>
17284
17285    <para>
17286     A dump/restore is not required for those running 8.0.X.  However,
17287     if you are upgrading from a version earlier than 8.0.6, see the release
17288     notes for 8.0.6.
17289    </para>
17290
17291   </sect2>
17292
17293   <sect2>
17294    <title>Changes</title>
17295
17296    <itemizedlist>
17297
17298     <listitem>
17299     <para>
17300      Support explicit placement of the temporary-table schema within
17301      <varname>search_path</>, and disable searching it for functions
17302      and operators (Tom)
17303     </para>
17304     <para>
17305      This is needed to allow a security-definer function to set a
17306      truly secure value of <varname>search_path</>.  Without it,
17307      an unprivileged SQL user can use temporary objects to execute code
17308      with the privileges of the security-definer function (CVE-2007-2138).
17309      See <command>CREATE FUNCTION</> for more information.
17310     </para>
17311     </listitem>
17312
17313     <listitem>
17314     <para>
17315      <filename>/contrib/tsearch2</> crash fixes (Teodor)
17316     </para>
17317     </listitem>
17318
17319     <listitem>
17320     <para>
17321      Fix potential-data-corruption bug in how <command>VACUUM FULL</> handles
17322      <command>UPDATE</> chains (Tom, Pavan Deolasee)
17323     </para>
17324     </listitem>
17325
17326     <listitem>
17327     <para>
17328      Fix PANIC during enlargement of a hash index (bug introduced in 8.0.10)
17329      (Tom)
17330     </para>
17331     </listitem>
17332
17333     <listitem>
17334     <para>
17335      Fix POSIX-style timezone specs to follow new USA DST rules (Tom)
17336     </para>
17337     </listitem>
17338
17339    </itemizedlist>
17340
17341   </sect2>
17342  </sect1>
17343
17344  <sect1 id="release-8-0-12">
17345   <title>Release 8.0.12</title>
17346
17347   <note>
17348   <title>Release date</title>
17349   <simpara>2007-02-07</simpara>
17350   </note>
17351
17352   <para>
17353    This release contains one fix from 8.0.11.
17354    For information about new features in the 8.0 major release, see
17355    <xref linkend="release-8-0">.
17356   </para>
17357
17358   <sect2>
17359    <title>Migration to Version 8.0.12</title>
17360
17361    <para>
17362     A dump/restore is not required for those running 8.0.X.  However,
17363     if you are upgrading from a version earlier than 8.0.6, see the release
17364     notes for 8.0.6.
17365    </para>
17366
17367   </sect2>
17368
17369   <sect2>
17370    <title>Changes</title>
17371
17372    <itemizedlist>
17373
17374     <listitem>
17375     <para>
17376      Remove overly-restrictive check for type length in constraints and
17377      functional indexes(Tom)
17378     </para>
17379     </listitem>
17380
17381    </itemizedlist>
17382
17383   </sect2>
17384  </sect1>
17385
17386  <sect1 id="release-8-0-11">
17387   <title>Release 8.0.11</title>
17388
17389   <note>
17390   <title>Release date</title>
17391   <simpara>2007-02-05</simpara>
17392   </note>
17393
17394   <para>
17395    This release contains a variety of fixes from 8.0.10, including
17396    a security fix.
17397    For information about new features in the 8.0 major release, see
17398    <xref linkend="release-8-0">.
17399   </para>
17400
17401   <sect2>
17402    <title>Migration to Version 8.0.11</title>
17403
17404    <para>
17405     A dump/restore is not required for those running 8.0.X.  However,
17406     if you are upgrading from a version earlier than 8.0.6, see the release
17407     notes for 8.0.6.
17408    </para>
17409
17410   </sect2>
17411
17412   <sect2>
17413    <title>Changes</title>
17414
17415    <itemizedlist>
17416
17417     <listitem>
17418     <para>
17419      Remove security vulnerabilities that allowed connected users
17420      to read backend memory (Tom)
17421     </para>
17422     <para>
17423      The vulnerabilities involve suppressing the normal check that a SQL
17424      function returns the data type it's declared to, and changing the
17425      data type of a table column (CVE-2007-0555, CVE-2007-0556).  These
17426      errors can easily be exploited to cause a backend crash, and in
17427      principle might be used to read database content that the user
17428      should not be able to access.
17429     </para>
17430     </listitem>
17431
17432     <listitem>
17433     <para>
17434      Fix rare bug wherein btree index page splits could fail
17435      due to choosing an infeasible split point (Heikki Linnakangas)
17436     </para>
17437     </listitem>
17438
17439     <listitem>
17440     <para>
17441      Fix for rare Assert() crash triggered by <literal>UNION</> (Tom)
17442     </para>
17443     </listitem>
17444
17445     <listitem>
17446     <para>
17447      Tighten security of multi-byte character processing for UTF8 sequences
17448      over three bytes long (Tom)
17449     </para>
17450     </listitem>
17451
17452    </itemizedlist>
17453
17454   </sect2>
17455  </sect1>
17456
17457  <sect1 id="release-8-0-10">
17458   <title>Release 8.0.10</title>
17459
17460   <note>
17461   <title>Release date</title>
17462   <simpara>2007-01-08</simpara>
17463   </note>
17464
17465   <para>
17466    This release contains a variety of fixes from 8.0.9.
17467    For information about new features in the 8.0 major release, see
17468    <xref linkend="release-8-0">.
17469   </para>
17470
17471   <sect2>
17472    <title>Migration to Version 8.0.10</title>
17473
17474    <para>
17475     A dump/restore is not required for those running 8.0.X.  However,
17476     if you are upgrading from a version earlier than 8.0.6, see the release
17477     notes for 8.0.6.
17478    </para>
17479
17480   </sect2>
17481
17482   <sect2>
17483    <title>Changes</title>
17484
17485    <itemizedlist>
17486
17487     <listitem>
17488      <para>
17489       Improve handling of <function>getaddrinfo()</> on AIX (Tom)
17490      </para>
17491
17492      <para>
17493       This fixes a problem with starting the statistics collector,
17494       among other things.
17495      </para>
17496     </listitem>
17497
17498      <listitem>
17499       <para>
17500        Fix <quote>failed to re-find parent key</> errors in
17501        <command>VACUUM</> (Tom)
17502       </para>
17503      </listitem>
17504
17505      <listitem>
17506       <para>
17507        Fix race condition for truncation of a large relation across a
17508        gigabyte boundary by <command>VACUUM</> (Tom)
17509       </para>
17510      </listitem>
17511
17512      <listitem>
17513       <para>
17514        Fix bugs affecting multi-gigabyte hash indexes (Tom)
17515       </para>
17516      </listitem>
17517
17518     <listitem>
17519      <para>
17520       Fix possible deadlock in Windows signal handling (Teodor)
17521      </para>
17522     </listitem>
17523
17524     <listitem>
17525      <para>
17526       Fix error when constructing an <literal>ARRAY[]</> made up of multiple
17527       empty elements (Tom)
17528      </para>
17529     </listitem>
17530
17531     <listitem>
17532      <para>
17533       Fix ecpg memory leak during connection (Michael)
17534      </para>
17535     </listitem>
17536
17537     <listitem>
17538      <para>
17539       <function>to_number()</> and <function>to_char(numeric)</>
17540       are now <literal>STABLE</>, not <literal>IMMUTABLE</>, for
17541       new <application>initdb</> installs (Tom)
17542      </para>
17543
17544      <para>
17545       This is because <varname>lc_numeric</> can potentially
17546       change the output of these functions.
17547      </para>
17548     </listitem>
17549
17550     <listitem>
17551      <para>
17552       Improve index usage of regular expressions that use parentheses (Tom)
17553      </para>
17554
17555      <para>
17556       This improves <application>psql</> <literal>\d</> performance also.
17557      </para>
17558     </listitem>
17559
17560     <listitem>
17561      <para>
17562       Update timezone database
17563      </para>
17564
17565      <para>
17566       This affects Australian and Canadian daylight-savings rules in
17567       particular.
17568      </para>
17569     </listitem>
17570
17571    </itemizedlist>
17572
17573   </sect2>
17574  </sect1>
17575
17576  <sect1 id="release-8-0-9">
17577   <title>Release 8.0.9</title>
17578
17579   <note>
17580   <title>Release date</title>
17581   <simpara>2006-10-16</simpara>
17582   </note>
17583
17584   <para>
17585    This release contains a variety of fixes from 8.0.8.
17586    For information about new features in the 8.0 major release, see
17587    <xref linkend="release-8-0">.
17588   </para>
17589
17590   <sect2>
17591    <title>Migration to Version 8.0.9</title>
17592
17593    <para>
17594     A dump/restore is not required for those running 8.0.X.  However,
17595     if you are upgrading from a version earlier than 8.0.6, see the release
17596     notes for 8.0.6.
17597    </para>
17598
17599   </sect2>
17600
17601   <sect2>
17602    <title>Changes</title>
17603
17604 <itemizedlist>
17605 <listitem><para>Fix crash when referencing <literal>NEW</> row
17606 values in rule WHERE expressions (Tom)</para></listitem>
17607 <listitem><para>Fix core dump when an untyped literal is taken as
17608 ANYARRAY</para></listitem>
17609 <listitem><para>Fix mishandling of AFTER triggers when query contains a SQL
17610 function returning multiple rows (Tom)</para></listitem>
17611 <listitem><para>Fix <command>ALTER TABLE ... TYPE</> to recheck
17612 <literal>NOT NULL</> for <literal>USING</> clause (Tom)</para></listitem>
17613 <listitem><para>Fix <function>string_to_array()</> to handle overlapping
17614  matches for the separator string</para>
17615 <para>For example, <literal>string_to_array('123xx456xxx789', 'xx')</>.
17616 </para></listitem>
17617 <listitem><para>Fix corner cases in pattern matching for
17618  <application>psql</>'s <literal>\d</> commands</para></listitem>
17619 <listitem><para>Fix index-corrupting bugs in /contrib/ltree
17620  (Teodor)</para></listitem>
17621 <listitem><para>Numerous robustness fixes in <application>ecpg</> (Joachim
17622 Wieland)</para></listitem>
17623 <listitem><para>Fix backslash escaping in /contrib/dbmirror</para></listitem>
17624 <listitem><para>Fix instability of statistics collection on Win32 (Tom, Andrew)</para></listitem>
17625 <listitem><para>Fixes for <systemitem class="osname">AIX</> and
17626 <productname>Intel</> compilers (Tom)</para></listitem>
17627 </itemizedlist>
17628
17629   </sect2>
17630  </sect1>
17631
17632  <sect1 id="release-8-0-8">
17633   <title>Release 8.0.8</title>
17634
17635   <note>
17636   <title>Release date</title>
17637   <simpara>2006-05-23</simpara>
17638   </note>
17639
17640   <para>
17641    This release contains a variety of fixes from 8.0.7,
17642    including patches for extremely serious security issues.
17643    For information about new features in the 8.0 major release, see
17644    <xref linkend="release-8-0">.
17645   </para>
17646
17647   <sect2>
17648    <title>Migration to Version 8.0.8</title>
17649
17650    <para>
17651     A dump/restore is not required for those running 8.0.X.  However,
17652     if you are upgrading from a version earlier than 8.0.6, see the release
17653     notes for 8.0.6.
17654    </para>
17655
17656    <para>
17657     Full security against the SQL-injection attacks described in
17658     CVE-2006-2313 and CVE-2006-2314 might require changes in application
17659     code.  If you have applications that embed untrustworthy strings
17660     into SQL commands, you should examine them as soon as possible to
17661     ensure that they are using recommended escaping techniques.  In
17662     most cases, applications should be using subroutines provided by
17663     libraries or drivers (such as <application>libpq</>'s
17664     <function>PQescapeStringConn()</>) to perform string escaping,
17665     rather than relying on <foreignphrase>ad hoc</> code to do it.
17666    </para>
17667   </sect2>
17668
17669   <sect2>
17670    <title>Changes</title>
17671
17672 <itemizedlist>
17673 <listitem><para>Change the server to reject invalidly-encoded multibyte
17674 characters in all cases (Tatsuo, Tom)</para>
17675 <para>While <productname>PostgreSQL</> has been moving in this direction for
17676 some time, the checks are now applied uniformly to all encodings and all
17677 textual input, and are now always errors not merely warnings.  This change
17678 defends against SQL-injection attacks of the type described in CVE-2006-2313.
17679 </para></listitem>
17680
17681 <listitem><para>Reject unsafe uses of <literal>\'</> in string literals</para>
17682 <para>As a server-side defense against SQL-injection attacks of the type
17683 described in CVE-2006-2314, the server now only accepts <literal>''</> and not
17684 <literal>\'</> as a representation of ASCII single quote in SQL string
17685 literals.  By default, <literal>\'</> is rejected only when
17686 <varname>client_encoding</> is set to a client-only encoding (SJIS, BIG5, GBK,
17687 GB18030, or UHC), which is the scenario in which SQL injection is possible.
17688 A new configuration parameter <varname>backslash_quote</> is available to
17689 adjust this behavior when needed.  Note that full security against
17690 CVE-2006-2314 might require client-side changes; the purpose of
17691 <varname>backslash_quote</> is in part to make it obvious that insecure
17692 clients are insecure.
17693 </para></listitem>
17694
17695 <listitem><para>Modify <application>libpq</>'s string-escaping routines to be
17696 aware of encoding considerations and
17697 <varname>standard_conforming_strings</></para>
17698 <para>This fixes <application>libpq</>-using applications for the security
17699 issues described in CVE-2006-2313 and CVE-2006-2314, and also future-proofs
17700 them against the planned changeover to SQL-standard string literal syntax.
17701 Applications that use multiple <productname>PostgreSQL</> connections
17702 concurrently should migrate to <function>PQescapeStringConn()</> and
17703 <function>PQescapeByteaConn()</> to ensure that escaping is done correctly
17704 for the settings in use in each database connection.  Applications that
17705 do string escaping <quote>by hand</> should be modified to rely on library
17706 routines instead.
17707 </para></listitem>
17708
17709 <listitem><para>Fix some incorrect encoding conversion functions</para>
17710 <para><function>win1251_to_iso</>, <function>alt_to_iso</>,
17711 <function>euc_tw_to_big5</>, <function>euc_tw_to_mic</>,
17712 <function>mic_to_euc_tw</> were all broken to varying
17713 extents.
17714 </para></listitem>
17715
17716 <listitem><para>Clean up stray remaining uses of <literal>\'</> in strings
17717 (Bruce, Jan)</para></listitem>
17718
17719 <listitem><para>Fix bug that sometimes caused OR'd index scans to
17720 miss rows they should have returned</para></listitem>
17721
17722 <listitem><para>Fix WAL replay for case where a btree index has been
17723 truncated</para></listitem>
17724
17725 <listitem><para>Fix <literal>SIMILAR TO</> for patterns involving
17726 <literal>|</> (Tom)</para></listitem>
17727
17728 <listitem><para>Fix <command>SELECT INTO</> and <command>CREATE TABLE AS</> to
17729 create tables in the default tablespace, not the base directory (Kris
17730 Jurka)</para></listitem>
17731
17732 <listitem><para>Fix server to use custom DH SSL parameters correctly (Michael
17733 Fuhr)</para></listitem>
17734
17735 <listitem><para>Fix for Bonjour on Intel Macs (Ashley Clark)</para></listitem>
17736
17737 <listitem><para>Fix various minor memory leaks</para></listitem>
17738
17739 <listitem><para>Fix problem with password prompting on some Win32 systems
17740 (Robert Kinberg)</para></listitem>
17741 </itemizedlist>
17742
17743   </sect2>
17744  </sect1>
17745
17746  <sect1 id="release-8-0-7">
17747   <title>Release 8.0.7</title>
17748
17749   <note>
17750   <title>Release date</title>
17751   <simpara>2006-02-14</simpara>
17752   </note>
17753
17754   <para>
17755    This release contains a variety of fixes from 8.0.6.
17756    For information about new features in the 8.0 major release, see
17757    <xref linkend="release-8-0">.
17758   </para>
17759
17760   <sect2>
17761    <title>Migration to Version 8.0.7</title>
17762
17763    <para>
17764     A dump/restore is not required for those running 8.0.X.  However,
17765     if you are upgrading from a version earlier than 8.0.6, see the release
17766     notes for 8.0.6.
17767    </para>
17768   </sect2>
17769
17770   <sect2>
17771    <title>Changes</title>
17772
17773 <itemizedlist>
17774
17775 <listitem><para>Fix potential crash in <command>SET
17776 SESSION AUTHORIZATION</> (CVE-2006-0553)</para>
17777 <para>An unprivileged user could crash the server process, resulting in
17778 momentary denial of service to other users, if the server has been compiled
17779 with Asserts enabled (which is not the default).
17780 Thanks to Akio Ishida for reporting this problem.
17781 </para></listitem>
17782
17783 <listitem><para>Fix bug with row visibility logic in self-inserted
17784 rows (Tom)</para>
17785 <para>Under rare circumstances a row inserted by the current command
17786 could be seen as already valid, when it should not be.  Repairs bug
17787 created in 8.0.4, 7.4.9, and 7.3.11 releases.
17788 </para></listitem>
17789
17790 <listitem><para>Fix race condition that could lead to <quote>file already
17791 exists</> errors during pg_clog and pg_subtrans file creation
17792 (Tom)</para></listitem>
17793
17794 <listitem><para>Fix cases that could lead to crashes if a cache-invalidation
17795 message arrives at just the wrong time (Tom)</para></listitem>
17796
17797 <listitem><para>Properly check <literal>DOMAIN</> constraints for
17798 <literal>UNKNOWN</> parameters in prepared statements
17799 (Neil)</para></listitem>
17800
17801 <listitem><para>Ensure <command>ALTER COLUMN TYPE</> will process
17802 <literal>FOREIGN KEY</>, <literal>UNIQUE</>, and <literal>PRIMARY KEY</>
17803 constraints in the proper order (Nakano Yoshihisa)</para></listitem>
17804
17805 <listitem><para>Fixes to allow restoring dumps that have cross-schema
17806 references to custom operators or operator classes (Tom)</para></listitem>
17807
17808 <listitem><para>Allow <application>pg_restore</> to continue properly after a
17809 <command>COPY</> failure; formerly it tried to treat the remaining
17810 <command>COPY</> data as SQL commands (Stephen Frost)</para></listitem>
17811
17812 <listitem><para>Fix <application>pg_ctl</> <literal>unregister</> crash
17813 when the  data directory is not specified (Magnus)</para></listitem>
17814
17815 <listitem><para>Fix <application>ecpg</> crash on AMD64 and PPC
17816 (Neil)</para></listitem>
17817
17818 <listitem><para>Recover properly if error occurs during argument passing
17819 in <application>PL/python</> (Neil)</para></listitem>
17820
17821 <listitem><para>Fix <application>PL/perl</>'s handling of locales on
17822 Win32 to match the backend (Andrew)</para></listitem>
17823
17824 <listitem><para>Fix crash when <literal>log_min_messages</> is set to
17825 <literal>DEBUG3</> or above in <filename>postgresql.conf</> on Win32
17826 (Bruce)</para></listitem>
17827
17828 <listitem><para>Fix <application>pgxs</> <literal>-L</> library path
17829 specification for Win32, Cygwin, OS X, AIX (Bruce)</para></listitem>
17830
17831 <listitem><para>Check that SID is enabled while checking for Win32 admin
17832 privileges (Magnus)</para></listitem>
17833
17834 <listitem><para>Properly reject out-of-range date inputs (Kris
17835 Jurka)</para></listitem>
17836
17837 <listitem><para>Portability fix for testing presence of <function>finite</>
17838 and <function>isinf</> during configure (Tom)</para></listitem>
17839
17840 </itemizedlist>
17841
17842   </sect2>
17843  </sect1>
17844
17845  <sect1 id="release-8-0-6">
17846   <title>Release 8.0.6</title>
17847
17848   <note>
17849   <title>Release date</title>
17850   <simpara>2006-01-09</simpara>
17851   </note>
17852
17853   <para>
17854    This release contains a variety of fixes from 8.0.5.
17855    For information about new features in the 8.0 major release, see
17856    <xref linkend="release-8-0">.
17857   </para>
17858
17859   <sect2>
17860    <title>Migration to Version 8.0.6</title>
17861
17862    <para>
17863     A dump/restore is not required for those running 8.0.X.  However,
17864     if you are upgrading from a version earlier than 8.0.3, see the release
17865     notes for 8.0.3.
17866     Also, you might need to <command>REINDEX</> indexes on textual
17867     columns after updating, if you are affected by the locale or
17868     <application>plperl</> issues described below.
17869    </para>
17870   </sect2>
17871
17872   <sect2>
17873    <title>Changes</title>
17874
17875 <itemizedlist>
17876
17877 <listitem><para>Fix Windows code so that postmaster will continue rather
17878 than exit if there is no more room in ShmemBackendArray (Magnus)</para>
17879 <para>The previous behavior could lead to a denial-of-service situation if too
17880 many connection requests arrive close together.  This applies
17881 <emphasis>only</> to the Windows port.</para></listitem>
17882
17883 <listitem><para>Fix bug introduced in 8.0 that could allow ReadBuffer
17884 to return an already-used page as new, potentially causing loss of
17885 recently-committed data (Tom)</para></listitem>
17886
17887 <listitem><para>Fix for protocol-level Describe messages issued
17888 outside a transaction or in a failed transaction (Tom)</para></listitem>
17889
17890 <listitem><para>Fix character string comparison for locales that consider
17891 different character combinations as equal, such as Hungarian (Tom)</para>
17892 <para>This might require <command>REINDEX</> to fix existing indexes on
17893 textual columns.</para></listitem>
17894
17895 <listitem><para>Set locale environment variables during postmaster startup
17896 to ensure that <application>plperl</> won't change the locale later</para>
17897 <para>This fixes a problem that occurred if the <application>postmaster</> was
17898 started with environment variables specifying a different locale than what
17899 <application>initdb</> had been told.  Under these conditions, any use of
17900 <application>plperl</> was likely to lead to corrupt indexes.  You might need
17901 <command>REINDEX</> to fix existing indexes on
17902 textual columns if this has happened to you.</para></listitem>
17903
17904 <listitem><para>Allow more flexible relocation of installation
17905 directories (Tom)</para>
17906 <para>Previous releases supported relocation only if all installation
17907 directory paths were the same except for the last component.</para></listitem>
17908
17909 <listitem><para>Fix longstanding bug in strpos() and regular expression
17910 handling in certain rarely used Asian multi-byte character sets (Tatsuo)
17911 </para></listitem>
17912
17913 <listitem><para>Various fixes for functions returning <literal>RECORD</>s
17914 (Tom) </para></listitem>
17915
17916 <listitem><para>Fix bug in <filename>/contrib/pgcrypto</> gen_salt,
17917 which caused it not to use all available salt space for MD5 and
17918 XDES algorithms (Marko Kreen, Solar Designer)</para>
17919 <para>Salts for Blowfish and standard DES are unaffected.</para></listitem>
17920
17921 <listitem><para>Fix <filename>/contrib/dblink</> to throw an error,
17922 rather than crashing, when the number of columns specified is different from
17923 what's actually returned by the query (Joe)</para></listitem>
17924
17925 </itemizedlist>
17926
17927   </sect2>
17928  </sect1>
17929
17930  <sect1 id="release-8-0-5">
17931   <title>Release 8.0.5</title>
17932
17933   <note>
17934   <title>Release date</title>
17935   <simpara>2005-12-12</simpara>
17936   </note>
17937
17938   <para>
17939    This release contains a variety of fixes from 8.0.4.
17940    For information about new features in the 8.0 major release, see
17941    <xref linkend="release-8-0">.
17942   </para>
17943
17944   <sect2>
17945    <title>Migration to Version 8.0.5</title>
17946
17947    <para>
17948     A dump/restore is not required for those running 8.0.X.  However,
17949     if you are upgrading from a version earlier than 8.0.3, see the release
17950     notes for 8.0.3.
17951    </para>
17952   </sect2>
17953
17954   <sect2>
17955    <title>Changes</title>
17956
17957 <itemizedlist>
17958
17959 <listitem><para>Fix race condition in transaction log management</para>
17960 <para>There was a narrow window in which an I/O operation could be initiated
17961 for the wrong page, leading to an Assert failure or data
17962 corruption.</para>
17963 </listitem>
17964
17965 <listitem><para>Fix bgwriter problems after recovering from errors
17966 (Tom)</para>
17967 <para>
17968 The background writer was found to leak buffer pins after write errors.
17969 While not fatal in itself, this might lead to mysterious blockages of
17970 later VACUUM commands.
17971 </para>
17972 </listitem>
17973
17974 <listitem><para>Prevent failure if client sends Bind protocol message
17975 when current transaction is already aborted</para></listitem>
17976
17977 <listitem><para><filename>/contrib/ltree</> fixes (Teodor)</para></listitem>
17978
17979 <listitem><para>AIX and HPUX compile fixes (Tom)</para></listitem>
17980
17981 <listitem><para>Retry file reads and writes after Windows
17982 NO_SYSTEM_RESOURCES error (Qingqing Zhou)</para></listitem>
17983
17984 <listitem><para>Fix intermittent failure when <varname>log_line_prefix</>
17985 includes <literal>%i</></para></listitem>
17986
17987 <listitem><para>Fix <application>psql</> performance issue with long scripts
17988 on Windows (Merlin Moncure)</para></listitem>
17989
17990 <listitem><para>Fix missing updates of <filename>pg_group</> flat
17991 file</para></listitem>
17992
17993 <listitem><para>Fix longstanding planning error for outer joins</para>
17994 <para>This bug sometimes caused a bogus error <quote>RIGHT JOIN is
17995 only supported with merge-joinable join conditions</>.</para></listitem>
17996
17997 <listitem><para>Postpone timezone initialization until after
17998 <filename>postmaster.pid</> is created</para>
17999 <para>This avoids confusing startup scripts that expect the pid file to appear
18000 quickly.</para></listitem>
18001
18002 <listitem><para>Prevent core dump in <application>pg_autovacuum</> when a
18003 table has been dropped</para></listitem>
18004
18005 <listitem><para>Fix problems with whole-row references (<literal>foo.*</>)
18006 to subquery results</para></listitem>
18007 </itemizedlist>
18008
18009   </sect2>
18010  </sect1>
18011
18012  <sect1 id="release-8-0-4">
18013   <title>Release 8.0.4</title>
18014
18015   <note>
18016   <title>Release date</title>
18017   <simpara>2005-10-04</simpara>
18018   </note>
18019
18020   <para>
18021    This release contains a variety of fixes from 8.0.3.
18022    For information about new features in the 8.0 major release, see
18023    <xref linkend="release-8-0">.
18024   </para>
18025
18026   <sect2>
18027    <title>Migration to Version 8.0.4</title>
18028
18029    <para>
18030     A dump/restore is not required for those running 8.0.X.  However,
18031     if you are upgrading from a version earlier than 8.0.3, see the release
18032     notes for 8.0.3.
18033    </para>
18034   </sect2>
18035
18036   <sect2>
18037    <title>Changes</title>
18038
18039 <itemizedlist>
18040 <listitem><para>Fix error that allowed <command>VACUUM</> to remove
18041 <literal>ctid</> chains too soon, and add more checking in code that follows
18042 <literal>ctid</> links</para>
18043 <para>This fixes a long-standing problem that could cause crashes in very rare
18044 circumstances.</para></listitem>
18045 <listitem><para>Fix <type>CHAR()</> to properly pad spaces to the specified
18046 length when using a multiple-byte character set (Yoshiyuki Asaba)</para>
18047 <para>In prior releases, the padding of <type>CHAR()</> was incorrect
18048 because it only padded to the specified number of bytes without
18049 considering how many characters were stored.</para></listitem>
18050 <listitem><para>Force a checkpoint before committing <command>CREATE
18051 DATABASE</></para>
18052 <para>This should fix recent reports of <quote>index is not a btree</>
18053 failures when a crash occurs shortly after <command>CREATE
18054 DATABASE</>.</para></listitem>
18055 <listitem><para>Fix the sense of the test for read-only transaction
18056 in <command>COPY</></para>
18057 <para>The code formerly prohibited <command>COPY TO</>, where it should
18058 prohibit <command>COPY FROM</>.
18059 </para></listitem>
18060 <listitem><para>Handle consecutive embedded newlines in <command>COPY</>
18061 CSV-mode input</para></listitem>
18062 <listitem><para>Fix <function>date_trunc(week)</> for dates near year
18063 end</para></listitem>
18064 <listitem><para>Fix planning problem with outer-join ON clauses that reference
18065 only the inner-side relation</para></listitem>
18066 <listitem><para>Further fixes for <literal>x FULL JOIN y ON true</> corner
18067 cases</para></listitem>
18068 <listitem><para>Fix overenthusiastic optimization of <literal>x IN (SELECT
18069 DISTINCT ...)</> and related cases</para></listitem>
18070 <listitem><para>Fix mis-planning of queries with small <literal>LIMIT</>
18071 values due to poorly thought out <quote>fuzzy</> cost
18072 comparison</para></listitem>
18073 <listitem><para>Make <function>array_in</> and <function>array_recv</> more
18074 paranoid about validating their OID parameter</para></listitem>
18075 <listitem><para>Fix missing rows in queries like <literal>UPDATE a=... WHERE
18076 a...</> with GiST index on column <literal>a</></para></listitem>
18077 <listitem><para>Improve robustness of datetime parsing</para></listitem>
18078 <listitem><para>Improve checking for partially-written WAL
18079 pages</para></listitem>
18080 <listitem><para>Improve robustness of signal handling when SSL is
18081 enabled</para></listitem>
18082 <listitem><para>Improve MIPS and M68K spinlock code</para></listitem>
18083 <listitem><para>Don't try to open more than <literal>max_files_per_process</>
18084 files during postmaster startup</para></listitem>
18085 <listitem><para>Various memory leakage fixes</para></listitem>
18086 <listitem><para>Various portability improvements</para></listitem>
18087 <listitem><para>Update timezone data files</para></listitem>
18088 <listitem><para>Improve handling of DLL load failures on Windows</para></listitem>
18089 <listitem><para>Improve random-number generation on Windows</para></listitem>
18090 <listitem><para>Make <literal>psql -f filename</> return a nonzero exit code
18091 when opening the file fails</para></listitem>
18092 <listitem><para>Change <application>pg_dump</> to handle inherited check
18093 constraints more reliably</para></listitem>
18094 <listitem><para>Fix password prompting in <application>pg_restore</> on
18095 Windows</para></listitem>
18096 <listitem><para>Fix PL/PgSQL to handle <literal>var := var</> correctly when
18097 the variable is of pass-by-reference type</para></listitem>
18098 <listitem><para>Fix PL/Perl <literal>%_SHARED</> so it's actually
18099 shared</para></listitem>
18100 <listitem><para>Fix <filename>contrib/pg_autovacuum</> to allow sleep
18101 intervals over 2000 sec</para></listitem>
18102 <listitem><para>Update <filename>contrib/tsearch2</> to use current Snowball
18103 code</para></listitem>
18104 </itemizedlist>
18105
18106   </sect2>
18107  </sect1>
18108
18109  <sect1 id="release-8-0-3">
18110   <title>Release 8.0.3</title>
18111
18112   <note>
18113   <title>Release date</title>
18114   <simpara>2005-05-09</simpara>
18115   </note>
18116
18117   <para>
18118    This release contains a variety of fixes from 8.0.2, including several
18119    security-related issues.
18120    For information about new features in the 8.0 major release, see
18121    <xref linkend="release-8-0">.
18122   </para>
18123
18124   <sect2>
18125    <title>Migration to Version 8.0.3</title>
18126
18127    <para>
18128     A dump/restore is not required for those running 8.0.X.  However,
18129     it is one possible way of handling two significant security problems
18130     that have been found in the initial contents of 8.0.X system
18131     catalogs.  A dump/initdb/reload sequence using 8.0.3's initdb will
18132     automatically correct these problems.
18133    </para>
18134
18135    <para>
18136     The larger security problem is that the built-in character set encoding
18137     conversion functions can be invoked from SQL commands by unprivileged
18138     users, but the functions were not designed for such use and are not
18139     secure against malicious choices of arguments.  The fix involves changing
18140     the declared parameter list of these functions so that they can no longer
18141     be invoked from SQL commands.  (This does not affect their normal use
18142     by the encoding conversion machinery.)
18143    </para>
18144
18145    <para>
18146     The lesser problem is that the <filename>contrib/tsearch2</> module
18147     creates several functions that are improperly declared to return
18148     <type>internal</> when they do not accept <type>internal</> arguments.
18149     This breaks type safety for all functions using <type>internal</>
18150     arguments.
18151    </para>
18152
18153    <para>
18154     It is strongly recommended that all installations repair these errors,
18155     either by initdb or by following the manual repair procedure given
18156     below.  The errors at least allow unprivileged database users to crash
18157     their server process, and might allow unprivileged users to gain the
18158     privileges of a database superuser.
18159    </para>
18160
18161    <para>
18162     If you wish not to do an initdb, perform the same manual repair
18163     procedures shown in the <link linkend="release-7-4-8">7.4.8 release
18164     notes</link>.
18165    </para>
18166   </sect2>
18167
18168   <sect2>
18169    <title>Changes</title>
18170
18171 <itemizedlist>
18172 <listitem><para>Change encoding function signature to prevent
18173 misuse</para></listitem>
18174 <listitem><para>Change <filename>contrib/tsearch2</> to avoid unsafe use of
18175 <type>INTERNAL</> function results</para></listitem>
18176 <listitem><para>Guard against incorrect second parameter to
18177 <function>record_out</></para></listitem>
18178 <listitem><para>Repair ancient race condition that allowed a transaction to be
18179 seen as committed for some purposes (eg SELECT FOR UPDATE) slightly sooner
18180 than for other purposes</para>
18181 <para>This is an extremely serious bug since it could lead to apparent
18182 data inconsistencies being briefly visible to applications.</para></listitem>
18183 <listitem><para>Repair race condition between relation extension and
18184 VACUUM</para>
18185 <para>This could theoretically have caused loss of a page's worth of
18186 freshly-inserted data, although the scenario seems of very low probability.
18187 There are no known cases of it having caused more than an Assert failure.
18188 </para></listitem>
18189 <listitem><para>Fix comparisons of <type>TIME WITH TIME ZONE</> values</para>
18190 <para>
18191 The comparison code was wrong in the case where the
18192 <literal>--enable-integer-datetimes</> configuration switch had been used.
18193 NOTE: if you have an index on a <type>TIME WITH TIME ZONE</> column,
18194 it will need to be <command>REINDEX</>ed after installing this update, because
18195 the fix corrects the sort order of column values.
18196 </para></listitem>
18197 <listitem><para>Fix <function>EXTRACT(EPOCH)</> for
18198 <type>TIME WITH TIME ZONE</> values</para></listitem>
18199 <listitem><para>Fix mis-display of negative fractional seconds in
18200 <type>INTERVAL</> values</para>
18201 <para>
18202 This error only occurred when the
18203 <literal>--enable-integer-datetimes</> configuration switch had been used.
18204 </para></listitem>
18205 <listitem><para>Fix pg_dump to dump trigger names containing <literal>%</>
18206 correctly (Neil)</para></listitem>
18207 <listitem><para>Still more 64-bit fixes for
18208 <filename>contrib/intagg</></para></listitem>
18209 <listitem><para>Prevent incorrect optimization of functions returning
18210 <type>RECORD</></para></listitem>
18211 <listitem><para>Prevent crash on <literal>COALESCE(NULL,NULL)</></para></listitem>
18212 <listitem><para>Fix Borland makefile for libpq</para></listitem>
18213 <listitem><para>Fix <filename>contrib/btree_gist</> for <type>timetz</> type
18214 (Teodor)</para></listitem>
18215 <listitem><para>Make <command>pg_ctl</> check the PID found in
18216 <filename>postmaster.pid</> to see if it is still a live
18217 process</para></listitem>
18218 <listitem><para>Fix <command>pg_dump</>/<command>pg_restore</> problems caused
18219 by addition of dump timestamps</para></listitem>
18220 <listitem><para>Fix interaction between materializing holdable cursors and
18221 firing deferred triggers during transaction commit</para></listitem>
18222 <listitem><para>Fix memory leak in SQL functions returning pass-by-reference
18223 data types</para></listitem>
18224 </itemizedlist>
18225
18226   </sect2>
18227  </sect1>
18228
18229  <sect1 id="release-8-0-2">
18230   <title>Release 8.0.2</title>
18231
18232   <note>
18233   <title>Release date</title>
18234   <simpara>2005-04-07</simpara>
18235   </note>
18236
18237   <para>
18238    This release contains a variety of fixes from 8.0.1.
18239    For information about new features in the 8.0 major release, see
18240    <xref linkend="release-8-0">.
18241   </para>
18242
18243   <sect2>
18244    <title>Migration to Version 8.0.2</title>
18245
18246    <para>
18247     A dump/restore is not required for those running 8.0.*.
18248     This release updates the major version number of the
18249     <productname>PostgreSQL</productname> libraries, so it might be
18250     necessary to re-link some user applications if they cannot
18251     find the properly-numbered shared library.
18252    </para>
18253   </sect2>
18254
18255   <sect2>
18256    <title>Changes</title>
18257
18258 <itemizedlist>
18259 <listitem><para>Increment the major version number of all interface
18260 libraries (Bruce)</para>
18261 <para>
18262 This should have been done in 8.0.0.  It is required so 7.4.X versions
18263 of PostgreSQL client applications, like <application>psql</>,
18264 can be used on the same machine as 8.0.X applications.  This might require
18265 re-linking user applications that use these libraries.
18266 </para></listitem>
18267 <listitem><para>Add Windows-only <varname>wal_sync_method</> setting of
18268 <option>fsync_writethrough</> (Magnus, Bruce)</para>
18269 <para>
18270 This setting causes <productname>PostgreSQL</productname> to write through
18271 any disk-drive write cache when writing to WAL.
18272 This behavior was formerly called <option>fsync</>, but was
18273 renamed because it acts quite differently from <option>fsync</> on other
18274 platforms.
18275 </para>
18276 </listitem>
18277 <listitem><para>Enable the <varname>wal_sync_method</> setting of
18278 <option>open_datasync</> on Windows, and make it the default for that
18279  platform (Magnus, Bruce)</para>
18280 <para>
18281 Because the default is no longer <option>fsync_writethrough</>,
18282 data loss is possible during a power failure if the disk drive has
18283 write caching enabled. To turn off the write cache on Windows,
18284 from the <application>Device Manager</>, choose the drive properties,
18285 then <literal>Policies</>.
18286 </para>
18287 </listitem>
18288 <listitem><para>New cache management algorithm <acronym>2Q</> replaces
18289 <acronym>ARC</> (Tom)</para>
18290 <para>
18291 This was done to avoid a pending US patent on <acronym>ARC</>.  The
18292 <acronym>2Q</> code might be a few percentage points slower than
18293 <acronym>ARC</> for some work loads.  A better cache management algorithm
18294 will appear in 8.1.
18295 </para></listitem>
18296 <listitem><para>Planner adjustments to improve behavior on freshly-created
18297 tables (Tom)</para></listitem>
18298 <listitem><para>Allow plpgsql to assign to an element of an array that is
18299 initially <literal>NULL</> (Tom)</para>
18300 <para>
18301 Formerly the array would remain <literal>NULL</>, but now it becomes a
18302 single-element array.  The main SQL engine was changed to handle
18303 <command>UPDATE</> of a null array value this way in 8.0, but the similar
18304 case in plpgsql was overlooked.
18305 </para>
18306 </listitem>
18307 <listitem><para>Convert <literal>\r\n</> and <literal>\r</> to <literal>\n</>
18308 in plpython function bodies (Michael Fuhr)</para>
18309 <para>
18310  This prevents syntax errors when plpython code is written on a Windows or
18311  Mac client.
18312 </para>
18313 </listitem>
18314 <listitem><para>Allow SPI cursors to handle utility commands that return rows,
18315 such as <command>EXPLAIN</> (Tom)</para></listitem>
18316 <listitem><para>Fix <command>CLUSTER</> failure after <command>ALTER TABLE
18317 SET WITHOUT OIDS</> (Tom)</para></listitem>
18318 <listitem><para>Reduce memory usage of <command>ALTER TABLE ADD COLUMN</>
18319 (Neil)</para></listitem>
18320 <listitem><para>Fix <command>ALTER LANGUAGE RENAME</> (Tom)</para></listitem>
18321 <listitem><para>Document the Windows-only <literal>register</> and
18322 <literal>unregister</> options of <application>pg_ctl</> (Magnus)</para></listitem>
18323 <listitem><para>Ensure operations done during backend shutdown are counted by
18324 statistics collector</para>
18325 <para>
18326 This is expected to resolve reports of <application>pg_autovacuum</>
18327 not vacuuming the system catalogs often enough &mdash; it was not being
18328 told about catalog deletions caused by temporary table removal during
18329 backend exit.
18330 </para></listitem>
18331 <listitem><para>Change the Windows default for configuration parameter
18332 <varname>log_destination</> to <option>eventlog</> (Magnus)</para>
18333 <para>
18334 By default, a server running on Windows will now send log output to the
18335 Windows event logger rather than standard error.
18336 </para></listitem>
18337 <listitem><para>Make Kerberos authentication work on Windows (Magnus)</para></listitem>
18338 <listitem><para>Allow <command>ALTER DATABASE RENAME</> by superusers
18339 who aren't flagged as having CREATEDB privilege (Tom)</para></listitem>
18340 <listitem><para>Modify WAL log entries for <command>CREATE</> and
18341 <command>DROP DATABASE</> to not specify absolute paths (Tom)</para>
18342 <para>This allows point-in-time recovery on a different machine with possibly
18343 different database location.  Note that <command>CREATE TABLESPACE</> still
18344 poses a hazard in such situations.
18345 </para></listitem>
18346 <listitem><para>Fix crash from a backend exiting with an open transaction
18347 that created a table and opened a cursor on it (Tom)</para></listitem>
18348 <listitem><para>Fix <function>array_map()</> so it can call PL functions
18349 (Tom)</para></listitem>
18350 <listitem><para>Several <filename>contrib/tsearch2</> and
18351 <filename>contrib/btree_gist</> fixes (Teodor)
18352 </para></listitem>
18353 <listitem><para>Fix crash of some <filename>contrib/pgcrypto</>
18354 functions on some platforms (Marko Kreen)</para></listitem>
18355 <listitem><para>Fix <filename>contrib/intagg</> for 64-bit platforms
18356 (Tom)</para></listitem>
18357 <listitem><para>Fix ecpg bugs in parsing of <command>CREATE</> statement
18358 (Michael)</para></listitem>
18359 <listitem><para>Work around gcc bug on powerpc and amd64 causing problems in
18360 ecpg (Christof Petig)</para></listitem>
18361 <listitem><para>Do not use locale-aware versions of <function>upper()</>,
18362 <function>lower()</>, and <function>initcap()</> when the locale is
18363 <literal>C</> (Bruce)</para>
18364 <para>
18365  This allows these functions to work on platforms that generate errors
18366  for non-7-bit data when the locale is <literal>C</>.
18367 </para></listitem>
18368 <listitem><para>Fix <function>quote_ident()</> to quote names that match keywords (Tom)</para></listitem>
18369 <listitem><para>Fix <function>to_date()</> to behave reasonably when
18370 <literal>CC</> and <literal>YY</> fields are both used (Karel)</para></listitem>
18371 <listitem><para>Prevent <function>to_char(interval)</> from failing
18372 when given a zero-month interval (Tom)</para></listitem>
18373 <listitem><para>Fix wrong week returned by <function>date_trunc('week')</>
18374 (Bruce)</para>
18375 <para>
18376 <function>date_trunc('week')</>
18377 returned the wrong year for the first few days of January in some years.
18378 </para></listitem>
18379 <listitem><para>Use the correct default mask length for class <literal>D</>
18380 addresses in <type>INET</> data types (Tom)</para></listitem>
18381 </itemizedlist>
18382
18383   </sect2>
18384  </sect1>
18385
18386  <sect1 id="release-8-0-1">
18387   <title>Release 8.0.1</title>
18388
18389   <note>
18390   <title>Release date</title>
18391   <simpara>2005-01-31</simpara>
18392   </note>
18393
18394   <para>
18395    This release contains a variety of fixes from 8.0.0, including several
18396    security-related issues.
18397    For information about new features in the 8.0 major release, see
18398    <xref linkend="release-8-0">.
18399   </para>
18400
18401   <sect2>
18402    <title>Migration to Version 8.0.1</title>
18403
18404    <para>
18405     A dump/restore is not required for those running 8.0.0.
18406    </para>
18407   </sect2>
18408
18409   <sect2>
18410    <title>Changes</title>
18411
18412 <itemizedlist>
18413 <listitem><para>Disallow <command>LOAD</> to non-superusers</para>
18414 <para>
18415 On platforms that will automatically execute initialization functions of a
18416 shared library (this includes at least Windows and ELF-based Unixen),
18417 <command>LOAD</> can be used to make the server execute arbitrary code.
18418 Thanks to NGS Software for reporting this.</para></listitem>
18419 <listitem><para>Check that creator of an aggregate function has the right to
18420 execute the specified transition functions</para>
18421 <para>
18422 This oversight made it possible to bypass denial of EXECUTE
18423 permission on a function.</para></listitem>
18424 <listitem><para>Fix security and 64-bit issues in
18425 contrib/intagg</para></listitem>
18426 <listitem><para>Add needed STRICT marking to some contrib functions (Kris
18427 Jurka)</para></listitem>
18428 <listitem><para>Avoid buffer overrun when plpgsql cursor declaration has too
18429 many parameters (Neil)</para></listitem>
18430 <listitem><para>Make <command>ALTER TABLE ADD COLUMN</> enforce domain
18431 constraints in all cases</para></listitem>
18432 <listitem><para>Fix planning error for FULL and RIGHT outer joins</para>
18433 <para>
18434 The result of the join was mistakenly supposed to be sorted the same as the
18435 left input.  This could not only deliver mis-sorted output to the user, but
18436 in case of nested merge joins could give outright wrong answers.
18437 </para></listitem>
18438 <listitem><para>Improve planning of grouped aggregate queries</para></listitem>
18439 <listitem><para><command>ROLLBACK TO <replaceable>savepoint</></command>
18440 closes cursors created since the savepoint</para></listitem>
18441 <listitem><para>Fix inadequate backend stack size on Windows</para></listitem>
18442 <listitem><para>Avoid SHGetSpecialFolderPath() on Windows
18443 (Magnus)</para></listitem>
18444 <listitem><para>Fix some problems in running pg_autovacuum as a Windows
18445 service (Dave Page)</para></listitem>
18446 <listitem><para>Multiple minor bug fixes in
18447 pg_dump/pg_restore</para></listitem>
18448 <listitem><para>Fix ecpg segfault with named structs used in
18449 typedefs (Michael)</para></listitem>
18450 </itemizedlist>
18451
18452   </sect2>
18453  </sect1>
18454
18455  <sect1 id="release-8-0">
18456   <title>Release 8.0</title>
18457
18458   <note>
18459    <title>Release date</title>
18460    <simpara>2005-01-19</simpara>
18461   </note>
18462
18463   <sect2>
18464    <title>Overview</title>
18465
18466    <para>
18467     Major changes in this release:
18468    </para>
18469
18470    <variablelist>
18471     <varlistentry>
18472      <term>
18473       Microsoft Windows Native Server
18474      </term>
18475
18476      <listitem>
18477       <para>
18478        This is the first <productname>PostgreSQL</productname> release
18479        to run natively on <trademark class="registered">Microsoft Windows</> as
18480        a server. It can run as a <productname>Windows</> service. This
18481        release supports NT-based Windows releases like
18482        <productname>Windows 2000 SP4</>, <productname>Windows XP</>, and
18483        <productname>Windows 2003</>. Older releases like
18484        <productname>Windows 95</>, <productname>Windows 98</>, and
18485        <productname>Windows ME</> are not supported because these operating
18486        systems do not have the infrastructure to support
18487        <productname>PostgreSQL</productname>. A separate installer
18488        project has been created to ease installation on
18489        <productname>Windows</> &mdash; see <ulink
18490        url="http://www.postgresql.org/ftp/win32/"></ulink>.
18491       </para>
18492
18493       <para>
18494        Although tested throughout our release cycle, the Windows port
18495        does not have the benefit of years of use in production
18496        environments that <productname>PostgreSQL</productname> has on
18497        Unix platforms.  Therefore it should be treated with the same
18498        level of caution as you would a new product.
18499       </para>
18500
18501       <para>
18502        Previous releases required the Unix emulation toolkit
18503        <productname>Cygwin</> in order to run the server on Windows
18504        operating systems.  <productname>PostgreSQL</productname> has
18505        supported native clients on Windows for many years.
18506       </para>
18507      </listitem>
18508     </varlistentry>
18509
18510     <varlistentry>
18511      <term>
18512       Savepoints
18513      </term>
18514
18515      <listitem>
18516       <para>
18517        Savepoints allow specific parts of a transaction to be aborted
18518        without affecting the remainder of the transaction. Prior
18519        releases had no such capability; there was no way to recover
18520        from a statement failure within a transaction except by
18521        aborting the whole transaction. This feature is valuable for
18522        application writers who require error recovery within a
18523        complex transaction.
18524       </para>
18525      </listitem>
18526     </varlistentry>
18527
18528     <varlistentry>
18529      <term>
18530       Point-In-Time Recovery
18531      </term>
18532
18533      <listitem>
18534       <para>
18535        In previous releases there was no way to recover from disk
18536        drive failure except to restore from a previous backup or use
18537        a standby replication server.  Point-in-time recovery allows
18538        continuous backup of the server.  You can recover either to
18539        the point of failure or to some transaction in the past.
18540       </para>
18541      </listitem>
18542     </varlistentry>
18543
18544     <varlistentry>
18545      <term>
18546       Tablespaces
18547      </term>
18548
18549      <listitem>
18550       <para>
18551        Tablespaces allow administrators to select different file systems
18552        for storage of individual tables, indexes, and databases.
18553        This improves performance and control over disk space
18554        usage. Prior releases used <application>initlocation</> and
18555        manual symlink management for such tasks.
18556       </para>
18557      </listitem>
18558     </varlistentry>
18559
18560     <varlistentry>
18561      <term>
18562       Improved Buffer Management, <command>CHECKPOINT</command>,
18563       <command>VACUUM</command>
18564      </term>
18565
18566      <listitem>
18567       <para>
18568        This release has a more intelligent buffer replacement strategy,
18569        which will make better use of available shared buffers and
18570        improve performance. The performance impact of vacuum and
18571        checkpoints is also lessened.
18572       </para>
18573      </listitem>
18574     </varlistentry>
18575
18576     <varlistentry>
18577      <term>
18578       Change Column Types
18579      </term>
18580
18581      <listitem>
18582       <para>
18583        A column's data type can now be changed with <command>ALTER
18584        TABLE</command>.
18585       </para>
18586      </listitem>
18587     </varlistentry>
18588
18589     <varlistentry>
18590      <term>
18591       New Perl Server-Side Language
18592      </term>
18593
18594      <listitem>
18595       <para>
18596        A new version of the <application>plperl</> server-side language now
18597        supports a persistent shared storage area, triggers, returning records
18598        and arrays of records, and SPI calls to access the database.
18599       </para>
18600      </listitem>
18601     </varlistentry>
18602
18603     <varlistentry>
18604      <term>
18605        Comma-separated-value (CSV) support in <command>COPY</command>
18606      </term>
18607
18608      <listitem>
18609       <para>
18610        <command>COPY</command> can now read and write
18611        comma-separated-value files. It has the flexibility to
18612        interpret nonstandard quoting and separation characters too.
18613       </para>
18614      </listitem>
18615     </varlistentry>
18616
18617    </variablelist>
18618   </sect2>
18619
18620   <sect2>
18621    <title>Migration to Version 8.0</title>
18622
18623    <para>
18624     A dump/restore using <application>pg_dump</application> is
18625     required for those wishing to migrate data from any previous
18626     release.
18627    </para>
18628
18629    <para>
18630     Observe the following incompatibilities:
18631    </para>
18632
18633    <itemizedlist>
18634
18635     <listitem>
18636      <para>
18637       In <option>READ COMMITTED</> serialization mode, volatile functions
18638       now see the results of concurrent transactions committed up to the
18639       beginning of each statement within the function, rather than up to the
18640       beginning of the interactive command that called the function.
18641      </para>
18642     </listitem>
18643
18644     <listitem>
18645      <para>
18646       Functions declared <option>STABLE</> or <option>IMMUTABLE</> always
18647       use the snapshot of the calling query, and therefore do not see the
18648       effects of actions taken after the calling query starts, whether in
18649       their own transaction or other transactions.  Such a function must be
18650       read-only, too, meaning that it cannot use any SQL commands other than
18651       <command>SELECT</>.
18652      </para>
18653     </listitem>
18654
18655     <listitem>
18656      <para>
18657       Nondeferred <option>AFTER</> triggers are now fired immediately
18658       after completion of the triggering query, rather than upon
18659       finishing the current interactive command. This makes a
18660       difference when the triggering query occurred within a function:
18661       the trigger is invoked before the function proceeds to its next
18662       operation.
18663      </para>
18664     </listitem>
18665
18666     <listitem>
18667      <para>
18668       Server configuration parameters <varname>virtual_host</> and
18669       <varname>tcpip_socket</> have been replaced with a more general
18670       parameter <varname>listen_addresses</>. Also, the server now listens on
18671       <literal>localhost</> by default, which eliminates the need for the
18672       <literal>-i</> postmaster switch in many scenarios.
18673      </para>
18674     </listitem>
18675
18676     <listitem>
18677      <para>
18678       Server configuration parameters <varname>SortMem</> and
18679       <varname>VacuumMem</> have been renamed to <varname>work_mem</>
18680       and <varname>maintenance_work_mem</> to better reflect their
18681       use. The original names are still supported in
18682       <command>SET</command> and <command>SHOW</command>.
18683      </para>
18684     </listitem>
18685
18686     <listitem>
18687      <para>
18688       Server configuration parameters <varname>log_pid</>,
18689       <varname>log_timestamp</>, and <varname>log_source_port</> have been
18690       replaced with a more general parameter <varname>log_line_prefix</>.
18691      </para>
18692     </listitem>
18693
18694     <listitem>
18695      <para>
18696       Server configuration parameter <varname>syslog</> has been
18697       replaced with a more logical <varname>log_destination</> variable to
18698       control the log output destination.
18699      </para>
18700     </listitem>
18701
18702     <listitem>
18703      <para>
18704       Server configuration parameter <varname>log_statement</> has been
18705       changed so it can selectively log just database modification or
18706       data definition statements.  Server configuration parameter
18707       <varname>log_duration</> now prints only when <varname>log_statement</>
18708       prints the query.
18709      </para>
18710     </listitem>
18711
18712     <listitem>
18713      <para>
18714       Server configuration parameter <varname>max_expr_depth</> parameter has
18715       been replaced with <varname>max_stack_depth</> which measures the
18716       physical stack size rather than the expression nesting depth. This
18717       helps prevent session termination due to stack overflow caused by
18718       recursive functions.
18719      </para>
18720     </listitem>
18721
18722     <listitem>
18723      <para>
18724       The <function>length()</> function no longer counts trailing spaces in
18725       <type>CHAR(n)</> values.
18726      </para>
18727     </listitem>
18728
18729    <listitem>
18730     <para>
18731      Casting an integer to <type>BIT(N)</> selects the rightmost N bits of the
18732      integer, not the leftmost N bits as before.
18733     </para>
18734    </listitem>
18735
18736    <listitem>
18737     <para>
18738      Updating an element or slice of a NULL array value now produces
18739      a nonnull array result, namely an array containing
18740      just the assigned-to positions.
18741     </para>
18742    </listitem>
18743
18744     <listitem>
18745      <para>
18746       Syntax checking of array input values has been tightened up
18747       considerably. Junk that was previously allowed in odd places with
18748       odd results now causes an error. Empty-string element values
18749       must now be written as <literal>""</>, rather than writing nothing.
18750       Also changed behavior with respect to whitespace surrounding
18751       array elements: trailing whitespace is now ignored, for symmetry
18752       with leading whitespace (which has always been ignored).
18753      </para>
18754     </listitem>
18755
18756     <listitem>
18757      <para>
18758       Overflow in integer arithmetic operations is now detected and
18759       reported as an error.
18760      </para>
18761     </listitem>
18762
18763     <listitem>
18764      <para>
18765       The arithmetic operators associated with the single-byte
18766       <type>"char"</> data type have been removed.
18767      </para>
18768     </listitem>
18769
18770     <listitem>
18771      <para>
18772       The <function>extract()</> function (also called
18773       <function>date_part</>) now returns the proper year for BC dates.
18774       It previously returned one less than the correct year. The
18775       function now also returns the proper values for millennium and
18776       century.
18777      </para>
18778     </listitem>
18779
18780    <listitem>
18781     <para>
18782      <type>CIDR</> values now must have their nonmasked bits be zero.
18783      For example, we no longer allow
18784      <literal>204.248.199.1/31</literal> as a <type>CIDR</> value. Such
18785      values should never have been accepted by
18786      <productname>PostgreSQL</productname> and will now be rejected.
18787     </para>
18788    </listitem>
18789
18790     <listitem>
18791      <para>
18792       <command>EXECUTE</command> now returns a completion tag that
18793       matches the executed statement.
18794      </para>
18795     </listitem>
18796
18797     <listitem>
18798      <para>
18799       <application>psql</>'s <command>\copy</> command now reads or
18800       writes to the query's <literal>stdin/stdout</>, rather than
18801       <application>psql</>'s <literal>stdin/stdout</>. The previous
18802       behavior can be accessed via new
18803       <option>pstdin</>/<option>pstdout</> parameters.
18804      </para>
18805     </listitem>
18806
18807     <listitem>
18808      <para>
18809      The JDBC client interface has been removed from the core
18810      distribution, and is now hosted at <ulink url=
18811      "http://jdbc.postgresql.org"></ulink>.
18812      </para>
18813     </listitem>
18814
18815     <listitem>
18816      <para>
18817      The Tcl client interface has also been removed. There are several
18818      Tcl interfaces now hosted at <ulink url=
18819      "http://gborg.postgresql.org"></ulink>.
18820      </para>
18821     </listitem>
18822
18823     <listitem>
18824      <para>
18825       The server now uses its own time zone database, rather than the
18826       one supplied by the operating system. This will provide consistent
18827       behavior across all platforms.  In most cases, there should be
18828       little noticeable difference in time zone behavior, except that
18829       the time zone names used by <command>SET</>/<command>SHOW</>
18830       <varname>TimeZone</> might be different from what your platform provides.
18831      </para>
18832     </listitem>
18833
18834     <listitem>
18835      <para>
18836       <application>Configure</>'s threading option no longer requires
18837       users to run tests or edit configuration files; threading options
18838       are now detected automatically.
18839      </para>
18840     </listitem>
18841
18842     <listitem>
18843      <para>
18844       Now that tablespaces have been implemented,
18845       <application>initlocation</> has been removed.
18846      </para>
18847     </listitem>
18848
18849     <listitem>
18850      <para>
18851       The API for user-defined GiST indexes has been changed. The
18852       Union and PickSplit methods are now passed a pointer to a
18853       special <structname>GistEntryVector</structname> structure,
18854       rather than a <type>bytea</type>.
18855      </para>
18856     </listitem>
18857
18858    </itemizedlist>
18859   </sect2>
18860
18861  <sect2>
18862   <title>Deprecated Features</title>
18863
18864   <para>
18865     Some aspects of <productname>PostgreSQL</productname>'s behavior
18866     have been determined to be suboptimal. For the sake of backward
18867     compatibility these have not been removed in 8.0, but they are
18868     considered deprecated and will be removed in the next major
18869     release.
18870     </para>
18871
18872    <itemizedlist>
18873     <listitem>
18874      <para>
18875       The 8.1 release will remove the <function>to_char()</> function
18876       for intervals.
18877      </para>
18878     </listitem>
18879
18880      <listitem>
18881       <para>
18882        The server now warns of empty strings passed to
18883        <type>oid</type>/<type>float4</type>/<type>float8</type> data
18884        types, but continues to interpret them as zeroes as before.
18885        In the next major release, empty strings will be considered
18886        invalid input for these data types.
18887       </para>
18888      </listitem>
18889
18890     <listitem>
18891      <para>
18892       By default, tables in <productname>PostgreSQL</productname> 8.0
18893       and earlier are created with <type>OID</>s. In the next release,
18894       this will <emphasis>not</emphasis> be the case: to create a table
18895       that contains <type>OID</>s, the <option>WITH OIDS</> clause must
18896       be specified or the <varname>default_with_oids</varname>
18897       configuration parameter must be set. Users are encouraged to
18898       explicitly specify <option>WITH OIDS</> if their tables
18899       require OIDs for compatibility with future releases of
18900       <productname>PostgreSQL</productname>.
18901      </para>
18902     </listitem>
18903
18904    </itemizedlist>
18905   </sect2>
18906
18907   <sect2>
18908    <title>Changes</title>
18909
18910    <para>
18911     Below you will find a detailed account of the changes between
18912     release 8.0 and the previous major release.
18913    </para>
18914
18915    <sect3>
18916     <title>Performance Improvements</title>
18917     <itemizedlist>
18918
18919      <listitem>
18920       <para>
18921        Support cross-data-type index usage (Tom)
18922       </para>
18923       <para>
18924        Before this change, many queries would not use an index if the data
18925        types did not match exactly. This improvement makes index usage more
18926        intuitive and consistent.
18927       </para>
18928      </listitem>
18929
18930      <listitem>
18931       <para>
18932        New buffer replacement strategy that improves caching (Jan)
18933       </para>
18934       <para>
18935        Prior releases used a least-recently-used (LRU) cache to keep
18936        recently referenced pages in memory. The LRU algorithm
18937        did not consider the number of times a specific cache entry was
18938        accessed, so large table scans could force out useful cache pages.
18939        The new cache algorithm uses four separate lists to track most
18940        recently used and most frequently used cache pages and dynamically
18941        optimize their replacement based on the work load. This should
18942        lead to much more efficient use of the shared buffer cache.
18943        Administrators who have tested shared buffer sizes in the past
18944        should retest with this new cache replacement policy.
18945       </para>
18946      </listitem>
18947
18948      <listitem>
18949       <para>
18950        Add subprocess to write dirty buffers periodically to reduce
18951        checkpoint writes (Jan)
18952       </para>
18953       <para>
18954        In previous releases, the checkpoint process, which runs every few
18955        minutes, would write all dirty buffers to the operating system's
18956        buffer cache then flush all dirty operating system buffers to
18957        disk. This resulted in a periodic spike in disk usage that often
18958        hurt performance. The new code uses a background writer to trickle
18959        disk writes at a steady pace so checkpoints have far fewer dirty
18960        pages to write to disk. Also, the new code does not issue a global
18961        <function>sync()</> call, but instead <function>fsync()</>s just
18962        the files written since the last checkpoint. This should improve
18963        performance and minimize degradation during checkpoints.
18964       </para>
18965      </listitem>
18966
18967      <listitem>
18968       <para>
18969        Add ability to prolong vacuum to reduce performance impact (Jan)
18970       </para>
18971       <para>
18972        On busy systems, <command>VACUUM</command> performs many I/O
18973        requests which can hurt performance for other users. This
18974        release allows you to slow down <command>VACUUM</command> to
18975        reduce its impact on other users, though this increases the
18976        total duration of <command>VACUUM</command>.
18977       </para>
18978      </listitem>
18979
18980      <listitem>
18981       <para>
18982        Improve B-tree index performance for duplicate keys (Dmitry Tkach, Tom)
18983       </para>
18984       <para>
18985        This improves the way indexes are scanned when many duplicate
18986        values exist in the index.
18987       </para>
18988      </listitem>
18989
18990      <listitem>
18991       <para>
18992        Use dynamically-generated table size estimates while planning (Tom)
18993       </para>
18994       <para>
18995        Formerly the planner estimated table sizes using the values seen
18996        by the last <command>VACUUM</command> or <command>ANALYZE</command>,
18997        both as to physical table size (number of pages) and number of rows.
18998        Now, the current physical table size is obtained from the kernel,
18999        and the number of rows is estimated by multiplying the table size
19000        by the row density (rows per page) seen by the last
19001        <command>VACUUM</command> or <command>ANALYZE</command>.  This should
19002        produce more reliable estimates in cases where the table size has
19003        changed significantly since the last housekeeping command.
19004       </para>
19005      </listitem>
19006
19007      <listitem>
19008       <para>
19009        Improved index usage with <literal>OR</> clauses (Tom)
19010       </para>
19011       <para>
19012        This allows the optimizer to use indexes in statements with many OR
19013        clauses that would not have been indexed in the past.  It can also use
19014        multi-column indexes where the first column is specified and the second
19015        column is part of an <literal>OR</> clause.
19016       </para>
19017      </listitem>
19018
19019      <listitem>
19020       <para>
19021        Improve matching of partial index clauses (Tom)
19022       </para>
19023       <para>
19024        The server is now smarter about using partial indexes in queries
19025        involving complex <option>WHERE</> clauses.
19026       </para>
19027      </listitem>
19028
19029      <listitem>
19030       <para>
19031        Improve performance of the GEQO optimizer (Tom)
19032       </para>
19033       <para>
19034        The GEQO optimizer is used to plan queries involving many tables (by
19035        default, twelve or more). This release speeds up the way queries are
19036        analyzed to decrease time spent in optimization.
19037       </para>
19038      </listitem>
19039
19040      <listitem>
19041       <para>
19042        Miscellaneous optimizer improvements
19043       </para>
19044       <para>
19045        There is not room here to list all the minor improvements made, but
19046        numerous special cases work better than in prior releases.
19047       </para>
19048      </listitem>
19049
19050      <listitem>
19051       <para>
19052        Improve lookup speed for C functions (Tom)
19053       </para>
19054       <para>
19055        This release uses a hash table to lookup information for dynamically
19056        loaded C functions. This improves their speed so they perform nearly as
19057        quickly as functions that are built into the server executable.
19058       </para>
19059      </listitem>
19060
19061      <listitem>
19062       <para>
19063        Add type-specific <command>ANALYZE</command> statistics
19064        capability (Mark Cave-Ayland)
19065       </para>
19066       <para>
19067        This feature allows more flexibility in generating statistics
19068        for nonstandard data types.
19069       </para>
19070      </listitem>
19071
19072      <listitem>
19073       <para>
19074        <command>ANALYZE</command> now collects statistics for
19075        expression indexes (Tom)
19076       </para>
19077       <para>
19078        Expression indexes (also called functional indexes) allow users to
19079        index not just columns but the results of expressions and function
19080        calls. With this release, the optimizer can gather and use statistics
19081        about the contents of expression indexes.  This will greatly improve
19082        the quality of planning for queries in which an expression index is
19083        relevant.
19084       </para>
19085      </listitem>
19086
19087      <listitem>
19088       <para>
19089        New two-stage sampling method for <command>ANALYZE</command>
19090        (Manfred Koizar)
19091       </para>
19092       <para>
19093        This gives better statistics when the density of valid rows is very
19094        different in different regions of a table.
19095       </para>
19096      </listitem>
19097
19098      <listitem>
19099       <para>
19100        Speed up <command>TRUNCATE</command> (Tom)
19101       </para>
19102       <para>
19103        This buys back some of the performance loss observed in 7.4, while still
19104        keeping <command>TRUNCATE</command> transaction-safe.
19105       </para>
19106      </listitem>
19107
19108     </itemizedlist>
19109    </sect3>
19110
19111
19112    <sect3>
19113     <title>Server Changes</title>
19114     <itemizedlist>
19115
19116      <listitem>
19117       <para>
19118        Add WAL file archiving and point-in-time recovery (Simon Riggs)
19119       </para>
19120      </listitem>
19121
19122      <listitem>
19123       <para>
19124        Add tablespaces so admins can control disk layout (Gavin)
19125       </para>
19126      </listitem>
19127
19128      <listitem>
19129       <para>
19130        Add a built-in log rotation program (Andreas Pflug)
19131       </para>
19132       <para>
19133        It is now possible to log server messages conveniently without
19134        relying on either <application>syslog</> or an external log
19135        rotation program.
19136       </para>
19137      </listitem>
19138
19139      <listitem>
19140       <para>
19141        Add new read-only server configuration parameters to show server
19142        compile-time settings: <varname>block_size</>,
19143        <varname>integer_datetimes</>, <varname>max_function_args</>,
19144        <varname>max_identifier_length</>, <varname>max_index_keys</>  (Joe)
19145       </para>
19146      </listitem>
19147
19148      <listitem>
19149       <para>
19150        Make quoting of <literal>sameuser</>, <literal>samegroup</>, and
19151        <literal>all</> remove special meaning of these terms in
19152        <filename>pg_hba.conf</> (Andrew)
19153       </para>
19154      </listitem>
19155
19156      <listitem>
19157       <para>
19158        Use clearer IPv6 name <literal>::1/128</> for
19159        <literal>localhost</> in default <filename>pg_hba.conf</> (Andrew)
19160       </para>
19161      </listitem>
19162
19163      <listitem>
19164       <para>
19165        Use CIDR format in <filename>pg_hba.conf</> examples (Andrew)
19166       </para>
19167      </listitem>
19168
19169      <listitem>
19170       <para>
19171        Rename server configuration parameters <varname>SortMem</> and
19172        <varname>VacuumMem</> to <varname>work_mem</> and
19173        <varname>maintenance_work_mem</> (Old names still supported) (Tom)
19174       </para>
19175       <para>
19176        This change was made to clarify that bulk operations such as index and
19177        foreign key creation use <varname>maintenance_work_mem</>, while
19178        <varname>work_mem</> is for workspaces used during query execution.
19179       </para>
19180      </listitem>
19181
19182      <listitem>
19183       <para>
19184        Allow logging of session disconnections using server configuration
19185        <varname>log_disconnections</> (Andrew)
19186       </para>
19187      </listitem>
19188
19189      <listitem>
19190       <para>
19191        Add new server configuration parameter <varname>log_line_prefix</> to
19192        allow control of information emitted in each log line (Andrew)
19193       </para>
19194       <para>
19195        Available information includes user name, database name, remote IP
19196        address, and session start time.
19197       </para>
19198      </listitem>
19199
19200      <listitem>
19201       <para>
19202        Remove server configuration parameters <varname>log_pid</>,
19203        <varname>log_timestamp</>, <varname>log_source_port</>; functionality
19204        superseded by <varname>log_line_prefix</> (Andrew)
19205       </para>
19206      </listitem>
19207
19208      <listitem>
19209       <para>
19210        Replace the <varname>virtual_host</> and <varname>tcpip_socket</>
19211        parameters with a unified <varname>listen_addresses</> parameter
19212        (Andrew, Tom)
19213       </para>
19214       <para>
19215        <varname>virtual_host</> could only specify a single IP address to
19216        listen on.  <varname>listen_addresses</> allows multiple addresses
19217        to be specified.
19218       </para>
19219      </listitem>
19220
19221      <listitem>
19222       <para>
19223        Listen on localhost by default, which eliminates the need for the
19224        <option>-i</> postmaster switch in many scenarios (Andrew)
19225       </para>
19226       <para>
19227        Listening on localhost (<literal>127.0.0.1</>) opens no new
19228        security holes but allows configurations like Windows and JDBC,
19229        which do not support local sockets, to work without special
19230        adjustments.
19231       </para>
19232      </listitem>
19233
19234      <listitem>
19235       <para>
19236        Remove <varname>syslog</> server configuration parameter, and add more
19237        logical <varname>log_destination</> variable to control log output
19238        location (Magnus)
19239       </para>
19240      </listitem>
19241
19242      <listitem>
19243       <para>
19244        Change server configuration parameter <varname>log_statement</> to take
19245        values <varname>all</>, <varname>mod</>, <varname>ddl</>, or
19246        <varname>none</> to select which queries are logged (Bruce)
19247       </para>
19248       <para>
19249        This allows administrators to log only data definition changes or
19250        only data modification statements.
19251       </para>
19252      </listitem>
19253
19254      <listitem>
19255       <para>
19256        Some logging-related configuration parameters could formerly be adjusted
19257        by ordinary users, but only in the <quote>more verbose</> direction.
19258        They are now treated more strictly: only superusers can set them.
19259        However, a superuser can use <command>ALTER USER</> to provide per-user
19260        settings of these values for non-superusers.  Also, it is now possible
19261        for superusers to set values of superuser-only configuration parameters
19262        via <literal>PGOPTIONS</>.
19263       </para>
19264      </listitem>
19265
19266      <listitem>
19267       <para>
19268        Allow configuration files to be placed outside the data directory (mlw)
19269       </para>
19270       <para>
19271        By default, configuration files are kept in the cluster's top directory.
19272        With this addition, configuration files can be placed outside the
19273        data directory, easing administration.
19274       </para>
19275      </listitem>
19276
19277      <listitem>
19278       <para>
19279        Plan prepared queries only when first executed so constants can be
19280        used for statistics (Oliver Jowett)
19281       </para>
19282       <para>
19283        Prepared statements plan queries once and execute them many
19284        times. While prepared queries avoid the overhead of re-planning
19285        on each use, the quality of the plan suffers from not knowing the exact
19286        parameters to be used in the query.  In this release, planning of
19287        unnamed prepared statements is delayed until the first execution,
19288        and the actual parameter values of that execution are used as
19289        optimization hints.  This allows use of out-of-line parameter passing
19290        without incurring a performance penalty.
19291       </para>
19292      </listitem>
19293
19294      <listitem>
19295       <para>
19296        Allow <command>DECLARE CURSOR</command> to take parameters
19297        (Oliver Jowett)
19298       </para>
19299       <para>
19300        It is now useful to issue <command>DECLARE CURSOR</command> in a
19301        <function>Parse</> message with parameters. The parameter values
19302        sent at <function>Bind</> time will be substituted into the
19303        execution of the cursor's query.
19304       </para>
19305      </listitem>
19306
19307      <listitem>
19308       <para>
19309        Fix hash joins and aggregates of <type>inet</type> and
19310        <type>cidr</type> data types (Tom)
19311       </para>
19312       <para>
19313        Release 7.4 handled hashing of mixed <type>inet</type> and
19314        <type>cidr</type> values incorrectly.  (This bug did not exist
19315        in prior releases because they wouldn't try to hash either
19316        data type.)
19317       </para>
19318      </listitem>
19319
19320      <listitem>
19321       <para>
19322        Make <varname>log_duration</> print only when <varname>log_statement</>
19323        prints the query (Ed L.)
19324       </para>
19325      </listitem>
19326
19327     </itemizedlist>
19328    </sect3>
19329
19330
19331    <sect3>
19332     <title>Query Changes</title>
19333     <itemizedlist>
19334
19335      <listitem>
19336       <para>
19337        Add savepoints (nested transactions) (Alvaro)
19338       </para>
19339      </listitem>
19340
19341      <listitem>
19342       <para>
19343        Unsupported isolation levels are now accepted and promoted to the
19344        nearest supported level (Peter)
19345       </para>
19346       <para>
19347        The SQL specification states that if a database doesn't support a
19348        specific isolation level, it should use the next more restrictive level.
19349        This change complies with that recommendation.
19350       </para>
19351      </listitem>
19352
19353      <listitem>
19354       <para>
19355        Allow <command>BEGIN WORK</command> to specify transaction
19356        isolation levels like <command>START TRANSACTION</command> does
19357        (Bruce)
19358       </para>
19359      </listitem>
19360
19361      <listitem>
19362       <para>
19363        Fix table permission checking for cases in which rules generate
19364        a query type different from the originally submitted query (Tom)
19365       </para>
19366      </listitem>
19367
19368      <listitem>
19369       <para>
19370        Implement dollar quoting to simplify single-quote usage (Andrew, Tom,
19371        David Fetter)
19372       </para>
19373       <para>
19374        In previous releases, because single quotes had to be used to
19375        quote a function's body, the use of single quotes inside the
19376        function text required use of two single quotes or other error-prone
19377        notations. With this release we add the ability to use "dollar
19378        quoting" to quote a block of text.  The ability to use different
19379        quoting delimiters at different nesting levels greatly simplifies
19380        the task of quoting correctly, especially in complex functions.
19381        Dollar quoting can be used anywhere quoted text is needed.
19382       </para>
19383      </listitem>
19384
19385      <listitem>
19386       <para>
19387        Make <literal>CASE val WHEN compval1 THEN ...</> evaluate <literal>val</> only once (Tom)
19388       </para>
19389       <para>
19390        <option>CASE</> no longer evaluates the tested expression multiple
19391        times. This has benefits when the expression is complex or is
19392        volatile.
19393       </para>
19394      </listitem>
19395
19396      <listitem>
19397       <para>
19398        Test <option>HAVING</> before computing target list of an
19399        aggregate query (Tom)
19400       </para>
19401       <para>
19402        Fixes improper failure of cases such as <literal>SELECT SUM(win)/SUM(lose)
19403        ... GROUP BY ... HAVING SUM(lose) &gt; 0</>.  This should work but formerly
19404        could fail with divide-by-zero.
19405       </para>
19406      </listitem>
19407
19408      <listitem>
19409       <para>
19410        Replace <varname>max_expr_depth</> parameter with
19411        <varname>max_stack_depth</> parameter, measured in kilobytes of stack
19412        size (Tom)
19413       </para>
19414       <para>
19415       This gives us a fairly bulletproof defense against crashing due to
19416       runaway recursive functions. Instead of measuring the depth of expression
19417       nesting, we now directly measure the size of the execution stack.
19418       </para>
19419      </listitem>
19420
19421      <listitem>
19422       <para>
19423        Allow arbitrary row expressions (Tom)
19424       </para>
19425       <para>
19426        This release allows SQL expressions to contain arbitrary composite
19427        types, that is, row values. It also allows functions to more easily
19428        take rows as arguments and return row values.
19429       </para>
19430      </listitem>
19431
19432      <listitem>
19433       <para>
19434        Allow <option>LIKE</>/<option>ILIKE</> to be used as the operator
19435        in row and subselect comparisons (Fabien Coelho)
19436       </para>
19437      </listitem>
19438
19439      <listitem>
19440       <para>
19441        Avoid locale-specific case conversion of basic ASCII letters in
19442        identifiers and keywords (Tom)
19443       </para>
19444       <para>
19445        This solves the <quote>Turkish problem</> with mangling of words
19446        containing <literal>I</> and  <literal>i</>.  Folding of characters
19447        outside the 7-bit-ASCII set is still locale-aware.
19448       </para>
19449      </listitem>
19450
19451      <listitem>
19452       <para>
19453        Improve syntax error reporting (Fabien, Tom)
19454       </para>
19455       <para>
19456        Syntax error reports are more useful than before.
19457       </para>
19458      </listitem>
19459
19460      <listitem>
19461       <para>
19462        Change <command>EXECUTE</command> to return a completion tag
19463        matching the executed statement (Kris Jurka)
19464       </para>
19465       <para>
19466        Previous releases return an <command>EXECUTE</command> tag for
19467        any <command>EXECUTE</command> call. In this release, the tag
19468        returned will reflect the command executed.
19469       </para>
19470      </listitem>
19471
19472      <listitem>
19473       <para>
19474        Avoid emitting <option>NATURAL CROSS JOIN</> in rule listings (Tom)
19475       </para>
19476       <para>
19477        Such a clause makes no logical sense, but in some cases the rule
19478        decompiler formerly produced this syntax.
19479       </para>
19480      </listitem>
19481
19482     </itemizedlist>
19483    </sect3>
19484
19485
19486    <sect3>
19487     <title>Object Manipulation Changes</title>
19488     <itemizedlist>
19489
19490      <listitem>
19491       <para>
19492        Add <command>COMMENT ON</> for casts, conversions, languages,
19493        operator classes, and large objects (Christopher)
19494       </para>
19495      </listitem>
19496
19497      <listitem>
19498       <para>
19499        Add new server configuration parameter <varname>default_with_oids</> to
19500        control whether tables are created with <type>OID</>s by default (Neil)
19501       </para>
19502       <para>
19503        This allows administrators to control whether <command>CREATE
19504        TABLE</command> commands create tables with or without <type>OID</>
19505        columns by default.  (Note: the current factory default setting for
19506        <varname>default_with_oids</> is <literal>TRUE</>, but the default
19507        will become <literal>FALSE</> in future releases.)
19508       </para>
19509      </listitem>
19510
19511      <listitem>
19512       <para>
19513        Add <option>WITH</> / <option>WITHOUT OIDS</> clause to
19514        <command>CREATE TABLE AS</command> (Neil)
19515       </para>
19516      </listitem>
19517
19518      <listitem>
19519       <para>
19520        Allow <command>ALTER TABLE DROP COLUMN</> to drop an <type>OID</>
19521        column (<command>ALTER TABLE SET WITHOUT OIDS</> still works)
19522        (Tom)
19523       </para>
19524      </listitem>
19525
19526      <listitem>
19527       <para>
19528        Allow composite types as table columns (Tom)
19529       </para>
19530      </listitem>
19531
19532      <listitem>
19533       <para>
19534        Allow <command>ALTER ... ADD COLUMN</> with defaults and
19535        <option>NOT NULL</> constraints; works per SQL spec (Rod)
19536       </para>
19537       <para>
19538        It is now possible for <option>ADD COLUMN</> to create a column
19539        that is not initially filled with NULLs, but with a specified
19540        default value.
19541       </para>
19542      </listitem>
19543
19544      <listitem>
19545       <para>
19546        Add <command>ALTER COLUMN TYPE</> to change column's type (Rod)
19547       </para>
19548       <para>
19549        It is now possible to alter a column's data type without dropping
19550        and re-adding the column.
19551       </para>
19552      </listitem>
19553
19554      <listitem>
19555       <para>
19556        Allow multiple <command>ALTER</> actions in a single <command>ALTER
19557        TABLE</command> command (Rod)
19558       </para>
19559       <para>
19560        This is particularly useful for <command>ALTER</> commands that
19561        rewrite the table (which include <option>ALTER COLUMN TYPE</> and
19562        <option>ADD COLUMN</> with a default). By grouping
19563        <command>ALTER</> commands together, the table need be rewritten
19564        only once.
19565       </para>
19566      </listitem>
19567
19568      <listitem>
19569       <para>
19570        Allow <command>ALTER TABLE</command> to add <type>SERIAL</type>
19571        columns (Tom)
19572       </para>
19573       <para>
19574        This falls out from the new capability of specifying defaults for new
19575        columns.
19576       </para>
19577      </listitem>
19578
19579      <listitem>
19580       <para>
19581        Allow changing the owners of aggregates, conversions, databases,
19582        functions, operators, operator classes, schemas, types, and tablespaces
19583        (Christopher, Euler Taveira de Oliveira)
19584       </para>
19585       <para>
19586        Previously this required modifying the system tables directly.
19587       </para>
19588      </listitem>
19589
19590      <listitem>
19591       <para>
19592        Allow temporary object creation to be limited to <option>SECURITY
19593        DEFINER</> functions (Sean Chittenden)
19594       </para>
19595      </listitem>
19596
19597      <listitem>
19598       <para>
19599        Add <option>ALTER TABLE ... SET WITHOUT CLUSTER</> (Christopher)
19600       </para>
19601       <para>
19602        Prior to this release, there was no way to clear an auto-cluster
19603        specification except to modify the system tables.
19604       </para>
19605      </listitem>
19606
19607      <listitem>
19608       <para>
19609        Constraint/Index/<type>SERIAL</> names are now
19610        <replaceable>table_column_type</>
19611        with numbers appended to guarantee uniqueness within the schema
19612        (Tom)
19613       </para>
19614       <para>
19615        The SQL specification states that such names should be unique
19616        within a schema.
19617       </para>
19618      </listitem>
19619
19620      <listitem>
19621       <para>
19622        Add <function>pg_get_serial_sequence()</> to return a
19623        <type>SERIAL</> column's sequence name (Christopher)
19624       </para>
19625       <para>
19626        This allows automated scripts to reliably find the <type>SERIAL</>
19627        sequence name.
19628       </para>
19629      </listitem>
19630
19631      <listitem>
19632       <para>
19633        Warn when primary/foreign key data type mismatch requires costly lookup
19634       </para>
19635      </listitem>
19636
19637      <listitem>
19638       <para>
19639        New <command>ALTER INDEX</> command to allow moving of indexes
19640        between tablespaces (Gavin)
19641       </para>
19642      </listitem>
19643
19644      <listitem>
19645       <para>
19646        Make <command>ALTER TABLE OWNER</> change dependent sequence
19647        ownership too (Alvaro)
19648       </para>
19649      </listitem>
19650
19651
19652     </itemizedlist>
19653    </sect3>
19654
19655
19656    <sect3>
19657     <title>Utility Command Changes</title>
19658     <itemizedlist>
19659
19660      <listitem>
19661       <para>
19662        Allow <command>CREATE SCHEMA</command> to create triggers,
19663        indexes, and sequences (Neil)
19664       </para>
19665      </listitem>
19666
19667      <listitem>
19668       <para>
19669        Add <option>ALSO</> keyword to <command>CREATE RULE</command> (Fabien
19670        Coelho)
19671       </para>
19672       <para>
19673        This allows <option>ALSO</> to be added to rule creation to contrast it with
19674        <option>INSTEAD</> rules.
19675       </para>
19676      </listitem>
19677
19678      <listitem>
19679       <para>
19680        Add <option>NOWAIT</> option to <command>LOCK</command> (Tatsuo)
19681       </para>
19682       <para>
19683        This allows the <command>LOCK</command> command to fail if it
19684        would have to wait for the requested lock.
19685       </para>
19686      </listitem>
19687
19688      <listitem>
19689       <para>
19690        Allow <command>COPY</command> to read and write
19691        comma-separated-value (CSV) files (Andrew, Bruce)
19692       </para>
19693      </listitem>
19694
19695      <listitem>
19696       <para>
19697        Generate error if the <command>COPY</command> delimiter and NULL
19698        string conflict (Bruce)
19699       </para>
19700      </listitem>
19701
19702      <listitem>
19703       <para>
19704        <command>GRANT</command>/<command>REVOKE</command> behavior
19705        follows the SQL spec more closely
19706       </para>
19707      </listitem>
19708
19709      <listitem>
19710       <para>
19711        Avoid locking conflict between <command>CREATE INDEX</command>
19712        and <command>CHECKPOINT</command> (Tom)
19713       </para>
19714       <para>
19715        In 7.3 and 7.4, a long-running B-tree index build could block concurrent
19716        <command>CHECKPOINT</>s from completing, thereby causing WAL bloat because the
19717        WAL log could not be recycled.
19718       </para>
19719      </listitem>
19720
19721      <listitem>
19722       <para>
19723        Database-wide <command>ANALYZE</command> does not hold locks
19724        across tables (Tom)
19725       </para>
19726       <para>
19727        This reduces the potential for deadlocks against other backends
19728        that want exclusive locks on tables.  To get the benefit of this
19729        change, do not execute database-wide <command>ANALYZE</command>
19730        inside a transaction block (<command>BEGIN</command> block); it
19731        must be able to commit and start a new transaction for each
19732        table.
19733       </para>
19734      </listitem>
19735
19736      <listitem>
19737       <para>
19738        <command>REINDEX</command> does not exclusively lock the index's
19739        parent table anymore
19740       </para>
19741       <para>
19742        The index itself is still exclusively locked, but readers of the
19743        table can continue if they are not using the particular index
19744        being rebuilt.
19745       </para>
19746      </listitem>
19747
19748      <listitem>
19749       <para>
19750        Erase MD5 user passwords when a user is renamed (Bruce)
19751       </para>
19752       <para>
19753        <productname>PostgreSQL</productname> uses the user name as salt
19754        when encrypting passwords via MD5. When a user's name is changed,
19755        the salt will no longer match the stored MD5 password, so the
19756        stored password becomes useless.  In this release a notice is
19757        generated and the password is cleared.  A new password must then
19758        be assigned if the user is to be able to log in with a password.
19759       </para>
19760      </listitem>
19761
19762      <listitem>
19763       <para>
19764        New <application>pg_ctl</> <option>kill</> option for Windows (Andrew)
19765       </para>
19766       <para>
19767        Windows does not have a <literal>kill</> command to send signals to
19768        backends so this capability was added to <application>pg_ctl</>.
19769       </para>
19770      </listitem>
19771
19772      <listitem>
19773       <para>
19774        Information schema improvements
19775       </para>
19776      </listitem>
19777
19778      <listitem>
19779       <para>
19780        Add <option>--pwfile</> option to
19781        <application>initdb</application> so the initial password can be
19782        set by GUI tools (Magnus)
19783       </para>
19784      </listitem>
19785
19786      <listitem>
19787       <para>
19788        Detect locale/encoding mismatch in
19789        <application>initdb</application> (Peter)
19790       </para>
19791      </listitem>
19792
19793      <listitem>
19794       <para>
19795        Add <option>register</> command to <application>pg_ctl</> to
19796        register Windows operating system service (Dave Page)
19797       </para>
19798      </listitem>
19799
19800     </itemizedlist>
19801    </sect3>
19802
19803
19804    <sect3>
19805     <title>Data Type and Function Changes</title>
19806     <itemizedlist>
19807
19808      <listitem>
19809       <para>
19810        More complete support for composite types (row types)  (Tom)
19811       </para>
19812       <para>
19813        Composite values can be used in many places where only scalar values
19814        worked before.
19815       </para>
19816      </listitem>
19817
19818      <listitem>
19819       <para>
19820        Reject nonrectangular array values as erroneous (Joe)
19821       </para>
19822       <para>
19823        Formerly, <function>array_in</> would silently build a
19824        surprising result.
19825       </para>
19826      </listitem>
19827
19828       <listitem>
19829        <para>
19830         Overflow in integer arithmetic operations is now detected (Tom)
19831        </para>
19832       </listitem>
19833
19834       <listitem>
19835        <para>
19836         The arithmetic operators associated with the single-byte
19837         <type>"char"</> data type have been removed.
19838        </para>
19839        <para>
19840         Formerly, the parser would select these operators in many situations
19841         where an <quote>unable to select an operator</> error would be more
19842         appropriate, such as <literal>null * null</>.  If you actually want
19843         to do arithmetic on a <type>"char"</> column, you can cast it to
19844         integer explicitly.
19845        </para>
19846       </listitem>
19847
19848      <listitem>
19849        <para>
19850         Syntax checking of array input values considerably tightened up (Joe)
19851        </para>
19852       <para>
19853         Junk that was previously allowed in odd places with odd results
19854         now causes an <literal>ERROR</>, for example, non-whitespace
19855         after the closing right brace.
19856        </para>
19857      </listitem>
19858
19859      <listitem>
19860        <para>
19861         Empty-string array element values must now be written as
19862         <literal>""</>, rather than writing nothing (Joe)
19863        </para>
19864       <para>
19865         Formerly, both ways of writing an empty-string element value were
19866         allowed, but now a quoted empty string is required.  The case where
19867         nothing at all appears will probably be considered to be a NULL
19868         element value in some future release.
19869        </para>
19870      </listitem>
19871
19872      <listitem>
19873        <para>
19874         Array element trailing whitespace is now ignored (Joe)
19875        </para>
19876       <para>
19877         Formerly leading whitespace was ignored, but trailing whitespace
19878         between an element value and the delimiter or right brace was
19879         significant.  Now trailing whitespace is also ignored.
19880        </para>
19881      </listitem>
19882
19883      <listitem>
19884       <para>
19885        Emit array values with explicit array bounds when lower bound is not one
19886        (Joe)
19887       </para>
19888      </listitem>
19889
19890      <listitem>
19891       <para>
19892        Accept <literal>YYYY-monthname-DD</> as a date string (Tom)
19893       </para>
19894      </listitem>
19895
19896      <listitem>
19897       <para>
19898        Make <function>netmask</> and <function>hostmask</> functions
19899        return maximum-length mask length (Tom)
19900       </para>
19901      </listitem>
19902
19903      <listitem>
19904       <para>
19905        Change factorial function to return <type>numeric</type> (Gavin)
19906       </para>
19907       <para>
19908        Returning <type>numeric</type> allows the factorial function to
19909        work for a wider range of input values.
19910       </para>
19911      </listitem>
19912
19913      <listitem>
19914       <para>
19915        <function>to_char</>/<function>to_date()</> date conversion
19916        improvements (Kurt Roeckx, Fabien Coelho)
19917       </para>
19918      </listitem>
19919
19920      <listitem>
19921       <para>
19922        Make <function>length()</> disregard trailing spaces in
19923        <type>CHAR(n)</> (Gavin)
19924       </para>
19925       <para>
19926        This change was made to improve consistency: trailing spaces are
19927        semantically insignificant in <type>CHAR(n)</> data, so they
19928        should not be counted by <function>length()</>.
19929       </para>
19930      </listitem>
19931
19932      <listitem>
19933       <para>
19934        Warn about empty string being passed to
19935        <type>OID</>/<type>float4</>/<type>float8</> data types (Neil)
19936       </para>
19937       <para>
19938        8.1 will throw an error instead.
19939       </para>
19940      </listitem>
19941
19942      <listitem>
19943       <para>
19944        Allow leading or trailing whitespace in
19945        <type>int2</>/<type>int4</>/<type>int8</>/<type>float4</>/<type>float8</>
19946        input routines
19947        (Neil)
19948       </para>
19949      </listitem>
19950
19951      <listitem>
19952       <para>
19953        Better support for IEEE <literal>Infinity</> and <literal>NaN</>
19954        values in <type>float4</type>/<type>float8</type> (Neil)
19955       </para>
19956       <para>
19957        These should now work on all platforms that support IEEE-compliant
19958        floating point arithmetic.
19959       </para>
19960      </listitem>
19961
19962      <listitem>
19963       <para>
19964        Add <option>week</> option to <function>date_trunc()</> (Robert Creager)
19965       </para>
19966      </listitem>
19967
19968      <listitem>
19969       <para>
19970        Fix <function>to_char</function> for <literal>1 BC</>
19971        (previously it returned <literal>1 AD</>) (Bruce)
19972       </para>
19973      </listitem>
19974
19975      <listitem>
19976       <para>
19977        Fix <function>date_part(year)</> for BC dates (previously it
19978        returned one less than the correct year) (Bruce)
19979       </para>
19980      </listitem>
19981
19982      <listitem>
19983       <para>
19984        Fix <function>date_part()</> to return the proper millennium and
19985        century (Fabien Coelho)
19986       </para>
19987       <para>
19988        In previous versions, the century and millennium results had a wrong
19989        number and started in the wrong year, as compared to standard
19990        reckoning of such things.
19991       </para>
19992      </listitem>
19993
19994      <listitem>
19995       <para>
19996        Add <function>ceiling()</> as an alias for <function>ceil()</>,
19997        and <function>power()</> as an alias for <function>pow()</> for
19998        standards compliance (Neil)
19999       </para>
20000      </listitem>
20001
20002      <listitem>
20003       <para>
20004        Change <function>ln()</>, <function>log()</>,
20005        <function>power()</>, and <function>sqrt()</> to emit the correct
20006        <literal>SQLSTATE</> error codes for certain error conditions, as
20007        specified by SQL:2003 (Neil)
20008       </para>
20009      </listitem>
20010
20011      <listitem>
20012       <para>
20013        Add <function>width_bucket()</> function as defined by SQL:2003 (Neil)
20014       </para>
20015      </listitem>
20016
20017      <listitem>
20018       <para>
20019        Add <function>generate_series()</> functions to simplify working
20020        with numeric sets (Joe)
20021       </para>
20022      </listitem>
20023
20024      <listitem>
20025       <para>
20026        Fix <function>upper/lower/initcap()</> functions to work with
20027        multibyte encodings (Tom)
20028       </para>
20029      </listitem>
20030
20031      <listitem>
20032       <para>
20033        Add boolean and bitwise integer <option>AND</>/<option>OR</>
20034        aggregates (Fabien Coelho)
20035       </para>
20036      </listitem>
20037
20038      <listitem>
20039       <para>
20040        New session information functions to return network addresses for client
20041        and server (Sean Chittenden)
20042       </para>
20043      </listitem>
20044
20045      <listitem>
20046       <para>
20047        Add function to determine the area of a closed path (Sean Chittenden)
20048       </para>
20049      </listitem>
20050
20051      <listitem>
20052       <para>
20053        Add function to send cancel request to other backends (Magnus)
20054       </para>
20055      </listitem>
20056
20057      <listitem>
20058       <para>
20059        Add <type>interval</> plus <type>datetime</> operators (Tom)
20060       </para>
20061       <para>
20062        The reverse ordering, <type>datetime</> plus <type>interval</>,
20063        was already supported, but both are required by the SQL standard.
20064       </para>
20065      </listitem>
20066
20067      <listitem>
20068       <para>
20069        Casting an integer to <type>BIT(N)</> selects the rightmost N bits
20070        of the integer
20071        (Tom)
20072       </para>
20073       <para>
20074        In prior releases, the leftmost N bits were selected, but this was
20075        deemed unhelpful, not to mention inconsistent with casting from bit
20076        to int.
20077       </para>
20078      </listitem>
20079
20080      <listitem>
20081       <para>
20082        Require <type>CIDR</> values to have all nonmasked bits be zero
20083        (Kevin Brintnall)
20084       </para>
20085      </listitem>
20086
20087     </itemizedlist>
20088    </sect3>
20089
20090
20091    <sect3>
20092     <title>Server-Side Language Changes</title>
20093     <itemizedlist>
20094
20095      <listitem>
20096       <para>
20097        In <literal>READ COMMITTED</> serialization mode, volatile functions
20098        now see the results of concurrent transactions committed up to the
20099        beginning of each statement within the function, rather than up to the
20100        beginning of the interactive command that called the function.
20101       </para>
20102      </listitem>
20103
20104      <listitem>
20105       <para>
20106        Functions declared <literal>STABLE</> or <literal>IMMUTABLE</> always
20107        use the snapshot of the calling query, and therefore do not see the
20108        effects of actions taken after the calling query starts, whether in
20109        their own transaction or other transactions.  Such a function must be
20110        read-only, too, meaning that it cannot use any SQL commands other than
20111        <command>SELECT</>.  There is a considerable performance gain from
20112        declaring a function <literal>STABLE</> or <literal>IMMUTABLE</>
20113        rather than <literal>VOLATILE</>.
20114       </para>
20115      </listitem>
20116
20117      <listitem>
20118       <para>
20119        Nondeferred <option>AFTER</> triggers are now fired immediately
20120        after completion of the triggering query, rather than upon
20121        finishing the current interactive command. This makes a difference
20122        when the triggering query occurred within a function: the trigger
20123        is invoked before the function proceeds to its next operation. For
20124        example, if a function inserts a new row into a table, any
20125        nondeferred foreign key checks occur before proceeding with the
20126        function.
20127       </para>
20128      </listitem>
20129
20130      <listitem>
20131       <para>
20132        Allow function parameters to be declared with names (Dennis Bj&ouml;rklund)
20133       </para>
20134       <para>
20135        This allows better documentation of functions.  Whether the names
20136        actually do anything depends on the specific function language
20137        being used.
20138       </para>
20139      </listitem>
20140
20141      <listitem>
20142       <para>
20143        Allow PL/pgSQL parameter names to be referenced in the function (Dennis Bj&ouml;rklund)
20144       </para>
20145       <para>
20146        This basically creates an automatic alias for each named parameter.
20147       </para>
20148      </listitem>
20149
20150      <listitem>
20151       <para>
20152        Do minimal syntax checking of PL/pgSQL functions at creation time (Tom)
20153       </para>
20154       <para>
20155        This allows us to catch simple syntax errors sooner.
20156       </para>
20157      </listitem>
20158
20159      <listitem>
20160       <para>
20161        More support for composite types (row and record variables) in PL/pgSQL
20162       </para>
20163       <para>
20164        For example, it now works to pass a rowtype variable to another function
20165        as a single variable.
20166       </para>
20167      </listitem>
20168
20169      <listitem>
20170       <para>
20171        Default values for PL/pgSQL variables can now reference previously
20172        declared variables
20173       </para>
20174      </listitem>
20175
20176      <listitem>
20177       <para>
20178        Improve parsing of PL/pgSQL FOR loops (Tom)
20179       </para>
20180       <para>
20181        Parsing is now driven by presence of <literal>".."</> rather than
20182        data type of <option>FOR</> variable. This makes no difference for
20183        correct functions, but should result in more understandable error
20184        messages when a mistake is made.
20185       </para>
20186      </listitem>
20187
20188      <listitem>
20189       <para>
20190        Major overhaul of PL/Perl server-side language (Command Prompt, Andrew Dunstan)
20191       </para>
20192      </listitem>
20193
20194      <listitem>
20195       <para>
20196        In PL/Tcl, SPI commands are now run in subtransactions.  If an error
20197        occurs, the subtransaction is cleaned up and the error is reported
20198        as an ordinary Tcl error, which can be trapped with <literal>catch</>.
20199        Formerly, it was not possible to catch such errors.
20200       </para>
20201      </listitem>
20202
20203      <listitem>
20204       <para>
20205        Accept <command>ELSEIF</> in PL/pgSQL (Neil)
20206       </para>
20207       <para>
20208        Previously PL/pgSQL only allowed <command>ELSIF</>, but many people
20209        are accustomed to spelling this keyword <command>ELSEIF</>.
20210       </para>
20211      </listitem>
20212
20213     </itemizedlist>
20214    </sect3>
20215
20216
20217    <sect3>
20218     <title><application>psql</> Changes</title>
20219     <itemizedlist>
20220
20221      <listitem>
20222       <para>
20223        Improve <application>psql</> information display about database
20224        objects (Christopher)
20225       </para>
20226      </listitem>
20227
20228      <listitem>
20229       <para>
20230        Allow <application>psql</> to display group membership in
20231        <command>\du</> and <command>\dg</> (Markus Bertheau)
20232       </para>
20233      </listitem>
20234
20235      <listitem>
20236       <para>
20237        Prevent <application>psql</> <command>\dn</command> from showing
20238        temporary schemas (Bruce)
20239       </para>
20240      </listitem>
20241
20242      <listitem>
20243       <para>
20244        Allow <application>psql</> to handle tilde user expansion for file
20245        names (Zach Irmen)
20246       </para>
20247      </listitem>
20248
20249      <listitem>
20250       <para>
20251        Allow <application>psql</> to display fancy prompts, including
20252        color, via <application>readline</> (Reece Hart, Chet Ramey)
20253       </para>
20254      </listitem>
20255
20256      <listitem>
20257       <para>
20258        Make <application>psql</> <command>\copy</> match <command>COPY</command> command syntax
20259        fully (Tom)
20260       </para>
20261      </listitem>
20262
20263      <listitem>
20264       <para>
20265        Show the location of syntax errors (Fabien Coelho, Tom)
20266       </para>
20267      </listitem>
20268
20269      <listitem>
20270       <para>
20271        Add <command>CLUSTER</command> information to <application>psql</>
20272        <command>\d</> display
20273        (Bruce)
20274       </para>
20275      </listitem>
20276
20277      <listitem>
20278       <para>
20279        Change <application>psql</> <command>\copy stdin/stdout</> to read
20280        from command input/output (Bruce)
20281       </para>
20282      </listitem>
20283
20284      <listitem>
20285       <para>
20286        Add <option>pstdin</>/<option>pstdout</> to read from
20287        <application>psql</>'s <literal>stdin</>/<literal>stdout</> (Mark
20288        Feit)
20289       </para>
20290      </listitem>
20291
20292      <listitem>
20293       <para>
20294        Add global <application>psql</> configuration file, <filename>psqlrc.sample</filename>
20295        (Bruce)
20296       </para>
20297       <para>
20298        This allows a central file where global <application>psql</> startup commands can
20299        be stored.
20300       </para>
20301      </listitem>
20302
20303      <listitem>
20304       <para>
20305        Have <application>psql</> <command>\d+</> indicate if the table
20306        has an <type>OID</> column (Neil)
20307       </para>
20308      </listitem>
20309
20310      <listitem>
20311       <para>
20312        On Windows, use binary mode in <application>psql</> when reading files so control-Z
20313        is not seen as end-of-file
20314       </para>
20315      </listitem>
20316
20317      <listitem>
20318       <para>
20319        Have <command>\dn+</> show permissions and description for schemas (Dennis
20320        Bj&ouml;rklund)
20321       </para>
20322      </listitem>
20323
20324      <listitem>
20325       <para>
20326        Improve tab completion support (Stefan Kaltenbrunn, Greg Sabino Mullane)
20327       </para>
20328      </listitem>
20329
20330      <listitem>
20331       <para>
20332        Allow boolean settings to be set using upper or lower case (Michael Paesold)
20333       </para>
20334      </listitem>
20335
20336     </itemizedlist>
20337    </sect3>
20338
20339
20340    <sect3>
20341     <title><application>pg_dump</> Changes</title>
20342     <itemizedlist>
20343
20344      <listitem>
20345       <para>
20346        Use dependency information to improve the reliability of
20347        <application>pg_dump</> (Tom)
20348       </para>
20349       <para>
20350        This should solve the longstanding problems with related objects
20351        sometimes being dumped in the wrong order.
20352       </para>
20353      </listitem>
20354
20355      <listitem>
20356       <para>
20357        Have <application>pg_dump</> output objects in alphabetical order if possible (Tom)
20358       </para>
20359       <para>
20360        This should make it easier to identify changes between
20361        dump files.
20362       </para>
20363      </listitem>
20364
20365      <listitem>
20366       <para>
20367        Allow <application>pg_restore</> to ignore some SQL errors (Fabien Coelho)
20368       </para>
20369       <para>
20370        This makes <application>pg_restore</>'s behavior similar to the
20371        results of feeding a <application>pg_dump</> output script to
20372        <application>psql</>. In most cases, ignoring errors and plowing
20373        ahead is the most useful thing to do. Also added was a pg_restore
20374        option to give the old behavior of exiting on an error.
20375       </para>
20376      </listitem>
20377
20378      <listitem>
20379       <para>
20380        <application>pg_restore</> <option>-l</> display now includes
20381        objects' schema names
20382       </para>
20383      </listitem>
20384
20385      <listitem>
20386       <para>
20387        New begin/end markers in <application>pg_dump</> text output (Bruce)
20388       </para>
20389      </listitem>
20390
20391      <listitem>
20392       <para>
20393        Add start/stop times for
20394        <application>pg_dump</>/<application>pg_dumpall</> in verbose mode
20395        (Bruce)
20396       </para>
20397      </listitem>
20398
20399      <listitem>
20400       <para>
20401        Allow most <application>pg_dump</> options in
20402        <application>pg_dumpall</> (Christopher)
20403       </para>
20404      </listitem>
20405
20406      <listitem>
20407       <para>
20408        Have <application>pg_dump</> use <command>ALTER OWNER</> rather
20409        than <command>SET SESSION AUTHORIZATION</> by default
20410        (Christopher)
20411       </para>
20412      </listitem>
20413
20414     </itemizedlist>
20415    </sect3>
20416
20417
20418    <sect3>
20419     <title>libpq Changes</title>
20420     <itemizedlist>
20421
20422      <listitem>
20423       <para>
20424        Make libpq's <option>SIGPIPE</> handling thread-safe (Bruce)
20425       </para>
20426      </listitem>
20427
20428      <listitem>
20429       <para>
20430        Add <function>PQmbdsplen()</> which returns the display length
20431        of a character (Tatsuo)
20432       </para>
20433      </listitem>
20434
20435      <listitem>
20436       <para>
20437        Add thread locking to <application>SSL</> and
20438        <application>Kerberos</> connections (Manfred Spraul)
20439       </para>
20440      </listitem>
20441
20442      <listitem>
20443       <para>
20444        Allow <function>PQoidValue()</>, <function>PQcmdTuples()</>, and
20445        <function>PQoidStatus()</> to work on <command>EXECUTE</command>
20446        commands (Neil)
20447       </para>
20448      </listitem>
20449
20450      <listitem>
20451       <para>
20452        Add <function>PQserverVersion()</> to provide more convenient
20453        access to the server version number (Greg Sabino Mullane)
20454       </para>
20455      </listitem>
20456
20457      <listitem>
20458       <para>
20459        Add <function>PQprepare/PQsendPrepared()</> functions to support
20460        preparing statements without necessarily specifying the data types
20461        of their parameters (Abhijit Menon-Sen)
20462       </para>
20463      </listitem>
20464
20465      <listitem>
20466       <para>
20467        Many ECPG improvements, including <command>SET DESCRIPTOR</> (Michael)
20468       </para>
20469      </listitem>
20470
20471     </itemizedlist>
20472    </sect3>
20473
20474
20475    <sect3>
20476     <title>Source Code Changes</title>
20477     <itemizedlist>
20478
20479      <listitem>
20480       <para>
20481        Allow the database server to run natively on Windows (Claudio, Magnus, Andrew)
20482       </para>
20483      </listitem>
20484
20485      <listitem>
20486       <para>
20487        Shell script commands converted to C versions for Windows support (Andrew)
20488       </para>
20489      </listitem>
20490
20491      <listitem>
20492       <para>
20493        Create an extension makefile framework (Fabien Coelho, Peter)
20494       </para>
20495       <para>
20496        This simplifies the task of building extensions outside the original
20497        source tree.
20498       </para>
20499      </listitem>
20500
20501      <listitem>
20502       <para>
20503        Support relocatable installations (Bruce)
20504       </para>
20505       <para>
20506        Directory paths for installed files (such as the
20507        <filename>/share</> directory) are now computed relative to the
20508        actual location of the executables, so that an installation tree
20509        can be moved to another place without reconfiguring and
20510        rebuilding.
20511       </para>
20512      </listitem>
20513
20514      <listitem>
20515       <para>
20516        Use <option>--with-docdir</> to choose installation location of documentation; also
20517        allow <option>--infodir</> (Peter)
20518       </para>
20519      </listitem>
20520
20521      <listitem>
20522       <para>
20523        Add <option>--without-docdir</> to prevent installation of documentation (Peter)
20524       </para>
20525      </listitem>
20526
20527      <listitem>
20528       <para>
20529        Upgrade to <application>DocBook</> V4.2 SGML (Peter)
20530       </para>
20531      </listitem>
20532
20533      <listitem>
20534       <para>
20535        New <literal>PostgreSQL</> <application>CVS</> tag (Marc)
20536       </para>
20537       <para>
20538        This was done to make it easier for organizations to manage their
20539        own copies of the <productname>PostgreSQL</productname>
20540        <application>CVS</> repository. File version stamps from the master
20541        repository will not get munged by checking into or out of a copied
20542        repository.
20543       </para>
20544      </listitem>
20545
20546      <listitem>
20547       <para>
20548        Clarify locking code (Manfred Koizar)
20549       </para>
20550      </listitem>
20551
20552      <listitem>
20553       <para>
20554        Buffer manager cleanup (Neil)
20555       </para>
20556      </listitem>
20557
20558      <listitem>
20559       <para>
20560        Decouple platform tests from CPU spinlock code (Bruce, Tom)
20561       </para>
20562      </listitem>
20563
20564      <listitem>
20565       <para>
20566        Add inlined test-and-set code on PA-RISC for <application>gcc</>
20567        (ViSolve, Tom)
20568       </para>
20569      </listitem>
20570
20571      <listitem>
20572       <para>
20573        Improve i386 spinlock code (Manfred Spraul)
20574       </para>
20575      </listitem>
20576
20577      <listitem>
20578       <para>
20579        Clean up spinlock assembly code to avoid warnings from newer
20580        <application>gcc</> releases (Tom)
20581       </para>
20582      </listitem>
20583
20584      <listitem>
20585       <para>
20586        Remove JDBC from source tree; now a separate project
20587       </para>
20588      </listitem>
20589
20590      <listitem>
20591       <para>
20592        Remove the libpgtcl client interface; now a separate project
20593       </para>
20594      </listitem>
20595
20596      <listitem>
20597       <para>
20598        More accurately estimate memory and file descriptor usage (Tom)
20599       </para>
20600      </listitem>
20601
20602      <listitem>
20603       <para>
20604        Improvements to the Mac OS X startup scripts (Ray A.)
20605       </para>
20606      </listitem>
20607
20608      <listitem>
20609       <para>
20610        New <function>fsync()</> test program (Bruce)
20611       </para>
20612      </listitem>
20613
20614      <listitem>
20615       <para>
20616        Major documentation improvements (Neil, Peter)
20617       </para>
20618      </listitem>
20619
20620      <listitem>
20621       <para>
20622        Remove <application>pg_encoding</application>; not needed
20623        anymore
20624       </para>
20625      </listitem>
20626
20627      <listitem>
20628       <para>
20629        Remove <application>pg_id</application>; not needed anymore
20630       </para>
20631      </listitem>
20632
20633      <listitem>
20634       <para>
20635        Remove <application>initlocation</application>; not needed
20636        anymore
20637       </para>
20638      </listitem>
20639
20640      <listitem>
20641       <para>
20642        Auto-detect thread flags (no more manual testing) (Bruce)
20643       </para>
20644      </listitem>
20645
20646      <listitem>
20647       <para>
20648        Use Olson's public domain <application>timezone</> library (Magnus)
20649       </para>
20650      </listitem>
20651
20652      <listitem>
20653       <para>
20654        With threading enabled, use thread flags on Unixware for
20655        backend executables too (Bruce)
20656       </para>
20657       <para>
20658        Unixware cannot mix threaded and nonthreaded object files in the
20659        same executable, so everything must be compiled as threaded.
20660       </para>
20661      </listitem>
20662
20663      <listitem>
20664       <para>
20665        <application>psql</> now uses a <application>flex</>-generated
20666        lexical analyzer to process command strings
20667       </para>
20668      </listitem>
20669
20670      <listitem>
20671       <para>
20672        Reimplement the linked list data structure used throughout the
20673        backend (Neil)
20674       </para>
20675       <para>
20676        This improves performance by allowing list append and length
20677        operations to be more efficient.
20678       </para>
20679      </listitem>
20680
20681      <listitem>
20682       <para>
20683        Allow dynamically loaded modules to create their own server configuration
20684        parameters (Thomas Hallgren)
20685       </para>
20686      </listitem>
20687
20688      <listitem>
20689       <para>
20690        New Brazilian version of FAQ (Euler Taveira de Oliveira)
20691       </para>
20692      </listitem>
20693
20694      <listitem>
20695       <para>
20696        Add French FAQ (Guillaume Lelarge)
20697       </para>
20698      </listitem>
20699
20700      <listitem>
20701       <para>
20702        New <application>pgevent</> for Windows logging
20703       </para>
20704      </listitem>
20705
20706      <listitem>
20707       <para>
20708        Make libpq and ECPG build as proper shared libraries on OS X (Tom)
20709       </para>
20710      </listitem>
20711
20712     </itemizedlist>
20713    </sect3>
20714
20715
20716    <sect3>
20717     <title>Contrib Changes</title>
20718     <itemizedlist>
20719
20720      <listitem>
20721       <para>
20722        Overhaul of <filename>contrib/dblink</> (Joe)
20723       </para>
20724      </listitem>
20725
20726      <listitem>
20727       <para>
20728        <filename>contrib/dbmirror</> improvements (Steven Singer)
20729       </para>
20730      </listitem>
20731
20732      <listitem>
20733       <para>
20734        New <filename>contrib/xml2</> (John Gray, Torchbox)
20735       </para>
20736      </listitem>
20737
20738      <listitem>
20739       <para>
20740        Updated <filename>contrib/mysql</filename>
20741       </para>
20742      </listitem>
20743
20744      <listitem>
20745       <para>
20746        New version of <filename>contrib/btree_gist</> (Teodor)
20747       </para>
20748      </listitem>
20749
20750      <listitem>
20751       <para>
20752        New <filename>contrib/trgm</>, trigram matching for
20753        <productname>PostgreSQL</productname> (Teodor)
20754       </para>
20755      </listitem>
20756
20757      <listitem>
20758       <para>
20759        Many <filename>contrib/tsearch2</> improvements (Teodor)
20760       </para>
20761      </listitem>
20762
20763      <listitem>
20764       <para>
20765        Add double metaphone to <filename>contrib/fuzzystrmatch</> (Andrew)
20766       </para>
20767      </listitem>
20768
20769      <listitem>
20770       <para>
20771        Allow <filename>contrib/pg_autovacuum</> to run as a Windows service (Dave Page)
20772       </para>
20773      </listitem>
20774
20775      <listitem>
20776       <para>
20777        Add functions to <filename>contrib/dbsize</> (Andreas Pflug)
20778       </para>
20779      </listitem>
20780
20781      <listitem>
20782       <para>
20783        Removed <filename>contrib/pg_logger</>: obsoleted by integrated logging
20784        subprocess
20785       </para>
20786      </listitem>
20787
20788      <listitem>
20789       <para>
20790        Removed <filename>contrib/rserv</>: obsoleted by various separate projects
20791       </para>
20792      </listitem>
20793
20794     </itemizedlist>
20795    </sect3>
20796
20797   </sect2>
20798  </sect1>
20799
20800  <sect1 id="release-7-4-25">
20801   <title>Release 7.4.25</title>
20802
20803   <note>
20804   <title>Release date</title>
20805   <simpara>2009-03-16</simpara>
20806   </note>
20807
20808   <para>
20809    This release contains a variety of fixes from 7.4.24.
20810    For information about new features in the 7.4 major release, see
20811    <xref linkend="release-7-4">.
20812   </para>
20813
20814   <sect2>
20815    <title>Migration to Version 7.4.25</title>
20816
20817    <para>
20818     A dump/restore is not required for those running 7.4.X.
20819     However, if you are upgrading from a version earlier than 7.4.11,
20820     see the release notes for 7.4.11.
20821    </para>
20822
20823   </sect2>
20824
20825   <sect2>
20826    <title>Changes</title>
20827
20828    <itemizedlist>
20829
20830     <listitem>
20831      <para>
20832       Prevent error recursion crashes when encoding conversion fails (Tom)
20833      </para>
20834
20835      <para>
20836       This change extends fixes made in the last two minor releases for
20837       related failure scenarios.  The previous fixes were narrowly tailored
20838       for the original problem reports, but we have now recognized that
20839       <emphasis>any</> error thrown by an encoding conversion function could
20840       potentially lead to infinite recursion while trying to report the
20841       error.  The solution therefore is to disable translation and encoding
20842       conversion and report the plain-ASCII form of any error message,
20843       if we find we have gotten into a recursive error reporting situation.
20844       (CVE-2009-0922)
20845      </para>
20846     </listitem>
20847
20848     <listitem>
20849      <para>
20850       Disallow <command>CREATE CONVERSION</> with the wrong encodings
20851       for the specified conversion function (Heikki)
20852      </para>
20853
20854      <para>
20855       This prevents one possible scenario for encoding conversion failure.
20856       The previous change is a backstop to guard against other kinds of
20857       failures in the same area.
20858      </para>
20859     </listitem>
20860
20861     <listitem>
20862      <para>
20863       Fix core dump when <function>to_char()</> is given format codes that
20864       are inappropriate for the type of the data argument (Tom)
20865      </para>
20866     </listitem>
20867
20868     <listitem>
20869      <para>
20870       Add <literal>MUST</> (Mauritius Island Summer Time) to the default list
20871       of known timezone abbreviations (Xavier Bugaud)
20872      </para>
20873     </listitem>
20874
20875    </itemizedlist>
20876
20877   </sect2>
20878  </sect1>
20879
20880  <sect1 id="release-7-4-24">
20881   <title>Release 7.4.24</title>
20882
20883   <note>
20884   <title>Release date</title>
20885   <simpara>2009-02-02</simpara>
20886   </note>
20887
20888   <para>
20889    This release contains a variety of fixes from 7.4.23.
20890    For information about new features in the 7.4 major release, see
20891    <xref linkend="release-7-4">.
20892   </para>
20893
20894   <sect2>
20895    <title>Migration to Version 7.4.24</title>
20896
20897    <para>
20898     A dump/restore is not required for those running 7.4.X.
20899     However, if you are upgrading from a version earlier than 7.4.11,
20900     see the release notes for 7.4.11.
20901    </para>
20902
20903   </sect2>
20904
20905   <sect2>
20906    <title>Changes</title>
20907
20908    <itemizedlist>
20909
20910     <listitem>
20911      <para>
20912       Improve handling of URLs in <function>headline()</> function (Teodor)
20913      </para>
20914     </listitem>
20915
20916     <listitem>
20917      <para>
20918       Improve handling of overlength headlines in <function>headline()</>
20919       function (Teodor)
20920      </para>
20921     </listitem>
20922
20923     <listitem>
20924      <para>
20925       Prevent possible Assert failure or misconversion if an encoding
20926       conversion is created with the wrong conversion function for the
20927       specified pair of encodings (Tom, Heikki)
20928      </para>
20929     </listitem>
20930
20931     <listitem>
20932      <para>
20933       Avoid unnecessary locking of small tables in <command>VACUUM</>
20934       (Heikki)
20935      </para>
20936     </listitem>
20937
20938     <listitem>
20939      <para>
20940       Fix uninitialized variables in <filename>contrib/tsearch2</>'s
20941       <function>get_covers()</> function (Teodor)
20942      </para>
20943     </listitem>
20944
20945     <listitem>
20946      <para>
20947       Fix bug in <function>to_char()</>'s handling of <literal>TH</>
20948       format codes (Andreas Scherbaum)
20949      </para>
20950     </listitem>
20951
20952     <listitem>
20953      <para>
20954       Make all documentation reference <literal>pgsql-bugs</> and/or
20955       <literal>pgsql-hackers</> as appropriate, instead of the
20956       now-decommissioned <literal>pgsql-ports</> and <literal>pgsql-patches</>
20957       mailing lists (Tom)
20958      </para>
20959     </listitem>
20960
20961    </itemizedlist>
20962
20963   </sect2>
20964  </sect1>
20965
20966  <sect1 id="release-7-4-23">
20967   <title>Release 7.4.23</title>
20968
20969   <note>
20970   <title>Release date</title>
20971   <simpara>2008-11-03</simpara>
20972   </note>
20973
20974   <para>
20975    This release contains a variety of fixes from 7.4.22.
20976    For information about new features in the 7.4 major release, see
20977    <xref linkend="release-7-4">.
20978   </para>
20979
20980   <sect2>
20981    <title>Migration to Version 7.4.23</title>
20982
20983    <para>
20984     A dump/restore is not required for those running 7.4.X.
20985     However, if you are upgrading from a version earlier than 7.4.11,
20986     see the release notes for 7.4.11.
20987    </para>
20988
20989   </sect2>
20990
20991   <sect2>
20992    <title>Changes</title>
20993
20994    <itemizedlist>
20995
20996     <listitem>
20997      <para>
20998       Fix backend crash when the client encoding cannot represent a localized
20999       error message (Tom)
21000      </para>
21001
21002      <para>
21003       We have addressed similar issues before, but it would still fail if
21004       the <quote>character has no equivalent</> message itself couldn't
21005       be converted.  The fix is to disable localization and send the plain
21006       ASCII error message when we detect such a situation.
21007      </para>
21008     </listitem>
21009
21010     <listitem>
21011      <para>
21012       Fix incorrect tsearch2 headline generation when single query
21013       item matches first word of text (Sushant Sinha)
21014      </para>
21015     </listitem>
21016
21017     <listitem>
21018      <para>
21019       Fix improper display of fractional seconds in interval values when
21020       using a non-ISO datestyle in an <option>--enable-integer-datetimes</>
21021       build (Ron Mayer)
21022      </para>
21023     </listitem>
21024
21025     <listitem>
21026      <para>
21027       Ensure <function>SPI_getvalue</> and <function>SPI_getbinval</>
21028       behave correctly when the passed tuple and tuple descriptor have
21029       different numbers of columns (Tom)
21030      </para>
21031
21032      <para>
21033       This situation is normal when a table has had columns added or removed,
21034       but these two functions didn't handle it properly.
21035       The only likely consequence is an incorrect error indication.
21036      </para>
21037     </listitem>
21038
21039     <listitem>
21040      <para>
21041       Fix <application>ecpg</>'s parsing of <command>CREATE USER</> (Michael)
21042      </para>
21043     </listitem>
21044
21045    </itemizedlist>
21046
21047   </sect2>
21048  </sect1>
21049
21050  <sect1 id="release-7-4-22">
21051   <title>Release 7.4.22</title>
21052
21053   <note>
21054   <title>Release date</title>
21055   <simpara>2008-09-22</simpara>
21056   </note>
21057
21058   <para>
21059    This release contains a variety of fixes from 7.4.21.
21060    For information about new features in the 7.4 major release, see
21061    <xref linkend="release-7-4">.
21062   </para>
21063
21064   <sect2>
21065    <title>Migration to Version 7.4.22</title>
21066
21067    <para>
21068     A dump/restore is not required for those running 7.4.X.
21069     However, if you are upgrading from a version earlier than 7.4.11,
21070     see the release notes for 7.4.11.
21071    </para>
21072
21073   </sect2>
21074
21075   <sect2>
21076    <title>Changes</title>
21077
21078    <itemizedlist>
21079
21080     <listitem>
21081      <para>
21082       Fix datetime input functions to correctly detect integer overflow when
21083       running on a 64-bit platform (Tom)
21084      </para>
21085     </listitem>
21086
21087     <listitem>
21088      <para>
21089       Improve performance of writing very long log messages to syslog (Tom)
21090      </para>
21091     </listitem>
21092
21093     <listitem>
21094      <para>
21095       Fix bug in backwards scanning of a cursor on a <literal>SELECT DISTINCT
21096       ON</> query (Tom)
21097      </para>
21098     </listitem>
21099
21100     <listitem>
21101      <para>
21102       Fix planner to estimate that <literal>GROUP BY</> expressions yielding
21103       boolean results always result in two groups, regardless of the
21104       expressions' contents (Tom)
21105      </para>
21106
21107      <para>
21108       This is very substantially more accurate than the regular <literal>GROUP
21109       BY</> estimate for certain boolean tests like <replaceable>col</>
21110       <literal>IS NULL</>.
21111      </para>
21112     </listitem>
21113
21114     <listitem>
21115      <para>
21116       Improve <application>pg_dump</> and <application>pg_restore</>'s
21117       error reporting after failure to send a SQL command (Tom)
21118      </para>
21119     </listitem>
21120
21121    </itemizedlist>
21122
21123   </sect2>
21124  </sect1>
21125
21126  <sect1 id="release-7-4-21">
21127   <title>Release 7.4.21</title>
21128
21129   <note>
21130   <title>Release date</title>
21131   <simpara>2008-06-12</simpara>
21132   </note>
21133
21134   <para>
21135    This release contains one serious bug fix over 7.4.20.
21136    For information about new features in the 7.4 major release, see
21137    <xref linkend="release-7-4">.
21138   </para>
21139
21140   <sect2>
21141    <title>Migration to Version 7.4.21</title>
21142
21143    <para>
21144     A dump/restore is not required for those running 7.4.X.
21145     However, if you are upgrading from a version earlier than 7.4.11,
21146     see the release notes for 7.4.11.
21147    </para>
21148
21149   </sect2>
21150
21151   <sect2>
21152    <title>Changes</title>
21153
21154    <itemizedlist>
21155
21156     <listitem>
21157      <para>
21158       Make <function>pg_get_ruledef()</> parenthesize negative constants (Tom)
21159      </para>
21160
21161      <para>
21162       Before this fix, a negative constant in a view or rule might be dumped
21163       as, say, <literal>-42::integer</>, which is subtly incorrect: it should
21164       be <literal>(-42)::integer</> due to operator precedence rules.
21165       Usually this would make little difference, but it could interact with
21166       another recent patch to cause
21167       <productname>PostgreSQL</> to reject what had been a valid
21168       <command>SELECT DISTINCT</> view query.  Since this could result in
21169       <application>pg_dump</> output failing to reload, it is being treated
21170       as a high-priority fix.  The only released versions in which dump
21171       output is actually incorrect are 8.3.1 and 8.2.7.
21172      </para>
21173     </listitem>
21174
21175    </itemizedlist>
21176
21177   </sect2>
21178  </sect1>
21179
21180  <sect1 id="release-7-4-20">
21181   <title>Release 7.4.20</title>
21182
21183   <note>
21184   <title>Release date</title>
21185   <simpara>never released</simpara>
21186   </note>
21187
21188   <para>
21189    This release contains a variety of fixes from 7.4.19.
21190    For information about new features in the 7.4 major release, see
21191    <xref linkend="release-7-4">.
21192   </para>
21193
21194   <sect2>
21195    <title>Migration to Version 7.4.20</title>
21196
21197    <para>
21198     A dump/restore is not required for those running 7.4.X.
21199     However, if you are upgrading from a version earlier than 7.4.11,
21200     see the release notes for 7.4.11.
21201    </para>
21202
21203   </sect2>
21204
21205   <sect2>
21206    <title>Changes</title>
21207
21208    <itemizedlist>
21209
21210     <listitem>
21211      <para>
21212       Fix conversions between ISO-8859-5 and other encodings to handle
21213       Cyrillic <quote>Yo</> characters (<literal>e</> and <literal>E</> with
21214       two dots) (Sergey Burladyan)
21215      </para>
21216     </listitem>
21217
21218     <listitem>
21219      <para>
21220       Fix a few datatype input functions
21221       that were allowing unused bytes in their results to contain
21222       uninitialized, unpredictable values (Tom)
21223      </para>
21224
21225      <para>
21226       This could lead to failures in which two apparently identical literal
21227       values were not seen as equal, resulting in the parser complaining
21228       about unmatched <literal>ORDER BY</> and <literal>DISTINCT</>
21229       expressions.
21230      </para>
21231     </listitem>
21232
21233     <listitem>
21234      <para>
21235       Fix a corner case in regular-expression substring matching
21236       (<literal>substring(<replaceable>string</> from
21237       <replaceable>pattern</>)</literal>) (Tom)
21238      </para>
21239
21240      <para>
21241       The problem occurs when there is a match to the pattern overall but
21242       the user has specified a parenthesized subexpression and that
21243       subexpression hasn't got a match.  An example is
21244       <literal>substring('foo' from 'foo(bar)?')</>.
21245       This should return NULL, since <literal>(bar)</> isn't matched, but
21246       it was mistakenly returning the whole-pattern match instead (ie,
21247       <literal>foo</>).
21248      </para>
21249     </listitem>
21250
21251     <listitem>
21252      <para>
21253       Fix incorrect result from <application>ecpg</>'s
21254       <function>PGTYPEStimestamp_sub()</> function (Michael)
21255      </para>
21256     </listitem>
21257
21258     <listitem>
21259      <para>
21260       Fix <literal>DatumGetBool</> macro to not fail with <application>gcc</>
21261       4.3 (Tom)
21262      </para>
21263
21264      <para>
21265       This problem affects <quote>old style</> (V0) C functions that
21266       return boolean.  The fix is already in 8.3, but the need to
21267       back-patch it was not realized at the time.
21268      </para>
21269     </listitem>
21270
21271     <listitem>
21272      <para>
21273       Fix longstanding <command>LISTEN</>/<command>NOTIFY</>
21274       race condition (Tom)
21275      </para>
21276
21277      <para>
21278       In rare cases a session that had just executed a
21279       <command>LISTEN</> might not get a notification, even though
21280       one would be expected because the concurrent transaction executing
21281       <command>NOTIFY</> was observed to commit later.
21282      </para>
21283
21284      <para>
21285       A side effect of the fix is that a transaction that has executed
21286       a not-yet-committed <command>LISTEN</> command will not see any
21287       row in <structname>pg_listener</> for the <command>LISTEN</>,
21288       should it choose to look; formerly it would have.  This behavior
21289       was never documented one way or the other, but it is possible that
21290       some applications depend on the old behavior.
21291      </para>
21292     </listitem>
21293
21294     <listitem>
21295      <para>
21296       Fix display of constant expressions in <literal>ORDER BY</>
21297       and <literal>GROUP BY</> (Tom)
21298      </para>
21299
21300      <para>
21301       An explictly casted constant would be shown incorrectly.  This could
21302       for example lead to corruption of a view definition during
21303       dump and reload.
21304      </para>
21305     </listitem>
21306
21307     <listitem>
21308      <para>
21309       Fix <application>libpq</> to handle NOTICE messages correctly
21310       during COPY OUT (Tom)
21311      </para>
21312
21313      <para>
21314       This failure has only been observed to occur when a user-defined
21315       datatype's output routine issues a NOTICE, but there is no
21316       guarantee it couldn't happen due to other causes.
21317      </para>
21318     </listitem>
21319
21320    </itemizedlist>
21321
21322   </sect2>
21323  </sect1>
21324
21325  <sect1 id="release-7-4-19">
21326   <title>Release 7.4.19</title>
21327
21328   <note>
21329   <title>Release date</title>
21330   <simpara>2008-01-07</simpara>
21331   </note>
21332
21333   <para>
21334    This release contains a variety of fixes from 7.4.18,
21335    including fixes for significant security issues.
21336    For information about new features in the 7.4 major release, see
21337    <xref linkend="release-7-4">.
21338   </para>
21339
21340   <sect2>
21341    <title>Migration to Version 7.4.19</title>
21342
21343    <para>
21344     A dump/restore is not required for those running 7.4.X.  However,
21345     if you are upgrading from a version earlier than 7.4.11, see the release
21346     notes for 7.4.11.
21347    </para>
21348
21349   </sect2>
21350
21351   <sect2>
21352    <title>Changes</title>
21353
21354    <itemizedlist>
21355
21356     <listitem>
21357      <para>
21358       Prevent functions in indexes from executing with the privileges of
21359       the user running <command>VACUUM</>, <command>ANALYZE</>, etc (Tom)
21360      </para>
21361
21362      <para>
21363       Functions used in index expressions and partial-index
21364       predicates are evaluated whenever a new table entry is made.  It has
21365       long been understood that this poses a risk of trojan-horse code
21366       execution if one modifies a table owned by an untrustworthy user.
21367       (Note that triggers, defaults, check constraints, etc. pose the
21368       same type of risk.)  But functions in indexes pose extra danger
21369       because they will be executed by routine maintenance operations
21370       such as <command>VACUUM FULL</>, which are commonly performed
21371       automatically under a superuser account.  For example, a nefarious user
21372       can execute code with superuser privileges by setting up a
21373       trojan-horse index definition and waiting for the next routine vacuum.
21374       The fix arranges for standard maintenance operations
21375       (including <command>VACUUM</>, <command>ANALYZE</>, <command>REINDEX</>,
21376       and <command>CLUSTER</>) to execute as the table owner rather than
21377       the calling user, using the same privilege-switching mechanism already
21378       used for <literal>SECURITY DEFINER</> functions.  To prevent bypassing
21379       this security measure, execution of <command>SET SESSION
21380       AUTHORIZATION</> and <command>SET ROLE</> is now forbidden within a
21381       <literal>SECURITY DEFINER</> context.  (CVE-2007-6600)
21382      </para>
21383     </listitem>
21384
21385     <listitem>
21386      <para>
21387       Repair assorted bugs in the regular-expression package (Tom, Will Drewry)
21388      </para>
21389
21390      <para>
21391       Suitably crafted regular-expression patterns could cause crashes,
21392       infinite or near-infinite looping, and/or massive memory consumption,
21393       all of which pose denial-of-service hazards for applications that
21394       accept regex search patterns from untrustworthy sources.
21395       (CVE-2007-4769, CVE-2007-4772, CVE-2007-6067)
21396      </para>
21397     </listitem>
21398
21399     <listitem>
21400      <para>
21401       Require non-superusers who use <filename>/contrib/dblink</> to use only
21402       password authentication, as a security measure (Joe)
21403      </para>
21404
21405      <para>
21406       The fix that appeared for this in 7.4.18 was incomplete, as it plugged
21407       the hole for only some <filename>dblink</> functions.  (CVE-2007-6601,
21408       CVE-2007-3278)
21409      </para>
21410     </listitem>
21411
21412     <listitem>
21413      <para>
21414       Fix planner failure in some cases of <literal>WHERE false AND var IN
21415       (SELECT ...)</> (Tom)
21416      </para>
21417     </listitem>
21418
21419     <listitem>
21420      <para>
21421       Fix potential crash in <function>translate()</> when using a multibyte
21422       database encoding (Tom)
21423      </para>
21424     </listitem>
21425
21426     <listitem>
21427      <para>
21428       Fix PL/Python to not crash on long exception messages (Alvaro)
21429      </para>
21430     </listitem>
21431
21432     <listitem>
21433      <para>
21434       <application>ecpg</> parser fixes (Michael)
21435      </para>
21436     </listitem>
21437
21438     <listitem>
21439      <para>
21440       Make <filename>contrib/tablefunc</>'s <function>crosstab()</> handle
21441       NULL rowid as a category in its own right, rather than crashing (Joe)
21442      </para>
21443     </listitem>
21444
21445     <listitem>
21446      <para>
21447       Fix <type>tsvector</> and <type>tsquery</> output routines to
21448       escape backslashes correctly (Teodor, Bruce)
21449      </para>
21450     </listitem>
21451
21452     <listitem>
21453      <para>
21454       Fix crash of <function>to_tsvector()</> on huge input strings (Teodor)
21455      </para>
21456     </listitem>
21457
21458     <listitem>
21459      <para>
21460       Require a specific version of <productname>Autoconf</> to be used
21461       when re-generating the <command>configure</> script (Peter)
21462      </para>
21463
21464      <para>
21465       This affects developers and packagers only.  The change was made
21466       to prevent accidental use of untested combinations of
21467       <productname>Autoconf</> and <productname>PostgreSQL</> versions.
21468       You can remove the version check if you really want to use a
21469       different <productname>Autoconf</> version, but it's
21470       your responsibility whether the result works or not.
21471      </para>
21472     </listitem>
21473
21474    </itemizedlist>
21475
21476   </sect2>
21477  </sect1>
21478
21479  <sect1 id="release-7-4-18">
21480   <title>Release 7.4.18</title>
21481
21482   <note>
21483   <title>Release date</title>
21484   <simpara>2007-09-17</simpara>
21485   </note>
21486
21487   <para>
21488    This release contains fixes from 7.4.17.
21489    For information about new features in the 7.4 major release, see
21490    <xref linkend="release-7-4">.
21491   </para>
21492
21493   <sect2>
21494    <title>Migration to Version 7.4.18</title>
21495
21496    <para>
21497     A dump/restore is not required for those running 7.4.X.  However,
21498     if you are upgrading from a version earlier than 7.4.11, see the release
21499     notes for 7.4.11.
21500    </para>
21501
21502   </sect2>
21503
21504   <sect2>
21505    <title>Changes</title>
21506
21507    <itemizedlist>
21508
21509     <listitem>
21510      <para>
21511       Prevent index corruption when a transaction inserts rows and
21512       then aborts close to the end of a concurrent <command>VACUUM</>
21513       on the same table (Tom)
21514      </para>
21515     </listitem>
21516
21517     <listitem>
21518      <para>
21519       Make <command>CREATE DOMAIN ... DEFAULT NULL</> work properly (Tom)
21520      </para>
21521     </listitem>
21522
21523     <listitem>
21524      <para>
21525       Fix excessive logging of <acronym>SSL</> error messages (Tom)
21526      </para>
21527     </listitem>
21528
21529     <listitem>
21530      <para>
21531       Fix crash when <varname>log_min_error_statement</> logging runs out
21532       of memory (Tom)
21533      </para>
21534     </listitem>
21535
21536     <listitem>
21537      <para>
21538       Prevent <command>CLUSTER</> from failing
21539       due to attempting to process temporary tables of other sessions (Alvaro)
21540      </para>
21541     </listitem>
21542
21543     <listitem>
21544      <para>
21545       Require non-superusers who use <filename>/contrib/dblink</> to use only
21546       password authentication, as a security measure (Joe)
21547      </para>
21548     </listitem>
21549
21550    </itemizedlist>
21551
21552   </sect2>
21553  </sect1>
21554
21555  <sect1 id="release-7-4-17">
21556   <title>Release 7.4.17</title>
21557
21558   <note>
21559   <title>Release date</title>
21560   <simpara>2007-04-23</simpara>
21561   </note>
21562
21563   <para>
21564    This release contains fixes from 7.4.16,
21565    including a security fix.
21566    For information about new features in the 7.4 major release, see
21567    <xref linkend="release-7-4">.
21568   </para>
21569
21570   <sect2>
21571    <title>Migration to Version 7.4.17</title>
21572
21573    <para>
21574     A dump/restore is not required for those running 7.4.X.  However,
21575     if you are upgrading from a version earlier than 7.4.11, see the release
21576     notes for 7.4.11.
21577    </para>
21578
21579   </sect2>
21580
21581   <sect2>
21582    <title>Changes</title>
21583
21584    <itemizedlist>
21585
21586     <listitem>
21587     <para>
21588      Support explicit placement of the temporary-table schema within
21589      <varname>search_path</>, and disable searching it for functions
21590      and operators (Tom)
21591     </para>
21592     <para>
21593      This is needed to allow a security-definer function to set a
21594      truly secure value of <varname>search_path</>.  Without it,
21595      an unprivileged SQL user can use temporary objects to execute code
21596      with the privileges of the security-definer function (CVE-2007-2138).
21597      See <command>CREATE FUNCTION</> for more information.
21598     </para>
21599     </listitem>
21600
21601     <listitem>
21602     <para>
21603      <filename>/contrib/tsearch2</> crash fixes (Teodor)
21604     </para>
21605     </listitem>
21606
21607     <listitem>
21608     <para>
21609      Fix potential-data-corruption bug in how <command>VACUUM FULL</> handles
21610      <command>UPDATE</> chains (Tom, Pavan Deolasee)
21611     </para>
21612     </listitem>
21613
21614     <listitem>
21615     <para>
21616      Fix PANIC during enlargement of a hash index (bug introduced in 7.4.15)
21617      (Tom)
21618     </para>
21619     </listitem>
21620
21621    </itemizedlist>
21622
21623   </sect2>
21624  </sect1>
21625
21626  <sect1 id="release-7-4-16">
21627   <title>Release 7.4.16</title>
21628
21629   <note>
21630   <title>Release date</title>
21631   <simpara>2007-02-05</simpara>
21632   </note>
21633
21634   <para>
21635    This release contains a variety of fixes from 7.4.15, including
21636    a security fix.
21637    For information about new features in the 7.4 major release, see
21638    <xref linkend="release-7-4">.
21639   </para>
21640
21641   <sect2>
21642    <title>Migration to Version 7.4.16</title>
21643
21644    <para>
21645     A dump/restore is not required for those running 7.4.X.  However,
21646     if you are upgrading from a version earlier than 7.4.11, see the release
21647     notes for 7.4.11.
21648    </para>
21649
21650   </sect2>
21651
21652   <sect2>
21653    <title>Changes</title>
21654
21655    <itemizedlist>
21656
21657     <listitem>
21658     <para>
21659      Remove security vulnerability that allowed connected users
21660      to read backend memory (Tom)
21661     </para>
21662     <para>
21663      The vulnerability involves suppressing the normal check that a SQL
21664      function returns the data type it's declared to, or changing the
21665      data type of a table column used in a SQL function (CVE-2007-0555).
21666      This error can easily be exploited to cause a backend crash, and in
21667      principle might be used to read database content that the user
21668      should not be able to access.
21669     </para>
21670     </listitem>
21671
21672     <listitem>
21673     <para>
21674      Fix rare bug wherein btree index page splits could fail
21675      due to choosing an infeasible split point (Heikki Linnakangas)
21676     </para>
21677     </listitem>
21678
21679     <listitem>
21680     <para>
21681      Fix for rare Assert() crash triggered by <literal>UNION</> (Tom)
21682     </para>
21683     </listitem>
21684
21685     <listitem>
21686     <para>
21687      Tighten security of multi-byte character processing for UTF8 sequences
21688      over three bytes long (Tom)
21689     </para>
21690     </listitem>
21691
21692    </itemizedlist>
21693
21694   </sect2>
21695  </sect1>
21696
21697  <sect1 id="release-7-4-15">
21698   <title>Release 7.4.15</title>
21699
21700   <note>
21701   <title>Release date</title>
21702   <simpara>2007-01-08</simpara>
21703   </note>
21704
21705   <para>
21706    This release contains a variety of fixes from 7.4.14.
21707    For information about new features in the 7.4 major release, see
21708    <xref linkend="release-7-4">.
21709   </para>
21710
21711   <sect2>
21712    <title>Migration to Version 7.4.15</title>
21713
21714    <para>
21715     A dump/restore is not required for those running 7.4.X.  However,
21716     if you are upgrading from a version earlier than 7.4.11, see the release
21717     notes for 7.4.11.
21718    </para>
21719
21720   </sect2>
21721
21722   <sect2>
21723    <title>Changes</title>
21724
21725    <itemizedlist>
21726
21727     <listitem>
21728      <para>
21729       Improve handling of <function>getaddrinfo()</> on AIX (Tom)
21730      </para>
21731
21732      <para>
21733       This fixes a problem with starting the statistics collector,
21734       among other things.
21735      </para>
21736     </listitem>
21737
21738      <listitem>
21739       <para>
21740        Fix <quote>failed to re-find parent key</> errors in
21741        <command>VACUUM</> (Tom)
21742       </para>
21743      </listitem>
21744
21745      <listitem>
21746       <para>
21747        Fix bugs affecting multi-gigabyte hash indexes (Tom)
21748       </para>
21749      </listitem>
21750
21751     <listitem>
21752      <para>
21753       Fix error when constructing an <literal>ARRAY[]</> made up of multiple
21754       empty elements (Tom)
21755      </para>
21756     </listitem>
21757
21758     <listitem>
21759      <para>
21760       <function>to_number()</> and <function>to_char(numeric)</>
21761       are now <literal>STABLE</>, not <literal>IMMUTABLE</>, for
21762       new <application>initdb</> installs (Tom)
21763      </para>
21764
21765      <para>
21766       This is because <varname>lc_numeric</> can potentially
21767       change the output of these functions.
21768      </para>
21769     </listitem>
21770
21771     <listitem>
21772      <para>
21773       Improve index usage of regular expressions that use parentheses (Tom)
21774      </para>
21775
21776      <para>
21777       This improves <application>psql</> <literal>\d</> performance also.
21778      </para>
21779     </listitem>
21780
21781    </itemizedlist>
21782
21783   </sect2>
21784  </sect1>
21785
21786  <sect1 id="release-7-4-14">
21787   <title>Release 7.4.14</title>
21788
21789   <note>
21790   <title>Release date</title>
21791   <simpara>2006-10-16</simpara>
21792   </note>
21793
21794   <para>
21795    This release contains a variety of fixes from 7.4.13.
21796    For information about new features in the 7.4 major release, see
21797    <xref linkend="release-7-4">.
21798   </para>
21799
21800   <sect2>
21801    <title>Migration to Version 7.4.14</title>
21802
21803    <para>
21804     A dump/restore is not required for those running 7.4.X.  However,
21805     if you are upgrading from a version earlier than 7.4.11, see the release
21806     notes for 7.4.11.
21807    </para>
21808
21809   </sect2>
21810
21811   <sect2>
21812    <title>Changes</title>
21813
21814 <itemizedlist>
21815 <listitem><para>Fix core dump when an untyped literal is taken as
21816 ANYARRAY</para></listitem>
21817 <listitem><para>Fix <function>string_to_array()</> to handle overlapping
21818  matches for the separator string</para>
21819 <para>For example, <literal>string_to_array('123xx456xxx789', 'xx')</>.
21820 </para></listitem>
21821 <listitem><para>Fix corner cases in pattern matching for
21822  <application>psql</>'s <literal>\d</> commands</para></listitem>
21823 <listitem><para>Fix index-corrupting bugs in /contrib/ltree
21824  (Teodor)</para></listitem>
21825 <listitem><para>Fix backslash escaping in /contrib/dbmirror</para></listitem>
21826 <listitem><para>Adjust regression tests for recent changes in US DST laws
21827 </para> </listitem>
21828 </itemizedlist>
21829
21830   </sect2>
21831  </sect1>
21832
21833  <sect1 id="release-7-4-13">
21834   <title>Release 7.4.13</title>
21835
21836   <note>
21837   <title>Release date</title>
21838   <simpara>2006-05-23</simpara>
21839   </note>
21840
21841   <para>
21842    This release contains a variety of fixes from 7.4.12,
21843    including patches for extremely serious security issues.
21844    For information about new features in the 7.4 major release, see
21845    <xref linkend="release-7-4">.
21846   </para>
21847
21848   <sect2>
21849    <title>Migration to Version 7.4.13</title>
21850
21851    <para>
21852     A dump/restore is not required for those running 7.4.X.  However,
21853     if you are upgrading from a version earlier than 7.4.11, see the release
21854     notes for 7.4.11.
21855    </para>
21856
21857    <para>
21858     Full security against the SQL-injection attacks described in
21859     CVE-2006-2313 and CVE-2006-2314 might require changes in application
21860     code.  If you have applications that embed untrustworthy strings
21861     into SQL commands, you should examine them as soon as possible to
21862     ensure that they are using recommended escaping techniques.  In
21863     most cases, applications should be using subroutines provided by
21864     libraries or drivers (such as <application>libpq</>'s
21865     <function>PQescapeStringConn()</>) to perform string escaping,
21866     rather than relying on <foreignphrase>ad hoc</> code to do it.
21867    </para>
21868   </sect2>
21869
21870   <sect2>
21871    <title>Changes</title>
21872
21873 <itemizedlist>
21874 <listitem><para>Change the server to reject invalidly-encoded multibyte
21875 characters in all cases (Tatsuo, Tom)</para>
21876 <para>While <productname>PostgreSQL</> has been moving in this direction for
21877 some time, the checks are now applied uniformly to all encodings and all
21878 textual input, and are now always errors not merely warnings.  This change
21879 defends against SQL-injection attacks of the type described in CVE-2006-2313.
21880 </para></listitem>
21881
21882 <listitem><para>Reject unsafe uses of <literal>\'</> in string literals</para>
21883 <para>As a server-side defense against SQL-injection attacks of the type
21884 described in CVE-2006-2314, the server now only accepts <literal>''</> and not
21885 <literal>\'</> as a representation of ASCII single quote in SQL string
21886 literals.  By default, <literal>\'</> is rejected only when
21887 <varname>client_encoding</> is set to a client-only encoding (SJIS, BIG5, GBK,
21888 GB18030, or UHC), which is the scenario in which SQL injection is possible.
21889 A new configuration parameter <varname>backslash_quote</> is available to
21890 adjust this behavior when needed.  Note that full security against
21891 CVE-2006-2314 might require client-side changes; the purpose of
21892 <varname>backslash_quote</> is in part to make it obvious that insecure
21893 clients are insecure.
21894 </para></listitem>
21895
21896 <listitem><para>Modify <application>libpq</>'s string-escaping routines to be
21897 aware of encoding considerations and
21898 <varname>standard_conforming_strings</></para>
21899 <para>This fixes <application>libpq</>-using applications for the security
21900 issues described in CVE-2006-2313 and CVE-2006-2314, and also future-proofs
21901 them against the planned changeover to SQL-standard string literal syntax.
21902 Applications that use multiple <productname>PostgreSQL</> connections
21903 concurrently should migrate to <function>PQescapeStringConn()</> and
21904 <function>PQescapeByteaConn()</> to ensure that escaping is done correctly
21905 for the settings in use in each database connection.  Applications that
21906 do string escaping <quote>by hand</> should be modified to rely on library
21907 routines instead.
21908 </para></listitem>
21909
21910 <listitem><para>Fix some incorrect encoding conversion functions</para>
21911 <para><function>win1251_to_iso</>, <function>alt_to_iso</>,
21912 <function>euc_tw_to_big5</>, <function>euc_tw_to_mic</>,
21913 <function>mic_to_euc_tw</> were all broken to varying
21914 extents.
21915 </para></listitem>
21916
21917 <listitem><para>Clean up stray remaining uses of <literal>\'</> in strings
21918 (Bruce, Jan)</para></listitem>
21919
21920 <listitem><para>Fix bug that sometimes caused OR'd index scans to
21921 miss rows they should have returned</para></listitem>
21922
21923 <listitem><para>Fix WAL replay for case where a btree index has been
21924 truncated</para></listitem>
21925
21926 <listitem><para>Fix <literal>SIMILAR TO</> for patterns involving
21927 <literal>|</> (Tom)</para></listitem>
21928
21929 <listitem><para>Fix server to use custom DH SSL parameters correctly (Michael
21930 Fuhr)</para></listitem>
21931
21932 <listitem><para>Fix for Bonjour on Intel Macs (Ashley Clark)</para></listitem>
21933
21934 <listitem><para>Fix various minor memory leaks</para></listitem>
21935 </itemizedlist>
21936
21937   </sect2>
21938  </sect1>
21939
21940  <sect1 id="release-7-4-12">
21941   <title>Release 7.4.12</title>
21942
21943   <note>
21944   <title>Release date</title>
21945   <simpara>2006-02-14</simpara>
21946   </note>
21947
21948   <para>
21949    This release contains a variety of fixes from 7.4.11.
21950    For information about new features in the 7.4 major release, see
21951    <xref linkend="release-7-4">.
21952   </para>
21953
21954   <sect2>
21955    <title>Migration to Version 7.4.12</title>
21956
21957    <para>
21958     A dump/restore is not required for those running 7.4.X.  However,
21959     if you are upgrading from a version earlier than 7.4.11, see the release
21960     notes for 7.4.11.
21961    </para>
21962   </sect2>
21963
21964   <sect2>
21965    <title>Changes</title>
21966
21967 <itemizedlist>
21968
21969 <listitem><para>Fix potential crash in <command>SET
21970 SESSION AUTHORIZATION</> (CVE-2006-0553)</para>
21971 <para>An unprivileged user could crash the server process, resulting in
21972 momentary denial of service to other users, if the server has been compiled
21973 with Asserts enabled (which is not the default).
21974 Thanks to Akio Ishida for reporting this problem.
21975 </para></listitem>
21976
21977 <listitem><para>Fix bug with row visibility logic in self-inserted
21978 rows (Tom)</para>
21979 <para>Under rare circumstances a row inserted by the current command
21980 could be seen as already valid, when it should not be.  Repairs bug
21981 created in 7.4.9 and 7.3.11 releases.
21982 </para></listitem>
21983
21984 <listitem><para>Fix race condition that could lead to <quote>file already
21985 exists</> errors during pg_clog file creation
21986 (Tom)</para></listitem>
21987
21988 <listitem><para>Properly check <literal>DOMAIN</> constraints for
21989 <literal>UNKNOWN</> parameters in prepared statements
21990 (Neil)</para></listitem>
21991
21992 <listitem><para>Fix to allow restoring dumps that have cross-schema
21993 references to custom operators (Tom)</para></listitem>
21994
21995 <listitem><para>Portability fix for testing presence of <function>finite</>
21996 and <function>isinf</> during configure (Tom)</para></listitem>
21997
21998 </itemizedlist>
21999
22000   </sect2>
22001  </sect1>
22002
22003  <sect1 id="release-7-4-11">
22004   <title>Release 7.4.11</title>
22005
22006   <note>
22007   <title>Release date</title>
22008   <simpara>2006-01-09</simpara>
22009   </note>
22010
22011   <para>
22012    This release contains a variety of fixes from 7.4.10.
22013    For information about new features in the 7.4 major release, see
22014    <xref linkend="release-7-4">.
22015   </para>
22016
22017   <sect2>
22018    <title>Migration to Version 7.4.11</title>
22019
22020    <para>
22021     A dump/restore is not required for those running 7.4.X.  However,
22022     if you are upgrading from a version earlier than 7.4.8, see the release
22023     notes for 7.4.8.
22024     Also, you might need to <command>REINDEX</> indexes on textual
22025     columns after updating, if you are affected by the locale or
22026     <application>plperl</> issues described below.
22027    </para>
22028   </sect2>
22029
22030   <sect2>
22031    <title>Changes</title>
22032
22033 <itemizedlist>
22034
22035 <listitem><para>Fix for protocol-level Describe messages issued
22036 outside a transaction or in a failed transaction (Tom)</para></listitem>
22037
22038 <listitem><para>Fix character string comparison for locales that consider
22039 different character combinations as equal, such as Hungarian (Tom)</para>
22040 <para>This might require <command>REINDEX</> to fix existing indexes on
22041 textual columns.</para></listitem>
22042
22043 <listitem><para>Set locale environment variables during postmaster startup
22044 to ensure that <application>plperl</> won't change the locale later</para>
22045 <para>This fixes a problem that occurred if the <application>postmaster</> was
22046 started with environment variables specifying a different locale than what
22047 <application>initdb</> had been told.  Under these conditions, any use of
22048 <application>plperl</> was likely to lead to corrupt indexes.  You might need
22049 <command>REINDEX</> to fix existing indexes on
22050 textual columns if this has happened to you.</para></listitem>
22051
22052 <listitem><para>Fix longstanding bug in strpos() and regular expression
22053 handling in certain rarely used Asian multi-byte character sets (Tatsuo)
22054 </para></listitem>
22055
22056 <listitem><para>Fix bug in <filename>/contrib/pgcrypto</> gen_salt,
22057 which caused it not to use all available salt space for MD5 and
22058 XDES algorithms (Marko Kreen, Solar Designer)</para>
22059 <para>Salts for Blowfish and standard DES are unaffected.</para></listitem>
22060
22061 <listitem><para>Fix <filename>/contrib/dblink</> to throw an error,
22062 rather than crashing, when the number of columns specified is different from
22063 what's actually returned by the query (Joe)</para></listitem>
22064
22065 </itemizedlist>
22066
22067   </sect2>
22068  </sect1>
22069
22070  <sect1 id="release-7-4-10">
22071   <title>Release 7.4.10</title>
22072
22073   <note>
22074   <title>Release date</title>
22075   <simpara>2005-12-12</simpara>
22076   </note>
22077
22078   <para>
22079    This release contains a variety of fixes from 7.4.9.
22080    For information about new features in the 7.4 major release, see
22081    <xref linkend="release-7-4">.
22082   </para>
22083
22084   <sect2>
22085    <title>Migration to Version 7.4.10</title>
22086
22087    <para>
22088     A dump/restore is not required for those running 7.4.X.  However,
22089     if you are upgrading from a version earlier than 7.4.8, see the release
22090     notes for 7.4.8.
22091    </para>
22092   </sect2>
22093
22094   <sect2>
22095    <title>Changes</title>
22096
22097 <itemizedlist>
22098
22099 <listitem><para>Fix race condition in transaction log management</para>
22100 <para>There was a narrow window in which an I/O operation could be initiated
22101 for the wrong page, leading to an Assert failure or data
22102 corruption.</para>
22103 </listitem>
22104
22105 <listitem><para>Prevent failure if client sends Bind protocol message
22106 when current transaction is already aborted</para></listitem>
22107
22108 <listitem><para><filename>/contrib/ltree</> fixes (Teodor)</para></listitem>
22109
22110 <listitem><para>AIX and HPUX compile fixes (Tom)</para></listitem>
22111
22112 <listitem><para>Fix longstanding planning error for outer joins</para>
22113 <para>This bug sometimes caused a bogus error <quote>RIGHT JOIN is
22114 only supported with merge-joinable join conditions</>.</para></listitem>
22115
22116 <listitem><para>Prevent core dump in <application>pg_autovacuum</> when a
22117 table has been dropped</para></listitem>
22118 </itemizedlist>
22119
22120   </sect2>
22121  </sect1>
22122
22123  <sect1 id="release-7-4-9">
22124   <title>Release 7.4.9</title>
22125
22126   <note>
22127   <title>Release date</title>
22128   <simpara>2005-10-04</simpara>
22129   </note>
22130
22131   <para>
22132    This release contains a variety of fixes from 7.4.8.
22133    For information about new features in the 7.4 major release, see
22134    <xref linkend="release-7-4">.
22135   </para>
22136
22137   <sect2>
22138    <title>Migration to Version 7.4.9</title>
22139
22140    <para>
22141     A dump/restore is not required for those running 7.4.X.  However,
22142     if you are upgrading from a version earlier than 7.4.8, see the release
22143     notes for 7.4.8.
22144    </para>
22145   </sect2>
22146
22147   <sect2>
22148    <title>Changes</title>
22149
22150 <itemizedlist>
22151 <listitem><para>Fix error that allowed <command>VACUUM</> to remove
22152 <literal>ctid</> chains too soon, and add more checking in code that follows
22153 <literal>ctid</> links</para>
22154 <para>This fixes a long-standing problem that could cause crashes in very rare
22155 circumstances.</para></listitem>
22156 <listitem><para>Fix <type>CHAR()</> to properly pad spaces to the specified
22157 length when using a multiple-byte character set (Yoshiyuki Asaba)</para>
22158 <para>In prior releases, the padding of <type>CHAR()</> was incorrect
22159 because it only padded to the specified number of bytes without
22160 considering how many characters were stored.</para></listitem>
22161 <listitem><para>Fix the sense of the test for read-only transaction
22162 in <command>COPY</></para>
22163 <para>The code formerly prohibited <command>COPY TO</>, where it should
22164 prohibit <command>COPY FROM</>.
22165 </para></listitem>
22166 <listitem><para>Fix planning problem with outer-join ON clauses that reference
22167 only the inner-side relation</para></listitem>
22168 <listitem><para>Further fixes for <literal>x FULL JOIN y ON true</> corner
22169 cases</para></listitem>
22170 <listitem><para>Make <function>array_in</> and <function>array_recv</> more
22171 paranoid about validating their OID parameter</para></listitem>
22172 <listitem><para>Fix missing rows in queries like <literal>UPDATE a=... WHERE
22173 a...</> with GiST index on column <literal>a</></para></listitem>
22174 <listitem><para>Improve robustness of datetime parsing</para></listitem>
22175 <listitem><para>Improve checking for partially-written WAL
22176 pages</para></listitem>
22177 <listitem><para>Improve robustness of signal handling when SSL is
22178 enabled</para></listitem>
22179 <listitem><para>Don't try to open more than <literal>max_files_per_process</>
22180 files during postmaster startup</para></listitem>
22181 <listitem><para>Various memory leakage fixes</para></listitem>
22182 <listitem><para>Various portability improvements</para></listitem>
22183 <listitem><para>Fix PL/PgSQL to handle <literal>var := var</> correctly when
22184 the variable is of pass-by-reference type</para></listitem>
22185 <listitem><para>Update <filename>contrib/tsearch2</> to use current Snowball
22186 code</para></listitem>
22187 </itemizedlist>
22188
22189   </sect2>
22190  </sect1>
22191
22192  <sect1 id="release-7-4-8">
22193   <title>Release 7.4.8</title>
22194
22195   <note>
22196   <title>Release date</title>
22197   <simpara>2005-05-09</simpara>
22198   </note>
22199
22200   <para>
22201    This release contains a variety of fixes from 7.4.7, including several
22202    security-related issues.
22203    For information about new features in the 7.4 major release, see
22204    <xref linkend="release-7-4">.
22205   </para>
22206
22207   <sect2>
22208    <title>Migration to Version 7.4.8</title>
22209
22210    <para>
22211     A dump/restore is not required for those running 7.4.X.  However,
22212     it is one possible way of handling two significant security problems
22213     that have been found in the initial contents of 7.4.X system
22214     catalogs.  A dump/initdb/reload sequence using 7.4.8's initdb will
22215     automatically correct these problems.
22216    </para>
22217
22218    <para>
22219     The larger security problem is that the built-in character set encoding
22220     conversion functions can be invoked from SQL commands by unprivileged
22221     users, but the functions were not designed for such use and are not
22222     secure against malicious choices of arguments.  The fix involves changing
22223     the declared parameter list of these functions so that they can no longer
22224     be invoked from SQL commands.  (This does not affect their normal use
22225     by the encoding conversion machinery.)
22226    </para>
22227
22228    <para>
22229     The lesser problem is that the <filename>contrib/tsearch2</> module
22230     creates several functions that are misdeclared to return
22231     <type>internal</> when they do not accept <type>internal</> arguments.
22232     This breaks type safety for all functions using <type>internal</>
22233     arguments.
22234    </para>
22235
22236    <para>
22237     It is strongly recommended that all installations repair these errors,
22238     either by initdb or by following the manual repair procedures given
22239     below.  The errors at least allow unprivileged database users to crash
22240     their server process, and might allow unprivileged users to gain the
22241     privileges of a database superuser.
22242    </para>
22243
22244    <para>
22245     If you wish not to do an initdb, perform the following procedures instead.
22246     As the database superuser, do:
22247
22248 <programlisting>
22249 BEGIN;
22250 UPDATE pg_proc SET proargtypes[3] = 'internal'::regtype
22251 WHERE pronamespace = 11 AND pronargs = 5
22252      AND proargtypes[2] = 'cstring'::regtype;
22253 -- The command should report having updated 90 rows;
22254 -- if not, rollback and investigate instead of committing!
22255 COMMIT;
22256 </programlisting>
22257
22258     Next, if you have installed <filename>contrib/tsearch2</>, do:
22259
22260 <programlisting>
22261 BEGIN;
22262 UPDATE pg_proc SET proargtypes[0] = 'internal'::regtype
22263 WHERE oid IN (
22264    'dex_init(text)'::regprocedure,
22265    'snb_en_init(text)'::regprocedure,
22266    'snb_ru_init(text)'::regprocedure,
22267    'spell_init(text)'::regprocedure,
22268    'syn_init(text)'::regprocedure
22269 );
22270 -- The command should report having updated 5 rows;
22271 -- if not, rollback and investigate instead of committing!
22272 COMMIT;
22273 </programlisting>
22274
22275     If this command fails with a message like <quote>function
22276     "dex_init(text)" does not exist</>, then either <filename>tsearch2</>
22277     is not installed in this database, or you already did the update.
22278    </para>
22279
22280    <para>
22281     The above procedures must be carried out in <emphasis>each</> database
22282     of an installation, including <literal>template1</>, and ideally
22283     including <literal>template0</> as well.  If you do not fix the
22284     template databases then any subsequently created databases will contain
22285     the same errors.  <literal>template1</> can be fixed in the same way
22286     as any other database, but fixing <literal>template0</> requires
22287     additional steps.  First, from any database issue:
22288 <programlisting>
22289 UPDATE pg_database SET datallowconn = true WHERE datname = 'template0';
22290 </programlisting>
22291      Next connect to <literal>template0</> and perform the above repair
22292      procedures.  Finally, do:
22293 <programlisting>
22294 -- re-freeze template0:
22295 VACUUM FREEZE;
22296 -- and protect it against future alterations:
22297 UPDATE pg_database SET datallowconn = false WHERE datname = 'template0';
22298 </programlisting>
22299    </para>
22300   </sect2>
22301
22302   <sect2>
22303    <title>Changes</title>
22304
22305 <itemizedlist>
22306 <listitem><para>Change encoding function signature to prevent
22307 misuse</para></listitem>
22308 <listitem><para>Change <filename>contrib/tsearch2</> to avoid unsafe use of
22309 <type>INTERNAL</> function results</para></listitem>
22310 <listitem><para>Repair ancient race condition that allowed a transaction to be
22311 seen as committed for some purposes (eg SELECT FOR UPDATE) slightly sooner
22312 than for other purposes</para>
22313 <para>This is an extremely serious bug since it could lead to apparent
22314 data inconsistencies being briefly visible to applications.</para></listitem>
22315 <listitem><para>Repair race condition between relation extension and
22316 VACUUM</para>
22317 <para>This could theoretically have caused loss of a page's worth of
22318 freshly-inserted data, although the scenario seems of very low probability.
22319 There are no known cases of it having caused more than an Assert failure.
22320 </para></listitem>
22321 <listitem><para>Fix comparisons of <type>TIME WITH TIME ZONE</> values</para>
22322 <para>
22323 The comparison code was wrong in the case where the
22324 <literal>--enable-integer-datetimes</> configuration switch had been used.
22325 NOTE: if you have an index on a <type>TIME WITH TIME ZONE</> column,
22326 it will need to be <command>REINDEX</>ed after installing this update, because
22327 the fix corrects the sort order of column values.
22328 </para></listitem>
22329 <listitem><para>Fix <function>EXTRACT(EPOCH)</> for
22330 <type>TIME WITH TIME ZONE</> values</para></listitem>
22331 <listitem><para>Fix mis-display of negative fractional seconds in
22332 <type>INTERVAL</> values</para>
22333 <para>
22334 This error only occurred when the
22335 <literal>--enable-integer-datetimes</> configuration switch had been used.
22336 </para></listitem>
22337 <listitem><para>Ensure operations done during backend shutdown are counted by
22338 statistics collector</para>
22339 <para>
22340 This is expected to resolve reports of <application>pg_autovacuum</>
22341 not vacuuming the system catalogs often enough &mdash; it was not being
22342 told about catalog deletions caused by temporary table removal during
22343 backend exit.
22344 </para></listitem>
22345 <listitem><para>Additional buffer overrun checks in plpgsql
22346 (Neil)</para></listitem>
22347 <listitem><para>Fix pg_dump to dump trigger names containing <literal>%</>
22348 correctly (Neil)</para></listitem>
22349 <listitem><para>Fix <filename>contrib/pgcrypto</> for newer OpenSSL builds
22350 (Marko Kreen)</para></listitem>
22351 <listitem><para>Still more 64-bit fixes for
22352 <filename>contrib/intagg</></para></listitem>
22353 <listitem><para>Prevent incorrect optimization of functions returning
22354 <type>RECORD</></para></listitem>
22355 <listitem><para>Prevent <function>to_char(interval)</> from dumping core for
22356 month-related formats</para></listitem>
22357 <listitem><para>Prevent crash on <literal>COALESCE(NULL,NULL)</></para></listitem>
22358 <listitem><para>Fix <function>array_map</> to call PL functions correctly</para></listitem>
22359 <listitem><para>Fix permission checking in <command>ALTER DATABASE RENAME</></para></listitem>
22360 <listitem><para>Fix <command>ALTER LANGUAGE RENAME</></para></listitem>
22361 <listitem><para>Make <function>RemoveFromWaitQueue</> clean up after itself</para>
22362 <para>
22363 This fixes a lock management error that would only be visible if a transaction
22364 was kicked out of a wait for a lock (typically by query cancel) and then the
22365 holder of the lock released it within a very narrow window.
22366 </para></listitem>
22367 <listitem><para>Fix problem with untyped parameter appearing in
22368 <command>INSERT ... SELECT</></para></listitem>
22369 <listitem><para>Fix <command>CLUSTER</> failure after
22370 <command>ALTER TABLE SET WITHOUT OIDS</></para></listitem>
22371 </itemizedlist>
22372
22373   </sect2>
22374  </sect1>
22375
22376  <sect1 id="release-7-4-7">
22377   <title>Release 7.4.7</title>
22378
22379   <note>
22380   <title>Release date</title>
22381   <simpara>2005-01-31</simpara>
22382   </note>
22383
22384   <para>
22385    This release contains a variety of fixes from 7.4.6, including several
22386    security-related issues.
22387    For information about new features in the 7.4 major release, see
22388    <xref linkend="release-7-4">.
22389   </para>
22390
22391   <sect2>
22392    <title>Migration to Version 7.4.7</title>
22393
22394    <para>
22395     A dump/restore is not required for those running 7.4.X.
22396    </para>
22397   </sect2>
22398
22399   <sect2>
22400    <title>Changes</title>
22401
22402 <itemizedlist>
22403 <listitem><para>Disallow <command>LOAD</> to non-superusers</para>
22404 <para>
22405 On platforms that will automatically execute initialization functions of a
22406 shared library (this includes at least Windows and ELF-based Unixen),
22407 <command>LOAD</> can be used to make the server execute arbitrary code.
22408 Thanks to NGS Software for reporting this.</para></listitem>
22409 <listitem><para>Check that creator of an aggregate function has the right to
22410 execute the specified transition functions</para>
22411 <para>
22412 This oversight made it possible to bypass denial of EXECUTE
22413 permission on a function.</para></listitem>
22414 <listitem><para>Fix security and 64-bit issues in
22415 contrib/intagg</para></listitem>
22416 <listitem><para>Add needed STRICT marking to some contrib functions (Kris
22417 Jurka)</para></listitem>
22418 <listitem><para>Avoid buffer overrun when plpgsql cursor declaration has too
22419 many parameters (Neil)</para></listitem>
22420 <listitem><para>Fix planning error for FULL and RIGHT outer joins</para>
22421 <para>
22422 The result of the join was mistakenly supposed to be sorted the same as the
22423 left input.  This could not only deliver mis-sorted output to the user, but
22424 in case of nested merge joins could give outright wrong answers.
22425 </para></listitem>
22426 <listitem><para>Fix plperl for quote marks in tuple fields</para></listitem>
22427 <listitem><para>Fix display of negative intervals in SQL and GERMAN
22428 datestyles</para></listitem>
22429 <listitem><para>Make age(timestamptz) do calculation in local timezone not
22430 GMT</para></listitem>
22431 </itemizedlist>
22432
22433   </sect2>
22434  </sect1>
22435
22436  <sect1 id="release-7-4-6">
22437   <title>Release 7.4.6</title>
22438
22439   <note>
22440   <title>Release date</title>
22441   <simpara>2004-10-22</simpara>
22442   </note>
22443
22444   <para>
22445    This release contains a variety of fixes from 7.4.5.
22446    For information about new features in the 7.4 major release, see
22447    <xref linkend="release-7-4">.
22448   </para>
22449
22450
22451   <sect2>
22452    <title>Migration to Version 7.4.6</title>
22453
22454    <para>
22455     A dump/restore is not required for those running 7.4.X.
22456    </para>
22457   </sect2>
22458
22459   <sect2>
22460    <title>Changes</title>
22461
22462 <itemizedlist>
22463 <listitem><para>Repair possible failure to update hint bits on disk</para>
22464 <para>
22465 Under rare circumstances this oversight could lead to
22466 <quote>could not access transaction status</> failures, which qualifies
22467 it as a potential-data-loss bug.
22468 </para></listitem>
22469 <listitem><para>Ensure that hashed outer join does not miss tuples</para>
22470 <para>
22471 Very large left joins using a hash join plan could fail to output unmatched
22472 left-side rows given just the right data distribution.
22473 </para></listitem>
22474 <listitem><para>Disallow running <application>pg_ctl</> as root</para>
22475 <para>
22476 This is to guard against any possible security issues.
22477 </para></listitem>
22478 <listitem><para>Avoid using temp files in <filename>/tmp</> in <command>make_oidjoins_check</command></para>
22479 <para>
22480 This has been reported as a security issue, though it's hardly worthy of
22481 concern since there is no reason for non-developers to use this script anyway.
22482 </para></listitem>
22483 <listitem><para>Prevent forced backend shutdown from re-emitting prior command
22484 result</para>
22485 <para>
22486 In rare cases, a client might think that its last command had succeeded when
22487 it really had been aborted by forced database shutdown.
22488 </para></listitem>
22489 <listitem><para>Repair bug in <function>pg_stat_get_backend_idset</function></para>
22490 <para>
22491 This could lead to misbehavior in some of the system-statistics views.
22492 </para></listitem>
22493 <listitem><para>Fix small memory leak in postmaster</para></listitem>
22494 <listitem><para>Fix <quote>expected both swapped tables to have TOAST
22495 tables</> bug</para>
22496 <para>
22497 This could arise in cases such as CLUSTER after ALTER TABLE DROP COLUMN.
22498 </para></listitem>
22499 <listitem><para>Prevent <literal>pg_ctl restart</> from adding <literal>-D</> multiple times</para></listitem>
22500 <listitem><para>Fix problem with NULL values in GiST indexes</para></listitem>
22501 <listitem><para><literal>::</> is no longer interpreted as a variable in an
22502 ECPG prepare statement</para></listitem>
22503 </itemizedlist>
22504
22505   </sect2>
22506  </sect1>
22507
22508  <sect1 id="release-7-4-5">
22509   <title>Release 7.4.5</title>
22510
22511   <note>
22512   <title>Release date</title>
22513   <simpara>2004-08-18</simpara>
22514   </note>
22515
22516   <para>
22517    This release contains one serious bug fix over 7.4.4.
22518    For information about new features in the 7.4 major release, see
22519    <xref linkend="release-7-4">.
22520   </para>
22521
22522
22523   <sect2>
22524    <title>Migration to Version 7.4.5</title>
22525
22526    <para>
22527     A dump/restore is not required for those running 7.4.X.
22528    </para>
22529   </sect2>
22530
22531   <sect2>
22532    <title>Changes</title>
22533
22534 <itemizedlist>
22535 <listitem><para>Repair possible crash during concurrent B-tree index insertions</para>
22536 <para>
22537 This patch fixes a rare case in which concurrent insertions into a B-tree index
22538 could result in a server panic.  No permanent damage would result, but it's
22539 still worth a re-release.  The bug does not exist in pre-7.4 releases.
22540 </para></listitem>
22541 </itemizedlist>
22542
22543   </sect2>
22544  </sect1>
22545
22546  <sect1 id="release-7-4-4">
22547   <title>Release 7.4.4</title>
22548
22549   <note>
22550   <title>Release date</title>
22551   <simpara>2004-08-16</simpara>
22552   </note>
22553
22554   <para>
22555    This release contains a variety of fixes from 7.4.3.
22556    For information about new features in the 7.4 major release, see
22557    <xref linkend="release-7-4">.
22558   </para>
22559
22560
22561   <sect2>
22562    <title>Migration to Version 7.4.4</title>
22563
22564    <para>
22565     A dump/restore is not required for those running 7.4.X.
22566    </para>
22567   </sect2>
22568
22569   <sect2>
22570    <title>Changes</title>
22571
22572 <itemizedlist>
22573 <listitem><para>Prevent possible loss of committed transactions during crash</para>
22574 <para>
22575 Due to insufficient interlocking between transaction commit and checkpointing,
22576 it was possible for transactions committed just before the most recent
22577 checkpoint to be lost, in whole or in part, following a database crash and
22578 restart.  This is a serious bug that has existed
22579 since <productname>PostgreSQL</productname> 7.1.
22580 </para></listitem>
22581 <listitem><para>Check HAVING restriction before evaluating result list of an
22582 aggregate plan</para></listitem>
22583 <listitem><para>Avoid crash when session's current user ID is deleted</para></listitem>
22584 <listitem><para>Fix hashed crosstab for zero-rows case (Joe)</para></listitem>
22585 <listitem><para>Force cache update after renaming a column in a foreign key</para></listitem>
22586 <listitem><para>Pretty-print UNION queries correctly</para></listitem>
22587 <listitem><para>Make psql handle <literal>\r\n</> newlines properly in COPY IN</para></listitem>
22588 <listitem><para><application>pg_dump</> handled ACLs with grant options incorrectly</para></listitem>
22589 <listitem><para>Fix thread support for OS X and Solaris</para></listitem>
22590 <listitem><para>Updated JDBC driver (build 215) with various fixes</para></listitem>
22591 <listitem><para>ECPG fixes</para></listitem>
22592 <listitem><para>Translation updates (various contributors)</para></listitem>
22593 </itemizedlist>
22594
22595   </sect2>
22596  </sect1>
22597
22598  <sect1 id="release-7-4-3">
22599   <title>Release 7.4.3</title>
22600
22601   <note>
22602   <title>Release date</title>
22603   <simpara>2004-06-14</simpara>
22604   </note>
22605
22606   <para>
22607    This release contains a variety of fixes from 7.4.2.
22608    For information about new features in the 7.4 major release, see
22609    <xref linkend="release-7-4">.
22610   </para>
22611
22612
22613   <sect2>
22614    <title>Migration to Version 7.4.3</title>
22615
22616    <para>
22617     A dump/restore is not required for those running 7.4.X.
22618    </para>
22619   </sect2>
22620
22621   <sect2>
22622    <title>Changes</title>
22623
22624 <itemizedlist>
22625 <listitem><para>Fix temporary memory leak when using non-hashed aggregates (Tom)</para></listitem>
22626 <listitem><para>ECPG fixes, including some for Informix compatibility (Michael)</para></listitem>
22627 <listitem><para>Fixes for compiling with thread-safety, particularly Solaris (Bruce)</para></listitem>
22628 <listitem><para>Fix error in COPY IN termination when using the old network protocol (ljb)</para></listitem>
22629 <listitem><para>Several important fixes in pg_autovacuum, including fixes for
22630 large tables, unsigned oids, stability, temp tables, and debug mode
22631 (Matthew T. O'Connor)</para></listitem>
22632 <listitem><para>Fix problem with reading tar-format dumps on NetBSD and BSD/OS (Bruce)</para></listitem>
22633 <listitem><para>Several JDBC fixes</para></listitem>
22634 <listitem><para>Fix ALTER SEQUENCE RESTART where last_value equals the restart value (Tom)</para></listitem>
22635 <listitem><para>Repair failure to recalculate nested sub-selects (Tom)</para></listitem>
22636 <listitem><para>Fix problems with non-constant expressions in LIMIT/OFFSET</para></listitem>
22637 <listitem><para>Support FULL JOIN with no join clause, such as X FULL JOIN Y ON TRUE (Tom)</para></listitem>
22638 <listitem><para>Fix another zero-column table bug (Tom)</para></listitem>
22639 <listitem><para>Improve handling of non-qualified identifiers in GROUP BY clauses in sub-selects (Tom)</para>
22640 <para>
22641 Select-list aliases within the sub-select will now take precedence over
22642 names from outer query levels.
22643 </para></listitem>
22644 <listitem><para>Do not generate <quote>NATURAL CROSS JOIN</> when decompiling rules (Tom)</para></listitem>
22645 <listitem><para>Add checks for invalid field length in binary COPY (Tom)</para>
22646 <para>
22647  This fixes a difficult-to-exploit security hole.
22648 </para></listitem>
22649 <listitem><para>Avoid locking conflict between <command>ANALYZE</command> and <command>LISTEN</command>/<command>NOTIFY</command></para></listitem>
22650 <listitem><para>Numerous translation updates (various contributors)</para></listitem>
22651 </itemizedlist>
22652
22653   </sect2>
22654  </sect1>
22655
22656  <sect1 id="release-7-4-2">
22657   <title>Release 7.4.2</title>
22658
22659   <note>
22660   <title>Release date</title>
22661   <simpara>2004-03-08</simpara>
22662   </note>
22663
22664   <para>
22665    This release contains a variety of fixes from 7.4.1.
22666    For information about new features in the 7.4 major release, see
22667    <xref linkend="release-7-4">.
22668   </para>
22669
22670
22671   <sect2>
22672    <title>Migration to Version 7.4.2</title>
22673
22674    <para>
22675     A dump/restore is not required for those running 7.4.X.  However,
22676     it might be advisable as the easiest method of incorporating fixes for
22677     two errors that have been found in the initial contents of 7.4.X system
22678     catalogs.  A dump/initdb/reload sequence using 7.4.2's initdb will
22679     automatically correct these problems.
22680    </para>
22681
22682    <para>
22683     The more severe of the two errors is that data type <type>anyarray</>
22684     has the wrong alignment label; this is a problem because the
22685     <structname>pg_statistic</> system catalog uses <type>anyarray</>
22686     columns.  The mislabeling can cause planner misestimations and even
22687     crashes when planning queries that involve <literal>WHERE</> clauses on
22688     double-aligned columns (such as <type>float8</> and <type>timestamp</>).
22689     It is strongly recommended that all installations repair this error,
22690     either by initdb or by following the manual repair procedure given
22691     below.
22692    </para>
22693
22694    <para>
22695     The lesser error is that the system view <structname>pg_settings</>
22696     ought to be marked as having public update access, to allow
22697     <literal>UPDATE pg_settings</> to be used as a substitute for
22698     <command>SET</>.  This can also be fixed either by initdb or manually,
22699     but it is not necessary to fix unless you want to use <literal>UPDATE
22700     pg_settings</>.
22701    </para>
22702
22703    <para>
22704     If you wish not to do an initdb, the following procedure will work
22705     for fixing <structname>pg_statistic</>.  As the database superuser,
22706     do:
22707
22708 <programlisting>
22709 -- clear out old data in pg_statistic:
22710 DELETE FROM pg_statistic;
22711 VACUUM pg_statistic;
22712 -- this should update 1 row:
22713 UPDATE pg_type SET typalign = 'd' WHERE oid = 2277;
22714 -- this should update 6 rows:
22715 UPDATE pg_attribute SET attalign = 'd' WHERE atttypid = 2277;
22716 --
22717 -- At this point you MUST start a fresh backend to avoid a crash!
22718 --
22719 -- repopulate pg_statistic:
22720 ANALYZE;
22721 </programlisting>
22722
22723     This can be done in a live database, but beware that all backends
22724     running in the altered database must be restarted before it is safe to
22725     repopulate <structname>pg_statistic</>.
22726    </para>
22727
22728    <para>
22729     To repair the <structname>pg_settings</> error, simply do:
22730 <programlisting>
22731 GRANT SELECT, UPDATE ON pg_settings TO PUBLIC;
22732 </programlisting>
22733    </para>
22734
22735    <para>
22736     The above procedures must be carried out in <emphasis>each</> database
22737     of an installation, including <literal>template1</>, and ideally
22738     including <literal>template0</> as well.  If you do not fix the
22739     template databases then any subsequently created databases will contain
22740     the same errors.  <literal>template1</> can be fixed in the same way
22741     as any other database, but fixing <literal>template0</> requires
22742     additional steps.  First, from any database issue:
22743 <programlisting>
22744 UPDATE pg_database SET datallowconn = true WHERE datname = 'template0';
22745 </programlisting>
22746      Next connect to <literal>template0</> and perform the above repair
22747      procedures.  Finally, do:
22748 <programlisting>
22749 -- re-freeze template0:
22750 VACUUM FREEZE;
22751 -- and protect it against future alterations:
22752 UPDATE pg_database SET datallowconn = false WHERE datname = 'template0';
22753 </programlisting>
22754    </para>
22755   </sect2>
22756
22757   <sect2>
22758    <title>Changes</title>
22759
22760 <para>
22761    Release 7.4.2 incorporates all the fixes included in release 7.3.6,
22762    plus the following fixes:
22763 </para>
22764
22765 <itemizedlist>
22766 <listitem><para>Fix <structname>pg_statistics</> alignment bug that could crash optimizer</para>
22767 <para>See above for details about this problem.</para></listitem>
22768 <listitem><para>Allow non-super users to update <structname>pg_settings</></para></listitem>
22769 <listitem><para>Fix several optimizer bugs, most of which led to
22770 <quote>variable not found in subplan target lists</> errors</para></listitem>
22771 <listitem><para>Avoid out-of-memory failure during startup of large multiple
22772 index scan</para></listitem>
22773 <listitem><para>Fix multibyte problem that could lead to <quote>out of
22774 memory</> error during <command>COPY IN</></para></listitem>
22775 <listitem><para>Fix problems with <command>SELECT INTO</> / <command>CREATE
22776 TABLE AS</> from tables without OIDs</para></listitem>
22777 <listitem><para>Fix problems with <filename>alter_table</> regression test
22778 during parallel testing</para></listitem>
22779 <listitem><para>Fix problems with hitting open file limit, especially on OS X (Tom)</para></listitem>
22780 <listitem><para>Partial fix for Turkish-locale issues</para>
22781 <para>initdb will succeed now in Turkish locale, but there are still some
22782 inconveniences associated with the <literal>i/I</> problem.</para></listitem>
22783 <listitem><para>Make pg_dump set client encoding on restore</para></listitem>
22784 <listitem><para>Other minor pg_dump fixes</para></listitem>
22785 <listitem><para>Allow ecpg to again use C keywords as column names (Michael)</para></listitem>
22786 <listitem><para>Added ecpg <literal>WHENEVER NOT_FOUND</> to
22787 <literal>SELECT/INSERT/UPDATE/DELETE</> (Michael)</para></listitem>
22788 <listitem><para>Fix ecpg crash for queries calling set-returning functions (Michael)</para></listitem>
22789 <listitem><para>Various other ecpg fixes (Michael)</para></listitem>
22790 <listitem><para>Fixes for Borland compiler</para></listitem>
22791 <listitem><para>Thread build improvements (Bruce)</para></listitem>
22792 <listitem><para>Various other build fixes</para></listitem>
22793 <listitem><para>Various JDBC fixes</para></listitem>
22794 </itemizedlist>
22795
22796   </sect2>
22797  </sect1>
22798
22799  <sect1 id="release-7-4-1">
22800   <title>Release 7.4.1</title>
22801
22802   <note>
22803   <title>Release date</title>
22804   <simpara>2003-12-22</simpara>
22805   </note>
22806
22807   <para>
22808    This release contains a variety of fixes from 7.4.
22809    For information about new features in the 7.4 major release, see
22810    <xref linkend="release-7-4">.
22811   </para>
22812
22813
22814   <sect2>
22815    <title>Migration to Version 7.4.1</title>
22816
22817    <para>
22818     A dump/restore is <emphasis>not</emphasis> required for those
22819     running 7.4.
22820    </para>
22821
22822    <para>
22823     If you want to install the fixes in the information schema
22824     you need to reload it into the database.
22825     This is either accomplished by initializing a new cluster
22826     by running <command>initdb</command>, or by running the following
22827     sequence of SQL commands in each database (ideally including
22828     <literal>template1</literal>) as a superuser in
22829     <application>psql</application>, after installing the new release:
22830 <programlisting>
22831 DROP SCHEMA information_schema CASCADE;
22832 \i /usr/local/pgsql/share/information_schema.sql
22833 </programlisting>
22834     Substitute your installation path in the second command.
22835    </para>
22836
22837   </sect2>
22838
22839   <sect2>
22840    <title>Changes</title>
22841
22842 <itemizedlist>
22843 <listitem><para>Fixed bug in <command>CREATE SCHEMA</command> parsing in ECPG (Michael)</para></listitem>
22844 <listitem><para>Fix compile error when <option>--enable-thread-safety</option> and <option>--with-perl</option> are used together (Peter)</para></listitem>
22845 <listitem><para>Fix for subqueries that used hash joins (Tom)</para>
22846 <para>
22847    Certain subqueries that used hash joins would crash because of
22848    improperly shared structures.
22849 </para></listitem>
22850 <listitem><para>Fix free space map compaction bug (Tom)</para>
22851 <para>
22852    This fixes a bug where compaction of the free space map could lead
22853    to a database server shutdown.
22854 </para>
22855 </listitem>
22856 <listitem><para>Fix for Borland compiler build of libpq (Bruce)</para></listitem>
22857 <listitem><para>Fix <function>netmask()</function> and <function>hostmask()</function> to return the maximum-length masklen (Tom)</para>
22858 <para>
22859    Fix these functions to return values consistent with pre-7.4
22860    releases.
22861 </para>
22862 </listitem>
22863 <listitem><para>Several <filename>contrib/pg_autovacuum</filename> fixes</para>
22864 <para>
22865    Fixes include improper variable initialization, missing vacuum after
22866    <command>TRUNCATE</command>, and duration computation overflow for long vacuums.
22867 </para>
22868 </listitem>
22869 <listitem><para>Allow compile of <filename>contrib/cube</filename> under Cygwin (Jason Tishler)</para></listitem>
22870 <listitem><para>Fix Solaris use of password file when no passwords are defined (Tom)</para>
22871 <para>
22872    Fix crash on Solaris caused by use of any type of password
22873    authentication when no passwords were defined.
22874 </para>
22875 </listitem>
22876 <listitem><para>JDBC fix for thread problems, other fixes</para></listitem>
22877 <listitem><para>Fix for <type>bytea</type> index lookups (Joe)</para></listitem>
22878 <listitem><para>Fix information schema for bit data types (Peter)</para></listitem>
22879 <listitem><para>Force zero_damaged_pages to be on during recovery from WAL</para></listitem>
22880 <listitem><para>Prevent some obscure cases of <quote>variable not in subplan target lists</quote></para></listitem>
22881 <listitem><para>Make <function>PQescapeBytea</function> and <function>byteaout</function> consistent with each other (Joe)</para></listitem>
22882 <listitem><para>Escape <type>bytea</type> output for bytes &gt; 0x7e(Joe)</para>
22883 <para>
22884  If different client encodings are used for <type>bytea</type> output and input, it
22885  is possible for <type>bytea</type> values to be corrupted by the differing
22886  encodings.  This fix escapes all bytes that might be affected.
22887 </para>
22888 </listitem>
22889 <listitem><para>Added missing <function>SPI_finish()</function> calls to dblink's <function>get_tuple_of_interest()</function> (Joe)</para></listitem>
22890 <listitem><para>New Czech FAQ</para></listitem>
22891 <listitem><para>Fix information schema view <literal>constraint_column_usage</literal> for foreign keys (Peter)</para></listitem>
22892 <listitem><para>ECPG fixes (Michael)</para></listitem>
22893 <listitem><para>Fix bug with multiple <literal>IN</literal> subqueries and joins in the subqueries (Tom)</para></listitem>
22894 <listitem><para>Allow <literal>COUNT('x')</literal> to work (Tom)</para></listitem>
22895 <listitem><para>Install ECPG include files for Informix compatibility into separate directory (Peter)</para>
22896 <para>
22897  Some names of ECPG include files for Informix compatibility conflicted with operating system include files.
22898  By installing them in their own directory, name conflicts have been reduced.
22899 </para>
22900 </listitem>
22901 <listitem><para>Fix SSL memory leak (Neil)</para>
22902 <para>
22903  This release fixes a bug in 7.4 where SSL didn't free all memory it allocated.
22904 </para>
22905 </listitem>
22906 <listitem><para>Prevent <filename>pg_service.conf</filename> from using service name as default dbname (Bruce)</para></listitem>
22907 <listitem><para>Fix local ident authentication on FreeBSD (Tom)</para></listitem>
22908 </itemizedlist>
22909
22910  </sect2>
22911 </sect1>
22912
22913 <sect1 id="release-7-4">
22914  <title>Release 7.4</title>
22915
22916  <note>
22917   <title>Release date</title>
22918   <simpara>2003-11-17</simpara>
22919  </note>
22920
22921  <sect2>
22922   <title>Overview</title>
22923
22924   <para>
22925    Major changes in this release:
22926   </para>
22927
22928   <variablelist>
22929    <varlistentry>
22930     <term>
22931      <literal>IN</literal> / <literal>NOT IN</literal> subqueries are
22932      now much more efficient
22933     </term>
22934
22935     <listitem>
22936      <para>
22937       In previous releases, <literal>IN</literal>/<literal>NOT
22938       IN</literal> subqueries were joined to the upper query by
22939       sequentially scanning the subquery looking for a match.  The
22940       7.4 code uses the same sophisticated techniques used by
22941       ordinary joins and so is much faster.  An
22942       <literal>IN</literal> will now usually be as fast as or faster
22943       than an equivalent <literal>EXISTS</literal> subquery; this
22944       reverses the conventional wisdom that applied to previous
22945       releases.
22946      </para>
22947     </listitem>
22948    </varlistentry>
22949
22950    <varlistentry>
22951     <term>
22952      Improved <literal>GROUP BY</literal> processing by using hash buckets
22953     </term>
22954
22955     <listitem>
22956      <para>
22957       In previous releases, rows to be grouped had to be sorted
22958       first.  The 7.4 code can do <literal>GROUP BY</literal>
22959       without sorting, by accumulating results into a hash table
22960       with one entry per group.  It will still use the sort
22961       technique, however, if the hash table is estimated to be too
22962       large to fit in <varname>sort_mem</>.
22963      </para>
22964     </listitem>
22965    </varlistentry>
22966
22967    <varlistentry>
22968     <term>
22969      New multikey hash join capability
22970     </term>
22971
22972     <listitem>
22973      <para>
22974       In previous releases, hash joins could only occur on single
22975       keys.  This release allows multicolumn hash joins.
22976      </para>
22977     </listitem>
22978    </varlistentry>
22979
22980    <varlistentry>
22981     <term>
22982      Queries using the explicit <literal>JOIN</literal> syntax are
22983      now better optimized
22984     </term>
22985
22986     <listitem>
22987      <para>
22988       Prior releases evaluated queries using the explicit
22989       <literal>JOIN</literal> syntax only in the order implied by
22990       the syntax. 7.4 allows full optimization of these queries,
22991       meaning the optimizer considers all possible join orderings
22992       and chooses the most efficient.  Outer joins, however, must
22993       still follow the declared ordering.
22994      </para>
22995     </listitem>
22996    </varlistentry>
22997
22998    <varlistentry>
22999     <term>
23000      Faster and more powerful regular expression code
23001     </term>
23002
23003     <listitem>
23004      <para>
23005       The entire regular expression module has been replaced with a
23006       new version by Henry Spencer, originally written for Tcl.  The
23007       code greatly improves performance and supports several flavors
23008       of regular expressions.
23009      </para>
23010     </listitem>
23011    </varlistentry>
23012
23013    <varlistentry>
23014     <term>
23015      Function-inlining for simple SQL functions
23016     </term>
23017
23018     <listitem>
23019      <para>
23020       Simple SQL functions can now be inlined by including their SQL
23021       in the main query.  This improves performance by eliminating
23022       per-call overhead.  That means simple SQL functions now
23023       behave like macros.
23024      </para>
23025     </listitem>
23026    </varlistentry>
23027
23028    <varlistentry>
23029     <term>
23030      Full support for IPv6 connections and IPv6 address data types
23031     </term>
23032
23033     <listitem>
23034      <para>
23035       Previous releases allowed only IPv4 connections, and the IP
23036       data types only supported IPv4 addresses. This release adds
23037       full IPv6 support in both of these areas.
23038      </para>
23039     </listitem>
23040    </varlistentry>
23041
23042    <varlistentry>
23043     <term>
23044      Major improvements in SSL performance and reliability
23045     </term>
23046
23047     <listitem>
23048      <para>
23049       Several people very familiar with the SSL API have overhauled
23050       our SSL code to improve SSL key negotiation and error
23051       recovery.
23052      </para>
23053     </listitem>
23054    </varlistentry>
23055
23056    <varlistentry>
23057     <term>
23058      Make free space map efficiently reuse empty index pages,
23059      and other free space management improvements
23060     </term>
23061
23062     <listitem>
23063      <para>
23064       In previous releases, B-tree index pages that were left empty
23065       because of deleted rows could only be reused by rows with
23066       index values similar to the rows originally indexed on that
23067       page. In 7.4, <command>VACUUM</command> records empty index
23068       pages and allows them to be reused for any future index rows.
23069      </para>
23070     </listitem>
23071    </varlistentry>
23072
23073    <varlistentry>
23074     <term>
23075      SQL-standard information schema
23076     </term>
23077
23078     <listitem>
23079      <para>
23080       The information schema provides a standardized and stable way
23081       to access information about the schema objects defined in a
23082       database.
23083      </para>
23084     </listitem>
23085    </varlistentry>
23086
23087    <varlistentry>
23088     <term>
23089      Cursors conform more closely to the SQL standard
23090     </term>
23091
23092     <listitem>
23093      <para>
23094       The commands <command>FETCH</command> and
23095       <command>MOVE</command> have been overhauled to conform more
23096       closely to the SQL standard.
23097      </para>
23098     </listitem>
23099    </varlistentry>
23100
23101    <varlistentry>
23102     <term>
23103      Cursors can exist outside transactions
23104     </term>
23105
23106     <listitem>
23107      <para>
23108       These cursors are also called holdable cursors.
23109      </para>
23110     </listitem>
23111    </varlistentry>
23112
23113    <varlistentry>
23114     <term>
23115      New client-to-server protocol
23116     </term>
23117
23118     <listitem>
23119      <para>
23120       The new protocol adds error codes, more status information,
23121       faster startup, better support for binary data transmission,
23122       parameter values separated from SQL commands, prepared
23123       statements available at the protocol level, and cleaner
23124       recovery from <command>COPY</command> failures.  The older
23125       protocol is still supported by both server and clients.
23126      </para>
23127     </listitem>
23128    </varlistentry>
23129
23130    <varlistentry>
23131     <term>
23132      <application>libpq</application> and
23133      <application>ECPG</application> applications are now fully
23134      thread-safe
23135     </term>
23136
23137     <listitem>
23138      <para>
23139       While previous <application>libpq</application> releases
23140       already supported threads, this release improves thread safety
23141       by fixing some non-thread-safe code that was used during
23142       database connection startup.  The <command>configure</command>
23143       option <option>--enable-thread-safety</option> must be used to
23144       enable this feature.
23145      </para>
23146     </listitem>
23147    </varlistentry>
23148
23149    <varlistentry>
23150     <term>
23151      New version of full-text indexing
23152     </term>
23153
23154     <listitem>
23155      <para>
23156       A new full-text indexing suite is available in
23157       <filename>contrib/tsearch2</filename>.
23158      </para>
23159     </listitem>
23160    </varlistentry>
23161
23162    <varlistentry>
23163     <term>
23164      New autovacuum tool
23165     </term>
23166
23167     <listitem>
23168      <para>
23169       The new autovacuum tool in
23170       <filename>contrib/autovacuum</filename> monitors the database
23171       statistics tables for
23172       <command>INSERT</command>/<command>UPDATE</command>/<command>DELETE</command>
23173       activity and automatically vacuums tables when needed.
23174      </para>
23175     </listitem>
23176    </varlistentry>
23177
23178    <varlistentry>
23179     <term>
23180      Array handling has been improved and moved into the server core
23181     </term>
23182
23183     <listitem>
23184      <para>
23185       Many array limitations have been removed, and arrays behave
23186       more like fully-supported data types.
23187      </para>
23188     </listitem>
23189    </varlistentry>
23190
23191   </variablelist>
23192  </sect2>
23193
23194  <sect2>
23195   <title>Migration to Version 7.4</title>
23196
23197   <para>
23198    A dump/restore using <application>pg_dump</application> is
23199    required for those wishing to migrate data from any previous
23200    release.
23201   </para>
23202
23203   <para>
23204    Observe the following incompatibilities:
23205   </para>
23206
23207   <itemizedlist>
23208    <listitem>
23209     <para>
23210      The server-side autocommit setting was removed and
23211      reimplemented in client applications and languages.
23212      Server-side autocommit was causing too many problems with
23213      languages and applications that wanted to control their own
23214      autocommit behavior, so autocommit was removed from the server
23215      and added to individual client APIs as appropriate.
23216     </para>
23217    </listitem>
23218
23219    <listitem>
23220     <para>
23221      Error message wording has changed substantially in this
23222      release.  Significant effort was invested to make the messages
23223      more consistent and user-oriented.  If your applications try to
23224      detect different error conditions by parsing the error message,
23225      you are strongly encouraged to use the new error code facility instead.
23226     </para>
23227    </listitem>
23228
23229    <listitem>
23230     <para>
23231      Inner joins using the explicit <literal>JOIN</literal> syntax
23232      might behave differently because they are now better
23233      optimized.
23234     </para>
23235    </listitem>
23236
23237    <listitem>
23238     <para>
23239      A number of server configuration parameters have been renamed
23240      for clarity, primarily those related to
23241      logging.
23242     </para>
23243    </listitem>
23244
23245    <listitem>
23246     <para>
23247      <literal>FETCH 0</literal> or <literal>MOVE 0</literal> now
23248      does nothing.  In prior releases, <literal>FETCH 0</literal>
23249      would fetch all remaining rows, and <literal>MOVE 0</literal>
23250      would move to the end of the cursor.
23251     </para>
23252    </listitem>
23253
23254    <listitem>
23255     <para>
23256      <command>FETCH</command> and <command>MOVE</command> now return
23257      the actual number of rows fetched/moved, or zero if at the
23258      beginning/end of the cursor.  Prior releases would return the
23259      row count passed to the command, not the number of rows
23260      actually fetched or moved.
23261     </para>
23262    </listitem>
23263
23264    <listitem>
23265     <para>
23266      <command>COPY</command> now can process files that use
23267      carriage-return or carriage-return/line-feed end-of-line
23268      sequences. Literal carriage-returns and line-feeds are no
23269      longer accepted in data values; use <literal>\r</literal> and
23270      <literal>\n</literal> instead.
23271     </para>
23272    </listitem>
23273
23274    <listitem>
23275     <para>
23276      Trailing spaces are now trimmed when converting from type
23277      <type>char(<replaceable>n</>)</type> to
23278      <type>varchar(<replaceable>n</>)</type> or <type>text</type>.
23279      This is what most people always expected to happen anyway.
23280     </para>
23281    </listitem>
23282
23283    <listitem>
23284     <para>
23285      The data type <type>float(<replaceable>p</>)</type> now
23286      measures <replaceable>p</> in binary digits, not decimal
23287      digits.  The new behavior follows the SQL standard.
23288     </para>
23289    </listitem>
23290
23291    <listitem>
23292     <para>
23293      Ambiguous date values now must match the ordering specified by
23294      the <varname>datestyle</varname> setting.  In prior releases, a
23295      date specification of <literal>10/20/03</> was interpreted as a
23296      date in October even if <varname>datestyle</> specified that
23297      the day should be first.  7.4 will throw an error if a date
23298      specification is invalid for the current setting of
23299      <varname>datestyle</>.
23300     </para>
23301    </listitem>
23302
23303    <listitem>
23304     <para>
23305      The functions <function>oidrand</function>,
23306      <function>oidsrand</function>, and
23307      <function>userfntest</function> have been removed.  These
23308      functions were determined to be no longer useful.
23309     </para>
23310    </listitem>
23311
23312    <listitem>
23313     <para>
23314      String literals specifying time-varying date/time values, such
23315      as <literal>'now'</literal> or <literal>'today'</literal> will
23316      no longer work as expected in column default expressions; they
23317      now cause the time of the table creation to be the default, not
23318      the time of the insertion.  Functions such as
23319      <function>now()</>, <function>current_timestamp</>, or
23320      <function>current_date</function> should be used instead.
23321     </para>
23322
23323     <para>
23324      In previous releases, there was special code so that strings
23325      such as <literal>'now'</literal> were interpreted at
23326      <command>INSERT</> time and not at table creation time, but
23327      this work around didn't cover all cases.  Release 7.4 now
23328      requires that defaults be defined properly using functions such
23329      as <function>now()</> or <function>current_timestamp</>. These
23330      will work in all situations.
23331     </para>
23332    </listitem>
23333
23334    <listitem>
23335     <para>
23336      The dollar sign (<literal>$</>) is no longer allowed in
23337      operator names.  It can instead be a non-first character in
23338      identifiers.  This was done to improve compatibility with other
23339      database systems, and to avoid syntax problems when parameter
23340      placeholders (<literal>$<replaceable>n</></>) are written
23341      adjacent to operators.
23342     </para>
23343    </listitem>
23344
23345   </itemizedlist>
23346  </sect2>
23347
23348  <sect2>
23349   <title>Changes</title>
23350
23351   <para>
23352    Below you will find a detailed account of the changes between
23353    release 7.4 and the previous major release.
23354   </para>
23355
23356  <sect3>
23357   <title>Server Operation Changes</title>
23358
23359   <itemizedlist>
23360    <listitem>
23361     <para>
23362      Allow IPv6 server connections (Nigel Kukard, Johan Jordaan,
23363      Bruce, Tom, Kurt Roeckx, Andrew Dunstan)
23364     </para>
23365    </listitem>
23366
23367    <listitem>
23368     <para>
23369      Fix SSL to handle errors cleanly (Nathan Mueller)
23370     </para>
23371     <para>
23372      In prior releases, certain SSL API error reports were not
23373      handled correctly.  This release fixes those problems.
23374     </para>
23375    </listitem>
23376
23377    <listitem>
23378     <para>
23379      SSL protocol security and performance improvements (Sean Chittenden)
23380     </para>
23381     <para>
23382      SSL key renegotiation was happening too frequently, causing poor
23383      SSL performance.  Also, initial key handling was improved.
23384     </para>
23385    </listitem>
23386
23387    <listitem>
23388     <para>
23389      Print lock information when a deadlock is detected (Tom)
23390     </para>
23391     <para>
23392      This allows easier debugging of deadlock situations.
23393     </para>
23394    </listitem>
23395
23396    <listitem>
23397     <para>
23398      Update <filename>/tmp</filename> socket modification times
23399      regularly to avoid their removal (Tom)
23400     </para>
23401     <para>
23402      This should help prevent <filename>/tmp</filename> directory
23403      cleaner administration scripts from removing server socket
23404      files.
23405     </para>
23406    </listitem>
23407
23408    <listitem><para>Enable PAM for Mac OS X (Aaron Hillegass)</para></listitem>
23409
23410    <listitem>
23411     <para>Make B-tree indexes fully WAL-safe (Tom)</para>
23412     <para>
23413      In prior releases, under certain rare cases, a server crash
23414      could cause B-tree indexes to become corrupt. This release
23415      removes those last few rare cases.
23416     </para>
23417    </listitem>
23418
23419    <listitem><para>Allow B-tree index compaction and empty page reuse (Tom)</para></listitem>
23420
23421    <listitem>
23422     <para>
23423      Fix inconsistent index lookups during split of first root page (Tom)
23424     </para>
23425     <para>
23426      In prior releases, when a single-page index split into two
23427      pages, there was a brief period when another database session
23428      could miss seeing an index entry.  This release fixes that rare
23429      failure case.
23430     </para>
23431    </listitem>
23432
23433    <listitem><para>Improve free space map allocation logic (Tom)</para></listitem>
23434
23435    <listitem>
23436     <para>Preserve free space information between server restarts (Tom)</para>
23437     <para>
23438      In prior releases, the free space map was not saved when the
23439      postmaster was stopped, so newly started servers had no free
23440      space information. This release saves the free space map, and
23441      reloads it when the server is restarted.
23442     </para>
23443    </listitem>
23444
23445    <listitem><para>Add start time to <literal>pg_stat_activity</literal> (Neil)</para></listitem>
23446    <listitem><para>New code to detect corrupt disk pages; erase with <varname>zero_damaged_pages</varname> (Tom)</para></listitem>
23447    <listitem><para>New client/server protocol: faster, no username length limit, allow clean exit from <command>COPY</command> (Tom)</para></listitem>
23448    <listitem><para>Add transaction status, table ID, column ID to client/server protocol (Tom)</para></listitem>
23449    <listitem><para>Add binary I/O to client/server protocol (Tom)</para></listitem>
23450    <listitem><para>Remove autocommit server setting; move to client applications (Tom)</para></listitem>
23451    <listitem><para>New error message wording, error codes, and three levels of error detail (Tom, Joe, Peter)</para></listitem>
23452   </itemizedlist>
23453  </sect3>
23454
23455  <sect3>
23456   <title>Performance Improvements</title>
23457
23458   <itemizedlist>
23459    <listitem><para>Add hashing for <literal>GROUP BY</literal> aggregates (Tom)</para></listitem>
23460    <listitem><para>Make nested-loop joins be smarter about multicolumn indexes (Tom)</para></listitem>
23461    <listitem><para>Allow multikey hash joins (Tom)</para></listitem>
23462    <listitem><para>Improve constant folding (Tom)</para></listitem>
23463    <listitem><para>Add ability to inline simple SQL functions (Tom)</para></listitem>
23464
23465    <listitem>
23466     <para>Reduce memory usage for queries using complex functions (Tom)</para>
23467     <para>
23468      In prior releases, functions returning allocated memory would
23469      not free it until the query completed. This release allows the
23470      freeing of function-allocated memory when the function call
23471      completes, reducing the total memory used by functions.
23472     </para>
23473    </listitem>
23474
23475    <listitem>
23476     <para>Improve GEQO optimizer performance (Tom)</para>
23477     <para>
23478      This release fixes several inefficiencies in the way the GEQO optimizer
23479      manages potential query paths.
23480     </para>
23481    </listitem>
23482
23483    <listitem>
23484     <para>
23485      Allow <literal>IN</>/<literal>NOT IN</> to be handled via hash
23486      tables (Tom)
23487     </para>
23488    </listitem>
23489
23490    <listitem>
23491     <para>
23492      Improve <literal>NOT IN (<replaceable>subquery</>)</literal>
23493      performance (Tom)
23494     </para>
23495    </listitem>
23496
23497    <listitem>
23498     <para>
23499      Allow most <literal>IN</literal> subqueries to be processed as
23500      joins (Tom)
23501     </para>
23502    </listitem>
23503
23504    <listitem>
23505     <para>
23506      Pattern matching operations can use indexes regardless of
23507      locale (Peter)
23508     </para>
23509     <para>
23510      There is no way for non-ASCII locales to use the standard
23511      indexes for <literal>LIKE</literal> comparisons. This release
23512      adds a way to create a special index for
23513      <literal>LIKE</literal>.
23514     </para>
23515    </listitem>
23516
23517    <listitem>
23518     <para>Allow the postmaster to preload libraries using <varname>preload_libraries</varname> (Joe)</para>
23519     <para>
23520      For shared libraries that require a long time to load, this
23521      option is available so the library can be preloaded in the
23522      postmaster and inherited by all database sessions.
23523     </para>
23524    </listitem>
23525
23526    <listitem>
23527     <para>
23528      Improve optimizer cost computations, particularly for subqueries (Tom)
23529     </para>
23530    </listitem>
23531
23532    <listitem>
23533     <para>
23534      Avoid sort when subquery <literal>ORDER BY</literal> matches upper query (Tom)
23535     </para>
23536    </listitem>
23537
23538    <listitem>
23539     <para>
23540      Deduce that <literal>WHERE a.x = b.y AND b.y = 42</literal> also
23541      means <literal>a.x = 42</literal> (Tom)
23542     </para>
23543    </listitem>
23544
23545    <listitem>
23546     <para>
23547      Allow hash/merge joins on complex joins (Tom)
23548     </para>
23549    </listitem>
23550
23551    <listitem>
23552     <para>
23553      Allow hash joins for more data types (Tom)
23554     </para>
23555    </listitem>
23556
23557    <listitem>
23558     <para>
23559      Allow join optimization of explicit inner joins, disable with
23560      <varname>join_collapse_limit</varname> (Tom)
23561     </para>
23562    </listitem>
23563
23564    <listitem>
23565     <para>
23566      Add parameter <varname>from_collapse_limit</varname> to control
23567      conversion of subqueries to joins (Tom)
23568     </para>
23569    </listitem>
23570
23571    <listitem>
23572     <para>
23573      Use faster and more powerful regular expression code from Tcl
23574      (Henry Spencer, Tom)
23575     </para>
23576    </listitem>
23577
23578    <listitem>
23579     <para>
23580      Use bit-mapped relation sets in the optimizer (Tom)
23581     </para>
23582    </listitem>
23583
23584    <listitem>
23585     <para>Improve connection startup time (Tom)</para>
23586     <para>
23587      The new client/server protocol requires fewer network packets to
23588      start a database session.
23589     </para>
23590    </listitem>
23591
23592    <listitem>
23593     <para>
23594      Improve trigger/constraint performance (Stephan)
23595     </para>
23596    </listitem>
23597
23598    <listitem>
23599     <para>
23600      Improve speed of <literal>col IN (const, const, const, ...)</literal> (Tom)
23601     </para>
23602    </listitem>
23603
23604    <listitem>
23605     <para>
23606      Fix hash indexes which were broken in rare cases (Tom)
23607     </para>
23608    </listitem>
23609
23610    <listitem><para>Improve hash index concurrency and speed (Tom)</para>
23611     <para>
23612      Prior releases suffered from poor hash index performance,
23613      particularly for high concurrency situations. This release fixes
23614      that, and the development group is interested in reports
23615      comparing B-tree and hash index performance.
23616     </para>
23617    </listitem>
23618
23619    <listitem>
23620     <para>Align shared buffers on 32-byte boundary for copy speed improvement (Manfred Spraul)</para>
23621     <para>
23622      Certain CPU's perform faster data copies when addresses are
23623      32-byte aligned.
23624     </para>
23625    </listitem>
23626
23627    <listitem>
23628     <para>Data type <type>numeric</type> reimplemented for better performance (Tom)</para>
23629     <para>
23630      <type>numeric</type> used to be stored in base 100. The new code
23631      uses base 10000, for significantly better performance.
23632     </para>
23633    </listitem>
23634   </itemizedlist>
23635  </sect3>
23636
23637  <sect3>
23638   <title>Server Configuration Changes</title>
23639
23640   <itemizedlist>
23641    <listitem>
23642     <para>Rename server parameter <varname>server_min_messages</> to <varname>log_min_messages</> (Bruce)</para>
23643     <para>
23644      This was done so most parameters that control the server logs
23645      begin with <literal>log_</>.
23646     </para>
23647    </listitem>
23648
23649    <listitem><para>Rename <varname>show_*_stats</> to <varname>log_*_stats</> (Bruce)</para></listitem>
23650    <listitem><para>Rename <varname>show_source_port</> to <varname>log_source_port</> (Bruce)</para></listitem>
23651    <listitem><para>Rename <varname>hostname_lookup</> to <varname>log_hostname</> (Bruce)</para></listitem>
23652
23653    <listitem>
23654     <para>Add <varname>checkpoint_warning</> to warn of excessive checkpointing (Bruce)</para>
23655     <para>
23656      In prior releases, it was difficult to determine if checkpoint
23657      was happening too frequently. This feature adds a warning to the
23658      server logs when excessive checkpointing happens.
23659     </para>
23660    </listitem>
23661
23662    <listitem><para>New read-only server parameters for localization (Tom)</para></listitem>
23663
23664    <listitem>
23665     <para>
23666      Change debug server log messages to output as <literal>DEBUG</>
23667      rather than <literal>LOG</> (Bruce)
23668     </para>
23669    </listitem>
23670
23671    <listitem>
23672     <para>Prevent server log variables from being turned off by non-superusers (Bruce)</para>
23673     <para>
23674      This is a security feature so non-superusers cannot disable
23675      logging that was enabled by the administrator.
23676     </para>
23677    </listitem>
23678
23679    <listitem>
23680     <para>
23681      <varname>log_min_messages</>/<varname>client_min_messages</> now
23682      controls <varname>debug_*</> output (Bruce)
23683     </para>
23684     <para>
23685      This centralizes client debug information so all debug output
23686      can be sent to either the client or server logs.
23687     </para>
23688    </listitem>
23689
23690    <listitem>
23691     <para>Add Mac OS X Rendezvous server support (Chris Campbell)</para>
23692     <para>
23693      This allows Mac OS X hosts to query the network for available
23694      <productname>PostgreSQL</productname> servers.
23695     </para>
23696    </listitem>
23697
23698    <listitem>
23699     <para>
23700      Add ability to print only slow statements using
23701      <varname>log_min_duration_statement</varname>
23702      (Christopher)
23703     </para>
23704     <para>
23705      This is an often requested debugging feature that allows
23706      administrators to see only slow queries in their server logs.
23707     </para>
23708    </listitem>
23709
23710    <listitem>
23711     <para>Allow <filename>pg_hba.conf</filename> to accept netmasks in CIDR format (Andrew Dunstan)</para>
23712     <para>
23713      This allows administrators to merge the host IP address and
23714      netmask fields into a single CIDR field in <filename>pg_hba.conf</filename>.
23715     </para>
23716    </listitem>
23717
23718    <listitem><para>New read-only parameter <varname>is_superuser</varname> (Tom)</para></listitem>
23719
23720    <listitem>
23721     <para>New parameter <varname>log_error_verbosity</varname> to control error detail (Tom)</para>
23722     <para>
23723      This works with the new error reporting feature to supply
23724      additional error information like hints, file names and line
23725      numbers.
23726     </para>
23727    </listitem>
23728
23729    <listitem>
23730     <para><literal>postgres --describe-config</literal> now dumps server config variables (Aizaz Ahmed, Peter)</para>
23731     <para>
23732      This option is useful for administration tools that need to know
23733      the configuration variable names and their minimums, maximums,
23734      defaults, and descriptions.
23735     </para>
23736    </listitem>
23737
23738    <listitem>
23739     <para>
23740      Add new columns in <literal>pg_settings</literal>:
23741      <literal>context</>, <literal>type</>, <literal>source</>,
23742      <literal>min_val</>, <literal>max_val</> (Joe)
23743     </para>
23744    </listitem>
23745
23746    <listitem>
23747     <para>
23748      Make default <varname>shared_buffers</> 1000 and
23749      <varname>max_connections</> 100, if possible (Tom)
23750     </para>
23751     <para>
23752      Prior versions defaulted to 64 shared buffers so <productname>PostgreSQL</productname>
23753      would start on even very old systems. This release tests the
23754      amount of shared memory allowed by the platform and selects more
23755      reasonable default values if possible.  Of course, users are
23756      still encouraged to evaluate their resource load and size
23757      <varname>shared_buffers</varname> accordingly.
23758     </para>
23759    </listitem>
23760
23761    <listitem>
23762     <para>
23763      New <filename>pg_hba.conf</filename> record type
23764      <literal>hostnossl</> to prevent SSL connections (Jon
23765      Jensen)
23766     </para>
23767     <para>
23768      In prior releases, there was no way to prevent SSL connections
23769      if both the client and server supported SSL. This option allows
23770      that capability.
23771     </para>
23772    </listitem>
23773
23774    <listitem>
23775     <para>
23776      Remove parameter <varname>geqo_random_seed</varname>
23777      (Tom)
23778     </para>
23779    </listitem>
23780
23781    <listitem>
23782     <para>
23783      Add server parameter <varname>regex_flavor</varname> to control regular expression processing (Tom)
23784     </para>
23785    </listitem>
23786
23787    <listitem>
23788     <para>
23789      Make <command>pg_ctl</command> better handle nonstandard ports (Greg)
23790     </para>
23791    </listitem>
23792   </itemizedlist>
23793  </sect3>
23794
23795  <sect3>
23796   <title>Query Changes</title>
23797
23798   <itemizedlist>
23799    <listitem><para>New SQL-standard information schema (Peter)</para></listitem>
23800    <listitem><para>Add read-only transactions (Peter)</para></listitem>
23801    <listitem><para>Print key name and value in foreign-key violation messages (Dmitry Tkach)</para></listitem>
23802
23803    <listitem>
23804     <para>Allow users to see their own queries in <literal>pg_stat_activity</literal> (Kevin Brown)</para>
23805     <para>
23806      In prior releases, only the superuser could see query strings
23807      using <literal>pg_stat_activity</literal>. Now ordinary users
23808      can see their own query strings.
23809     </para>
23810    </listitem>
23811
23812    <listitem>
23813     <para>Fix aggregates in subqueries to match SQL standard (Tom)</para>
23814     <para>
23815      The SQL standard says that an aggregate function appearing
23816      within a nested subquery belongs to the outer query if its
23817      argument contains only outer-query variables.  Prior
23818      <productname>PostgreSQL</productname> releases did not handle
23819      this fine point correctly.
23820     </para>
23821    </listitem>
23822
23823    <listitem>
23824     <para>Add option to prevent auto-addition of tables referenced in query (Nigel J. Andrews)</para>
23825     <para>
23826      By default, tables mentioned in the query are automatically
23827      added to the <literal>FROM</> clause if they are not already
23828      there.  This is compatible with historic
23829      <productname>POSTGRES</productname> behavior but is contrary to
23830      the SQL standard.  This option allows selecting
23831      standard-compatible behavior.
23832     </para>
23833    </listitem>
23834
23835    <listitem>
23836     <para>Allow <literal>UPDATE ... SET col = DEFAULT</literal> (Rod)</para>
23837     <para>
23838      This allows <command>UPDATE</command> to set a column to its
23839      declared default value.
23840     </para>
23841    </listitem>
23842
23843    <listitem>
23844     <para>Allow expressions to be used in <literal>LIMIT</>/<literal>OFFSET</> (Tom)</para>
23845     <para>
23846      In prior releases, <literal>LIMIT</>/<literal>OFFSET</> could
23847      only use constants, not expressions.
23848     </para>
23849    </listitem>
23850
23851    <listitem>
23852     <para>Implement <literal>CREATE TABLE AS EXECUTE</literal> (Neil, Peter)</para>
23853    </listitem>
23854   </itemizedlist>
23855  </sect3>
23856
23857  <sect3>
23858   <title>Object Manipulation Changes</title>
23859
23860   <itemizedlist>
23861    <listitem>
23862     <para>Make <command>CREATE SEQUENCE</command> grammar more conforming to SQL:2003 (Neil)</para>
23863    </listitem>
23864
23865    <listitem>
23866     <para>Add statement-level triggers (Neil)</para>
23867     <para>
23868      While this allows a trigger to fire at the end of a statement,
23869      it does not allow the trigger to access all rows modified by the
23870      statement.  This capability is planned for a future release.
23871     </para>
23872    </listitem>
23873
23874    <listitem>
23875     <para>Add check constraints for domains (Rod)</para>
23876     <para>
23877      This greatly increases the usefulness of domains by allowing
23878      them to use check constraints.
23879     </para>
23880    </listitem>
23881
23882    <listitem>
23883     <para>Add <command>ALTER DOMAIN</command> (Rod)</para>
23884     <para>
23885      This allows manipulation of existing domains.
23886     </para>
23887    </listitem>
23888
23889    <listitem>
23890     <para>Fix several zero-column table bugs (Tom)</para>
23891     <para>
23892      <productname>PostgreSQL</productname> supports zero-column tables. This fixes various bugs
23893      that occur when using such tables.
23894     </para>
23895    </listitem>
23896
23897    <listitem>
23898     <para>Have <literal>ALTER TABLE ... ADD PRIMARY KEY</literal> add not-null constraint (Rod)</para>
23899     <para>
23900      In prior releases, <literal>ALTER TABLE ... ADD
23901      PRIMARY</literal> would add a unique index, but not a not-null
23902      constraint.  That is fixed in this release.
23903     </para>
23904    </listitem>
23905
23906    <listitem><para>Add <literal>ALTER TABLE ... WITHOUT OIDS</literal> (Rod)</para>
23907     <para>
23908      This allows control over whether new and updated rows will have
23909      an OID column.  This is most useful for saving storage space.
23910     </para>
23911    </listitem>
23912
23913    <listitem>
23914     <para>
23915      Add <literal>ALTER SEQUENCE</literal> to modify minimum, maximum,
23916      increment, cache, cycle values (Rod)
23917     </para>
23918    </listitem>
23919
23920    <listitem>
23921     <para>Add <literal>ALTER TABLE ... CLUSTER ON</literal> (Alvaro Herrera)</para>
23922     <para>
23923      This command is used by <command>pg_dump</command> to record the
23924      cluster column for each table previously clustered. This
23925      information is used by database-wide cluster to cluster all
23926      previously clustered tables.
23927     </para>
23928    </listitem>
23929
23930    <listitem><para>Improve automatic type casting for domains (Rod, Tom)</para></listitem>
23931    <listitem><para>Allow dollar signs in identifiers, except as first character (Tom)</para></listitem>
23932    <listitem><para>Disallow dollar signs in operator names, so <literal>x=$1</> works (Tom)</para></listitem>
23933
23934    <listitem>
23935     <para>
23936      Allow copying table schema using <literal>LIKE
23937      <replaceable>subtable</replaceable></literal>, also SQL:2003
23938      feature <literal>INCLUDING DEFAULTS</literal> (Rod)
23939     </para>
23940    </listitem>
23941
23942    <listitem>
23943     <para>
23944      Add <literal>WITH GRANT OPTION</literal> clause to
23945      <command>GRANT</command> (Peter)
23946     </para>
23947     <para>
23948      This enabled <command>GRANT</command> to give other users the
23949      ability to grant privileges on a object.
23950     </para>
23951    </listitem>
23952   </itemizedlist>
23953  </sect3>
23954
23955  <sect3>
23956   <title>Utility Command Changes</title>
23957
23958   <itemizedlist>
23959    <listitem>
23960     <para>Add <literal>ON COMMIT</literal> clause to <command>CREATE TABLE</command> for temporary tables (Gavin)</para>
23961     <para>
23962      This adds the ability for a table to be dropped or all rows
23963      deleted on transaction commit.
23964     </para>
23965    </listitem>
23966
23967    <listitem>
23968     <para>Allow cursors outside transactions using <literal>WITH HOLD</literal> (Neil)</para>
23969     <para>
23970      In previous releases, cursors were removed at the end of the
23971      transaction that created them. Cursors can now be created with
23972      the <literal>WITH HOLD</literal> option, which allows them to
23973      continue to be accessed after the creating transaction has
23974      committed.
23975     </para>
23976    </listitem>
23977
23978    <listitem>
23979     <para><literal>FETCH 0</literal> and <literal>MOVE 0 </literal> now do nothing (Bruce)</para>
23980     <para>
23981      In previous releases, <literal>FETCH 0</literal> fetched all
23982      remaining rows, and <literal>MOVE 0</literal> moved to the end
23983      of the cursor.
23984     </para>
23985    </listitem>
23986
23987    <listitem>
23988     <para>
23989      Cause <command>FETCH</command> and <command>MOVE</command> to
23990      return the number of rows fetched/moved, or zero if at the
23991      beginning/end of cursor, per SQL standard (Bruce)
23992     </para>
23993     <para>
23994      In prior releases, the row count returned by
23995      <command>FETCH</command> and <command>MOVE</command> did not
23996      accurately reflect the number of rows processed.
23997     </para>
23998    </listitem>
23999
24000    <listitem>
24001     <para>Properly handle <literal>SCROLL</literal> with cursors, or
24002     report an error (Neil)</para>
24003     <para>
24004      Allowing random access (both forward and backward scrolling) to
24005      some kinds of queries cannot be done without some additional
24006      work. If <literal>SCROLL</literal> is specified when the cursor
24007      is created, this additional work will be performed. Furthermore,
24008      if the cursor has been created with <literal>NO SCROLL</literal>,
24009      no random access is allowed.
24010     </para>
24011    </listitem>
24012
24013    <listitem>
24014     <para>
24015      Implement SQL-compatible options <literal>FIRST</>,
24016      <literal>LAST</>, <literal>ABSOLUTE <replaceable>n</></>,
24017      <literal>RELATIVE <replaceable>n</></> for
24018      <command>FETCH</command> and <command>MOVE</command> (Tom)
24019     </para>
24020    </listitem>
24021
24022    <listitem>
24023     <para>Allow <command>EXPLAIN</command> on <command>DECLARE CURSOR</command> (Tom)</para>
24024    </listitem>
24025
24026    <listitem>
24027     <para>Allow <command>CLUSTER</command> to use index marked as pre-clustered by default (Alvaro Herrera)</para>
24028    </listitem>
24029
24030    <listitem>
24031     <para>Allow <command>CLUSTER</command> to cluster all tables (Alvaro Herrera)</para>
24032     <para>
24033      This allows all previously clustered tables in a database to be
24034      reclustered with a single command.
24035     </para>
24036    </listitem>
24037
24038    <listitem><para>Prevent <command>CLUSTER</command> on partial indexes (Tom)</para></listitem>
24039
24040    <listitem><para>Allow DOS and Mac line-endings in <command>COPY</> files (Bruce)</para></listitem>
24041
24042    <listitem>
24043     <para>
24044      Disallow literal carriage return as a data value,
24045      backslash-carriage-return and <literal>\r</> are still allowed
24046      (Bruce)
24047     </para>
24048    </listitem>
24049
24050    <listitem>
24051     <para><command>COPY</> changes (binary, <literal>\.</>) (Tom)</para>
24052    </listitem>
24053
24054    <listitem>
24055     <para>Recover from <command>COPY</command> failure cleanly (Tom)</para>
24056    </listitem>
24057
24058    <listitem>
24059     <para>Prevent possible memory leaks in <command>COPY</command> (Tom)</para>
24060    </listitem>
24061
24062    <listitem>
24063     <para>Make <command>TRUNCATE</command> transaction-safe (Rod)</para>
24064     <para>
24065      <command>TRUNCATE</command> can now be used inside a
24066      transaction. If the transaction aborts, the changes made by the
24067      <command>TRUNCATE</command> are automatically rolled back.
24068     </para>
24069    </listitem>
24070
24071    <listitem>
24072     <para>
24073      Allow prepare/bind of utility commands like
24074      <command>FETCH</command> and <command>EXPLAIN</command> (Tom)
24075     </para>
24076    </listitem>
24077
24078    <listitem>
24079     <para>Add <command>EXPLAIN EXECUTE</command> (Neil)</para>
24080    </listitem>
24081
24082    <listitem>
24083     <para>Improve <command>VACUUM</command> performance on indexes by reducing WAL traffic (Tom)</para>
24084    </listitem>
24085
24086    <listitem>
24087     <para>Functional indexes have been generalized into indexes on expressions (Tom)</para>
24088     <para>
24089      In prior releases, functional indexes only supported a simple
24090      function applied to one or more column names.  This release
24091      allows any type of scalar expression.
24092     </para>
24093    </listitem>
24094
24095    <listitem>
24096     <para>
24097      Have <command>SHOW TRANSACTION ISOLATION</command> match input
24098      to <command>SET TRANSACTION ISOLATION</command>
24099      (Tom)
24100     </para>
24101    </listitem>
24102
24103    <listitem>
24104     <para>
24105       Have <command>COMMENT ON DATABASE</command> on nonlocal
24106       database generate a warning, rather than an error (Rod)
24107      </para>
24108
24109     <para>
24110      Database comments are stored in database-local tables so
24111      comments on a database have to be stored in each database.
24112     </para>
24113    </listitem>
24114
24115    <listitem>
24116     <para>
24117      Improve reliability of <command>LISTEN</>/<command>NOTIFY</> (Tom)
24118     </para>
24119    </listitem>
24120
24121    <listitem>
24122     <para>Allow <command>REINDEX</command> to reliably reindex nonshared system catalog indexes (Tom)</para>
24123     <para>
24124      This allows system tables to be reindexed without the
24125      requirement of a standalone session, which was necessary in
24126      previous releases. The only tables that now require a standalone
24127      session for reindexing are the global system tables
24128      <literal>pg_database</>, <literal>pg_shadow</>, and
24129      <literal>pg_group</>.
24130     </para>
24131    </listitem>
24132   </itemizedlist>
24133  </sect3>
24134
24135  <sect3>
24136   <title>Data Type and Function Changes</title>
24137
24138   <itemizedlist>
24139    <listitem>
24140     <para>
24141      New server parameter <varname>extra_float_digits</varname> to
24142      control precision display of floating-point numbers (Pedro
24143      Ferreira, Tom)
24144     </para>
24145     <para>
24146      This controls output precision which was causing regression
24147      testing problems.
24148     </para>
24149    </listitem>
24150
24151    <listitem><para>Allow <literal>+1300</literal> as a numeric time-zone specifier, for FJST (Tom)</para></listitem>
24152
24153    <listitem>
24154     <para>
24155      Remove rarely used functions <function>oidrand</>,
24156      <function>oidsrand</>, and <function>userfntest</> functions
24157      (Neil)
24158     </para>
24159    </listitem>
24160
24161    <listitem>
24162     <para>Add <function>md5()</> function to main server, already in <filename>contrib/pgcrypto</filename> (Joe)</para>
24163     <para>
24164      An MD5 function was frequently requested. For more complex
24165      encryption capabilities, use
24166      <filename>contrib/pgcrypto</filename>.
24167     </para>
24168    </listitem>
24169
24170    <listitem><para>Increase date range of <type>timestamp</type> (John Cochran)</para></listitem>
24171
24172    <listitem>
24173     <para>
24174      Change <literal>EXTRACT(EPOCH FROM timestamp)</literal> so
24175      <type>timestamp without time zone</type> is assumed to be in
24176      local time, not GMT (Tom)
24177     </para>
24178    </listitem>
24179
24180    <listitem><para>Trap division by zero in case the operating system doesn't prevent it (Tom)</para></listitem>
24181    <listitem><para>Change the <type>numeric</type> data type internally to base 10000 (Tom)</para></listitem>
24182    <listitem><para>New <function>hostmask()</function> function (Greg Wickham)</para></listitem>
24183    <listitem><para>Fixes for <function>to_char()</function> and <function>to_timestamp()</function> (Karel)</para></listitem>
24184
24185    <listitem>
24186     <para>
24187      Allow functions that can take any argument data type and return
24188      any data type, using <type>anyelement</type> and
24189      <type>anyarray</type> (Joe)
24190     </para>
24191     <para>
24192      This allows the creation of functions that can work with any
24193      data type.
24194     </para>
24195    </listitem>
24196
24197    <listitem>
24198     <para>
24199      Arrays can now be specified as <literal>ARRAY[1,2,3]</literal>,
24200      <literal>ARRAY[['a','b'],['c','d']]</literal>, or
24201      <literal>ARRAY[ARRAY[ARRAY[2]]]</literal> (Joe)
24202     </para>
24203    </listitem>
24204
24205    <listitem>
24206     <para>
24207      Allow proper comparisons for arrays, including <literal>ORDER
24208      BY</literal> and <literal>DISTINCT</literal> support
24209      (Joe)
24210     </para>
24211    </listitem>
24212
24213    <listitem><para>Allow indexes on array columns (Joe)</para></listitem>
24214    <listitem><para>Allow array concatenation with <literal>||</literal> (Joe)</para></listitem>
24215
24216    <listitem>
24217     <para>
24218      Allow <literal>WHERE</literal> qualification
24219      <literal><replaceable>expr</> <replaceable>op</> ANY/SOME/ALL
24220      (<replaceable>array_expr</>)</literal> (Joe)
24221     </para>
24222     <para>
24223      This allows arrays to behave like a list of values, for purposes
24224      like <literal>SELECT * FROM tab WHERE col IN
24225      (array_val)</literal>.
24226     </para>
24227    </listitem>
24228
24229    <listitem>
24230     <para>
24231      New array functions <function>array_append</>,
24232      <function>array_cat</>, <function>array_lower</>,
24233      <function>array_prepend</>, <function>array_to_string</>,
24234      <function>array_upper</>, <function>string_to_array</> (Joe)
24235     </para>
24236    </listitem>
24237
24238    <listitem><para>Allow user defined aggregates to use polymorphic functions (Joe)</para></listitem>
24239    <listitem><para>Allow assignments to empty arrays (Joe)</para></listitem>
24240
24241    <listitem>
24242     <para>
24243      Allow 60 in seconds fields of <type>time</type>,
24244      <type>timestamp</type>, and <type>interval</type> input values
24245      (Tom)
24246     </para>
24247     <para>
24248      Sixty-second values are needed for leap seconds.
24249     </para>
24250    </listitem>
24251
24252    <listitem><para>Allow <type>cidr</type> data type to be cast to <type>text</type> (Tom)</para></listitem>
24253
24254    <listitem><para>Disallow invalid time zone names in SET TIMEZONE</para></listitem>
24255
24256    <listitem>
24257     <para>
24258      Trim trailing spaces when <type>char</type> is cast to
24259      <type>varchar</> or <type>text</> (Tom)
24260     </para>
24261    </listitem>
24262
24263    <listitem>
24264     <para>
24265      Make <type>float(<replaceable>p</>)</> measure the precision
24266      <replaceable>p</> in binary digits, not decimal digits
24267      (Tom)
24268     </para>
24269    </listitem>
24270
24271    <listitem>
24272     <para>Add IPv6 support to the <type>inet</type> and <type>cidr</type> data types (Michael Graff)</para>
24273    </listitem>
24274
24275    <listitem>
24276     <para>Add <function>family()</function> function to report whether address is IPv4 or IPv6 (Michael Graff)</para>
24277    </listitem>
24278
24279    <listitem>
24280     <para>
24281      Have <literal>SHOW datestyle</literal> generate output similar
24282      to that used by <literal>SET datestyle</literal> (Tom)
24283     </para>
24284    </listitem>
24285
24286    <listitem>
24287     <para>
24288      Make <literal>EXTRACT(TIMEZONE)</literal> and <literal>SET/SHOW
24289      TIME ZONE</literal> follow the SQL convention for the sign of
24290      time zone offsets, i.e., positive is east from UTC (Tom)
24291     </para>
24292    </listitem>
24293
24294    <listitem>
24295     <para>Fix <literal>date_trunc('quarter', ...)</literal> (Böjthe Zoltán)</para>
24296     <para>
24297      Prior releases returned an incorrect value for this function call.
24298     </para>
24299    </listitem>
24300
24301    <listitem>
24302     <para>Make <function>initcap()</function> more compatible with Oracle (Mike Nolan)</para>
24303     <para>
24304      <function>initcap()</function> now uppercases a letter appearing
24305      after any non-alphanumeric character, rather than only after
24306      whitespace.
24307     </para>
24308    </listitem>
24309
24310    <listitem>
24311     <para>Allow only <varname>datestyle</varname> field order for date values not in ISO-8601 format (Greg)</para>
24312    </listitem>
24313
24314    <listitem>
24315     <para>
24316      Add new <varname>datestyle</varname> values <literal>MDY</>,
24317      <literal>DMY</>, and <literal>YMD</> to set input field order;
24318      honor <literal>US</> and <literal>European</> for backward
24319      compatibility (Tom)
24320     </para>
24321    </listitem>
24322
24323    <listitem>
24324     <para>
24325      String literals like <literal>'now'</literal> or
24326      <literal>'today'</literal> will no longer work as a column
24327      default. Use functions such as <function>now()</function>,
24328      <function>current_timestamp</function> instead.  (change
24329      required for prepared statements) (Tom)
24330     </para>
24331    </listitem>
24332
24333    <listitem>
24334     <para>Treat NaN as larger than any other value in <function>min()</>/<function>max()</> (Tom)</para>
24335     <para>
24336      NaN was already sorted after ordinary numeric values for most
24337      purposes, but <function>min()</> and <function>max()</> didn't
24338      get this right.
24339     </para>
24340    </listitem>
24341
24342    <listitem>
24343     <para>Prevent interval from suppressing <literal>:00</literal>
24344     seconds display</para>
24345    </listitem>
24346
24347    <listitem>
24348     <para>
24349      New functions <function>pg_get_triggerdef(prettyprint)</function>
24350      and <function>pg_conversion_is_visible()</function> (Christopher)
24351     </para>
24352    </listitem>
24353
24354    <listitem>
24355     <para>Allow time to be specified as <literal>040506</> or <literal>0405</> (Tom)</para>
24356    </listitem>
24357
24358    <listitem>
24359     <para>
24360      Input date order must now be <literal>YYYY-MM-DD</literal> (with 4-digit year) or
24361      match <varname>datestyle</varname>
24362     </para>
24363    </listitem>
24364
24365    <listitem>
24366     <para>
24367      Make <function>pg_get_constraintdef</function> support
24368      unique, primary-key, and check constraints (Christopher)
24369     </para>
24370    </listitem>
24371   </itemizedlist>
24372  </sect3>
24373
24374  <sect3>
24375   <title>Server-Side Language Changes</title>
24376
24377   <itemizedlist>
24378    <listitem>
24379     <para>
24380      Prevent PL/pgSQL crash when <literal>RETURN NEXT</literal> is
24381      used on a zero-row record variable (Tom)
24382     </para>
24383    </listitem>
24384
24385    <listitem>
24386     <para>
24387      Make PL/Python's <function>spi_execute</function> interface
24388      handle null values properly (Andrew Bosma)
24389     </para>
24390    </listitem>
24391
24392    <listitem>
24393     <para>Allow PL/pgSQL to declare variables of composite types without <literal>%ROWTYPE</literal> (Tom)</para>
24394    </listitem>
24395
24396    <listitem>
24397     <para>Fix PL/Python's <function>_quote()</function> function to handle big integers</para>
24398    </listitem>
24399
24400    <listitem>
24401     <para>Make PL/Python an untrusted language, now called <literal>plpythonu</literal> (Kevin Jacobs, Tom)</para>
24402     <para>
24403      The Python language no longer supports a restricted execution
24404      environment, so the trusted version of PL/Python was removed. If
24405      this situation changes, a version of PL/Python that can be used
24406      by non-superusers will be readded.
24407     </para>
24408    </listitem>
24409
24410    <listitem>
24411     <para>Allow polymorphic PL/pgSQL functions (Joe, Tom)</para>
24412    </listitem>
24413
24414    <listitem>
24415     <para>Allow polymorphic SQL functions (Joe)</para>
24416    </listitem>
24417
24418    <listitem>
24419     <para>
24420      Improved compiled function caching mechanism in PL/pgSQL with
24421      full support for polymorphism (Joe)
24422     </para>
24423    </listitem>
24424
24425    <listitem>
24426     <para>
24427      Add new parameter <literal>$0</> in PL/pgSQL representing the
24428      function's actual return type (Joe)
24429     </para>
24430    </listitem>
24431
24432    <listitem>
24433     <para>
24434      Allow PL/Tcl and PL/Python to use the same trigger on multiple tables (Tom)
24435     </para>
24436    </listitem>
24437
24438    <listitem>
24439     <para>
24440      Fixed PL/Tcl's <function>spi_prepare</function> to accept fully
24441      qualified type names in the parameter type list
24442      (Jan)
24443     </para>
24444    </listitem>
24445   </itemizedlist>
24446  </sect3>
24447
24448  <sect3>
24449   <title>psql Changes</title>
24450
24451   <itemizedlist>
24452    <listitem>
24453     <para>Add <literal>\pset pager always</literal> to always use pager (Greg)</para>
24454     <para>
24455      This forces the pager to be used even if the number of rows is
24456      less than the screen height.  This is valuable for rows that
24457      wrap across several screen rows.
24458     </para>
24459    </listitem>
24460
24461    <listitem><para>Improve tab completion (Rod, Ross Reedstrom, Ian Barwick)</para></listitem>
24462    <listitem><para>Reorder <literal>\?</> help into groupings (Harald Armin Massa, Bruce)</para></listitem>
24463    <listitem><para>Add backslash commands for listing schemas, casts, and conversions (Christopher)</para></listitem>
24464
24465    <listitem>
24466     <para>
24467      <command>\encoding</> now changes based on the server parameter
24468      <varname>client_encoding</varname> (Tom)
24469     </para>
24470     <para>
24471      In previous versions, <command>\encoding</command> was not aware
24472      of encoding changes made using <literal>SET
24473      client_encoding</literal>.
24474     </para>
24475    </listitem>
24476
24477    <listitem>
24478     <para>Save editor buffer into readline history (Ross)</para>
24479     <para>
24480      When <command>\e</> is used to edit a query, the result is saved
24481      in the readline history for retrieval using the up arrow.
24482     </para>
24483    </listitem>
24484
24485    <listitem><para>Improve <command>\d</command> display (Christopher)</para></listitem>
24486    <listitem><para>Enhance HTML mode to be more standards-conforming (Greg)</para></listitem>
24487
24488    <listitem>
24489     <para>New <command>\set AUTOCOMMIT off</command> capability (Tom)</para>
24490     <para>
24491      This takes the place of the removed server parameter <varname>autocommit</varname>.
24492     </para>
24493    </listitem>
24494
24495    <listitem>
24496     <para>New <command>\set VERBOSITY</command> to control error detail (Tom)</para>
24497     <para>
24498      This controls the new error reporting details.
24499     </para>
24500    </listitem>
24501
24502    <listitem><para>New prompt escape sequence <literal>%x</literal> to show transaction status (Tom)</para></listitem>
24503    <listitem><para>Long options for <application>psql</application> are now available on all platforms</para></listitem>
24504   </itemizedlist>
24505  </sect3>
24506
24507  <sect3>
24508   <title>pg_dump Changes</title>
24509
24510   <itemizedlist>
24511    <listitem><para>Multiple pg_dump fixes, including tar format and large objects</para></listitem>
24512    <listitem><para>Allow pg_dump to dump specific schemas (Neil)</para></listitem>
24513
24514    <listitem>
24515     <para>Make pg_dump preserve column storage characteristics (Christopher)</para>
24516     <para>
24517      This preserves <literal>ALTER TABLE ... SET STORAGE</literal> information.
24518     </para>
24519    </listitem>
24520
24521    <listitem><para>Make pg_dump preserve <command>CLUSTER</command> characteristics (Christopher)</para></listitem>
24522
24523    <listitem>
24524     <para>
24525      Have pg_dumpall use <command>GRANT</>/<command>REVOKE</> to dump database-level privileges (Tom)
24526     </para>
24527    </listitem>
24528
24529    <listitem>
24530     <para>
24531      Allow pg_dumpall to support the options <option>-a</>,
24532      <option>-s</>, <option>-x</> of pg_dump (Tom)
24533     </para>
24534    </listitem>
24535
24536    <listitem><para>Prevent pg_dump from lowercasing identifiers specified on the command line (Tom)</para></listitem>
24537
24538    <listitem>
24539     <para>
24540      pg_dump options <option>--use-set-session-authorization</option>
24541      and <option>--no-reconnect</option> now do nothing, all dumps
24542      use <command>SET SESSION AUTHORIZATION</command>
24543     </para>
24544     <para>
24545      pg_dump no longer reconnects to switch users, but instead always
24546      uses <command>SET SESSION AUTHORIZATION</command>. This will
24547      reduce password prompting during restores.
24548     </para>
24549    </listitem>
24550
24551    <listitem>
24552     <para>Long options for <application>pg_dump</application> are now available on all platforms</para>
24553     <para>
24554      <productname>PostgreSQL</productname> now includes its own
24555      long-option processing routines.
24556     </para>
24557    </listitem>
24558   </itemizedlist>
24559  </sect3>
24560
24561  <sect3>
24562   <title>libpq Changes</title>
24563
24564   <itemizedlist>
24565    <listitem>
24566     <para>
24567      Add function <function>PQfreemem</function> for freeing memory on
24568      Windows, suggested for <command>NOTIFY</command> (Bruce)
24569     </para>
24570     <para>
24571      Windows requires that memory allocated in a library be freed by
24572      a function in the same library, hence
24573      <function>free()</function> doesn't work for freeing memory
24574      allocated by libpq. <function>PQfreemem</function> is the proper
24575      way to free libpq memory, especially on Windows, and is
24576      recommended for other platforms as well.
24577     </para>
24578    </listitem>
24579
24580    <listitem>
24581     <para>Document service capability, and add sample file (Bruce)</para>
24582     <para>
24583      This allows clients to look up connection information in a
24584      central file on the client machine.
24585     </para>
24586    </listitem>
24587
24588    <listitem>
24589     <para>
24590      Make <function>PQsetdbLogin</function> have the same defaults as
24591      <function>PQconnectdb</function> (Tom)
24592     </para>
24593    </listitem>
24594
24595    <listitem><para>Allow libpq to cleanly fail when result sets are too large (Tom)</para></listitem>
24596
24597    <listitem>
24598     <para>
24599      Improve performance of function <function>PQunescapeBytea</function> (Ben Lamb)
24600     </para>
24601    </listitem>
24602
24603    <listitem>
24604     <para>
24605      Allow thread-safe libpq with <filename>configure</filename>
24606      option <option>--enable-thread-safety</option> (Lee Kindness,
24607      Philip Yarra)
24608     </para>
24609    </listitem>
24610
24611    <listitem>
24612     <para>
24613      Allow function <function>pqInternalNotice</function> to accept a
24614      format string and arguments instead of just a preformatted
24615      message (Tom, Sean Chittenden)
24616     </para>
24617    </listitem>
24618
24619    <listitem>
24620     <para>
24621      Control SSL negotiation with <literal>sslmode</literal> values
24622      <literal>disable</literal>, <literal>allow</literal>,
24623      <literal>prefer</literal>, and <literal>require</literal> (Jon
24624      Jensen)
24625     </para>
24626    </listitem>
24627
24628    <listitem>
24629     <para>Allow new error codes and levels of text (Tom)</para>
24630    </listitem>
24631
24632    <listitem>
24633     <para>Allow access to the underlying table and column of a query result (Tom)</para>
24634     <para>
24635      This is helpful for query-builder applications that want to know
24636      the underlying table and column names associated with a specific
24637      result set.
24638     </para>
24639    </listitem>
24640
24641    <listitem><para>Allow access to the current transaction status (Tom)</para></listitem>
24642    <listitem><para>Add ability to pass binary data directly to the server (Tom)</para></listitem>
24643
24644    <listitem>
24645     <para>
24646      Add function <function>PQexecPrepared</function> and
24647      <function>PQsendQueryPrepared</function> functions which perform
24648      bind/execute of previously prepared statements (Tom)
24649      </para>
24650     </listitem>
24651   </itemizedlist>
24652  </sect3>
24653
24654  <sect3>
24655   <title>JDBC Changes</title>
24656
24657   <itemizedlist>
24658    <listitem><para>Allow <function>setNull</function> on updateable result sets</para></listitem>
24659    <listitem><para>Allow <function>executeBatch</function> on a prepared statement (Barry)</para></listitem>
24660    <listitem><para>Support SSL connections (Barry)</para></listitem>
24661    <listitem><para>Handle schema names in result sets (Paul Sorenson)</para></listitem>
24662    <listitem><para>Add refcursor support (Nic Ferrier)</para></listitem>
24663   </itemizedlist>
24664  </sect3>
24665
24666  <sect3>
24667   <title>Miscellaneous Interface Changes</title>
24668
24669   <itemizedlist>
24670    <listitem>
24671     <para>Prevent possible memory leak or core dump during libpgtcl shutdown (Tom)</para>
24672    </listitem>
24673    <listitem>
24674     <para>Add Informix compatibility to ECPG (Michael)</para>
24675     <para>
24676      This allows ECPG to process embedded C programs that were
24677      written using certain Informix extensions.
24678     </para>
24679    </listitem>
24680
24681    <listitem>
24682     <para>Add type <type>decimal</type> to ECPG that is fixed length, for Informix (Michael)</para>
24683    </listitem>
24684
24685    <listitem>
24686     <para>
24687      Allow thread-safe embedded SQL programs with
24688      <filename>configure</filename> option
24689      <option>--enable-thread-safety</option> (Lee Kindness, Bruce)
24690     </para>
24691     <para>
24692      This allows multiple threads to access the database at the same
24693      time.
24694     </para>
24695    </listitem>
24696
24697    <listitem>
24698     <para>Moved Python client PyGreSQL to <ulink url="http://www.pygresql.org"></ulink> (Marc)</para>
24699    </listitem>
24700   </itemizedlist>
24701  </sect3>
24702
24703  <sect3>
24704   <title>Source Code Changes</title>
24705
24706   <itemizedlist>
24707    <listitem><para>Prevent need for separate platform geometry regression result files (Tom)</para></listitem>
24708    <listitem><para>Improved PPC locking primitive (Reinhard Max)</para></listitem>
24709    <listitem><para>New function <function>palloc0</function> to allocate and clear memory (Bruce)</para></listitem>
24710    <listitem><para>Fix locking code for s390x CPU (64-bit) (Tom)</para></listitem>
24711    <listitem><para>Allow OpenBSD to use local ident credentials (William Ahern)</para></listitem>
24712    <listitem><para>Make query plan trees read-only to executor (Tom)</para></listitem>
24713    <listitem><para>Add Darwin startup scripts (David Wheeler)</para></listitem>
24714    <listitem><para>Allow libpq to compile with Borland C++ compiler (Lester Godwin, Karl Waclawek)</para></listitem>
24715    <listitem><para>Use our own version of <function>getopt_long()</function> if needed (Peter)</para></listitem>
24716    <listitem><para>Convert administration scripts to C (Peter)</para></listitem>
24717    <listitem><para> Bison &gt;= 1.85 is now required to build the <productname>PostgreSQL</> grammar, if building from CVS</para></listitem>
24718    <listitem><para>Merge documentation into one book (Peter)</para></listitem>
24719    <listitem><para>Add Windows compatibility functions (Bruce)</para></listitem>
24720    <listitem><para>Allow client interfaces to compile under MinGW (Bruce)</para></listitem>
24721    <listitem><para>New <function>ereport()</function> function for error reporting (Tom)</para></listitem>
24722    <listitem><para>Support Intel compiler on Linux (Peter)</para></listitem>
24723    <listitem><para>Improve Linux startup scripts (Slawomir Sudnik, Darko Prenosil)</para></listitem>
24724    <listitem><para>Add support for AMD Opteron and Itanium (Jeffrey W. Baker, Bruce)</para></listitem>
24725    <listitem>
24726     <para>Remove <option>--enable-recode</option> option from <command>configure</command></para>
24727     <para>
24728      This was no longer needed now that we have <command>CREATE CONVERSION</command>.
24729     </para>
24730    </listitem>
24731    <listitem>
24732     <para>Generate a compile error if spinlock code is not found (Bruce)</para>
24733     <para>
24734      Platforms without spinlock code will now fail to compile, rather
24735      than silently using semaphores. This failure can be disabled
24736      with a new <command>configure</command> option.
24737     </para>
24738    </listitem>
24739   </itemizedlist>
24740  </sect3>
24741
24742  <sect3>
24743   <title>Contrib Changes</title>
24744
24745   <itemizedlist>
24746    <listitem><para>Change dbmirror license to BSD</para></listitem>
24747    <listitem><para>Improve earthdistance (Bruno Wolff III)</para></listitem>
24748    <listitem><para>Portability improvements to pgcrypto (Marko Kreen)</para></listitem>
24749    <listitem><para>Prevent crash in xml (John Gray, Michael Richards)</para></listitem>
24750    <listitem><para>Update oracle</para></listitem>
24751    <listitem><para>Update mysql</para></listitem>
24752    <listitem><para>Update cube (Bruno Wolff III)</para></listitem>
24753    <listitem><para>Update earthdistance to use cube (Bruno Wolff III)</para></listitem>
24754    <listitem><para>Update btree_gist (Oleg)</para></listitem>
24755    <listitem><para>New tsearch2 full-text search module (Oleg, Teodor)</para></listitem>
24756    <listitem><para>Add hash-based crosstab function to tablefuncs (Joe)</para></listitem>
24757    <listitem><para>Add serial column to order <function>connectby()</> siblings in tablefuncs (Nabil Sayegh,Joe)</para></listitem>
24758    <listitem><para>Add named persistent connections to dblink (Shridhar Daithanka)</para></listitem>
24759    <listitem><para>New pg_autovacuum allows automatic <command>VACUUM</command> (Matthew T. O'Connor)</para></listitem>
24760    <listitem><para>Make pgbench honor environment variables <envar>PGHOST</>, <envar>PGPORT</>, <envar>PGUSER</> (Tatsuo)</para></listitem>
24761    <listitem><para>Improve intarray (Teodor Sigaev)</para></listitem>
24762    <listitem><para>Improve pgstattuple (Rod)</para></listitem>
24763    <listitem><para>Fix bug in <function>metaphone()</function> in fuzzystrmatch</para></listitem>
24764    <listitem><para>Improve adddepend (Rod)</para></listitem>
24765    <listitem><para>Update spi/timetravel (Böjthe Zoltán)</para></listitem>
24766    <listitem><para>Fix dbase <option>-s</> option and improve non-ASCII handling (Thomas Behr, Márcio Smiderle)</para></listitem>
24767    <listitem><para>Remove array module because features now included by default (Joe)</para></listitem>
24768   </itemizedlist>
24769  </sect3>
24770  </sect2>
24771 </sect1>
24772
24773  <sect1 id="release-7-3-21">
24774   <title>Release 7.3.21</title>
24775
24776   <note>
24777   <title>Release date</title>
24778   <simpara>2008-01-07</simpara>
24779   </note>
24780
24781   <para>
24782    This release contains a variety of fixes from 7.3.20,
24783    including fixes for significant security issues.
24784   </para>
24785
24786   <para>
24787    This is expected to be the last <productname>PostgreSQL</> release
24788    in the 7.3.X series.  Users are encouraged to update to a newer
24789    release branch soon.
24790   </para>
24791
24792   <sect2>
24793    <title>Migration to Version 7.3.21</title>
24794
24795    <para>
24796     A dump/restore is not required for those running 7.3.X.  However,
24797     if you are upgrading from a version earlier than 7.3.13, see the release
24798     notes for 7.3.13.
24799    </para>
24800
24801   </sect2>
24802
24803   <sect2>
24804    <title>Changes</title>
24805
24806    <itemizedlist>
24807
24808     <listitem>
24809      <para>
24810       Prevent functions in indexes from executing with the privileges of
24811       the user running <command>VACUUM</>, <command>ANALYZE</>, etc (Tom)
24812      </para>
24813
24814      <para>
24815       Functions used in index expressions and partial-index
24816       predicates are evaluated whenever a new table entry is made.  It has
24817       long been understood that this poses a risk of trojan-horse code
24818       execution if one modifies a table owned by an untrustworthy user.
24819       (Note that triggers, defaults, check constraints, etc. pose the
24820       same type of risk.)  But functions in indexes pose extra danger
24821       because they will be executed by routine maintenance operations
24822       such as <command>VACUUM FULL</>, which are commonly performed
24823       automatically under a superuser account.  For example, a nefarious user
24824       can execute code with superuser privileges by setting up a
24825       trojan-horse index definition and waiting for the next routine vacuum.
24826       The fix arranges for standard maintenance operations
24827       (including <command>VACUUM</>, <command>ANALYZE</>, <command>REINDEX</>,
24828       and <command>CLUSTER</>) to execute as the table owner rather than
24829       the calling user, using the same privilege-switching mechanism already
24830       used for <literal>SECURITY DEFINER</> functions.  To prevent bypassing
24831       this security measure, execution of <command>SET SESSION
24832       AUTHORIZATION</> and <command>SET ROLE</> is now forbidden within a
24833       <literal>SECURITY DEFINER</> context.  (CVE-2007-6600)
24834      </para>
24835     </listitem>
24836
24837     <listitem>
24838      <para>
24839       Require non-superusers who use <filename>/contrib/dblink</> to use only
24840       password authentication, as a security measure (Joe)
24841      </para>
24842
24843      <para>
24844       The fix that appeared for this in 7.3.20 was incomplete, as it plugged
24845       the hole for only some <filename>dblink</> functions.  (CVE-2007-6601,
24846       CVE-2007-3278)
24847      </para>
24848     </listitem>
24849
24850     <listitem>
24851      <para>
24852       Fix potential crash in <function>translate()</> when using a multibyte
24853       database encoding (Tom)
24854      </para>
24855     </listitem>
24856
24857     <listitem>
24858      <para>
24859       Make <filename>contrib/tablefunc</>'s <function>crosstab()</> handle
24860       NULL rowid as a category in its own right, rather than crashing (Joe)
24861      </para>
24862     </listitem>
24863
24864     <listitem>
24865      <para>
24866       Require a specific version of <productname>Autoconf</> to be used
24867       when re-generating the <command>configure</> script (Peter)
24868      </para>
24869
24870      <para>
24871       This affects developers and packagers only.  The change was made
24872       to prevent accidental use of untested combinations of
24873       <productname>Autoconf</> and <productname>PostgreSQL</> versions.
24874       You can remove the version check if you really want to use a
24875       different <productname>Autoconf</> version, but it's
24876       your responsibility whether the result works or not.
24877      </para>
24878     </listitem>
24879
24880    </itemizedlist>
24881
24882   </sect2>
24883  </sect1>
24884
24885  <sect1 id="release-7-3-20">
24886   <title>Release 7.3.20</title>
24887
24888   <note>
24889   <title>Release date</title>
24890   <simpara>2007-09-17</simpara>
24891   </note>
24892
24893   <para>
24894    This release contains fixes from 7.3.19.
24895   </para>
24896
24897   <sect2>
24898    <title>Migration to Version 7.3.20</title>
24899
24900    <para>
24901     A dump/restore is not required for those running 7.3.X.  However,
24902     if you are upgrading from a version earlier than 7.3.13, see the release
24903     notes for 7.3.13.
24904    </para>
24905
24906   </sect2>
24907
24908   <sect2>
24909    <title>Changes</title>
24910
24911    <itemizedlist>
24912
24913     <listitem>
24914      <para>
24915       Prevent index corruption when a transaction inserts rows and
24916       then aborts close to the end of a concurrent <command>VACUUM</>
24917       on the same table (Tom)
24918      </para>
24919     </listitem>
24920
24921     <listitem>
24922      <para>
24923       Make <command>CREATE DOMAIN ... DEFAULT NULL</> work properly (Tom)
24924      </para>
24925     </listitem>
24926
24927     <listitem>
24928      <para>
24929       Fix crash when <varname>log_min_error_statement</> logging runs out
24930       of memory (Tom)
24931      </para>
24932     </listitem>
24933
24934     <listitem>
24935      <para>
24936       Require non-superusers who use <filename>/contrib/dblink</> to use only
24937       password authentication, as a security measure (Joe)
24938      </para>
24939     </listitem>
24940
24941    </itemizedlist>
24942
24943   </sect2>
24944  </sect1>
24945
24946  <sect1 id="release-7-3-19">
24947   <title>Release 7.3.19</title>
24948
24949   <note>
24950   <title>Release date</title>
24951   <simpara>2007-04-23</simpara>
24952   </note>
24953
24954   <para>
24955    This release contains fixes from 7.3.18,
24956    including a security fix.
24957   </para>
24958
24959   <sect2>
24960    <title>Migration to Version 7.3.19</title>
24961
24962    <para>
24963     A dump/restore is not required for those running 7.3.X.  However,
24964     if you are upgrading from a version earlier than 7.3.13, see the release
24965     notes for 7.3.13.
24966    </para>
24967
24968   </sect2>
24969
24970   <sect2>
24971    <title>Changes</title>
24972
24973    <itemizedlist>
24974
24975     <listitem>
24976     <para>
24977      Support explicit placement of the temporary-table schema within
24978      <varname>search_path</>, and disable searching it for functions
24979      and operators (Tom)
24980     </para>
24981     <para>
24982      This is needed to allow a security-definer function to set a
24983      truly secure value of <varname>search_path</>.  Without it,
24984      an unprivileged SQL user can use temporary objects to execute code
24985      with the privileges of the security-definer function (CVE-2007-2138).
24986      See <command>CREATE FUNCTION</> for more information.
24987     </para>
24988     </listitem>
24989
24990     <listitem>
24991     <para>
24992      Fix potential-data-corruption bug in how <command>VACUUM FULL</> handles
24993      <command>UPDATE</> chains (Tom, Pavan Deolasee)
24994     </para>
24995     </listitem>
24996
24997    </itemizedlist>
24998
24999   </sect2>
25000  </sect1>
25001
25002  <sect1 id="release-7-3-18">
25003   <title>Release 7.3.18</title>
25004
25005   <note>
25006   <title>Release date</title>
25007   <simpara>2007-02-05</simpara>
25008   </note>
25009
25010   <para>
25011    This release contains a variety of fixes from 7.3.17, including
25012    a security fix.
25013   </para>
25014
25015   <sect2>
25016    <title>Migration to Version 7.3.18</title>
25017
25018    <para>
25019     A dump/restore is not required for those running 7.3.X.  However,
25020     if you are upgrading from a version earlier than 7.3.13, see the release
25021     notes for 7.3.13.
25022    </para>
25023
25024   </sect2>
25025
25026   <sect2>
25027    <title>Changes</title>
25028
25029    <itemizedlist>
25030
25031     <listitem>
25032     <para>
25033      Remove security vulnerability that allowed connected users
25034      to read backend memory (Tom)
25035     </para>
25036     <para>
25037      The vulnerability involves changing the
25038      data type of a table column used in a SQL function (CVE-2007-0555).
25039      This error can easily be exploited to cause a backend crash, and in
25040      principle might be used to read database content that the user
25041      should not be able to access.
25042     </para>
25043     </listitem>
25044
25045     <listitem>
25046     <para>
25047      Fix rare bug wherein btree index page splits could fail
25048      due to choosing an infeasible split point (Heikki Linnakangas)
25049     </para>
25050     </listitem>
25051
25052     <listitem>
25053     <para>
25054      Tighten security of multi-byte character processing for UTF8 sequences
25055      over three bytes long (Tom)
25056     </para>
25057     </listitem>
25058
25059    </itemizedlist>
25060
25061   </sect2>
25062  </sect1>
25063
25064  <sect1 id="release-7-3-17">
25065   <title>Release 7.3.17</title>
25066
25067   <note>
25068   <title>Release date</title>
25069   <simpara>2007-01-08</simpara>
25070   </note>
25071
25072   <para>
25073    This release contains a variety of fixes from 7.3.16.
25074   </para>
25075
25076   <sect2>
25077    <title>Migration to Version 7.3.17</title>
25078
25079    <para>
25080     A dump/restore is not required for those running 7.3.X.  However,
25081     if you are upgrading from a version earlier than 7.3.13, see the release
25082     notes for 7.3.13.
25083    </para>
25084
25085   </sect2>
25086
25087   <sect2>
25088    <title>Changes</title>
25089
25090    <itemizedlist>
25091
25092     <listitem>
25093      <para>
25094       <function>to_number()</> and <function>to_char(numeric)</>
25095       are now <literal>STABLE</>, not <literal>IMMUTABLE</>, for
25096       new <application>initdb</> installs (Tom)
25097      </para>
25098
25099      <para>
25100       This is because <varname>lc_numeric</> can potentially
25101       change the output of these functions.
25102      </para>
25103     </listitem>
25104
25105     <listitem>
25106      <para>
25107       Improve index usage of regular expressions that use parentheses (Tom)
25108      </para>
25109
25110      <para>
25111       This improves <application>psql</> <literal>\d</> performance also.
25112      </para>
25113     </listitem>
25114
25115    </itemizedlist>
25116
25117   </sect2>
25118  </sect1>
25119
25120  <sect1 id="release-7-3-16">
25121   <title>Release 7.3.16</title>
25122
25123   <note>
25124   <title>Release date</title>
25125   <simpara>2006-10-16</simpara>
25126   </note>
25127
25128   <para>
25129    This release contains a variety of fixes from 7.3.15.
25130   </para>
25131
25132   <sect2>
25133    <title>Migration to Version 7.3.16</title>
25134
25135    <para>
25136     A dump/restore is not required for those running 7.3.X.  However,
25137     if you are upgrading from a version earlier than 7.3.13, see the release
25138     notes for 7.3.13.
25139    </para>
25140
25141   </sect2>
25142
25143   <sect2>
25144    <title>Changes</title>
25145
25146 <itemizedlist>
25147 <listitem><para>Fix corner cases in pattern matching for
25148  <application>psql</>'s <literal>\d</> commands</para></listitem>
25149 <listitem><para>Fix index-corrupting bugs in /contrib/ltree
25150  (Teodor)</para></listitem>
25151 <listitem><para>Back-port 7.4 spinlock code to improve performance and support
25152 64-bit architectures better</para> </listitem>
25153 <listitem><para>Fix SSL-related memory leak in libpq</para> </listitem>
25154 <listitem><para>Fix backslash escaping in /contrib/dbmirror</para></listitem>
25155 <listitem><para>Adjust regression tests for recent changes in US DST laws
25156 </para> </listitem>
25157 </itemizedlist>
25158
25159   </sect2>
25160  </sect1>
25161
25162  <sect1 id="release-7-3-15">
25163   <title>Release 7.3.15</title>
25164
25165   <note>
25166   <title>Release date</title>
25167   <simpara>2006-05-23</simpara>
25168   </note>
25169
25170   <para>
25171    This release contains a variety of fixes from 7.3.14,
25172    including patches for extremely serious security issues.
25173   </para>
25174
25175   <sect2>
25176    <title>Migration to Version 7.3.15</title>
25177
25178    <para>
25179     A dump/restore is not required for those running 7.3.X.  However,
25180     if you are upgrading from a version earlier than 7.3.13, see the release
25181     notes for 7.3.13.
25182    </para>
25183
25184    <para>
25185     Full security against the SQL-injection attacks described in
25186     CVE-2006-2313 and CVE-2006-2314 might require changes in application
25187     code.  If you have applications that embed untrustworthy strings
25188     into SQL commands, you should examine them as soon as possible to
25189     ensure that they are using recommended escaping techniques.  In
25190     most cases, applications should be using subroutines provided by
25191     libraries or drivers (such as <application>libpq</>'s
25192     <function>PQescapeStringConn()</>) to perform string escaping,
25193     rather than relying on <foreignphrase>ad hoc</> code to do it.
25194    </para>
25195   </sect2>
25196
25197   <sect2>
25198    <title>Changes</title>
25199
25200 <itemizedlist>
25201 <listitem><para>Change the server to reject invalidly-encoded multibyte
25202 characters in all cases (Tatsuo, Tom)</para>
25203 <para>While <productname>PostgreSQL</> has been moving in this direction for
25204 some time, the checks are now applied uniformly to all encodings and all
25205 textual input, and are now always errors not merely warnings.  This change
25206 defends against SQL-injection attacks of the type described in CVE-2006-2313.
25207 </para></listitem>
25208
25209 <listitem><para>Reject unsafe uses of <literal>\'</> in string literals</para>
25210 <para>As a server-side defense against SQL-injection attacks of the type
25211 described in CVE-2006-2314, the server now only accepts <literal>''</> and not
25212 <literal>\'</> as a representation of ASCII single quote in SQL string
25213 literals.  By default, <literal>\'</> is rejected only when
25214 <varname>client_encoding</> is set to a client-only encoding (SJIS, BIG5, GBK,
25215 GB18030, or UHC), which is the scenario in which SQL injection is possible.
25216 A new configuration parameter <varname>backslash_quote</> is available to
25217 adjust this behavior when needed.  Note that full security against
25218 CVE-2006-2314 might require client-side changes; the purpose of
25219 <varname>backslash_quote</> is in part to make it obvious that insecure
25220 clients are insecure.
25221 </para></listitem>
25222
25223 <listitem><para>Modify <application>libpq</>'s string-escaping routines to be
25224 aware of encoding considerations</para>
25225 <para>This fixes <application>libpq</>-using applications for the security
25226 issues described in CVE-2006-2313 and CVE-2006-2314.
25227 Applications that use multiple <productname>PostgreSQL</> connections
25228 concurrently should migrate to <function>PQescapeStringConn()</> and
25229 <function>PQescapeByteaConn()</> to ensure that escaping is done correctly
25230 for the settings in use in each database connection.  Applications that
25231 do string escaping <quote>by hand</> should be modified to rely on library
25232 routines instead.
25233 </para></listitem>
25234
25235 <listitem><para>Fix some incorrect encoding conversion functions</para>
25236 <para><function>win1251_to_iso</>, <function>alt_to_iso</>,
25237 <function>euc_tw_to_big5</>, <function>euc_tw_to_mic</>,
25238 <function>mic_to_euc_tw</> were all broken to varying
25239 extents.
25240 </para></listitem>
25241
25242 <listitem><para>Clean up stray remaining uses of <literal>\'</> in strings
25243 (Bruce, Jan)</para></listitem>
25244
25245 <listitem><para>Fix server to use custom DH SSL parameters correctly (Michael
25246 Fuhr)</para></listitem>
25247
25248 <listitem><para>Fix various minor memory leaks</para></listitem>
25249 </itemizedlist>
25250
25251   </sect2>
25252  </sect1>
25253
25254  <sect1 id="release-7-3-14">
25255   <title>Release 7.3.14</title>
25256
25257   <note>
25258   <title>Release date</title>
25259   <simpara>2006-02-14</simpara>
25260   </note>
25261
25262   <para>
25263    This release contains a variety of fixes from 7.3.13.
25264   </para>
25265
25266   <sect2>
25267    <title>Migration to Version 7.3.14</title>
25268
25269    <para>
25270     A dump/restore is not required for those running 7.3.X.  However,
25271     if you are upgrading from a version earlier than 7.3.13, see the release
25272     notes for 7.3.13.
25273    </para>
25274   </sect2>
25275
25276   <sect2>
25277    <title>Changes</title>
25278
25279 <itemizedlist>
25280
25281 <listitem><para>Fix potential crash in <command>SET
25282 SESSION AUTHORIZATION</> (CVE-2006-0553)</para>
25283 <para>An unprivileged user could crash the server process, resulting in
25284 momentary denial of service to other users, if the server has been compiled
25285 with Asserts enabled (which is not the default).
25286 Thanks to Akio Ishida for reporting this problem.
25287 </para></listitem>
25288
25289 <listitem><para>Fix bug with row visibility logic in self-inserted
25290 rows (Tom)</para>
25291 <para>Under rare circumstances a row inserted by the current command
25292 could be seen as already valid, when it should not be.  Repairs bug
25293 created in 7.3.11 release.
25294 </para></listitem>
25295
25296 <listitem><para>Fix race condition that could lead to <quote>file already
25297 exists</> errors during pg_clog file creation
25298 (Tom)</para></listitem>
25299
25300 <listitem><para>Fix to allow restoring dumps that have cross-schema
25301 references to custom operators (Tom)</para></listitem>
25302
25303 <listitem><para>Portability fix for testing presence of <function>finite</>
25304 and <function>isinf</> during configure (Tom)</para></listitem>
25305
25306 </itemizedlist>
25307
25308   </sect2>
25309  </sect1>
25310
25311  <sect1 id="release-7-3-13">
25312   <title>Release 7.3.13</title>
25313
25314   <note>
25315   <title>Release date</title>
25316   <simpara>2006-01-09</simpara>
25317   </note>
25318
25319   <para>
25320    This release contains a variety of fixes from 7.3.12.
25321   </para>
25322
25323   <sect2>
25324    <title>Migration to Version 7.3.13</title>
25325
25326    <para>
25327     A dump/restore is not required for those running 7.3.X.  However,
25328     if you are upgrading from a version earlier than 7.3.10, see the release
25329     notes for 7.3.10.
25330     Also, you might need to <command>REINDEX</> indexes on textual
25331     columns after updating, if you are affected by the locale or
25332     <application>plperl</> issues described below.
25333    </para>
25334   </sect2>
25335
25336   <sect2>
25337    <title>Changes</title>
25338
25339 <itemizedlist>
25340
25341 <listitem><para>Fix character string comparison for locales that consider
25342 different character combinations as equal, such as Hungarian (Tom)</para>
25343 <para>This might require <command>REINDEX</> to fix existing indexes on
25344 textual columns.</para></listitem>
25345
25346 <listitem><para>Set locale environment variables during postmaster startup
25347 to ensure that <application>plperl</> won't change the locale later</para>
25348 <para>This fixes a problem that occurred if the <application>postmaster</> was
25349 started with environment variables specifying a different locale than what
25350 <application>initdb</> had been told.  Under these conditions, any use of
25351 <application>plperl</> was likely to lead to corrupt indexes.  You might need
25352 <command>REINDEX</> to fix existing indexes on
25353 textual columns if this has happened to you.</para></listitem>
25354
25355 <listitem><para>Fix longstanding bug in strpos() and regular expression
25356 handling in certain rarely used Asian multi-byte character sets (Tatsuo)
25357 </para></listitem>
25358
25359 <listitem><para>Fix bug in <filename>/contrib/pgcrypto</> gen_salt,
25360 which caused it not to use all available salt space for MD5 and
25361 XDES algorithms (Marko Kreen, Solar Designer)</para>
25362 <para>Salts for Blowfish and standard DES are unaffected.</para></listitem>
25363
25364 <listitem><para>Fix <filename>/contrib/dblink</> to throw an error,
25365 rather than crashing, when the number of columns specified is different from
25366 what's actually returned by the query (Joe)</para></listitem>
25367
25368 </itemizedlist>
25369
25370   </sect2>
25371  </sect1>
25372
25373  <sect1 id="release-7-3-12">
25374   <title>Release 7.3.12</title>
25375
25376   <note>
25377   <title>Release date</title>
25378   <simpara>2005-12-12</simpara>
25379   </note>
25380
25381   <para>
25382    This release contains a variety of fixes from 7.3.11.
25383   </para>
25384
25385   <sect2>
25386    <title>Migration to Version 7.3.12</title>
25387
25388    <para>
25389     A dump/restore is not required for those running 7.3.X.  However,
25390     if you are upgrading from a version earlier than 7.3.10, see the release
25391     notes for 7.3.10.
25392    </para>
25393   </sect2>
25394
25395   <sect2>
25396    <title>Changes</title>
25397
25398 <itemizedlist>
25399
25400 <listitem><para>Fix race condition in transaction log management</para>
25401 <para>There was a narrow window in which an I/O operation could be initiated
25402 for the wrong page, leading to an Assert failure or data
25403 corruption.</para>
25404 </listitem>
25405
25406 <listitem><para><filename>/contrib/ltree</> fixes (Teodor)</para></listitem>
25407
25408 <listitem><para>Fix longstanding planning error for outer joins</para>
25409 <para>This bug sometimes caused a bogus error <quote>RIGHT JOIN is
25410 only supported with merge-joinable join conditions</>.</para></listitem>
25411
25412 <listitem><para>Prevent core dump in <application>pg_autovacuum</> when a
25413 table has been dropped</para></listitem>
25414
25415 </itemizedlist>
25416
25417   </sect2>
25418  </sect1>
25419
25420  <sect1 id="release-7-3-11">
25421   <title>Release 7.3.11</title>
25422
25423   <note>
25424   <title>Release date</title>
25425   <simpara>2005-10-04</simpara>
25426   </note>
25427
25428   <para>
25429    This release contains a variety of fixes from 7.3.10.
25430   </para>
25431
25432   <sect2>
25433    <title>Migration to Version 7.3.11</title>
25434
25435    <para>
25436     A dump/restore is not required for those running 7.3.X.  However,
25437     if you are upgrading from a version earlier than 7.3.10, see the release
25438     notes for 7.3.10.
25439    </para>
25440   </sect2>
25441
25442   <sect2>
25443    <title>Changes</title>
25444
25445 <itemizedlist>
25446 <listitem><para>Fix error that allowed <command>VACUUM</> to remove
25447 <literal>ctid</> chains too soon, and add more checking in code that follows
25448 <literal>ctid</> links</para>
25449 <para>This fixes a long-standing problem that could cause crashes in very rare
25450 circumstances.</para></listitem>
25451 <listitem><para>Fix <type>CHAR()</> to properly pad spaces to the specified
25452 length when using a multiple-byte character set (Yoshiyuki Asaba)</para>
25453 <para>In prior releases, the padding of <type>CHAR()</> was incorrect
25454 because it only padded to the specified number of bytes without
25455 considering how many characters were stored.</para></listitem>
25456 <listitem><para>Fix missing rows in queries like <literal>UPDATE a=... WHERE
25457 a...</> with GiST index on column <literal>a</></para></listitem>
25458 <listitem><para>Improve checking for partially-written WAL
25459 pages</para></listitem>
25460 <listitem><para>Improve robustness of signal handling when SSL is
25461 enabled</para></listitem>
25462 <listitem><para>Various memory leakage fixes</para></listitem>
25463 <listitem><para>Various portability improvements</para></listitem>
25464 <listitem><para>Fix PL/PgSQL to handle <literal>var := var</> correctly when
25465 the variable is of pass-by-reference type</para></listitem>
25466 </itemizedlist>
25467
25468   </sect2>
25469  </sect1>
25470
25471  <sect1 id="release-7-3-10">
25472   <title>Release 7.3.10</title>
25473
25474   <note>
25475   <title>Release date</title>
25476   <simpara>2005-05-09</simpara>
25477   </note>
25478
25479   <para>
25480    This release contains a variety of fixes from 7.3.9, including several
25481    security-related issues.
25482   </para>
25483
25484   <sect2>
25485    <title>Migration to Version 7.3.10</title>
25486
25487    <para>
25488     A dump/restore is not required for those running 7.3.X.  However,
25489     it is one possible way of handling a significant security problem
25490     that has been found in the initial contents of 7.3.X system
25491     catalogs.  A dump/initdb/reload sequence using 7.3.10's initdb will
25492     automatically correct this problem.
25493    </para>
25494
25495    <para>
25496     The security problem is that the built-in character set encoding
25497     conversion functions can be invoked from SQL commands by unprivileged
25498     users, but the functions were not designed for such use and are not
25499     secure against malicious choices of arguments.  The fix involves changing
25500     the declared parameter list of these functions so that they can no longer
25501     be invoked from SQL commands.  (This does not affect their normal use
25502     by the encoding conversion machinery.)
25503     It is strongly recommended that all installations repair this error,
25504     either by initdb or by following the manual repair procedure given
25505     below.  The error at least allows unprivileged database users to crash
25506     their server process, and might allow unprivileged users to gain the
25507     privileges of a database superuser.
25508    </para>
25509
25510    <para>
25511     If you wish not to do an initdb, perform the following procedure instead.
25512     As the database superuser, do:
25513
25514 <programlisting>
25515 BEGIN;
25516 UPDATE pg_proc SET proargtypes[3] = 'internal'::regtype
25517 WHERE pronamespace = 11 AND pronargs = 5
25518      AND proargtypes[2] = 'cstring'::regtype;
25519 -- The command should report having updated 90 rows;
25520 -- if not, rollback and investigate instead of committing!
25521 COMMIT;
25522 </programlisting>
25523    </para>
25524
25525    <para>
25526     The above procedure must be carried out in <emphasis>each</> database
25527     of an installation, including <literal>template1</>, and ideally
25528     including <literal>template0</> as well.  If you do not fix the
25529     template databases then any subsequently created databases will contain
25530     the same error.  <literal>template1</> can be fixed in the same way
25531     as any other database, but fixing <literal>template0</> requires
25532     additional steps.  First, from any database issue:
25533 <programlisting>
25534 UPDATE pg_database SET datallowconn = true WHERE datname = 'template0';
25535 </programlisting>
25536      Next connect to <literal>template0</> and perform the above repair
25537      procedure.  Finally, do:
25538 <programlisting>
25539 -- re-freeze template0:
25540 VACUUM FREEZE;
25541 -- and protect it against future alterations:
25542 UPDATE pg_database SET datallowconn = false WHERE datname = 'template0';
25543 </programlisting>
25544    </para>
25545   </sect2>
25546
25547   <sect2>
25548    <title>Changes</title>
25549
25550 <itemizedlist>
25551 <listitem><para>Change encoding function signature to prevent
25552 misuse</para></listitem>
25553 <listitem><para>Repair ancient race condition that allowed a transaction to be
25554 seen as committed for some purposes (eg SELECT FOR UPDATE) slightly sooner
25555 than for other purposes</para>
25556 <para>This is an extremely serious bug since it could lead to apparent
25557 data inconsistencies being briefly visible to applications.</para></listitem>
25558 <listitem><para>Repair race condition between relation extension and
25559 VACUUM</para>
25560 <para>This could theoretically have caused loss of a page's worth of
25561 freshly-inserted data, although the scenario seems of very low probability.
25562 There are no known cases of it having caused more than an Assert failure.
25563 </para></listitem>
25564 <listitem><para>Fix comparisons of <type>TIME WITH TIME ZONE</> values</para>
25565 <para>
25566 The comparison code was wrong in the case where the
25567 <literal>--enable-integer-datetimes</> configuration switch had been used.
25568 NOTE: if you have an index on a <type>TIME WITH TIME ZONE</> column,
25569 it will need to be <command>REINDEX</>ed after installing this update, because
25570 the fix corrects the sort order of column values.
25571 </para></listitem>
25572 <listitem><para>Fix <function>EXTRACT(EPOCH)</> for
25573 <type>TIME WITH TIME ZONE</> values</para></listitem>
25574 <listitem><para>Fix mis-display of negative fractional seconds in
25575 <type>INTERVAL</> values</para>
25576 <para>
25577 This error only occurred when the
25578 <literal>--enable-integer-datetimes</> configuration switch had been used.
25579 </para></listitem>
25580 <listitem><para>Additional buffer overrun checks in plpgsql
25581 (Neil)</para></listitem>
25582 <listitem><para>Fix pg_dump to dump trigger names containing <literal>%</>
25583 correctly (Neil)</para></listitem>
25584 <listitem><para>Prevent <function>to_char(interval)</> from dumping core for
25585 month-related formats</para></listitem>
25586 <listitem><para>Fix <filename>contrib/pgcrypto</> for newer OpenSSL builds
25587 (Marko Kreen)</para></listitem>
25588 <listitem><para>Still more 64-bit fixes for
25589 <filename>contrib/intagg</></para></listitem>
25590 <listitem><para>Prevent incorrect optimization of functions returning
25591 <type>RECORD</></para></listitem>
25592 </itemizedlist>
25593
25594  </sect2>
25595 </sect1>
25596
25597  <sect1 id="release-7-3-9">
25598   <title>Release 7.3.9</title>
25599
25600   <note>
25601   <title>Release date</title>
25602   <simpara>2005-01-31</simpara>
25603   </note>
25604
25605   <para>
25606    This release contains a variety of fixes from 7.3.8, including several
25607    security-related issues.
25608   </para>
25609
25610   <sect2>
25611    <title>Migration to Version 7.3.9</title>
25612
25613    <para>
25614     A dump/restore is not required for those running 7.3.X.
25615    </para>
25616   </sect2>
25617
25618   <sect2>
25619    <title>Changes</title>
25620
25621 <itemizedlist>
25622 <listitem><para>Disallow <command>LOAD</> to non-superusers</para>
25623 <para>
25624 On platforms that will automatically execute initialization functions of a
25625 shared library (this includes at least Windows and ELF-based Unixen),
25626 <command>LOAD</> can be used to make the server execute arbitrary code.
25627 Thanks to NGS Software for reporting this.</para></listitem>
25628 <listitem><para>Check that creator of an aggregate function has the right to
25629 execute the specified transition functions</para>
25630 <para>
25631 This oversight made it possible to bypass denial of EXECUTE
25632 permission on a function.</para></listitem>
25633 <listitem><para>Fix security and 64-bit issues in
25634 contrib/intagg</para></listitem>
25635 <listitem><para>Add needed STRICT marking to some contrib functions (Kris
25636 Jurka)</para></listitem>
25637 <listitem><para>Avoid buffer overrun when plpgsql cursor declaration has too
25638 many parameters (Neil)</para></listitem>
25639 <listitem><para>Fix planning error for FULL and RIGHT outer joins</para>
25640 <para>
25641 The result of the join was mistakenly supposed to be sorted the same as the
25642 left input.  This could not only deliver mis-sorted output to the user, but
25643 in case of nested merge joins could give outright wrong answers.
25644 </para></listitem>
25645 <listitem><para>Fix plperl for quote marks in tuple fields</para></listitem>
25646 <listitem><para>Fix display of negative intervals in SQL and GERMAN
25647 datestyles</para></listitem>
25648 </itemizedlist>
25649
25650  </sect2>
25651 </sect1>
25652
25653  <sect1 id="release-7-3-8">
25654   <title>Release 7.3.8</title>
25655
25656   <note>
25657   <title>Release date</title>
25658   <simpara>2004-10-22</simpara>
25659   </note>
25660
25661   <para>
25662    This release contains a variety of fixes from 7.3.7.
25663   </para>
25664
25665
25666   <sect2>
25667    <title>Migration to Version 7.3.8</title>
25668
25669    <para>
25670     A dump/restore is not required for those running 7.3.X.
25671    </para>
25672   </sect2>
25673
25674   <sect2>
25675    <title>Changes</title>
25676
25677 <itemizedlist>
25678 <listitem><para>Repair possible failure to update hint bits on disk</para>
25679 <para>
25680 Under rare circumstances this oversight could lead to
25681 <quote>could not access transaction status</> failures, which qualifies
25682 it as a potential-data-loss bug.
25683 </para></listitem>
25684 <listitem><para>Ensure that hashed outer join does not miss tuples</para>
25685 <para>
25686 Very large left joins using a hash join plan could fail to output unmatched
25687 left-side rows given just the right data distribution.
25688 </para></listitem>
25689 <listitem><para>Disallow running pg_ctl as root</para>
25690 <para>
25691 This is to guard against any possible security issues.
25692 </para></listitem>
25693 <listitem><para>Avoid using temp files in /tmp in make_oidjoins_check</para>
25694 <para>
25695 This has been reported as a security issue, though it's hardly worthy of
25696 concern since there is no reason for non-developers to use this script anyway.
25697 </para></listitem>
25698 </itemizedlist>
25699
25700  </sect2>
25701 </sect1>
25702
25703  <sect1 id="release-7-3-7">
25704   <title>Release 7.3.7</title>
25705
25706   <note>
25707   <title>Release date</title>
25708   <simpara>2004-08-16</simpara>
25709   </note>
25710
25711   <para>
25712    This release contains one critical fix over 7.3.6, and some minor items.
25713   </para>
25714
25715
25716   <sect2>
25717    <title>Migration to Version 7.3.7</title>
25718
25719    <para>
25720     A dump/restore is not required for those running 7.3.X.
25721    </para>
25722   </sect2>
25723
25724   <sect2>
25725    <title>Changes</title>
25726
25727 <itemizedlist>
25728 <listitem><para>Prevent possible loss of committed transactions during crash</para>
25729 <para>
25730 Due to insufficient interlocking between transaction commit and checkpointing,
25731 it was possible for transactions committed just before the most recent
25732 checkpoint to be lost, in whole or in part, following a database crash and
25733 restart.  This is a serious bug that has existed
25734 since <productname>PostgreSQL</productname> 7.1.
25735 </para></listitem>
25736 <listitem><para>Remove asymmetrical word processing in tsearch (Teodor)</para></listitem>
25737 <listitem><para>Properly schema-qualify function names when pg_dump'ing a CAST</para></listitem>
25738 </itemizedlist>
25739
25740  </sect2>
25741 </sect1>
25742
25743  <sect1 id="release-7-3-6">
25744   <title>Release 7.3.6</title>
25745
25746   <note>
25747   <title>Release date</title>
25748   <simpara>2004-03-02</simpara>
25749   </note>
25750
25751   <para>
25752    This release contains a variety of fixes from 7.3.5.
25753   </para>
25754
25755
25756   <sect2>
25757    <title>Migration to Version 7.3.6</title>
25758
25759    <para>
25760     A dump/restore is <emphasis>not</emphasis> required for those
25761     running 7.3.*.
25762    </para>
25763
25764   </sect2>
25765
25766   <sect2>
25767    <title>Changes</title>
25768
25769 <itemizedlist>
25770 <listitem><para>Revert erroneous changes in rule permissions checking</para>
25771 <para>A patch applied in 7.3.3 to fix a corner case in rule permissions checks
25772 turns out to have disabled rule-related permissions checks in many
25773 not-so-corner cases.  This would for example allow users to insert into views
25774 they weren't supposed to have permission to insert into.  We have therefore
25775 reverted the 7.3.3 patch.  The original bug will be fixed in 8.0.
25776 </para></listitem>
25777 <listitem><para>Repair incorrect order of operations in
25778 GetNewTransactionId()</para>
25779 <para>
25780 This bug could result in failure under out-of-disk-space conditions, including
25781 inability to restart even after disk space is freed.
25782 </para></listitem>
25783 <listitem><para>Ensure configure selects -fno-strict-aliasing even when
25784 an external value for CFLAGS is supplied</para>
25785 <para>
25786 On some platforms, building with -fstrict-aliasing causes bugs.
25787 </para></listitem>
25788 <listitem><para>Make pg_restore handle 64-bit off_t correctly</para>
25789 <para>
25790 This bug prevented proper restoration from archive files exceeding 4 GB.
25791 </para></listitem>
25792 <listitem><para>Make contrib/dblink not assume that local and remote type OIDs
25793 match (Joe)</para></listitem>
25794 <listitem><para>Quote connectby()'s start_with argument properly (Joe)</para></listitem>
25795 <listitem><para>Don't crash when a rowtype argument to a plpgsql function is
25796 NULL</para></listitem>
25797 <listitem><para>Avoid generating invalid character encoding sequences in
25798 corner cases when planning LIKE operations</para></listitem>
25799 <listitem><para>Ensure text_position() cannot scan past end of source string
25800 in multibyte cases (Korea PostgreSQL Users' Group)</para></listitem>
25801 <listitem><para>Fix index optimization and selectivity estimates for LIKE
25802 operations on bytea columns (Joe)</para></listitem>
25803 </itemizedlist>
25804
25805  </sect2>
25806 </sect1>
25807
25808  <sect1 id="release-7-3-5">
25809   <title>Release 7.3.5</title>
25810
25811   <note>
25812   <title>Release date</title>
25813   <simpara>2003-12-03</simpara>
25814   </note>
25815
25816   <para>
25817    This has a variety of fixes from 7.3.4.
25818   </para>
25819
25820
25821   <sect2>
25822    <title>Migration to Version 7.3.5</title>
25823
25824    <para>
25825     A dump/restore is <emphasis>not</emphasis> required for those
25826     running 7.3.*.
25827    </para>
25828   </sect2>
25829
25830   <sect2>
25831    <title>Changes</title>
25832
25833 <itemizedlist>
25834 <listitem><para>Force zero_damaged_pages to be on during recovery from WAL</para></listitem>
25835 <listitem><para>Prevent some obscure cases of <quote>variable not in subplan target lists</quote></para></listitem>
25836 <listitem><para>Force stats processes to detach from shared memory, ensuring cleaner shutdown</para></listitem>
25837 <listitem><para>Make PQescapeBytea and byteaout consistent with each other (Joe)</para></listitem>
25838 <listitem><para>Added missing SPI_finish() calls to dblink's get_tuple_of_interest() (Joe)</para></listitem>
25839 <listitem><para>Fix for possible foreign key violation when rule rewrites INSERT (Jan)</para></listitem>
25840 <listitem><para>Support qualified type names in PL/Tcl's spi_prepare command (Jan)</para></listitem>
25841 <listitem><para>Make pg_dump handle a procedural language handler located in pg_catalog</para></listitem>
25842 <listitem><para>Make pg_dump handle cases where a custom opclass is in another schema</para></listitem>
25843 <listitem><para>Make pg_dump dump binary-compatible casts correctly (Jan)</para></listitem>
25844 <listitem><para>Fix insertion of expressions containing subqueries into rule bodies</para></listitem>
25845 <listitem><para>Fix incorrect argument processing in clusterdb script (Anand Ranganathan)</para></listitem>
25846 <listitem><para>Fix problems with dropped columns in plpython triggers</para></listitem>
25847 <listitem><para>Repair problems with to_char() reading past end of its input string (Karel)</para></listitem>
25848 <listitem><para>Fix GB18030 mapping errors (Tatsuo)</para></listitem>
25849 <listitem><para>Fix several problems with SSL error handling and asynchronous SSL I/O</para></listitem>
25850 <listitem><para>Remove ability to bind a list of values to a single parameter in JDBC
25851 (prevents possible SQL-injection attacks)</para></listitem>
25852 <listitem><para>Fix some errors in HAVE_INT64_TIMESTAMP code paths</para></listitem>
25853 <listitem><para>Fix corner case for btree search in parallel with first root page split</para></listitem>
25854 </itemizedlist>
25855
25856  </sect2>
25857 </sect1>
25858
25859  <sect1 id="release-7-3-4">
25860   <title>Release 7.3.4</title>
25861
25862   <note>
25863   <title>Release date</title>
25864   <simpara>2003-07-24</simpara>
25865   </note>
25866
25867   <para>
25868    This has a variety of fixes from 7.3.3.
25869   </para>
25870
25871
25872   <sect2>
25873    <title>Migration to Version 7.3.4</title>
25874
25875    <para>
25876     A dump/restore is <emphasis>not</emphasis> required for those
25877     running 7.3.*.
25878    </para>
25879   </sect2>
25880
25881   <sect2>
25882    <title>Changes</title>
25883
25884 <itemizedlist>
25885 <listitem><para>Repair breakage in timestamp-to-date conversion for dates before 2000</para></listitem>
25886 <listitem><para>Prevent rare possibility of server startup failure (Tom)</para></listitem>
25887 <listitem><para>Fix bugs in interval-to-time conversion (Tom)</para></listitem>
25888 <listitem><para>Add constraint names in a few places in pg_dump (Rod)</para></listitem>
25889 <listitem><para>Improve performance of functions with many parameters (Tom)</para></listitem>
25890 <listitem><para>Fix to_ascii() buffer overruns (Tom)</para></listitem>
25891 <listitem><para>Prevent restore of database comments from throwing an error (Tom)</para></listitem>
25892 <listitem><para>Work around buggy strxfrm() present in some Solaris releases (Tom)</para></listitem>
25893 <listitem><para>Properly escape jdbc setObject() strings to improve security (Barry)</para></listitem>
25894 </itemizedlist>
25895   </sect2>
25896  </sect1>
25897
25898
25899 <sect1 id="release-7-3-3">
25900  <title>Release 7.3.3</title>
25901
25902  <note>
25903   <title>Release date</title>
25904   <simpara>2003-05-22</simpara>
25905  </note>
25906
25907  <para>
25908   This release contains a variety of fixes for version 7.3.2.
25909  </para>
25910
25911  <sect2>
25912   <title>Migration to Version 7.3.3</title>
25913
25914   <para>
25915    A dump/restore is <emphasis>not</emphasis> required for those
25916    running version 7.3.*.
25917   </para>
25918  </sect2>
25919
25920  <sect2>
25921   <title>Changes</title>
25922
25923 <itemizedlist>
25924 <listitem><para>Repair sometimes-incorrect computation of StartUpID after a crash</para></listitem>
25925 <listitem><para>Avoid slowness with lots of deferred triggers in one transaction (Stephan)</para></listitem>
25926 <listitem><para>Don't lock referenced row when <command>UPDATE</command> doesn't change foreign key's value (Jan)</para></listitem>
25927 <listitem><para>Use <command>-fPIC</command> not <command>-fpic</command> on Sparc (Tom Callaway)</para></listitem>
25928 <listitem><para>Repair lack of schema-awareness in contrib/reindexdb</para></listitem>
25929 <listitem><para>Fix contrib/intarray error for zero-element result array (Teodor)</para></listitem>
25930 <listitem><para>Ensure createuser script will exit on control-C (Oliver)</para></listitem>
25931 <listitem><para>Fix errors when the type of a dropped column has itself been dropped</para></listitem>
25932 <listitem><para><command>CHECKPOINT</command> does not cause database panic on failure in noncritical steps</para></listitem>
25933 <listitem><para>Accept 60 in seconds fields of timestamp, time, interval input values</para></listitem>
25934 <listitem><para>Issue notice, not error, if <type>TIMESTAMP</type>,
25935 <type> TIME</type>, or <type>INTERVAL</type> precision too large</para></listitem>
25936 <listitem><para>Fix <function>abstime-to-time</function> cast function (fix is
25937       not applied unless you <application>initdb</application>)</para></listitem>
25938 <listitem><para>Fix <application>pg_proc</application> entry for
25939      <type>timestampt_izone</type> (fix is not applied unless you
25940        <application>initdb</application>)</para></listitem>
25941 <listitem><para>Make <function>EXTRACT(EPOCH FROM timestamp without time zone)</function> treat input as local time</para></listitem>
25942 <listitem><para><command>'now'::timestamptz</command> gave wrong answer if timezone changed earlier in transaction</para></listitem>
25943 <listitem><para><envar>HAVE_INT64_TIMESTAMP</envar> code for time with timezone overwrote its input</para></listitem>
25944 <listitem><para>Accept <command>GLOBAL TEMP/TEMPORARY</command> as a
25945       synonym for <command>TEMPORARY</command></para></listitem>
25946 <listitem><para>Avoid improper schema-privilege-check failure in foreign-key triggers</para></listitem>
25947 <listitem><para>Fix bugs in foreign-key triggers for <command>SET DEFAULT</command> action</para></listitem>
25948 <listitem><para>Fix incorrect time-qual check in row fetch for
25949       <command>UPDATE</command> and <command>DELETE</command> triggers</para></listitem>
25950 <listitem><para>Foreign-key clauses were parsed but ignored in
25951       <command>ALTER TABLE ADD COLUMN</command></para></listitem>
25952 <listitem><para>Fix createlang script breakage for case where handler function already exists</para></listitem>
25953 <listitem><para>Fix misbehavior on zero-column tables in <application>pg_dump</application>, COPY, ANALYZE, other places</para></listitem>
25954 <listitem><para>Fix misbehavior of <function>func_error()</function> on type names containing '%'</para></listitem>
25955 <listitem><para>Fix misbehavior of <function>replace()</function> on strings containing '%'</para></listitem>
25956 <listitem><para>Regular-expression patterns containing certain multibyte characters failed</para></listitem>
25957 <listitem><para>Account correctly for <command>NULL</command>s in more cases in join size estimation</para></listitem>
25958 <listitem><para>Avoid conflict with system definition of <function>isblank()</function> function or macro</para></listitem>
25959 <listitem><para>Fix failure to convert large code point values in EUC_TW conversions (Tatsuo)</para></listitem>
25960 <listitem><para>Fix error recovery for <function>SSL_read</function>/<function>SSL_write</function> calls</para></listitem>
25961 <listitem><para>Don't do early constant-folding of type coercion expressions</para></listitem>
25962 <listitem><para>Validate page header fields immediately after reading in any page</para></listitem>
25963 <listitem><para>Repair incorrect check for ungrouped variables in unnamed joins</para></listitem>
25964 <listitem><para>Fix buffer overrun in <function>to_ascii</function> (Guido Notari)</para></listitem>
25965 <listitem><para>contrib/ltree fixes (Teodor)</para></listitem>
25966 <listitem><para>Fix core dump in deadlock detection on machines where char is unsigned</para></listitem>
25967 <listitem><para>Avoid running out of buffers in many-way indexscan (bug introduced in 7.3)</para></listitem>
25968 <listitem><para>Fix planner's selectivity estimation functions to handle domains properly</para></listitem>
25969 <listitem><para>Fix <application>dbmirror</application> memory-allocation bug (Steven Singer)</para></listitem>
25970 <listitem><para>Prevent infinite loop in <function>ln(numeric)</function> due to roundoff error</para></listitem>
25971 <listitem><para><command>GROUP BY</command> got confused if there were multiple equal GROUP BY items</para></listitem>
25972 <listitem><para>Fix bad plan when inherited <command>UPDATE</command>/<command>DELETE</command> references another inherited table</para></listitem>
25973 <listitem><para>Prevent clustering on incomplete (partial or non-NULL-storing) indexes</para></listitem>
25974 <listitem><para>Service shutdown request at proper time if it arrives while still starting up</para></listitem>
25975 <listitem><para>Fix left-links in temporary indexes (could make backwards scans miss entries)</para></listitem>
25976 <listitem><para>Fix incorrect handling of client_encoding setting in postgresql.conf (Tatsuo)</para></listitem>
25977 <listitem><para>Fix failure to respond to <command>pg_ctl stop -m fast</command> after Async_NotifyHandler runs</para></listitem>
25978 <listitem><para>Fix SPI for case where rule contains multiple statements of the same type</para></listitem>
25979 <listitem><para>Fix problem with checking for wrong type of access privilege in rule query</para></listitem>
25980 <listitem><para>Fix problem with <command>EXCEPT</command> in <command>CREATE RULE</command></para></listitem>
25981 <listitem><para>Prevent problem with dropping temp tables having serial columns</para></listitem>
25982 <listitem><para>Fix replace_vars_with_subplan_refs failure in complex views</para></listitem>
25983 <listitem><para>Fix regexp slowness in single-byte encodings (Tatsuo)</para></listitem>
25984 <listitem><para>Allow qualified type names in <command>CREATE CAST</command>
25985       and <command> DROP CAST</command></para></listitem>
25986 <listitem><para>Accept <function>SETOF type[]</function>, which formerly had to
25987       be written <function>SETOF _type</function></para></listitem>
25988 <listitem><para>Fix <application>pg_dump</application> core dump in some cases with procedural languages</para></listitem>
25989 <listitem><para>Force ISO datestyle in <application>pg_dump</application> output, for portability (Oliver)</para></listitem>
25990 <listitem><para><application>pg_dump</application> failed to handle error return
25991       from <function>lo_read</function> (Oleg Drokin)</para></listitem>
25992 <listitem><para><application>pg_dumpall</application> failed with groups having no members (Nick Eskelinen)</para></listitem>
25993 <listitem><para><application>pg_dumpall</application> failed to recognize --globals-only switch</para></listitem>
25994 <listitem><para>pg_restore failed to restore blobs if -X disable-triggers is specified</para></listitem>
25995 <listitem><para>Repair intrafunction memory leak in plpgsql</para></listitem>
25996 <listitem><para>pltcl's <command>elog</command> command dumped core if given wrong parameters (Ian Harding)</para></listitem>
25997 <listitem><para>plpython used wrong value of <envar>atttypmod</envar> (Brad McLean)</para></listitem>
25998 <listitem><para>Fix improper quoting of boolean values in Python interface (D'Arcy)</para></listitem>
25999 <listitem><para>Added <function>addDataType()</function> method to PGConnection interface for JDBC</para></listitem>
26000 <listitem><para>Fixed various problems with updateable ResultSets for JDBC (Shawn Green)</para></listitem>
26001 <listitem><para>Fixed various problems with DatabaseMetaData for JDBC (Kris Jurka, Peter Royal)</para></listitem>
26002 <listitem><para>Fixed problem with parsing table ACLs in JDBC</para></listitem>
26003 <listitem><para>Better error message for character set conversion problems in JDBC</para></listitem>
26004 </itemizedlist>
26005  </sect2>
26006 </sect1>
26007
26008
26009 <sect1 id="release-7-3-2">
26010  <title>Release 7.3.2</title>
26011
26012  <note>
26013   <title>Release date</title>
26014   <simpara>2003-02-04</simpara>
26015  </note>
26016
26017  <para>
26018   This release contains a variety of fixes for version 7.3.1.
26019  </para>
26020
26021
26022  <sect2>
26023   <title>Migration to Version 7.3.2</title>
26024
26025   <para>
26026    A dump/restore is <emphasis>not</emphasis> required for those
26027    running version 7.3.*.
26028   </para>
26029  </sect2>
26030
26031  <sect2>
26032   <title>Changes</title>
26033
26034 <itemizedlist>
26035 <listitem><para>Restore creation of OID column in CREATE TABLE AS / SELECT INTO</para></listitem>
26036 <listitem><para>Fix <application>pg_dump</> core dump when dumping views having comments</para></listitem>
26037 <listitem><para>Dump DEFERRABLE/INITIALLY DEFERRED constraints properly</para></listitem>
26038 <listitem><para>Fix UPDATE when child table's column numbering differs from parent</para></listitem>
26039 <listitem><para>Increase default value of max_fsm_relations</para></listitem>
26040 <listitem><para>Fix problem when fetching backwards in a cursor for a single-row query</para></listitem>
26041 <listitem><para>Make backward fetch work properly with cursor on SELECT DISTINCT query</para></listitem>
26042 <listitem><para>Fix problems with loading <application>pg_dump</> files containing contrib/lo usage</para></listitem>
26043 <listitem><para>Fix problem with all-numeric user names</para></listitem>
26044 <listitem><para>Fix possible memory leak and core dump during disconnect in libpgtcl</para></listitem>
26045 <listitem><para>Make plpython's spi_execute command handle nulls properly (Andrew Bosma)</para></listitem>
26046 <listitem><para>Adjust plpython error reporting so that its regression test passes again</para></listitem>
26047 <listitem><para>Work with bison 1.875</para></listitem>
26048 <listitem><para>Handle mixed-case names properly in plpgsql's %type (Neil)</para></listitem>
26049 <listitem><para>Fix core dump in pltcl when executing a query rewritten by a rule</para></listitem>
26050 <listitem><para>Repair array subscript overruns (per report from Yichen Xie)</para></listitem>
26051 <listitem><para>Reduce MAX_TIME_PRECISION from 13 to 10 in floating-point case</para></listitem>
26052 <listitem><para>Correctly case-fold variable names in per-database and per-user settings</para></listitem>
26053 <listitem><para>Fix coredump in plpgsql's RETURN NEXT when SELECT into record returns no rows</para></listitem>
26054 <listitem><para>Fix outdated use of pg_type.typprtlen in python client interface</para></listitem>
26055 <listitem><para>Correctly handle fractional seconds in timestamps in JDBC driver</para></listitem>
26056 <listitem><para>Improve performance of getImportedKeys() in JDBC</para></listitem>
26057 <listitem><para>Make shared-library symlinks work standardly on HPUX (Giles)</para></listitem>
26058 <listitem><para>Repair inconsistent rounding behavior for timestamp, time, interval</para></listitem>
26059 <listitem><para>SSL negotiation fixes (Nathan Mueller)</para></listitem>
26060 <listitem><para>Make libpq's ~/.pgpass feature work when connecting with PQconnectDB</para></listitem>
26061 <listitem><para>Update my2pg, ora2pg</para></listitem>
26062 <listitem><para>Translation updates</para></listitem>
26063 <listitem><para>Add casts between types lo and oid in contrib/lo</para></listitem>
26064 <listitem><para>fastpath code now checks for privilege to call function</para></listitem>
26065 </itemizedlist>
26066  </sect2>
26067 </sect1>
26068
26069
26070 <sect1 id="release-7-3-1">
26071  <title>Release 7.3.1</title>
26072
26073  <note>
26074   <title>Release date</title>
26075   <simpara>2002-12-18</simpara>
26076  </note>
26077
26078  <para>
26079   This release contains a variety of fixes for version 7.3.
26080  </para>
26081
26082
26083  <sect2>
26084   <title>Migration to Version 7.3.1</title>
26085
26086   <para>
26087    A dump/restore is <emphasis>not</emphasis> required for those
26088    running version 7.3. However, it should be noted that the main
26089    <productname>PostgreSQL</productname> interface library, libpq,
26090    has a new major version number for this release, which might require
26091    recompilation of client code in certain cases.
26092   </para>
26093  </sect2>
26094
26095  <sect2>
26096   <title>Changes</title>
26097
26098 <itemizedlist>
26099 <listitem><para>Fix a core dump of COPY TO when client/server encodings don't match (Tom)</para></listitem>
26100 <listitem><para>Allow <application>pg_dump</> to work with pre-7.2 servers (Philip)</para></listitem>
26101 <listitem><para>contrib/adddepend fixes (Tom)</para></listitem>
26102 <listitem><para>Fix problem with deletion of per-user/per-database config settings (Tom)</para></listitem>
26103 <listitem><para>contrib/vacuumlo fix (Tom)</para></listitem>
26104 <listitem><para>Allow 'password' encryption even when pg_shadow contains MD5 passwords (Bruce)</para></listitem>
26105 <listitem><para>contrib/dbmirror fix (Steven Singer)</para></listitem>
26106 <listitem><para>Optimizer fixes (Tom)</para></listitem>
26107 <listitem><para>contrib/tsearch fixes (Teodor Sigaev, Magnus)</para></listitem>
26108 <listitem><para>Allow locale names to be mixed case (Nicolai Tufar)</para></listitem>
26109 <listitem><para>Increment libpq library's major version number (Bruce)</para></listitem>
26110 <listitem><para>pg_hba.conf error reporting fixes (Bruce, Neil)</para></listitem>
26111 <listitem><para>Add SCO Openserver 5.0.4 as a supported platform (Bruce)</para></listitem>
26112 <listitem><para>Prevent EXPLAIN from crashing server (Tom)</para></listitem>
26113 <listitem><para>SSL fixes (Nathan Mueller)</para></listitem>
26114 <listitem><para>Prevent composite column creation via ALTER TABLE (Tom)</para></listitem>
26115 </itemizedlist>
26116  </sect2>
26117 </sect1>
26118
26119
26120 <sect1 id="release-7-3">
26121  <title>Release 7.3</title>
26122
26123  <note>
26124   <title>Release date</title>
26125   <simpara>2002-11-27</simpara>
26126  </note>
26127
26128  <sect2>
26129   <title>Overview</title>
26130
26131   <para>
26132    Major changes in this release:
26133   </para>
26134
26135   <variablelist>
26136    <varlistentry>
26137     <term>Schemas</term>
26138     <listitem>
26139      <para>
26140       Schemas allow users to create objects in separate namespaces,
26141       so two people or applications can have tables with the same
26142       name. There is also a public schema for shared tables.
26143       Table/index creation can be restricted by removing privileges
26144       on the public schema.
26145      </para>
26146     </listitem>
26147    </varlistentry>
26148
26149    <varlistentry>
26150     <term>Drop Column</term>
26151     <listitem>
26152      <para>
26153       <productname>PostgreSQL</productname> now supports the
26154       <literal>ALTER TABLE ... DROP COLUMN</literal> functionality.
26155      </para>
26156     </listitem>
26157    </varlistentry>
26158
26159    <varlistentry>
26160     <term>Table Functions</term>
26161     <listitem>
26162      <para>
26163       Functions returning multiple rows and/or multiple columns are
26164       now much easier to use than before.  You can call such a
26165       <quote>table function</quote> in the <literal>SELECT</literal>
26166       <literal>FROM</literal> clause, treating its output like a
26167       table. Also, <application>PL/pgSQL</application> functions can
26168       now return sets.
26169      </para>
26170     </listitem>
26171    </varlistentry>
26172
26173    <varlistentry>
26174     <term>Prepared Queries</term>
26175     <listitem>
26176      <para>
26177       <productname>PostgreSQL</productname> now supports prepared
26178       queries, for improved performance.
26179      </para>
26180     </listitem>
26181    </varlistentry>
26182
26183    <varlistentry>
26184     <term>Dependency Tracking</term>
26185     <listitem>
26186      <para>
26187       <productname>PostgreSQL</productname> now records object
26188       dependencies, which allows improvements in many areas.
26189       <command>DROP</command> statements now take either
26190       <literal>CASCADE</> or <literal>RESTRICT</> to control whether
26191       dependent objects are also dropped.
26192      </para>
26193     </listitem>
26194    </varlistentry>
26195
26196    <varlistentry>
26197     <term>Privileges</term>
26198     <listitem>
26199      <para>
26200       Functions and procedural languages now have privileges, and
26201       functions can be defined to run with the privileges of their
26202       creator.
26203      </para>
26204     </listitem>
26205    </varlistentry>
26206
26207    <varlistentry>
26208     <term>Internationalization</term>
26209     <listitem>
26210      <para>
26211       Both multibyte and locale support are now always enabled.
26212      </para>
26213     </listitem>
26214    </varlistentry>
26215
26216    <varlistentry>
26217     <term>Logging</term>
26218     <listitem>
26219      <para>
26220       A variety of logging options have been enhanced.
26221      </para>
26222     </listitem>
26223    </varlistentry>
26224
26225    <varlistentry>
26226     <term>Interfaces</term>
26227     <listitem>
26228      <para>
26229       A large number of interfaces have been moved to <ulink
26230       url="http://gborg.postgresql.org">http://gborg.postgresql.org</>
26231       where they can be developed and released independently.
26232      </para>
26233     </listitem>
26234    </varlistentry>
26235
26236    <varlistentry>
26237     <term>Functions/Identifiers</term>
26238     <listitem>
26239      <para>
26240       By default, functions can now take up to 32 parameters, and
26241       identifiers can be up to 63 bytes long.  Also, <literal>OPAQUE</>
26242       is now deprecated: there are specific <quote>pseudo-datatypes</>
26243       to represent each of the former meanings of <literal>OPAQUE</>
26244       in function argument and result types.
26245      </para>
26246     </listitem>
26247    </varlistentry>
26248
26249   </variablelist>
26250  </sect2>
26251
26252  <sect2>
26253   <title>Migration to Version 7.3</title>
26254
26255   <para>
26256    A dump/restore using <application>pg_dump</> is required for those
26257    wishing to migrate data from any previous release. If your
26258    application examines the system catalogs, additional changes will
26259    be required due to the introduction of schemas in 7.3; for more
26260    information, see: <ulink
26261    url="http://developer.postgresql.org/~momjian/upgrade_tips_7.3"></>.
26262   </para>
26263
26264   <para>
26265    Observe the following incompatibilities:
26266   </para>
26267
26268   <itemizedlist>
26269    <listitem>
26270     <para>
26271      Pre-6.3 clients are no longer supported.
26272     </para>
26273    </listitem>
26274
26275    <listitem>
26276     <para>
26277      <filename>pg_hba.conf</filename> now has a column for the user
26278      name and additional features.  Existing files need to be
26279      adjusted.
26280     </para>
26281    </listitem>
26282
26283    <listitem>
26284     <para>
26285      Several <filename>postgresql.conf</filename> logging parameters
26286      have been renamed.
26287     </para>
26288    </listitem>
26289
26290    <listitem>
26291     <para>
26292      <literal>LIMIT #,#</literal> has been disabled; use
26293      <literal>LIMIT # OFFSET #</literal>.
26294     </para>
26295    </listitem>
26296
26297    <listitem>
26298     <para>
26299      <command>INSERT</command> statements with column lists must
26300      specify a value for each specified column. For example,
26301      <literal>INSERT INTO tab (col1, col2) VALUES ('val1')</literal>
26302      is now invalid.  It's still allowed to supply fewer columns than
26303      expected if the <command>INSERT</command> does not have a column list.
26304     </para>
26305    </listitem>
26306
26307    <listitem>
26308     <para>
26309      <type>serial</type> columns are no longer automatically
26310      <literal>UNIQUE</>; thus, an index will not automatically be
26311      created.
26312     </para>
26313    </listitem>
26314
26315    <listitem>
26316     <para>
26317      A <command>SET</command> command inside an aborted transaction
26318      is now rolled back.
26319     </para>
26320    </listitem>
26321
26322    <listitem>
26323     <para>
26324      <command>COPY</command> no longer considers missing trailing
26325      columns to be null.  All columns need to be specified.
26326      (However, one can achieve a similar effect by specifying a
26327      column list in the <command>COPY</command> command.)
26328     </para>
26329    </listitem>
26330
26331    <listitem>
26332     <para>
26333      The data type <type>timestamp</type> is now equivalent to
26334      <type>timestamp without time zone</type>, instead of
26335      <type>timestamp with time zone</type>.
26336     </para>
26337    </listitem>
26338
26339    <listitem>
26340     <para>
26341      Pre-7.3 databases loaded into 7.3 will not have the new object
26342      dependencies for <type>serial</type> columns, unique
26343      constraints, and foreign keys. See the directory
26344      <filename>contrib/adddepend/</filename> for a detailed
26345      description and a script that will add such dependencies.
26346     </para>
26347    </listitem>
26348
26349    <listitem>
26350     <para>
26351      An empty string (<literal>''</literal>) is no longer allowed as
26352      the input into an integer field.  Formerly, it was silently
26353      interpreted as 0.
26354     </para>
26355    </listitem>
26356
26357   </itemizedlist>
26358  </sect2>
26359
26360  <sect2>
26361   <title>Changes</title>
26362
26363   <sect3>
26364    <title>Server Operation</title>
26365 <itemizedlist>
26366 <listitem><para>Add pg_locks view to show locks (Neil)</para></listitem>
26367 <listitem><para>Security fixes for password negotiation memory allocation (Neil)</para></listitem>
26368 <listitem><para>Remove support for version 0 FE/BE protocol (<productname>PostgreSQL</productname> 6.2 and earlier) (Tom)</para></listitem>
26369 <listitem><para>Reserve the last few backend slots for superusers, add parameter superuser_reserved_connections to control this (Nigel J. Andrews)</para></listitem>
26370 </itemizedlist>
26371   </sect3>
26372
26373   <sect3>
26374    <title>Performance</title>
26375 <itemizedlist>
26376 <listitem><para>Improve startup by calling localtime() only once (Tom)</para></listitem>
26377 <listitem><para>Cache system catalog information in flat files for faster startup (Tom)</para></listitem>
26378 <listitem><para>Improve caching of index information (Tom)</para></listitem>
26379 <listitem><para>Optimizer improvements (Tom, Fernando Nasser)</para></listitem>
26380 <listitem><para>Catalog caches now store failed lookups (Tom)</para></listitem>
26381 <listitem><para>Hash function improvements (Neil)</para></listitem>
26382 <listitem><para>Improve performance of query tokenization and network handling (Peter)</para></listitem>
26383 <listitem><para>Speed improvement for large object restore (Mario Weilguni)</para></listitem>
26384 <listitem><para>Mark expired index entries on first lookup, saving later heap fetches (Tom)</para></listitem>
26385 <listitem><para>Avoid excessive NULL bitmap padding (Manfred Koizar)</para></listitem>
26386 <listitem><para>Add BSD-licensed qsort() for Solaris, for performance (Bruce)</para></listitem>
26387 <listitem><para>Reduce per-row overhead by four bytes (Manfred Koizar)</para></listitem>
26388 <listitem><para>Fix GEQO optimizer bug (Neil Conway)</para></listitem>
26389 <listitem><para>Make WITHOUT OID actually save four bytes per row (Manfred Koizar)</para></listitem>
26390 <listitem><para>Add default_statistics_target variable to specify ANALYZE buckets (Neil)</para></listitem>
26391 <listitem><para>Use local buffer cache for temporary tables so no WAL overhead (Tom)</para></listitem>
26392 <listitem><para>Improve free space map performance on large tables (Stephen Marshall, Tom)</para></listitem>
26393 <listitem><para>Improved WAL write concurrency (Tom)</para></listitem>
26394 </itemizedlist>
26395   </sect3>
26396
26397   <sect3>
26398    <title>Privileges</title>
26399 <itemizedlist>
26400 <listitem><para>Add privileges on functions and procedural languages (Peter)</para></listitem>
26401 <listitem><para>Add OWNER to CREATE DATABASE so superusers can create databases on behalf of unprivileged users (Gavin Sherry, Tom)</para></listitem>
26402 <listitem><para>Add new object privilege bits EXECUTE and USAGE (Tom)</para></listitem>
26403 <listitem><para>Add SET SESSION AUTHORIZATION DEFAULT and RESET SESSION AUTHORIZATION (Tom)</para></listitem>
26404 <listitem><para>Allow functions to be executed with the privilege of the function owner (Peter)</para></listitem>
26405 </itemizedlist>
26406   </sect3>
26407
26408   <sect3>
26409    <title>Server Configuration</title>
26410 <itemizedlist>
26411 <listitem><para>Server log messages now tagged with LOG, not DEBUG (Bruce)</para></listitem>
26412 <listitem><para>Add user column to pg_hba.conf (Bruce)</para></listitem>
26413 <listitem><para>Have log_connections output two lines in log file (Tom)</para></listitem>
26414 <listitem><para>Remove debug_level from postgresql.conf, now server_min_messages (Bruce)</para></listitem>
26415 <listitem><para>New ALTER DATABASE/USER ... SET command for per-user/database initialization (Peter)</para></listitem>
26416 <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>
26417 <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>
26418 <listitem><para>Remove secondary password file capability and pg_password utility (Bruce)</para></listitem>
26419 <listitem><para>Add variable db_user_namespace for database-local user names (Bruce)</para></listitem>
26420 <listitem><para>SSL improvements (Bear Giles)</para></listitem>
26421 <listitem><para>Make encryption of stored passwords the default (Bruce)</para></listitem>
26422 <listitem><para>Allow pg_statistics to be reset by calling pg_stat_reset() (Christopher)</para></listitem>
26423 <listitem><para>Add log_duration parameter (Bruce)</para></listitem>
26424 <listitem><para>Rename debug_print_query to log_statement (Bruce)</para></listitem>
26425 <listitem><para>Rename show_query_stats to show_statement_stats (Bruce)</para></listitem>
26426 <listitem><para>Add param log_min_error_statement to print commands to logs on error (Gavin)</para></listitem>
26427 </itemizedlist>
26428   </sect3>
26429
26430   <sect3>
26431    <title>Queries</title>
26432 <itemizedlist>
26433 <listitem><para>Make cursors insensitive, meaning their contents do not change (Tom)</para></listitem>
26434 <listitem><para>Disable LIMIT #,# syntax; now only LIMIT # OFFSET # supported (Bruce)</para></listitem>
26435 <listitem><para>Increase identifier length to 63 (Neil, Bruce)</para></listitem>
26436 <listitem><para>UNION fixes for merging &gt;= 3 columns of different lengths (Tom)</para></listitem>
26437 <listitem><para>Add DEFAULT key word to INSERT, e.g., INSERT ... (..., DEFAULT, ...) (Rod)</para></listitem>
26438 <listitem><para>Allow views to have default values using ALTER COLUMN ... SET DEFAULT (Neil)</para></listitem>
26439 <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>
26440 <listitem><para>Fix for join aliases (Tom)</para></listitem>
26441 <listitem><para>Fix for FULL OUTER JOINs (Tom)</para></listitem>
26442 <listitem><para>Improve reporting of invalid identifier and location (Tom, Gavin)</para></listitem>
26443 <listitem><para>Fix OPEN cursor(args) (Tom)</para></listitem>
26444 <listitem><para>Allow 'ctid' to be used in a view and currtid(viewname) (Hiroshi)</para></listitem>
26445 <listitem><para>Fix for CREATE TABLE AS with UNION (Tom)</para></listitem>
26446 <listitem><para>SQL99 syntax improvements (Thomas)</para></listitem>
26447 <listitem><para>Add statement_timeout variable to cancel queries (Bruce)</para></listitem>
26448 <listitem><para>Allow prepared queries with PREPARE/EXECUTE (Neil)</para></listitem>
26449 <listitem><para>Allow FOR UPDATE to appear after LIMIT/OFFSET (Bruce)</para></listitem>
26450 <listitem><para>Add variable autocommit (Tom, David Van Wie)</para></listitem>
26451 </itemizedlist>
26452   </sect3>
26453
26454   <sect3>
26455    <title>Object Manipulation</title>
26456 <itemizedlist>
26457 <listitem><para>Make equals signs optional in CREATE DATABASE (Gavin Sherry)</para></listitem>
26458 <listitem><para>Make ALTER TABLE OWNER change index ownership too (Neil)</para></listitem>
26459 <listitem><para>New ALTER TABLE tabname ALTER COLUMN colname SET STORAGE controls TOAST storage, compression (John Gray)</para></listitem>
26460 <listitem><para>Add schema support, CREATE/DROP SCHEMA (Tom)</para></listitem>
26461 <listitem><para>Create schema for temporary tables (Tom)</para></listitem>
26462 <listitem><para>Add variable search_path for schema search (Tom)</para></listitem>
26463 <listitem><para>Add ALTER TABLE SET/DROP NOT NULL (Christopher)</para></listitem>
26464 <listitem><para>New CREATE FUNCTION volatility levels (Tom)</para></listitem>
26465 <listitem><para>Make rule names unique only per table (Tom)</para></listitem>
26466 <listitem><para>Add 'ON tablename' clause to DROP RULE and COMMENT ON RULE (Tom)</para></listitem>
26467 <listitem><para>Add ALTER TRIGGER RENAME (Joe)</para></listitem>
26468 <listitem><para>New current_schema() and current_schemas() inquiry functions (Tom)</para></listitem>
26469 <listitem><para>Allow functions to return multiple rows (table functions) (Joe)</para></listitem>
26470 <listitem><para>Make WITH optional in CREATE DATABASE, for consistency (Bruce)</para></listitem>
26471 <listitem><para>Add object dependency tracking (Rod, Tom)</para></listitem>
26472 <listitem><para>Add RESTRICT/CASCADE to DROP commands (Rod)</para></listitem>
26473 <listitem><para>Add ALTER TABLE DROP for non-CHECK CONSTRAINT (Rod)</para></listitem>
26474 <listitem><para>Autodestroy sequence on DROP of table with SERIAL (Rod)</para></listitem>
26475 <listitem><para>Prevent column dropping if column is used by foreign key (Rod)</para></listitem>
26476 <listitem><para>Automatically drop constraints/functions when object is dropped (Rod)</para></listitem>
26477 <listitem><para>Add CREATE/DROP OPERATOR CLASS (Bill Studenmund, Tom)</para></listitem>
26478 <listitem><para>Add ALTER TABLE DROP COLUMN (Christopher, Tom, Hiroshi)</para></listitem>
26479 <listitem><para>Prevent inherited columns from being removed or renamed (Alvaro Herrera)</para></listitem>
26480 <listitem><para>Fix foreign key constraints to not error on intermediate database states (Stephan)</para></listitem>
26481 <listitem><para>Propagate column or table renaming to foreign key constraints</para></listitem>
26482 <listitem><para>Add CREATE OR REPLACE VIEW (Gavin, Neil, Tom)</para></listitem>
26483 <listitem><para>Add CREATE OR REPLACE RULE (Gavin, Neil, Tom)</para></listitem>
26484 <listitem><para>Have rules execute alphabetically, returning more predictable values (Tom)</para></listitem>
26485 <listitem><para>Triggers are now fired in alphabetical order (Tom)</para></listitem>
26486 <listitem><para>Add /contrib/adddepend to handle pre-7.3 object dependencies (Rod)</para></listitem>
26487 <listitem><para>Allow better casting when inserting/updating values (Tom)</para></listitem>
26488 </itemizedlist>
26489   </sect3>
26490
26491   <sect3>
26492    <title>Utility Commands</title>
26493 <itemizedlist>
26494 <listitem><para>Have COPY TO output embedded carriage returns and newlines as \r and \n (Tom)</para></listitem>
26495 <listitem><para>Allow DELIMITER in COPY FROM to be 8-bit clean (Tatsuo)</para></listitem>
26496 <listitem><para>Make <application>pg_dump</> use ALTER TABLE ADD PRIMARY KEY, for performance (Neil)</para></listitem>
26497 <listitem><para>Disable brackets in multistatement rules (Bruce)</para></listitem>
26498 <listitem><para>Disable VACUUM from being called inside a function (Bruce)</para></listitem>
26499 <listitem><para>Allow dropdb and other scripts to use identifiers with spaces (Bruce)</para></listitem>
26500 <listitem><para>Restrict database comment changes to the current database</para></listitem>
26501 <listitem><para>Allow comments on operators, independent of the underlying function (Rod)</para></listitem>
26502 <listitem><para>Rollback SET commands in aborted transactions (Tom)</para></listitem>
26503 <listitem><para>EXPLAIN now outputs as a query (Tom)</para></listitem>
26504 <listitem><para>Display condition expressions and sort keys in EXPLAIN (Tom)</para></listitem>
26505 <listitem><para>Add 'SET LOCAL var = value' to set configuration variables for a single transaction (Tom)</para></listitem>
26506 <listitem><para>Allow ANALYZE to run in a transaction (Bruce)</para></listitem>
26507 <listitem><para>Improve COPY syntax using new WITH clauses, keep backward compatibility (Bruce)</para></listitem>
26508 <listitem><para>Fix <application>pg_dump</> to consistently output tags in non-ASCII dumps (Bruce)</para></listitem>
26509 <listitem><para>Make foreign key constraints clearer in dump file (Rod)</para></listitem>
26510 <listitem><para>Add COMMENT ON CONSTRAINT (Rod)</para></listitem>
26511 <listitem><para>Allow COPY TO/FROM to specify column names (Brent Verner)</para></listitem>
26512 <listitem><para>Dump UNIQUE and PRIMARY KEY constraints as ALTER TABLE (Rod)</para></listitem>
26513 <listitem><para>Have SHOW output a query result (Joe)</para></listitem>
26514 <listitem><para>Generate failure on short COPY lines rather than pad NULLs (Neil)</para></listitem>
26515 <listitem><para>Fix CLUSTER to preserve all table attributes (Alvaro Herrera)</para></listitem>
26516 <listitem><para>New pg_settings table to view/modify GUC settings (Joe)</para></listitem>
26517 <listitem><para>Add smart quoting, portability improvements to <application>pg_dump</> output (Peter)</para></listitem>
26518 <listitem><para>Dump serial columns out as SERIAL (Tom)</para></listitem>
26519 <listitem><para>Enable large file support, &gt;2G for <application>pg_dump</> (Peter, Philip Warner, Bruce)</para></listitem>
26520 <listitem><para>Disallow TRUNCATE on tables that are involved in referential constraints (Rod)</para></listitem>
26521 <listitem><para>Have TRUNCATE also auto-truncate the toast table of the relation (Tom)</para></listitem>
26522 <listitem><para>Add clusterdb utility that will auto-cluster an entire database based on previous CLUSTER operations (Alvaro Herrera)</para></listitem>
26523 <listitem><para>Overhaul pg_dumpall (Peter)</para></listitem>
26524 <listitem><para>Allow REINDEX of TOAST tables (Tom)</para></listitem>
26525 <listitem><para>Implemented START TRANSACTION, per SQL99 (Neil)</para></listitem>
26526 <listitem><para>Fix rare index corruption when a page split affects bulk delete (Tom)</para></listitem>
26527 <listitem><para>Fix ALTER TABLE ... ADD COLUMN for inheritance (Alvaro Herrera)</para></listitem>
26528 </itemizedlist>
26529   </sect3>
26530
26531   <sect3>
26532    <title>Data Types and Functions</title>
26533 <itemizedlist>
26534 <listitem><para>Fix factorial(0) to return 1 (Bruce)</para></listitem>
26535 <listitem><para>Date/time/timezone improvements (Thomas)</para></listitem>
26536 <listitem><para>Fix for array slice extraction (Tom)</para></listitem>
26537 <listitem><para>Fix extract/date_part to report proper microseconds for timestamp (Tatsuo)</para></listitem>
26538 <listitem><para>Allow text_substr() and bytea_substr() to read TOAST values more efficiently (John Gray)</para></listitem>
26539 <listitem><para>Add domain support (Rod)</para></listitem>
26540 <listitem><para>Make WITHOUT TIME ZONE the default for TIMESTAMP and TIME data types (Thomas)</para></listitem>
26541 <listitem><para>Allow alternate storage scheme of 64-bit integers for date/time types using --enable-integer-datetimes in configure (Thomas)</para></listitem>
26542 <listitem><para>Make timezone(timestamptz) return timestamp rather than a string (Thomas)</para></listitem>
26543 <listitem><para>Allow fractional seconds in date/time types for dates prior to 1BC (Thomas)</para></listitem>
26544 <listitem><para>Limit timestamp data types to 6 decimal places of precision (Thomas)</para></listitem>
26545 <listitem><para>Change timezone conversion functions from timetz() to timezone() (Thomas)</para></listitem>
26546 <listitem><para>Add configuration variables datestyle and timezone (Tom)</para></listitem>
26547 <listitem><para>Add OVERLAY(), which allows substitution of a substring in a string (Thomas)</para></listitem>
26548 <listitem><para>Add SIMILAR TO (Thomas, Tom)</para></listitem>
26549 <listitem><para>Add regular expression SUBSTRING(string FROM pat FOR escape) (Thomas)</para></listitem>
26550 <listitem><para>Add LOCALTIME and LOCALTIMESTAMP functions (Thomas)</para></listitem>
26551 <listitem><para>Add named composite types using CREATE TYPE typename AS (column) (Joe)</para></listitem>
26552 <listitem><para>Allow composite type definition in the table alias clause (Joe)</para></listitem>
26553 <listitem><para>Add new API to simplify creation of C language table functions (Joe)</para></listitem>
26554 <listitem><para>Remove ODBC-compatible empty parentheses from calls to SQL99 functions for which these parentheses do not match the standard (Thomas)</para></listitem>
26555 <listitem><para>Allow macaddr data type to accept 12 hex digits with no separators (Mike Wyer)</para></listitem>
26556 <listitem><para>Add CREATE/DROP CAST (Peter)</para></listitem>
26557 <listitem><para>Add IS DISTINCT FROM operator (Thomas)</para></listitem>
26558 <listitem><para>Add SQL99 TREAT() function, synonym for CAST() (Thomas)</para></listitem>
26559 <listitem><para>Add pg_backend_pid() to output backend pid (Bruce)</para></listitem>
26560 <listitem><para>Add IS OF / IS NOT OF type predicate (Thomas)</para></listitem>
26561 <listitem><para>Allow bit string constants without fully-specified length (Thomas)</para></listitem>
26562 <listitem><para>Allow conversion between 8-byte integers and bit strings (Thomas)</para></listitem>
26563 <listitem><para>Implement hex literal conversion to bit string literal (Thomas)</para></listitem>
26564 <listitem><para>Allow table functions to appear in the FROM clause (Joe)</para></listitem>
26565 <listitem><para>Increase maximum number of function parameters to 32 (Bruce)</para></listitem>
26566 <listitem><para>No longer automatically create index for SERIAL column (Tom)</para></listitem>
26567 <listitem><para>Add current_database() (Rod)</para></listitem>
26568 <listitem><para>Fix cash_words() to not overflow buffer (Tom)</para></listitem>
26569 <listitem><para>Add functions replace(), split_part(), to_hex() (Joe)</para></listitem>
26570 <listitem><para>Fix LIKE for bytea as a right-hand argument (Joe)</para></listitem>
26571 <listitem><para>Prevent crashes caused by SELECT cash_out(2) (Tom)</para></listitem>
26572 <listitem><para>Fix to_char(1,'FM999.99') to return a period (Karel)</para></listitem>
26573 <listitem><para>Fix trigger/type/language functions returning OPAQUE to return proper type (Tom)</para></listitem>
26574 </itemizedlist>
26575   </sect3>
26576
26577   <sect3>
26578    <title>Internationalization</title>
26579 <itemizedlist>
26580 <listitem><para>Add additional encodings: Korean (JOHAB), Thai (WIN874), Vietnamese (TCVN), Arabic (WIN1256), Simplified Chinese (GBK), Korean (UHC) (Eiji Tokuya)</para></listitem>
26581 <listitem><para>Enable locale support by default (Peter)</para></listitem>
26582 <listitem><para>Add locale variables (Peter)</para></listitem>
26583 <listitem><para>Escape byes &gt;= 0x7f for multibyte in PQescapeBytea/PQunescapeBytea (Tatsuo)</para></listitem>
26584 <listitem><para>Add locale awareness to regular expression character classes</para></listitem>
26585 <listitem><para>Enable multibyte support by default (Tatsuo)</para></listitem>
26586 <listitem><para>Add GB18030 multibyte support (Bill Huang)</para></listitem>
26587 <listitem><para>Add CREATE/DROP CONVERSION, allowing loadable encodings (Tatsuo, Kaori)</para></listitem>
26588 <listitem><para>Add pg_conversion table (Tatsuo)</para></listitem>
26589 <listitem><para>Add SQL99 CONVERT() function (Tatsuo)</para></listitem>
26590 <listitem><para>pg_dumpall, pg_controldata, and pg_resetxlog now national-language aware (Peter)</para></listitem>
26591 <listitem><para>New and updated translations</para></listitem>
26592 </itemizedlist>
26593   </sect3>
26594
26595   <sect3>
26596    <title>Server-side Languages</title>
26597 <itemizedlist>
26598 <listitem><para>Allow recursive SQL function (Peter)</para></listitem>
26599 <listitem><para>Change PL/Tcl build to use configured compiler and Makefile.shlib (Peter)</para></listitem>
26600 <listitem><para>Overhaul the PL/pgSQL FOUND variable to be more Oracle-compatible (Neil, Tom)</para></listitem>
26601 <listitem><para>Allow PL/pgSQL to handle quoted identifiers (Tom)</para></listitem>
26602 <listitem><para>Allow set-returning PL/pgSQL functions (Neil)</para></listitem>
26603 <listitem><para>Make PL/pgSQL schema-aware (Joe)</para></listitem>
26604 <listitem><para>Remove some memory leaks (Nigel J. Andrews, Tom)</para></listitem>
26605 </itemizedlist>
26606   </sect3>
26607
26608   <sect3>
26609    <title>psql</title>
26610 <itemizedlist>
26611 <listitem><para>Don't lowercase psql \connect database name for 7.2.0 compatibility (Tom)</para></listitem>
26612 <listitem><para>Add psql \timing to time user queries (Greg Sabino Mullane)</para></listitem>
26613 <listitem><para>Have psql \d show index information (Greg Sabino Mullane)</para></listitem>
26614 <listitem><para>New psql \dD shows domains (Jonathan Eisler)</para></listitem>
26615 <listitem><para>Allow psql to show rules on views (Paul ?)</para></listitem>
26616 <listitem><para>Fix for psql variable substitution (Tom)</para></listitem>
26617 <listitem><para>Allow psql \d to show temporary table structure (Tom)</para></listitem>
26618 <listitem><para>Allow psql \d to show foreign keys (Rod)</para></listitem>
26619 <listitem><para>Fix \? to honor \pset pager (Bruce)</para></listitem>
26620 <listitem><para>Have psql reports its version number on startup (Tom)</para></listitem>
26621 <listitem><para>Allow \copy to specify column names (Tom)</para></listitem>
26622 </itemizedlist>
26623   </sect3>
26624
26625   <sect3>
26626    <title>libpq</title>
26627 <itemizedlist>
26628 <listitem><para>Add ~/.pgpass to store host/user password combinations (Alvaro Herrera)</para></listitem>
26629 <listitem><para>Add PQunescapeBytea() function to libpq (Patrick Welche)</para></listitem>
26630 <listitem><para>Fix for sending large queries over non-blocking connections (Bernhard Herzog)</para></listitem>
26631 <listitem><para>Fix for libpq using timers on Win9X (David Ford)</para></listitem>
26632 <listitem><para>Allow libpq notify to handle servers with different-length identifiers (Tom)</para></listitem>
26633 <listitem><para>Add libpq PQescapeString() and PQescapeBytea() to Windows (Bruce)</para></listitem>
26634 <listitem><para>Fix for SSL with non-blocking connections (Jack Bates)</para></listitem>
26635 <listitem><para>Add libpq connection timeout parameter (Denis A Ustimenko)</para></listitem>
26636 </itemizedlist>
26637   </sect3>
26638
26639   <sect3>
26640    <title>JDBC</title>
26641 <itemizedlist>
26642 <listitem><para>Allow JDBC to compile with JDK 1.4 (Dave)</para></listitem>
26643 <listitem><para>Add JDBC 3 support (Barry)</para></listitem>
26644 <listitem><para>Allows JDBC to set loglevel by adding ?loglevel=X to the connection URL (Barry)</para></listitem>
26645 <listitem><para>Add Driver.info() message that prints out the version number (Barry)</para></listitem>
26646 <listitem><para>Add updateable result sets (Raghu Nidagal, Dave)</para></listitem>
26647 <listitem><para>Add support for callable statements (Paul Bethe)</para></listitem>
26648 <listitem><para>Add query cancel capability</para></listitem>
26649 <listitem><para>Add refresh row (Dave)</para></listitem>
26650 <listitem><para>Fix MD5 encryption handling for multibyte servers (Jun Kawai)</para></listitem>
26651 <listitem><para>Add support for prepared statements (Barry)</para></listitem>
26652 </itemizedlist>
26653   </sect3>
26654
26655   <sect3>
26656    <title>Miscellaneous Interfaces</title>
26657 <itemizedlist>
26658 <listitem><para>Fixed ECPG bug concerning octal numbers in single quotes (Michael)</para></listitem>
26659 <listitem><para>Move src/interfaces/libpgeasy to http://gborg.postgresql.org (Marc, Bruce)</para></listitem>
26660 <listitem><para>Improve Python interface (Elliot Lee, Andrew Johnson, Greg Copeland)</para></listitem>
26661 <listitem><para>Add libpgtcl connection close event (Gerhard Hintermayer)</para></listitem>
26662 <listitem><para>Move src/interfaces/libpq++ to http://gborg.postgresql.org (Marc, Bruce)</para></listitem>
26663 <listitem><para>Move src/interfaces/odbc to http://gborg.postgresql.org (Marc)</para></listitem>
26664 <listitem><para>Move src/interfaces/libpgeasy to http://gborg.postgresql.org (Marc, Bruce)</para></listitem>
26665 <listitem><para>Move src/interfaces/perl5 to http://gborg.postgresql.org (Marc, Bruce)</para></listitem>
26666 <listitem><para>Remove src/bin/pgaccess from main tree, now at http://www.pgaccess.org (Bruce)</para></listitem>
26667 <listitem><para>Add pg_on_connection_loss command to libpgtcl (Gerhard Hintermayer, Tom)</para></listitem>
26668 </itemizedlist>
26669   </sect3>
26670
26671   <sect3>
26672    <title>Source Code</title>
26673 <itemizedlist>
26674 <listitem><para>Fix for parallel make (Peter)</para></listitem>
26675 <listitem><para>AIX fixes for linking Tcl (Andreas Zeugswetter)</para></listitem>
26676 <listitem><para>Allow PL/Perl to build under Cygwin (Jason Tishler)</para></listitem>
26677 <listitem><para>Improve MIPS compiles (Peter, Oliver Elphick)</para></listitem>
26678 <listitem><para>Require Autoconf version 2.53 (Peter)</para></listitem>
26679 <listitem><para>Require readline and zlib by default in configure (Peter)</para></listitem>
26680 <listitem><para>Allow Solaris to use Intimate Shared Memory (ISM), for performance (Scott Brunza, P.J. Josh Rovero)</para></listitem>
26681 <listitem><para>Always enable syslog in compile, remove --enable-syslog option (Tatsuo)</para></listitem>
26682 <listitem><para>Always enable multibyte in compile, remove --enable-multibyte option (Tatsuo)</para></listitem>
26683 <listitem><para>Always enable locale in compile, remove --enable-locale option (Peter)</para></listitem>
26684 <listitem><para>Fix for Win9x DLL creation (Magnus Naeslund)</para></listitem>
26685 <listitem><para>Fix for link() usage by WAL code on Windows, BeOS (Jason Tishler)</para></listitem>
26686 <listitem><para>Add sys/types.h to c.h, remove from main files (Peter, Bruce)</para></listitem>
26687 <listitem><para>Fix AIX hang on SMP machines (Tomoyuki Niijima)</para></listitem>
26688 <listitem><para>AIX SMP hang fix (Tomoyuki Niijima)</para></listitem>
26689 <listitem><para>Fix pre-1970 date handling on newer glibc libraries (Tom)</para></listitem>
26690 <listitem><para>Fix PowerPC SMP locking (Tom)</para></listitem>
26691 <listitem><para>Prevent gcc -ffast-math from being used (Peter, Tom)</para></listitem>
26692 <listitem><para>Bison &gt;= 1.50 now required for developer builds</para></listitem>
26693 <listitem><para>Kerberos 5 support now builds with Heimdal (Peter)</para></listitem>
26694 <listitem><para>Add appendix in the User's Guide which lists SQL features (Thomas)</para></listitem>
26695 <listitem><para>Improve loadable module linking to use RTLD_NOW (Tom)</para></listitem>
26696 <listitem><para>New error levels WARNING, INFO, LOG, DEBUG[1-5] (Bruce)</para></listitem>
26697 <listitem><para>New src/port directory holds replaced libc functions (Peter, Bruce)</para></listitem>
26698 <listitem><para>New pg_namespace system catalog for schemas (Tom)</para></listitem>
26699 <listitem><para>Add pg_class.relnamespace for schemas (Tom)</para></listitem>
26700 <listitem><para>Add pg_type.typnamespace for schemas (Tom)</para></listitem>
26701 <listitem><para>Add pg_proc.pronamespace for schemas (Tom)</para></listitem>
26702 <listitem><para>Restructure aggregates to have pg_proc entries (Tom)</para></listitem>
26703 <listitem><para>System relations now have their own namespace, pg_* test not required (Fernando Nasser)</para></listitem>
26704 <listitem><para>Rename TOAST index names to be *_index rather than *_idx (Neil)</para></listitem>
26705 <listitem><para>Add namespaces for operators, opclasses (Tom)</para></listitem>
26706 <listitem><para>Add additional checks to server control file (Thomas)</para></listitem>
26707 <listitem><para>New Polish FAQ (Marcin Mazurek)</para></listitem>
26708 <listitem><para>Add Posix semaphore support (Tom)</para></listitem>
26709 <listitem><para>Document need for reindex (Bruce)</para></listitem>
26710 <listitem><para>Rename some internal identifiers to simplify Windows compile (Jan, Katherine Ward)</para></listitem>
26711 <listitem><para>Add documentation on computing disk space (Bruce)</para></listitem>
26712 <listitem><para>Remove KSQO from GUC (Bruce)</para></listitem>
26713 <listitem><para>Fix memory leak in rtree (Kenneth Been)</para></listitem>
26714 <listitem><para>Modify a few error messages for consistency (Bruce)</para></listitem>
26715 <listitem><para>Remove unused system table columns (Peter)</para></listitem>
26716 <listitem><para>Make system columns NOT NULL where appropriate (Tom)</para></listitem>
26717 <listitem><para>Clean up use of sprintf in favor of snprintf() (Neil, Jukka Holappa)</para></listitem>
26718 <listitem><para>Remove OPAQUE and create specific subtypes (Tom)</para></listitem>
26719 <listitem><para>Cleanups in array internal handling (Joe, Tom)</para></listitem>
26720 <listitem><para>Disallow pg_atoi('') (Bruce)</para></listitem>
26721 <listitem><para>Remove parameter wal_files because WAL files are now recycled (Bruce)</para></listitem>
26722 <listitem><para>Add version numbers to heap pages (Tom)</para></listitem>
26723 </itemizedlist>
26724   </sect3>
26725
26726   <sect3>
26727    <title>Contrib</title>
26728 <itemizedlist>
26729 <listitem><para>Allow inet arrays in /contrib/array (Neil)</para></listitem>
26730 <listitem><para>GiST fixes (Teodor Sigaev, Neil)</para></listitem>
26731 <listitem><para>Upgrade /contrib/mysql</para></listitem>
26732 <listitem><para>Add /contrib/dbsize which shows table sizes without vacuum (Peter)</para></listitem>
26733 <listitem><para>Add /contrib/intagg, integer aggregator routines (mlw)</para></listitem>
26734 <listitem><para>Improve /contrib/oid2name (Neil, Bruce)</para></listitem>
26735 <listitem><para>Improve /contrib/tsearch (Oleg, Teodor Sigaev)</para></listitem>
26736 <listitem><para>Cleanups of /contrib/rserver (Alexey V. Borzov)</para></listitem>
26737 <listitem><para>Update /contrib/oracle conversion utility (Gilles Darold)</para></listitem>
26738 <listitem><para>Update /contrib/dblink (Joe)</para></listitem>
26739 <listitem><para>Improve options supported by /contrib/vacuumlo (Mario Weilguni)</para></listitem>
26740 <listitem><para>Improvements to /contrib/intarray (Oleg, Teodor Sigaev, Andrey Oktyabrski)</para></listitem>
26741 <listitem><para>Add /contrib/reindexdb utility (Shaun Thomas)</para></listitem>
26742 <listitem><para>Add indexing to /contrib/isbn_issn (Dan Weston)</para></listitem>
26743 <listitem><para>Add /contrib/dbmirror (Steven Singer)</para></listitem>
26744 <listitem><para>Improve /contrib/pgbench (Neil)</para></listitem>
26745 <listitem><para>Add /contrib/tablefunc table function examples (Joe)</para></listitem>
26746 <listitem><para>Add /contrib/ltree data type for tree structures (Teodor Sigaev, Oleg Bartunov)</para></listitem>
26747 <listitem><para>Move /contrib/pg_controldata, pg_resetxlog into main tree (Bruce)</para></listitem>
26748 <listitem><para>Fixes to /contrib/cube (Bruno Wolff)</para></listitem>
26749 <listitem><para>Improve /contrib/fulltextindex (Christopher)</para></listitem>
26750 </itemizedlist>
26751   </sect3>
26752
26753  </sect2>
26754 </sect1>
26755
26756  <sect1 id="release-7-2-8">
26757   <title>Release 7.2.8</title>
26758
26759   <note>
26760   <title>Release date</title>
26761   <simpara>2005-05-09</simpara>
26762   </note>
26763
26764   <para>
26765    This release contains a variety of fixes from 7.2.7, including one
26766    security-related issue.
26767   </para>
26768
26769   <sect2>
26770    <title>Migration to Version 7.2.8</title>
26771
26772    <para>
26773     A dump/restore is not required for those running 7.2.X.
26774    </para>
26775   </sect2>
26776
26777   <sect2>
26778    <title>Changes</title>
26779
26780 <itemizedlist>
26781 <listitem><para>Repair ancient race condition that allowed a transaction to be
26782 seen as committed for some purposes (eg SELECT FOR UPDATE) slightly sooner
26783 than for other purposes</para>
26784 <para>This is an extremely serious bug since it could lead to apparent
26785 data inconsistencies being briefly visible to applications.</para></listitem>
26786 <listitem><para>Repair race condition between relation extension and
26787 VACUUM</para>
26788 <para>This could theoretically have caused loss of a page's worth of
26789 freshly-inserted data, although the scenario seems of very low probability.
26790 There are no known cases of it having caused more than an Assert failure.
26791 </para></listitem>
26792 <listitem><para>Fix <function>EXTRACT(EPOCH)</> for
26793 <type>TIME WITH TIME ZONE</> values</para></listitem>
26794 <listitem><para>Additional buffer overrun checks in plpgsql
26795 (Neil)</para></listitem>
26796 <listitem><para>Fix pg_dump to dump index names and trigger names containing
26797 <literal>%</> correctly (Neil)</para></listitem>
26798 <listitem><para>Prevent <function>to_char(interval)</> from dumping core for
26799 month-related formats</para></listitem>
26800 <listitem><para>Fix <filename>contrib/pgcrypto</> for newer OpenSSL builds
26801 (Marko Kreen)</para></listitem>
26802 </itemizedlist>
26803
26804  </sect2>
26805 </sect1>
26806
26807  <sect1 id="release-7-2-7">
26808   <title>Release 7.2.7</title>
26809
26810   <note>
26811   <title>Release date</title>
26812   <simpara>2005-01-31</simpara>
26813   </note>
26814
26815   <para>
26816    This release contains a variety of fixes from 7.2.6, including several
26817    security-related issues.
26818   </para>
26819
26820   <sect2>
26821    <title>Migration to Version 7.2.7</title>
26822
26823    <para>
26824     A dump/restore is not required for those running 7.2.X.
26825    </para>
26826   </sect2>
26827
26828   <sect2>
26829    <title>Changes</title>
26830
26831 <itemizedlist>
26832 <listitem><para>Disallow <command>LOAD</> to non-superusers</para>
26833 <para>
26834 On platforms that will automatically execute initialization functions of a
26835 shared library (this includes at least Windows and ELF-based Unixen),
26836 <command>LOAD</> can be used to make the server execute arbitrary code.
26837 Thanks to NGS Software for reporting this.</para></listitem>
26838 <listitem><para>Add needed STRICT marking to some contrib functions (Kris
26839 Jurka)</para></listitem>
26840 <listitem><para>Avoid buffer overrun when plpgsql cursor declaration has too
26841 many parameters (Neil)</para></listitem>
26842 <listitem><para>Fix planning error for FULL and RIGHT outer joins</para>
26843 <para>
26844 The result of the join was mistakenly supposed to be sorted the same as the
26845 left input.  This could not only deliver mis-sorted output to the user, but
26846 in case of nested merge joins could give outright wrong answers.
26847 </para></listitem>
26848 <listitem><para>Fix display of negative intervals in SQL and GERMAN
26849 datestyles</para></listitem>
26850 </itemizedlist>
26851
26852  </sect2>
26853 </sect1>
26854
26855  <sect1 id="release-7-2-6">
26856   <title>Release 7.2.6</title>
26857
26858   <note>
26859   <title>Release date</title>
26860   <simpara>2004-10-22</simpara>
26861   </note>
26862
26863   <para>
26864    This release contains a variety of fixes from 7.2.5.
26865   </para>
26866
26867
26868   <sect2>
26869    <title>Migration to Version 7.2.6</title>
26870
26871    <para>
26872     A dump/restore is not required for those running 7.2.X.
26873    </para>
26874   </sect2>
26875
26876   <sect2>
26877    <title>Changes</title>
26878
26879 <itemizedlist>
26880 <listitem><para>Repair possible failure to update hint bits on disk</para>
26881 <para>
26882 Under rare circumstances this oversight could lead to
26883 <quote>could not access transaction status</> failures, which qualifies
26884 it as a potential-data-loss bug.
26885 </para></listitem>
26886 <listitem><para>Ensure that hashed outer join does not miss tuples</para>
26887 <para>
26888 Very large left joins using a hash join plan could fail to output unmatched
26889 left-side rows given just the right data distribution.
26890 </para></listitem>
26891 <listitem><para>Disallow running pg_ctl as root</para>
26892 <para>
26893 This is to guard against any possible security issues.
26894 </para></listitem>
26895 <listitem><para>Avoid using temp files in /tmp in make_oidjoins_check</para>
26896 <para>
26897 This has been reported as a security issue, though it's hardly worthy of
26898 concern since there is no reason for non-developers to use this script anyway.
26899 </para></listitem>
26900 <listitem><para>Update to newer versions of Bison</para></listitem>
26901 </itemizedlist>
26902
26903  </sect2>
26904 </sect1>
26905
26906  <sect1 id="release-7-2-5">
26907   <title>Release 7.2.5</title>
26908
26909   <note>
26910   <title>Release date</title>
26911   <simpara>2004-08-16</simpara>
26912   </note>
26913
26914   <para>
26915    This release contains a variety of fixes from 7.2.4.
26916   </para>
26917
26918
26919   <sect2>
26920    <title>Migration to Version 7.2.5</title>
26921
26922    <para>
26923     A dump/restore is not required for those running 7.2.X.
26924    </para>
26925   </sect2>
26926
26927   <sect2>
26928    <title>Changes</title>
26929
26930 <itemizedlist>
26931 <listitem><para>Prevent possible loss of committed transactions during crash</para>
26932 <para>
26933 Due to insufficient interlocking between transaction commit and checkpointing,
26934 it was possible for transactions committed just before the most recent
26935 checkpoint to be lost, in whole or in part, following a database crash and
26936 restart.  This is a serious bug that has existed
26937 since <productname>PostgreSQL</productname> 7.1.
26938 </para></listitem>
26939 <listitem><para>Fix corner case for btree search in parallel with first root page split</para></listitem>
26940 <listitem><para>Fix buffer overrun in <function>to_ascii</function> (Guido Notari)</para></listitem>
26941 <listitem><para>Fix core dump in deadlock detection on machines where char is unsigned</para></listitem>
26942 <listitem><para>Fix failure to respond to <command>pg_ctl stop -m fast</command> after Async_NotifyHandler runs</para></listitem>
26943 <listitem><para>Repair memory leaks in pg_dump</para></listitem>
26944 <listitem><para>Avoid conflict with system definition of <function>isblank()</function> function or macro</para></listitem>
26945 </itemizedlist>
26946  </sect2>
26947 </sect1>
26948
26949 <sect1 id="release-7-2-4">
26950  <title>Release 7.2.4</title>
26951
26952  <note>
26953   <title>Release date</title>
26954   <simpara>2003-01-30</simpara>
26955  </note>
26956
26957  <para>
26958   This release contains a variety of fixes for version 7.2.3,
26959   including fixes to prevent possible data loss.
26960  </para>
26961
26962  <sect2>
26963   <title>Migration to Version 7.2.4</title>
26964
26965   <para>
26966    A dump/restore is <emphasis>not</emphasis> required for those
26967    running version 7.2.*.
26968   </para>
26969  </sect2>
26970
26971  <sect2>
26972   <title>Changes</title>
26973
26974 <itemizedlist>
26975 <listitem><para>Fix some additional cases of VACUUM "No one parent tuple was found" error</para></listitem>
26976 <listitem><para>Prevent VACUUM from being called inside a function  (Bruce)</para></listitem>
26977 <listitem><para>Ensure pg_clog updates are sync'd to disk before marking checkpoint complete</para></listitem>
26978 <listitem><para>Avoid integer overflow during large hash joins</para></listitem>
26979 <listitem><para>Make GROUP commands work when pg_group.grolist is large enough to be toasted</para></listitem>
26980 <listitem><para>Fix errors in datetime tables; some timezone names weren't being recognized</para></listitem>
26981 <listitem><para>Fix integer overflows in circle_poly(), path_encode(), path_add()  (Neil)</para></listitem>
26982 <listitem><para>Repair long-standing logic errors in lseg_eq(), lseg_ne(), lseg_center()</para></listitem>
26983 </itemizedlist>
26984  </sect2>
26985 </sect1>
26986
26987
26988 <sect1 id="release-7-2-3">
26989  <title>Release 7.2.3</title>
26990
26991  <note>
26992   <title>Release date</title>
26993   <simpara>2002-10-01</simpara>
26994  </note>
26995
26996  <para>
26997   This release contains a variety of fixes for version 7.2.2,
26998   including fixes to prevent possible data loss.
26999  </para>
27000
27001  <sect2>
27002   <title>Migration to Version 7.2.3</title>
27003
27004   <para>
27005    A dump/restore is <emphasis>not</emphasis> required for those
27006    running version 7.2.*.
27007   </para>
27008  </sect2>
27009
27010  <sect2>
27011   <title>Changes</title>
27012
27013 <itemizedlist>
27014 <listitem><para>Prevent possible compressed transaction log loss (Tom)</para></listitem>
27015 <listitem><para>Prevent non-superuser from increasing most recent vacuum info (Tom)</para></listitem>
27016 <listitem><para>Handle pre-1970 date values in newer versions of glibc (Tom)</para></listitem>
27017 <listitem><para>Fix possible hang during server shutdown</para></listitem>
27018 <listitem><para>Prevent spinlock hangs on SMP PPC machines (Tomoyuki Niijima)</para></listitem>
27019 <listitem><para>Fix <application>pg_dump</> to properly dump FULL JOIN USING (Tom)</para></listitem>
27020 </itemizedlist>
27021  </sect2>
27022 </sect1>
27023
27024
27025 <sect1 id="release-7-2-2">
27026  <title>Release 7.2.2</title>
27027
27028  <note>
27029   <title>Release date</title>
27030   <simpara>2002-08-23</simpara>
27031  </note>
27032
27033  <para>
27034   This release contains a variety of fixes for version 7.2.1.
27035  </para>
27036
27037  <sect2>
27038   <title>Migration to Version 7.2.2</title>
27039
27040   <para>
27041    A dump/restore is <emphasis>not</emphasis> required for those
27042    running version 7.2.*.
27043   </para>
27044  </sect2>
27045
27046  <sect2>
27047   <title>Changes</title>
27048
27049 <itemizedlist>
27050 <listitem><para>Allow EXECUTE of "CREATE TABLE AS ... SELECT" in PL/pgSQL (Tom)</para></listitem>
27051 <listitem><para>Fix for compressed transaction log id wraparound (Tom)</para></listitem>
27052 <listitem><para>Fix PQescapeBytea/PQunescapeBytea so that they handle bytes &gt; 0x7f (Tatsuo)</para></listitem>
27053 <listitem><para>Fix for psql and <application>pg_dump</> crashing when invoked with non-existent long options (Tatsuo)</para></listitem>
27054 <listitem><para>Fix crash when invoking geometric operators (Tom)</para></listitem>
27055 <listitem><para>Allow OPEN cursor(args) (Tom)</para></listitem>
27056 <listitem><para>Fix for rtree_gist index build (Teodor)</para></listitem>
27057 <listitem><para>Fix for dumping user-defined aggregates (Tom)</para></listitem>
27058 <listitem><para>contrib/intarray fixes (Oleg)</para></listitem>
27059 <listitem><para>Fix for complex UNION/EXCEPT/INTERSECT queries using parens (Tom)</para></listitem>
27060 <listitem><para>Fix to pg_convert (Tatsuo)</para></listitem>
27061 <listitem><para>Fix for crash with long DATA strings (Thomas, Neil)</para></listitem>
27062 <listitem><para>Fix for repeat(), lpad(), rpad() and long strings (Neil)</para></listitem>
27063 </itemizedlist>
27064  </sect2>
27065 </sect1>
27066
27067
27068 <sect1 id="release-7-2-1">
27069  <title>Release 7.2.1</title>
27070
27071  <note>
27072   <title>Release date</title>
27073   <simpara>2002-03-21</simpara>
27074  </note>
27075
27076  <para>
27077   This release contains a variety of fixes for version 7.2.
27078  </para>
27079
27080  <sect2>
27081   <title>Migration to Version 7.2.1</title>
27082
27083   <para>
27084    A dump/restore is <emphasis>not</emphasis> required for those
27085    running version 7.2.
27086   </para>
27087  </sect2>
27088
27089  <sect2>
27090   <title>Changes</title>
27091
27092 <itemizedlist>
27093 <listitem><para>Ensure that sequence counters do not go backwards after a crash (Tom)</para></listitem>
27094 <listitem><para>Fix pgaccess kanji-conversion key binding (Tatsuo)</para></listitem>
27095 <listitem><para>Optimizer improvements (Tom)</para></listitem>
27096 <listitem><para>Cash I/O improvements (Tom)</para></listitem>
27097 <listitem><para>New Russian FAQ</para></listitem>
27098 <listitem><para>Compile fix for missing AuthBlockSig (Heiko)</para></listitem>
27099 <listitem><para>Additional time zones and time zone fixes (Thomas)</para></listitem>
27100 <listitem><para>Allow psql \connect to handle mixed case database and user names (Tom)</para></listitem>
27101 <listitem><para>Return proper OID on command completion even with ON INSERT rules (Tom)</para></listitem>
27102 <listitem><para>Allow COPY FROM to use 8-bit DELIMITERS (Tatsuo)</para></listitem>
27103 <listitem><para>Fix bug in extract/date_part for milliseconds/microseconds (Tatsuo)</para></listitem>
27104 <listitem><para>Improve handling of multiple UNIONs with different lengths (Tom)</para></listitem>
27105 <listitem><para>contrib/btree_gist improvements (Teodor Sigaev)</para></listitem>
27106 <listitem><para>contrib/tsearch dictionary improvements, see README.tsearch for an additional installation step (Thomas T. Thai, Teodor Sigaev)</para></listitem>
27107 <listitem><para>Fix for array subscripts handling (Tom)</para></listitem>
27108 <listitem><para>Allow EXECUTE of "CREATE TABLE AS ... SELECT" in PL/pgSQL (Tom)</para></listitem>
27109 </itemizedlist>
27110  </sect2>
27111 </sect1>
27112
27113
27114 <sect1 id="release-7-2">
27115  <title>Release 7.2</title>
27116
27117  <note>
27118   <title>Release date</title>
27119   <simpara>2002-02-04</simpara>
27120  </note>
27121
27122  <sect2>
27123   <title>Overview</title>
27124
27125   <para>
27126    This release improves <productname>PostgreSQL</> for use in
27127    high-volume applications.
27128   </para>
27129
27130   <para>
27131    Major changes in this release:
27132   </para>
27133
27134   <variablelist>
27135    <varlistentry>
27136     <term>VACUUM</term>
27137     <listitem>
27138      <para>
27139       Vacuuming no longer locks tables, thus allowing normal user
27140       access during the vacuum.  A new <command>VACUUM FULL</>
27141       command does old-style vacuum by locking the table and
27142       shrinking the on-disk copy of the table.
27143      </para>
27144     </listitem>
27145    </varlistentry>
27146
27147    <varlistentry>
27148     <term>Transactions</term>
27149     <listitem>
27150      <para>
27151       There is no longer a problem with installations that exceed
27152       four billion transactions.
27153      </para>
27154     </listitem>
27155    </varlistentry>
27156
27157    <varlistentry>
27158     <term>OIDs</term>
27159     <listitem>
27160      <para>
27161       OIDs are now optional.  Users can now create tables without
27162       OIDs for cases where OID usage is excessive.
27163      </para>
27164     </listitem>
27165    </varlistentry>
27166
27167    <varlistentry>
27168     <term>Optimizer</term>
27169     <listitem>
27170      <para>
27171       The system now computes histogram column statistics during
27172       <command>ANALYZE</>, allowing much better optimizer choices.
27173      </para>
27174     </listitem>
27175    </varlistentry>
27176
27177    <varlistentry>
27178     <term>Security</term>
27179     <listitem>
27180      <para>
27181       A new MD5 encryption option allows more secure storage and
27182       transfer of passwords.  A new Unix-domain socket
27183       authentication option is available on Linux and BSD systems.
27184      </para>
27185     </listitem>
27186    </varlistentry>
27187
27188    <varlistentry>
27189     <term>Statistics</term>
27190     <listitem>
27191      <para>
27192       Administrators can use the new table access statistics module
27193       to get fine-grained information about table and index usage.
27194      </para>
27195     </listitem>
27196    </varlistentry>
27197
27198    <varlistentry>
27199     <term>Internationalization</term>
27200     <listitem>
27201      <para>
27202       Program and library messages can now be displayed in several
27203       languages.
27204      </para>
27205     </listitem>
27206    </varlistentry>
27207
27208   </variablelist>
27209  </sect2>
27210
27211  <sect2>
27212   <title>Migration to Version 7.2</title>
27213
27214   <para>
27215    A dump/restore using <command>pg_dump</command> is required for
27216    those wishing to migrate data from any previous release.
27217   </para>
27218
27219   <para>
27220    Observe the following incompatibilities:
27221   </para>
27222
27223   <itemizedlist>
27224    <listitem>
27225     <para>
27226      The semantics of the <command>VACUUM</command> command have
27227      changed in this release.  You might wish to update your
27228      maintenance procedures accordingly.
27229     </para>
27230    </listitem>
27231
27232    <listitem>
27233     <para>
27234      In this release, comparisons using <literal>= NULL</literal>
27235      will always return false (or NULL, more precisely).  Previous
27236      releases automatically transformed this syntax to <literal>IS
27237      NULL</literal>.  The old behavior can be re-enabled using a
27238      <filename>postgresql.conf</filename> parameter.
27239     </para>
27240    </listitem>
27241
27242    <listitem>
27243     <para>
27244      The <filename>pg_hba.conf</> and <filename>pg_ident.conf</>
27245      configuration is now only reloaded after receiving a
27246      <systemitem>SIGHUP</> signal, not with each connection.
27247     </para>
27248    </listitem>
27249
27250    <listitem>
27251     <para>
27252      The function <filename>octet_length()</> now returns the uncompressed data length.
27253     </para>
27254    </listitem>
27255
27256    <listitem>
27257     <para>
27258      The date/time value <literal>'current'</literal> is no longer
27259      available.  You will need to rewrite your applications.
27260     </para>
27261    </listitem>
27262
27263    <listitem>
27264     <para>
27265      The <literal>timestamp()</literal>, <literal>time()</literal>,
27266      and <literal>interval()</literal> functions are no longer
27267      available.  Instead of <literal>timestamp()</literal>, use
27268      <literal>timestamp 'string'</literal> or <literal>CAST</literal>.
27269     </para>
27270    </listitem>
27271
27272   </itemizedlist>
27273
27274   <para>
27275    The <literal>SELECT ... LIMIT #,#</literal> syntax will be removed
27276    in the next release. You should change your queries to use
27277    separate LIMIT and OFFSET clauses, e.g. <literal>LIMIT 10 OFFSET
27278    20</literal>.
27279   </para>
27280  </sect2>
27281
27282  <sect2>
27283   <title>Changes</title>
27284
27285   <sect3>
27286    <title>Server Operation</title>
27287 <itemizedlist>
27288 <listitem><para>Create temporary files in a separate directory (Bruce)</para></listitem>
27289 <listitem><para>Delete orphaned temporary files on postmaster startup (Bruce)</para></listitem>
27290 <listitem><para>Added unique indexes to some system tables (Tom)</para></listitem>
27291 <listitem><para>System table operator reorganization (Oleg Bartunov, Teodor Sigaev, Tom)</para></listitem>
27292 <listitem><para>Renamed pg_log to pg_clog (Tom)</para></listitem>
27293 <listitem><para>Enable SIGTERM, SIGQUIT to kill backends (Jan)</para></listitem>
27294 <listitem><para>Removed compile-time limit on number of backends (Tom)</para></listitem>
27295 <listitem><para>Better cleanup for semaphore resource failure (Tatsuo, Tom)</para></listitem>
27296 <listitem><para>Allow safe transaction ID wraparound (Tom)</para></listitem>
27297 <listitem><para>Removed OIDs from some system tables (Tom)</para></listitem>
27298 <listitem><para>Removed "triggered data change violation" error check (Tom)</para></listitem>
27299 <listitem><para>SPI portal creation of prepared/saved plans (Jan)</para></listitem>
27300 <listitem><para>Allow SPI column functions to work for system columns (Tom)</para></listitem>
27301 <listitem><para>Long value compression improvement (Tom)</para></listitem>
27302 <listitem><para>Statistics collector for table, index access (Jan)</para></listitem>
27303 <listitem><para>Truncate extra-long sequence names to a reasonable value (Tom)</para></listitem>
27304 <listitem><para>Measure transaction times in milliseconds (Thomas)</para></listitem>
27305 <listitem><para>Fix TID sequential scans (Hiroshi)</para></listitem>
27306 <listitem><para>Superuser ID now fixed at 1 (Peter E)</para></listitem>
27307 <listitem><para>New pg_ctl "reload" option (Tom)</para></listitem>
27308 </itemizedlist>
27309   </sect3>
27310
27311   <sect3>
27312    <title>Performance</title>
27313 <itemizedlist>
27314 <listitem><para>Optimizer improvements (Tom)</para></listitem>
27315 <listitem><para>New histogram column statistics for optimizer (Tom)</para></listitem>
27316 <listitem><para>Reuse write-ahead log files rather than discarding them (Tom)</para></listitem>
27317 <listitem><para>Cache improvements (Tom)</para></listitem>
27318 <listitem><para>IS NULL, IS NOT NULL optimizer improvement (Tom)</para></listitem>
27319 <listitem><para>Improve lock manager to reduce lock contention (Tom)</para></listitem>
27320 <listitem><para>Keep relcache entries for index access support functions (Tom)</para></listitem>
27321 <listitem><para>Allow better selectivity with NaN and infinities in NUMERIC (Tom)</para></listitem>
27322 <listitem><para>R-tree performance improvements (Kenneth Been)</para></listitem>
27323 <listitem><para>B-tree splits more efficient (Tom)</para></listitem>
27324 </itemizedlist>
27325   </sect3>
27326
27327   <sect3>
27328    <title>Privileges</title>
27329 <itemizedlist>
27330 <listitem><para>Change UPDATE, DELETE privileges to be distinct (Peter E)</para></listitem>
27331 <listitem><para>New REFERENCES, TRIGGER privileges (Peter E)</para></listitem>
27332 <listitem><para>Allow GRANT/REVOKE to/from more than one user at a time (Peter E)</para></listitem>
27333 <listitem><para>New has_table_privilege() function (Joe Conway)</para></listitem>
27334 <listitem><para>Allow non-superuser to vacuum database (Tom)</para></listitem>
27335 <listitem><para>New SET SESSION AUTHORIZATION command (Peter E)</para></listitem>
27336 <listitem><para>Fix bug in privilege modifications on newly created tables (Tom)</para></listitem>
27337 <listitem><para>Disallow access to pg_statistic for non-superuser, add user-accessible views (Tom)</para></listitem>
27338 </itemizedlist>
27339   </sect3>
27340
27341   <sect3>
27342    <title>Client Authentication</title>
27343 <itemizedlist>
27344 <listitem><para>Fork postmaster before doing authentication to prevent hangs (Peter E)</para></listitem>
27345 <listitem><para>Add ident authentication over Unix domain sockets on Linux, *BSD (Helge Bahmann, Oliver Elphick, Teodor Sigaev, Bruce)</para></listitem>
27346 <listitem><para>Add a password authentication method that uses MD5 encryption (Bruce)</para></listitem>
27347 <listitem><para>Allow encryption of stored passwords using MD5 (Bruce)</para></listitem>
27348 <listitem><para>PAM authentication (Dominic J. Eidson)</para></listitem>
27349 <listitem><para>Load pg_hba.conf and pg_ident.conf only on startup and SIGHUP (Bruce)</para></listitem>
27350 </itemizedlist>
27351   </sect3>
27352
27353   <sect3>
27354    <title>Server Configuration</title>
27355 <itemizedlist>
27356 <listitem><para>Interpretation of some time zone abbreviations as Australian rather than North American now settable at run time (Bruce)</para></listitem>
27357 <listitem><para>New parameter to set default transaction isolation level (Peter E)</para></listitem>
27358 <listitem><para>New parameter to enable conversion of "expr = NULL" into "expr IS NULL", off by default (Peter E)</para></listitem>
27359 <listitem><para>New parameter to control memory usage by VACUUM (Tom)</para></listitem>
27360 <listitem><para>New parameter to set client authentication timeout (Tom)</para></listitem>
27361 <listitem><para>New parameter to set maximum number of open files (Tom)</para></listitem>
27362 </itemizedlist>
27363   </sect3>
27364
27365   <sect3>
27366    <title>Queries</title>
27367 <itemizedlist>
27368 <listitem><para>Statements added by INSERT rules now execute after the INSERT (Jan)</para></listitem>
27369 <listitem><para>Prevent unadorned relation names in target list (Bruce)</para></listitem>
27370 <listitem><para>NULLs now sort after all normal values in ORDER BY (Tom)</para></listitem>
27371 <listitem><para>New IS UNKNOWN, IS NOT UNKNOWN Boolean tests (Tom)</para></listitem>
27372 <listitem><para>New SHARE UPDATE EXCLUSIVE lock mode (Tom)</para></listitem>
27373 <listitem><para>New EXPLAIN ANALYZE command that shows run times and row counts (Martijn van Oosterhout)</para></listitem>
27374 <listitem><para>Fix problem with LIMIT and subqueries (Tom)</para></listitem>
27375 <listitem><para>Fix for LIMIT, DISTINCT ON pushed into subqueries (Tom)</para></listitem>
27376 <listitem><para>Fix nested EXCEPT/INTERSECT (Tom)</para></listitem>
27377 </itemizedlist>
27378   </sect3>
27379
27380   <sect3>
27381    <title>Schema Manipulation</title>
27382 <itemizedlist>
27383 <listitem><para>Fix SERIAL in temporary tables (Bruce)</para></listitem>
27384 <listitem><para>Allow temporary sequences (Bruce)</para></listitem>
27385 <listitem><para>Sequences now use int8 internally (Tom)</para></listitem>
27386 <listitem><para>New SERIAL8 creates int8 columns with sequences, default still SERIAL4 (Tom)</para></listitem>
27387 <listitem><para>Make OIDs optional using WITHOUT OIDS (Tom)</para></listitem>
27388 <listitem><para>Add %TYPE syntax to CREATE TYPE (Ian Lance Taylor)</para></listitem>
27389 <listitem><para>Add ALTER TABLE / DROP CONSTRAINT for CHECK constraints (Christopher Kings-Lynne)</para></listitem>
27390 <listitem><para>New CREATE OR REPLACE FUNCTION to alter existing function (preserving the function OID) (Gavin Sherry)</para></listitem>
27391 <listitem><para>Add ALTER TABLE / ADD [ UNIQUE | PRIMARY ] (Christopher Kings-Lynne)</para></listitem>
27392 <listitem><para>Allow column renaming in views</para></listitem>
27393 <listitem><para>Make ALTER TABLE / RENAME COLUMN update column names of indexes (Brent Verner)</para></listitem>
27394 <listitem><para>Fix for ALTER TABLE / ADD CONSTRAINT ... CHECK with inherited tables (Stephan Szabo)</para></listitem>
27395 <listitem><para>ALTER TABLE RENAME update foreign-key trigger arguments correctly (Brent Verner)</para></listitem>
27396 <listitem><para>DROP AGGREGATE and COMMENT ON AGGREGATE now accept an aggtype (Tom)</para></listitem>
27397 <listitem><para>Add automatic return type data casting for SQL functions (Tom)</para></listitem>
27398 <listitem><para>Allow GiST indexes to handle NULLs and multikey indexes (Oleg Bartunov, Teodor Sigaev, Tom)</para></listitem>
27399 <listitem><para>Enable partial indexes (Martijn van Oosterhout)</para></listitem>
27400 </itemizedlist>
27401   </sect3>
27402
27403   <sect3>
27404    <title>Utility Commands</title>
27405 <itemizedlist>
27406 <listitem><para>Add RESET ALL, SHOW ALL (Marko Kreen)</para></listitem>
27407 <listitem><para>CREATE/ALTER USER/GROUP now allow options in any order (Vince)</para></listitem>
27408 <listitem><para>Add LOCK A, B, C functionality (Neil Padgett)</para></listitem>
27409 <listitem><para>New ENCRYPTED/UNENCRYPTED option to CREATE/ALTER USER (Bruce)</para></listitem>
27410 <listitem><para>New light-weight VACUUM does not lock table; old semantics are available as VACUUM FULL (Tom)</para></listitem>
27411 <listitem><para>Disable COPY TO/FROM on views (Bruce)</para></listitem>
27412 <listitem><para>COPY DELIMITERS string must be exactly one character (Tom)</para></listitem>
27413 <listitem><para>VACUUM warning about index tuples fewer than heap now only appears when appropriate (Martijn van Oosterhout)</para></listitem>
27414 <listitem><para>Fix privilege checks for CREATE INDEX (Tom)</para></listitem>
27415 <listitem><para>Disallow inappropriate use of CREATE/DROP INDEX/TRIGGER/VIEW (Tom)</para></listitem>
27416 </itemizedlist>
27417   </sect3>
27418
27419   <sect3>
27420    <title>Data Types and Functions</title>
27421 <itemizedlist>
27422 <listitem><para>SUM(), AVG(), COUNT() now uses int8 internally for speed (Tom)</para></listitem>
27423 <listitem><para>Add convert(), convert2() (Tatsuo)</para></listitem>
27424 <listitem><para>New function bit_length() (Peter E)</para></listitem>
27425 <listitem><para>Make the "n" in CHAR(n)/VARCHAR(n) represents letters, not bytes (Tatsuo)</para></listitem>
27426 <listitem><para>CHAR(), VARCHAR() now reject strings that are too long (Peter E)</para></listitem>
27427 <listitem><para>BIT VARYING now rejects bit strings that are too long (Peter E)</para></listitem>
27428 <listitem><para>BIT now rejects bit strings that do not match declared size (Peter E)</para></listitem>
27429 <listitem><para>INET, CIDR text conversion functions (Alex Pilosov)</para></listitem>
27430 <listitem><para>INET, CIDR operators &lt;&lt; and &lt;&lt;= indexable (Alex Pilosov)</para></listitem>
27431 <listitem><para>Bytea \### now requires valid three digit octal number</para></listitem>
27432 <listitem><para>Bytea comparison improvements, now supports =, &lt;&gt;, &gt;, &gt;=, &lt;, and &lt;=</para></listitem>
27433 <listitem><para>Bytea now supports B-tree indexes</para></listitem>
27434 <listitem><para>Bytea now supports LIKE, LIKE...ESCAPE, NOT LIKE, NOT LIKE...ESCAPE</para></listitem>
27435 <listitem><para>Bytea now supports concatenation</para></listitem>
27436 <listitem><para>New bytea functions: position, substring, trim, btrim, and length</para></listitem>
27437 <listitem><para>New encode() function mode, "escaped", converts minimally escaped bytea to/from text</para></listitem>
27438 <listitem><para>Add pg_database_encoding_max_length() (Tatsuo)</para></listitem>
27439 <listitem><para>Add pg_client_encoding() function (Tatsuo)</para></listitem>
27440 <listitem><para>now() returns time with millisecond precision (Thomas)</para></listitem>
27441 <listitem><para>New TIMESTAMP WITHOUT TIMEZONE data type (Thomas)</para></listitem>
27442 <listitem><para>Add ISO date/time specification with "T", yyyy-mm-ddThh:mm:ss (Thomas)</para></listitem>
27443 <listitem><para>New xid/int comparison functions (Hiroshi)</para></listitem>
27444 <listitem><para>Add precision to TIME, TIMESTAMP, and INTERVAL data types (Thomas)</para></listitem>
27445 <listitem><para>Modify type coercion logic to attempt binary-compatible functions first (Tom)</para></listitem>
27446 <listitem><para>New encode() function installed by default (Marko Kreen)</para></listitem>
27447 <listitem><para>Improved to_*() conversion functions (Karel Zak)</para></listitem>
27448 <listitem><para>Optimize LIKE/ILIKE when using single-byte encodings (Tatsuo)</para></listitem>
27449 <listitem><para>New functions in contrib/pgcrypto: crypt(), hmac(), encrypt(), gen_salt() (Marko Kreen)</para></listitem>
27450 <listitem><para>Correct description of translate() function (Bruce)</para></listitem>
27451 <listitem><para>Add INTERVAL argument for SET TIME ZONE (Thomas)</para></listitem>
27452 <listitem><para>Add INTERVAL YEAR TO MONTH (etc.) syntax (Thomas)</para></listitem>
27453 <listitem><para>Optimize length functions when using single-byte encodings (Tatsuo)</para></listitem>
27454 <listitem><para>Fix path_inter, path_distance, path_length, dist_ppath to handle closed paths (Curtis Barrett, Tom)</para></listitem>
27455 <listitem><para>octet_length(text) now returns non-compressed length (Tatsuo, Bruce)</para></listitem>
27456 <listitem><para>Handle "July" full name in date/time literals (Greg Sabino Mullane)</para></listitem>
27457 <listitem><para>Some datatype() function calls now evaluated differently</para></listitem>
27458 <listitem><para>Add support for Julian and ISO time specifications (Thomas)</para></listitem>
27459 </itemizedlist>
27460   </sect3>
27461
27462   <sect3>
27463    <title>Internationalization</title>
27464 <itemizedlist>
27465 <listitem><para>National language support in psql, <application>pg_dump</>, libpq, and server (Peter E)</para></listitem>
27466 <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>
27467 <listitem><para>Make trim, ltrim, rtrim, btrim, lpad, rpad, translate multibyte aware (Tatsuo)</para></listitem>
27468 <listitem><para>Add LATIN5,6,7,8,9,10 support (Tatsuo)</para></listitem>
27469 <listitem><para>Add ISO 8859-5,6,7,8 support (Tatsuo)</para></listitem>
27470 <listitem><para>Correct LATIN5 to mean ISO-8859-9, not ISO-8859-5 (Tatsuo)</para></listitem>
27471 <listitem><para>Make mic2ascii() non-ASCII aware (Tatsuo)</para></listitem>
27472 <listitem><para>Reject invalid multibyte character sequences (Tatsuo)</para></listitem>
27473 </itemizedlist>
27474   </sect3>
27475
27476   <sect3>
27477    <title><application>PL/pgSQL</></title>
27478 <itemizedlist>
27479 <listitem><para>Now uses portals for SELECT loops, allowing huge result sets (Jan)</para></listitem>
27480 <listitem><para>CURSOR and REFCURSOR support (Jan)</para></listitem>
27481 <listitem><para>Can now return open cursors (Jan)</para></listitem>
27482 <listitem><para>Add ELSEIF (Klaus Reger)</para></listitem>
27483 <listitem><para>Improve PL/pgSQL error reporting, including location of error (Tom)</para></listitem>
27484 <listitem><para>Allow IS or FOR key words in cursor declaration, for compatibility (Bruce)</para></listitem>
27485 <listitem><para>Fix for SELECT ... FOR UPDATE (Tom)</para></listitem>
27486 <listitem><para>Fix for PERFORM returning multiple rows (Tom)</para></listitem>
27487 <listitem><para>Make PL/pgSQL use the server's type coercion code (Tom)</para></listitem>
27488 <listitem><para>Memory leak fix (Jan, Tom)</para></listitem>
27489 <listitem><para>Make trailing semicolon optional (Tom)</para></listitem>
27490 </itemizedlist>
27491   </sect3>
27492
27493   <sect3>
27494    <title>PL/Perl</title>
27495 <itemizedlist>
27496 <listitem><para>New untrusted PL/Perl (Alex Pilosov)</para></listitem>
27497 <listitem><para>PL/Perl is now built on some platforms even if libperl is not shared (Peter E)</para></listitem>
27498 </itemizedlist>
27499    </sect3>
27500
27501   <sect3>
27502    <title>PL/Tcl</title>
27503 <itemizedlist>
27504 <listitem><para>Now reports errorInfo (Vsevolod Lobko)</para></listitem>
27505 <listitem><para>Add spi_lastoid function (bob@redivi.com)</para></listitem>
27506 </itemizedlist>
27507   </sect3>
27508
27509   <sect3>
27510    <title>PL/Python</title>
27511 <itemizedlist>
27512 <listitem><para>...is new (Andrew Bosma)</para></listitem>
27513 </itemizedlist>
27514   </sect3>
27515
27516   <sect3>
27517    <title><application>psql</></title>
27518 <itemizedlist>
27519 <listitem><para>\d displays indexes in unique, primary groupings (Christopher Kings-Lynne)</para></listitem>
27520 <listitem><para>Allow trailing semicolons in backslash commands (Greg Sabino Mullane)</para></listitem>
27521 <listitem><para>Read password from /dev/tty if possible</para></listitem>
27522 <listitem><para>Force new password prompt when changing user and database (Tatsuo, Tom)</para></listitem>
27523 <listitem><para>Format the correct number of columns for Unicode (Patrice)</para></listitem>
27524 </itemizedlist>
27525   </sect3>
27526
27527   <sect3>
27528    <title><application>libpq</></title>
27529 <itemizedlist>
27530 <listitem><para>New function PQescapeString() to escape quotes in command strings (Florian Weimer)</para></listitem>
27531 <listitem><para>New function PQescapeBytea() escapes binary strings for use as SQL string literals</para></listitem>
27532 </itemizedlist>
27533   </sect3>
27534
27535   <sect3>
27536    <title>JDBC</title>
27537 <itemizedlist>
27538 <listitem><para>Return OID of INSERT (Ken K)</para></listitem>
27539 <listitem><para>Handle more data types (Ken K)</para></listitem>
27540 <listitem><para>Handle single quotes and newlines in strings (Ken K)</para></listitem>
27541 <listitem><para>Handle NULL variables (Ken K)</para></listitem>
27542 <listitem><para>Fix for time zone handling (Barry Lind)</para></listitem>
27543 <listitem><para>Improved Druid support</para></listitem>
27544 <listitem><para>Allow eight-bit characters with non-multibyte server (Barry Lind)</para></listitem>
27545 <listitem><para>Support BIT, BINARY types (Ned Wolpert)</para></listitem>
27546 <listitem><para>Reduce memory usage (Michael Stephens, Dave Cramer)</para></listitem>
27547 <listitem><para>Update DatabaseMetaData (Peter E)</para></listitem>
27548 <listitem><para>Add DatabaseMetaData.getCatalogs() (Peter E)</para></listitem>
27549 <listitem><para>Encoding fixes (Anders Bengtsson)</para></listitem>
27550 <listitem><para>Get/setCatalog methods (Jason Davies)</para></listitem>
27551 <listitem><para>DatabaseMetaData.getColumns() now returns column defaults (Jason Davies)</para></listitem>
27552 <listitem><para>DatabaseMetaData.getColumns() performance improvement (Jeroen van Vianen)</para></listitem>
27553 <listitem><para>Some JDBC1 and JDBC2 merging (Anders Bengtsson)</para></listitem>
27554 <listitem><para>Transaction performance improvements (Barry Lind)</para></listitem>
27555 <listitem><para>Array fixes (Greg Zoller)</para></listitem>
27556 <listitem><para>Serialize addition </para></listitem>
27557 <listitem><para>Fix batch processing (Rene Pijlman)</para></listitem>
27558 <listitem><para>ExecSQL method reorganization (Anders Bengtsson)</para></listitem>
27559 <listitem><para>GetColumn() fixes (Jeroen van Vianen)</para></listitem>
27560 <listitem><para>Fix isWriteable() function (Rene Pijlman)</para></listitem>
27561 <listitem><para>Improved passage of JDBC2 conformance tests (Rene Pijlman)</para></listitem>
27562 <listitem><para>Add bytea type capability (Barry Lind)</para></listitem>
27563 <listitem><para>Add isNullable() (Rene Pijlman)</para></listitem>
27564 <listitem><para>JDBC date/time test suite fixes (Liam Stewart)</para></listitem>
27565 <listitem><para>Fix for SELECT 'id' AS xxx FROM table (Dave Cramer)</para></listitem>
27566 <listitem><para>Fix DatabaseMetaData to show precision properly (Mark Lillywhite)</para></listitem>
27567 <listitem><para>New getImported/getExported keys (Jason Davies)</para></listitem>
27568 <listitem><para>MD5 password encryption support (Jeremy Wohl)</para></listitem>
27569 <listitem><para>Fix to actually use type cache (Ned Wolpert)</para></listitem>
27570 </itemizedlist>
27571   </sect3>
27572
27573   <sect3>
27574    <title>ODBC</title>
27575 <itemizedlist>
27576 <listitem><para>Remove query size limit (Hiroshi)</para></listitem>
27577 <listitem><para>Remove text field size limit (Hiroshi)</para></listitem>
27578 <listitem><para>Fix for SQLPrimaryKeys in multibyte mode (Hiroshi)</para></listitem>
27579 <listitem><para>Allow ODBC procedure calls (Hiroshi)</para></listitem>
27580 <listitem><para>Improve boolean handing (Aidan Mountford)</para></listitem>
27581 <listitem><para>Most configuration options now settable via DSN (Hiroshi)</para></listitem>
27582 <listitem><para>Multibyte, performance fixes (Hiroshi)</para></listitem>
27583 <listitem><para>Allow driver to be used with iODBC or unixODBC (Peter E)</para></listitem>
27584 <listitem><para>MD5 password encryption support (Bruce)</para></listitem>
27585 <listitem><para>Add more compatibility functions to odbc.sql (Peter E)</para></listitem>
27586 </itemizedlist>
27587   </sect3>
27588
27589   <sect3>
27590    <title><application>ECPG</></title>
27591 <itemizedlist>
27592 <listitem><para>EXECUTE ... INTO implemented (Christof Petig)</para></listitem>
27593 <listitem><para>Multiple row descriptor support (e.g. CARDINALITY) (Christof Petig)</para></listitem>
27594 <listitem><para>Fix for GRANT parameters (Lee Kindness)</para></listitem>
27595 <listitem><para>Fix INITIALLY DEFERRED bug</para></listitem>
27596 <listitem><para>Various bug fixes (Michael, Christof Petig)</para></listitem>
27597 <listitem><para>Auto allocation for indicator variable arrays (int *ind_p=NULL)</para></listitem>
27598 <listitem><para>Auto allocation for string arrays (char **foo_pp=NULL)</para></listitem>
27599 <listitem><para>ECPGfree_auto_mem fixed</para></listitem>
27600 <listitem><para>All function names with external linkage are now prefixed by ECPG</para></listitem>
27601 <listitem><para>Fixes for arrays of structures (Michael)</para></listitem>
27602 </itemizedlist>
27603   </sect3>
27604
27605   <sect3>
27606    <title>Misc. Interfaces</title>
27607 <itemizedlist>
27608 <listitem><para>Python fix fetchone() (Gerhard Haring)</para></listitem>
27609 <listitem><para>Use UTF, Unicode in Tcl where appropriate (Vsevolod Lobko, Reinhard Max)</para></listitem>
27610 <listitem><para>Add Tcl COPY TO/FROM (ljb)</para></listitem>
27611 <listitem><para>Prevent output of default index op class in <application>pg_dump</> (Tom)</para></listitem>
27612 <listitem><para>Fix libpgeasy memory leak (Bruce)</para></listitem>
27613 </itemizedlist>
27614   </sect3>
27615
27616   <sect3>
27617    <title>Build and Install</title>
27618 <itemizedlist>
27619 <listitem><para>Configure, dynamic loader, and shared library fixes (Peter E)</para></listitem>
27620 <listitem><para>Fixes in QNX 4 port (Bernd Tegge)</para></listitem>
27621 <listitem><para>Fixes in Cygwin and Windows ports (Jason Tishler, Gerhard Haring, Dmitry Yurtaev, Darko Prenosil, Mikhail Terekhov)</para></listitem>
27622 <listitem><para>Fix for Windows socket communication failures (Magnus, Mikhail Terekhov)</para></listitem>
27623 <listitem><para>Hurd compile fix (Oliver Elphick)</para></listitem>
27624 <listitem><para>BeOS fixes (Cyril Velter)</para></listitem>
27625 <listitem><para>Remove configure --enable-unicode-conversion, now enabled by multibyte (Tatsuo)</para></listitem>
27626 <listitem><para>AIX fixes (Tatsuo, Andreas)</para></listitem>
27627 <listitem><para>Fix parallel make (Peter E)</para></listitem>
27628 <listitem><para>Install SQL language manual pages into OS-specific directories (Peter E)</para></listitem>
27629 <listitem><para>Rename config.h to pg_config.h (Peter E)</para></listitem>
27630 <listitem><para>Reorganize installation layout of header files (Peter E)</para></listitem>
27631 </itemizedlist>
27632   </sect3>
27633
27634   <sect3>
27635    <title>Source Code</title>
27636 <itemizedlist>
27637 <listitem><para>Remove SEP_CHAR (Bruce)</para></listitem>
27638 <listitem><para>New GUC hooks (Tom)</para></listitem>
27639 <listitem><para>Merge GUC and command line handling (Marko Kreen)</para></listitem>
27640 <listitem><para>Remove EXTEND INDEX (Martijn van Oosterhout, Tom)</para></listitem>
27641 <listitem><para>New pgjindent utility to indent java code (Bruce)</para></listitem>
27642 <listitem><para>Remove define of true/false when compiling under C++ (Leandro Fanzone, Tom)</para></listitem>
27643 <listitem><para>pgindent fixes (Bruce, Tom)</para></listitem>
27644 <listitem><para>Replace strcasecmp() with strcmp() where appropriate (Peter E)</para></listitem>
27645 <listitem><para>Dynahash portability improvements (Tom)</para></listitem>
27646 <listitem><para>Add 'volatile' usage in spinlock structures</para></listitem>
27647 <listitem><para>Improve signal handling logic (Tom)</para></listitem>
27648 </itemizedlist>
27649   </sect3>
27650
27651   <sect3>
27652    <title>Contrib</title>
27653 <itemizedlist>
27654 <listitem><para>New contrib/rtree_gist (Oleg Bartunov, Teodor Sigaev)</para></listitem>
27655 <listitem><para>New contrib/tsearch full-text indexing (Oleg, Teodor Sigaev)</para></listitem>
27656 <listitem><para>Add contrib/dblink for remote database access (Joe Conway)</para></listitem>
27657 <listitem><para>contrib/ora2pg Oracle conversion utility (Gilles Darold)</para></listitem>
27658 <listitem><para>contrib/xml XML conversion utility (John Gray)</para></listitem>
27659 <listitem><para>contrib/fulltextindex fixes (Christopher Kings-Lynne)</para></listitem>
27660 <listitem><para>New contrib/fuzzystrmatch with levenshtein and metaphone, soundex merged (Joe Conway)</para></listitem>
27661 <listitem><para>Add contrib/intarray boolean queries, binary search, fixes (Oleg Bartunov)</para></listitem>
27662 <listitem><para>New pg_upgrade utility (Bruce)</para></listitem>
27663 <listitem><para>Add new pg_resetxlog options (Bruce, Tom)</para></listitem>
27664 </itemizedlist>
27665   </sect3>
27666  </sect2>
27667 </sect1>
27668
27669
27670  <sect1 id="release-7-1-3">
27671   <title>Release 7.1.3</title>
27672
27673   <note>
27674   <title>Release date</title>
27675   <simpara>2001-08-15</simpara>
27676   </note>
27677
27678   <sect2>
27679    <title>Migration to Version 7.1.3</title>
27680
27681    <para>
27682     A dump/restore is <emphasis>not</emphasis> required for those running
27683     7.1.X.
27684    </para>
27685   </sect2>
27686
27687   <sect2>
27688    <title>Changes</title>
27689
27690    <para>
27691     <programlisting>
27692 Remove unused WAL segments of large transactions (Tom)
27693 Multiaction rule fix (Tom)
27694 PL/pgSQL memory allocation fix (Jan)
27695 VACUUM buffer fix (Tom)
27696 Regression test fixes (Tom)
27697 pg_dump fixes for GRANT/REVOKE/comments on views, user-defined types (Tom)
27698 Fix subselects with DISTINCT ON or LIMIT (Tom)
27699 BeOS fix
27700 Disable COPY TO/FROM a view (Tom)
27701 Cygwin build (Jason Tishler)
27702     </programlisting>
27703    </para>
27704   </sect2>
27705  </sect1>
27706
27707
27708  <sect1 id="release-7-1-2">
27709   <title>Release 7.1.2</title>
27710
27711   <note>
27712   <title>Release date</title>
27713   <simpara>2001-05-11</simpara>
27714   </note>
27715
27716   <para>
27717    This has one fix from 7.1.1.
27718   </para>
27719
27720
27721   <sect2>
27722    <title>Migration to Version 7.1.2</title>
27723
27724    <para>
27725     A dump/restore is <emphasis>not</emphasis> required for those running
27726     7.1.X.
27727    </para>
27728   </sect2>
27729
27730   <sect2>
27731    <title>Changes</title>
27732
27733    <para>
27734     <programlisting>
27735 Fix PL/pgSQL SELECTs when returning no rows
27736 Fix for psql backslash core dump
27737 Referential integrity privilege fix
27738 Optimizer fixes
27739 pg_dump cleanups
27740     </programlisting>
27741    </para>
27742   </sect2>
27743  </sect1>
27744
27745
27746  <sect1 id="release-7-1-1">
27747   <title>Release 7.1.1</title>
27748
27749   <note>
27750   <title>Release date</title>
27751   <simpara>2001-05-05</simpara>
27752   </note>
27753
27754   <para>
27755    This has a variety of fixes from 7.1.
27756   </para>
27757
27758
27759   <sect2>
27760    <title>Migration to Version 7.1.1</title>
27761
27762    <para>
27763     A dump/restore is <emphasis>not</emphasis> required for those running
27764     7.1.
27765    </para>
27766   </sect2>
27767
27768   <sect2>
27769    <title>Changes</title>
27770
27771    <para>
27772     <programlisting>
27773 Fix for numeric MODULO operator (Tom)
27774 pg_dump fixes (Philip)
27775 pg_dump can dump 7.0 databases (Philip)
27776 readline 4.2 fixes (Peter E)
27777 JOIN fixes (Tom)
27778 AIX, MSWIN, VAX, N32K fixes (Tom)
27779 Multibytes fixes (Tom)
27780 Unicode fixes (Tatsuo)
27781 Optimizer improvements (Tom)
27782 Fix for whole rows in functions (Tom)
27783 Fix for pg_ctl and option strings with spaces (Peter E)
27784 ODBC fixes (Hiroshi)
27785 EXTRACT can now take string argument (Thomas)
27786 Python fixes (Darcy)
27787     </programlisting>
27788    </para>
27789   </sect2>
27790  </sect1>
27791
27792
27793  <sect1 id="release-7-1">
27794   <title>Release 7.1</title>
27795
27796   <note>
27797   <title>Release date</title>
27798   <simpara>2001-04-13</simpara>
27799   </note>
27800
27801   <para>
27802        This release focuses on removing limitations that have existed in the
27803        <productname>PostgreSQL</productname> code for many years.
27804   </para>
27805
27806   <para>
27807    Major changes in this release:
27808   </para>
27809
27810   <variablelist>
27811    <varlistentry>
27812     <term>
27813       Write-ahead Log (WAL)
27814     </term>
27815     <listitem>
27816      <para>
27817 To maintain database consistency in case of an operating system crash,
27818 previous releases of <productname>PostgreSQL</productname> have forced
27819 all data modifications to disk before each transaction commit.  With
27820 WAL, only one log file must be flushed to disk, greatly improving
27821 performance.  If you have been using -F in previous releases to
27822 disable disk flushes, you might want to consider discontinuing its use.
27823      </para>
27824     </listitem>
27825    </varlistentry>
27826
27827    <varlistentry>
27828     <term>
27829       TOAST
27830     </term>
27831     <listitem>
27832      <para>
27833       TOAST - Previous releases had a compiled-in row length limit,
27834 typically 8k - 32k. This limit made storage of long text fields
27835 difficult.  With TOAST, long rows of any length can be stored with good
27836 performance.
27837      </para>
27838     </listitem>
27839    </varlistentry>
27840
27841    <varlistentry>
27842     <term>
27843       Outer Joins
27844     </term>
27845     <listitem>
27846      <para>
27847 We now support outer joins.  The UNION/NOT IN
27848 workaround for outer joins is no longer required.  We use the SQL92
27849 outer join syntax.
27850      </para>
27851     </listitem>
27852    </varlistentry>
27853
27854    <varlistentry>
27855     <term>
27856       Function Manager
27857     </term>
27858     <listitem>
27859      <para>
27860 The previous C function manager did not
27861 handle null values properly, nor did it support 64-bit <acronym>CPU</acronym>'s (Alpha).  The new
27862 function manager does.  You can continue using your old custom
27863 functions, but you might want to rewrite them in the future to use the new
27864 function manager call interface.
27865      </para>
27866     </listitem>
27867    </varlistentry>
27868
27869    <varlistentry>
27870     <term>
27871       Complex Queries
27872     </term>
27873     <listitem>
27874      <para>
27875 A large number of complex queries that were
27876 unsupported in previous releases now work.  Many combinations of views,
27877 aggregates, UNION, LIMIT, cursors, subqueries, and inherited tables
27878 now work properly. Inherited tables are now accessed by default.
27879 Subqueries in FROM are now supported.
27880      </para>
27881     </listitem>
27882    </varlistentry>
27883
27884   </variablelist>
27885
27886   <sect2>
27887    <title>Migration to Version 7.1</title>
27888
27889    <para>
27890        A dump/restore using pg_dump is required for those wishing to migrate
27891        data from any previous release.
27892    </para>
27893   </sect2>
27894
27895   <sect2>
27896    <title>Changes</title>
27897
27898    <para>
27899     <programlisting>
27900 Bug Fixes
27901 ---------
27902 Many multibyte/Unicode/locale fixes (Tatsuo and others)
27903 More reliable ALTER TABLE RENAME (Tom)
27904 Kerberos V fixes (David Wragg)
27905 Fix for INSERT INTO...SELECT where targetlist has subqueries (Tom)
27906 Prompt username/password on standard error (Bruce)
27907 Large objects inv_read/inv_write fixes (Tom)
27908 Fixes for to_char(), to_date(), to_ascii(), and to_timestamp() (Karel,
27909    Daniel Baldoni)
27910 Prevent query expressions from leaking memory (Tom)
27911 Allow UPDATE of arrays elements (Tom)
27912 Wake up lock waiters during cancel (Hiroshi)
27913 Fix rare cursor crash when using hash join (Tom)
27914 Fix for DROP TABLE/INDEX in rolled-back transaction (Hiroshi)
27915 Fix psql crash from \l+ if MULTIBYTE enabled (Peter E)
27916 Fix truncation of rule names during CREATE VIEW (Ross Reedstrom)
27917 Fix PL/perl (Alex Kapranoff)
27918 Disallow LOCK on views (Mark Hollomon)
27919 Disallow INSERT/UPDATE/DELETE on views (Mark Hollomon)
27920 Disallow DROP RULE, CREATE INDEX, TRUNCATE on views (Mark Hollomon)
27921 Allow PL/pgSQL accept non-ASCII identifiers (Tatsuo)
27922 Allow views to proper handle GROUP BY, aggregates, DISTINCT (Tom)
27923 Fix rare failure with TRUNCATE command (Tom)
27924 Allow UNION/INTERSECT/EXCEPT to be used with ALL, subqueries, views,
27925    DISTINCT, ORDER BY, SELECT...INTO (Tom)
27926 Fix parser failures during aborted transactions (Tom)
27927 Allow temporary relations to properly clean up indexes (Bruce)
27928 Fix VACUUM problem with moving rows in same page (Tom)
27929 Modify pg_dump to better handle user-defined items in template1 (Philip)
27930 Allow LIMIT in VIEW (Tom)
27931 Require cursor FETCH to honor LIMIT (Tom)
27932 Allow PRIMARY/FOREIGN Key definitions on inherited columns (Stephan)
27933 Allow ORDER BY, LIMIT in subqueries (Tom)
27934 Allow UNION in CREATE RULE (Tom)
27935 Make ALTER/DROP TABLE rollback-able (Vadim, Tom)
27936 Store initdb collation in pg_control so collation cannot be changed (Tom)
27937 Fix INSERT...SELECT with rules (Tom)
27938 Fix FOR UPDATE inside views and subselects (Tom)
27939 Fix OVERLAPS operators conform to SQL92 spec regarding NULLs (Tom)
27940 Fix lpad() and rpad() to handle length less than input string (Tom)
27941 Fix use of NOTIFY in some rules (Tom)
27942 Overhaul btree code (Tom)
27943 Fix NOT NULL use in Pl/pgSQL variables (Tom)
27944 Overhaul GIST code (Oleg)
27945 Fix CLUSTER to preserve constraints and column default (Tom)
27946 Improved deadlock detection handling (Tom)
27947 Allow multiple SERIAL columns in a table (Tom)
27948 Prevent occasional index corruption (Vadim)
27949
27950 Enhancements
27951 ------------
27952 Add OUTER JOINs (Tom)
27953 Function manager overhaul (Tom)
27954 Allow ALTER TABLE RENAME on indexes (Tom)
27955 Improve CLUSTER (Tom)
27956 Improve ps status display for more platforms (Peter E, Marc)
27957 Improve CREATE FUNCTION failure message (Ross)
27958 JDBC improvements (Peter, Travis Bauer, Christopher Cain, William Webber,
27959    Gunnar)
27960 Grand Unified Configuration scheme/GUC.  Many options can now be set in
27961    data/postgresql.conf, postmaster/postgres flags, or SET commands (Peter E)
27962 Improved handling of file descriptor cache (Tom)
27963 New warning code about auto-created table alias entries (Bruce)
27964 Overhaul initdb process (Tom, Peter E)
27965 Overhaul of inherited tables; inherited tables now accessed by default;
27966   new ONLY key word prevents it (Chris Bitmead, Tom)
27967 ODBC cleanups/improvements (Nick Gorham, Stephan Szabo, Zoltan Kovacs,
27968    Michael Fork)
27969 Allow renaming of temp tables (Tom)
27970 Overhaul memory manager contexts (Tom)
27971 pg_dumpall uses CREATE USER or CREATE GROUP rather using COPY (Peter E)
27972 Overhaul pg_dump (Philip Warner)
27973 Allow pg_hba.conf secondary password file to specify only username (Peter E)
27974 Allow TEMPORARY or TEMP key word when creating temporary tables (Bruce)
27975 New memory leak checker (Karel)
27976 New SET SESSION CHARACTERISTICS (Thomas)
27977 Allow nested block comments (Thomas)
27978 Add WITHOUT TIME ZONE type qualifier (Thomas)
27979 New ALTER TABLE ADD CONSTRAINT (Stephan)
27980 Use NUMERIC accumulators for INTEGER aggregates (Tom)
27981 Overhaul aggregate code (Tom)
27982 New VARIANCE and STDDEV() aggregates
27983 Improve dependency ordering of pg_dump (Philip)
27984 New pg_restore command (Philip)
27985 New pg_dump tar output option (Philip)
27986 New pg_dump of large objects  (Philip)
27987 New ESCAPE option to LIKE (Thomas)
27988 New case-insensitive LIKE - ILIKE (Thomas)
27989 Allow functional indexes to use binary-compatible type (Tom)
27990 Allow SQL functions to be used in more contexts (Tom)
27991 New pg_config utility (Peter E)
27992 New PL/pgSQL EXECUTE command which allows dynamic SQL and utility statements
27993    (Jan)
27994 New PL/pgSQL GET DIAGNOSTICS statement for SPI value access (Jan)
27995 New quote_identifiers() and quote_literal() functions (Jan)
27996 New ALTER TABLE table OWNER TO user command (Mark Hollomon)
27997 Allow subselects in FROM, i.e. FROM (SELECT ...) [AS] alias (Tom)
27998 Update PyGreSQL to version 3.1 (D'Arcy)
27999 Store tables as files named by OID (Vadim)
28000 New SQL function setval(seq,val,bool) for use in pg_dump (Philip)
28001 Require DROP VIEW to remove views, no DROP TABLE (Mark)
28002 Allow DROP VIEW view1, view2 (Mark)
28003 Allow multiple objects in DROP INDEX, DROP RULE, and DROP TYPE (Tom)
28004 Allow automatic conversion to/from Unicode (Tatsuo, Eiji)
28005 New /contrib/pgcrypto hashing functions (Marko Kreen)
28006 New pg_dumpall --globals-only option (Peter E)
28007 New CHECKPOINT command for WAL which creates new WAL log file (Vadim)
28008 New AT TIME ZONE syntax (Thomas)
28009 Allow location of Unix domain socket to be configurable (David J. MacKenzie)
28010 Allow postmaster to listen on a specific IP address (David J. MacKenzie)
28011 Allow socket path name to be specified in hostname by using leading slash
28012    (David J. MacKenzie)
28013 Allow CREATE DATABASE to specify template database (Tom)
28014 New utility to convert MySQL schema dumps to SQL92 and PostgreSQL (Thomas)
28015 New /contrib/rserv replication toolkit (Vadim)
28016 New file format for COPY BINARY (Tom)
28017 New /contrib/oid2name to map numeric files to table names (B Palmer)
28018 New "idle in transaction" ps status message (Marc)
28019 Update to pgaccess 0.98.7 (Constantin Teodorescu)
28020 pg_ctl now defaults to -w (wait) on shutdown, new -l (log) option
28021 Add rudimentary dependency checking to pg_dump (Philip)
28022
28023 Types
28024 -----
28025 Fix INET/CIDR type ordering and add new functions (Tom)
28026 Make OID behave as an unsigned type (Tom)
28027 Allow BIGINT as synonym for INT8 (Peter E)
28028 New int2 and int8 comparison operators (Tom)
28029 New BIT and BIT VARYING types (Adriaan Joubert, Tom, Peter E)
28030 CHAR() no longer faster than VARCHAR() because of TOAST (Tom)
28031 New GIST seg/cube examples (Gene Selkov)
28032 Improved round(numeric) handling (Tom)
28033 Fix CIDR output formatting (Tom)
28034 New CIDR abbrev() function (Tom)
28035
28036 Performance
28037 -----------
28038 Write-Ahead Log (WAL) to provide crash recovery with less performance
28039    overhead (Vadim)
28040 ANALYZE stage of VACUUM no longer exclusively locks table (Bruce)
28041 Reduced file seeks (Denis Perchine)
28042 Improve BTREE code for duplicate keys (Tom)
28043 Store all large objects in a single table (Denis Perchine, Tom)
28044 Improve memory allocation performance (Karel, Tom)
28045
28046 Source Code
28047 -----------
28048 New function manager call conventions (Tom)
28049 SGI portability fixes (David Kaelbling)
28050 New configure --enable-syslog option (Peter E)
28051 New BSDI README (Bruce)
28052 configure script moved to top level, not /src (Peter E)
28053 Makefile/configuration/compilation overhaul (Peter E)
28054 New configure --with-python option (Peter E)
28055 Solaris cleanups (Peter E)
28056 Overhaul /contrib Makefiles (Karel)
28057 New OpenSSL configuration option (Magnus, Peter E)
28058 AIX fixes (Andreas)
28059 QNX fixes (Maurizio)
28060 New heap_open(), heap_openr() API (Tom)
28061 Remove colon and semi-colon operators (Thomas)
28062 New pg_class.relkind value for views (Mark Hollomon)
28063 Rename ichar() to chr() (Karel)
28064 New documentation for btrim(), ascii(), chr(), repeat() (Karel)
28065 Fixes for NT/Cygwin (Pete Forman)
28066 AIX port fixes (Andreas)
28067 New BeOS port (David Reid, Cyril Velter)
28068 Add proofreader's changes to docs (Addison-Wesley, Bruce)
28069 New Alpha spinlock code (Adriaan Joubert, Compaq)
28070 UnixWare port overhaul (Peter E)
28071 New Darwin/MacOS X port (Peter Bierman, Bruce Hartzler)
28072 New FreeBSD Alpha port (Alfred)
28073 Overhaul shared memory segments (Tom)
28074 Add IBM S/390 support (Neale Ferguson)
28075 Moved macmanuf to /contrib (Larry Rosenman)
28076 Syslog improvements (Larry Rosenman)
28077 New template0 database that contains no user additions (Tom)
28078 New /contrib/cube and /contrib/seg GIST sample code (Gene Selkov)
28079 Allow NetBSD's libedit instead of readline (Peter)
28080 Improved assembly language source code format (Bruce)
28081 New contrib/pg_logger
28082 New --template option to createdb
28083 New contrib/pg_control utility (Oliver)
28084 New FreeBSD tools ipc_check, start-scripts/freebsd
28085     </programlisting>
28086    </para>
28087   </sect2>
28088  </sect1>
28089
28090
28091  <sect1 id="release-7-0-3">
28092   <title>Release 7.0.3</title>
28093
28094   <note>
28095   <title>Release date</title>
28096   <simpara>2000-11-11</simpara>
28097   </note>
28098
28099   <para>
28100    This has a variety of fixes from 7.0.2.
28101   </para>
28102
28103
28104   <sect2>
28105    <title>Migration to Version 7.0.3</title>
28106
28107    <para>
28108     A dump/restore is <emphasis>not</emphasis> required for those running
28109     7.0.*.
28110    </para>
28111   </sect2>
28112
28113   <sect2>
28114    <title>Changes</title>
28115
28116    <para>
28117     <programlisting>
28118 Jdbc fixes (Peter)
28119 Large object fix (Tom)
28120 Fix lean in COPY WITH OIDS leak (Tom)
28121 Fix backwards-index-scan (Tom)
28122 Fix SELECT ... FOR UPDATE so it checks for duplicate keys (Hiroshi)
28123 Add --enable-syslog to configure (Marc)
28124 Fix abort transaction at backend exit in rare cases (Tom)
28125 Fix for psql \l+ when multibyte enabled (Tatsuo)
28126 Allow PL/pgSQL to accept non ascii identifiers (Tatsuo)
28127 Make vacuum always flush buffers (Tom)
28128 Fix to allow cancel while waiting for a lock (Hiroshi)
28129 Fix for memory allocation problem in user authentication code (Tom)
28130 Remove bogus use of int4out() (Tom)
28131 Fixes for multiple subqueries in COALESCE or BETWEEN (Tom)
28132 Fix for failure of triggers on heap open in certain cases (Jeroen van
28133    Vianen)
28134 Fix for erroneous selectivity of not-equals (Tom)
28135 Fix for erroneous use of strcmp() (Tom)
28136 Fix for bug where storage manager accesses items beyond end of file
28137    (Tom)
28138 Fix to include kernel errno message in all smgr elog messages (Tom)
28139 Fix for '.' not in PATH at build time (SL Baur)
28140 Fix for out-of-file-descriptors error (Tom)
28141 Fix to make pg_dump dump 'iscachable' flag for functions (Tom)
28142 Fix for subselect in targetlist of Append node (Tom)
28143 Fix for mergejoin plans (Tom)
28144 Fix TRUNCATE failure on relations with indexes (Tom)
28145 Avoid database-wide restart on write error (Hiroshi)
28146 Fix nodeMaterial to honor chgParam by recomputing its output (Tom)
28147 Fix VACUUM problem with moving chain of update row versions when source
28148    and destination of a row version lie on the same page (Tom)
28149 Fix user.c CommandCounterIncrement (Tom)
28150 Fix for AM/PM boundary problem in to_char() (Karel Zak)
28151 Fix TIME aggregate handling (Tom)
28152 Fix to_char() to avoid coredump on NULL input (Tom)
28153 Buffer fix (Tom)
28154 Fix for inserting/copying longer multibyte strings into char() data
28155    types (Tatsuo)
28156 Fix for crash of backend, on abort (Tom)
28157     </programlisting>
28158    </para>
28159   </sect2>
28160  </sect1>
28161
28162
28163  <sect1 id="release-7-0-2">
28164   <title>Release 7.0.2</title>
28165
28166   <note>
28167   <title>Release date</title>
28168   <simpara>2000-06-05</simpara>
28169   </note>
28170
28171   <para>
28172    This is a repackaging of 7.0.1 with added documentation.
28173   </para>
28174
28175
28176   <sect2>
28177    <title>Migration to Version 7.0.2</title>
28178
28179    <para>
28180     A dump/restore is <emphasis>not</emphasis> required for those running
28181     7.*.
28182    </para>
28183   </sect2>
28184
28185   <sect2>
28186    <title>Changes</title>
28187
28188    <para>
28189     <programlisting>
28190 Added documentation to tarball.
28191     </programlisting>
28192    </para>
28193   </sect2>
28194  </sect1>
28195
28196
28197  <sect1 id="release-7-0-1">
28198   <title>Release 7.0.1</title>
28199
28200   <note>
28201   <title>Release date</title>
28202   <simpara>2000-06-01</simpara>
28203   </note>
28204
28205   <para>
28206    This is a cleanup release for 7.0.
28207   </para>
28208
28209   <sect2>
28210    <title>Migration to Version 7.0.1</title>
28211
28212    <para>
28213     A dump/restore is <emphasis>not</emphasis> required for those running
28214     7.0.
28215    </para>
28216   </sect2>
28217
28218   <sect2>
28219    <title>Changes</title>
28220
28221    <para>
28222     <programlisting>
28223 Fix many CLUSTER failures (Tom)
28224 Allow ALTER TABLE RENAME works on indexes (Tom)
28225 Fix plpgsql to handle datetime-&gt;timestamp and timespan-&gt;interval (Bruce)
28226 New configure --with-setproctitle switch to use setproctitle() (Marc, Bruce)
28227 Fix the off by one errors in ResultSet from 6.5.3, and more.
28228 jdbc ResultSet fixes (Joseph Shraibman)
28229 optimizer tunings (Tom)
28230 Fix create user for pgaccess
28231 Fix for UNLISTEN failure
28232 IRIX fixes (David Kaelbling)
28233 QNX fixes (Andreas Kardos)
28234 Reduce COPY IN lock level (Tom)
28235 Change libpqeasy to use PQconnectdb() style parameters (Bruce)
28236 Fix pg_dump to handle OID indexes (Tom)
28237 Fix small memory leak (Tom)
28238 Solaris fix for createdb/dropdb (Tatsuo)
28239 Fix for non-blocking connections (Alfred Perlstein)
28240 Fix improper recovery after RENAME TABLE failures (Tom)
28241 Copy pg_ident.conf.sample into /lib directory in install (Bruce)
28242 Add SJIS UDC (NEC selection IBM kanji) support (Eiji Tokuya)
28243 Fix too long syslog message (Tatsuo)
28244 Fix problem with quoted indexes that are too long (Tom)
28245 JDBC ResultSet.getTimestamp() fix (Gregory Krasnow &amp; Floyd Marinescu)
28246 ecpg changes (Michael)
28247     </programlisting>
28248    </para>
28249   </sect2>
28250  </sect1>
28251
28252  <sect1 id="release-7-0">
28253   <title>Release 7.0</title>
28254
28255   <note>
28256   <title>Release date</title>
28257   <simpara>2000-05-08</simpara>
28258   </note>
28259
28260   <para>
28261    This release contains improvements in many areas, demonstrating
28262    the continued growth of <productname>PostgreSQL</productname>.
28263    There are more improvements and fixes in 7.0 than in any previous
28264    release. The developers have confidence that this is the best
28265    release yet; we do our best to put out only solid releases, and
28266    this one is no exception.
28267   </para>
28268
28269   <para>
28270    Major changes in this release:
28271   </para>
28272
28273   <variablelist>
28274    <varlistentry>
28275     <term>
28276      Foreign Keys
28277     </term>
28278     <listitem>
28279      <para>
28280       Foreign keys are now implemented, with the exception of PARTIAL MATCH
28281       foreign keys. Many users have been asking for this feature, and we are
28282       pleased to offer it.
28283      </para>
28284     </listitem>
28285    </varlistentry>
28286
28287    <varlistentry>
28288     <term>
28289      Optimizer Overhaul
28290     </term>
28291     <listitem>
28292      <para>
28293       Continuing on work started a year ago, the optimizer has been
28294       improved, allowing better query plan selection and faster performance
28295       with less memory usage.
28296      </para>
28297     </listitem>
28298    </varlistentry>
28299
28300    <varlistentry>
28301     <term>
28302      Updated <application>psql</application>
28303     </term>
28304     <listitem>
28305      <para>
28306       <application>psql</application>, our interactive terminal monitor, has been
28307       updated with a variety of new features. See the <application>psql</application> manual page for details.
28308      </para>
28309     </listitem>
28310    </varlistentry>
28311
28312    <varlistentry>
28313     <term>
28314      Join Syntax
28315     </term>
28316     <listitem>
28317      <para>
28318       SQL92 join syntax is now supported, though only as
28319       <literal>INNER JOIN</> for this release. <literal>JOIN</>,
28320       <literal>NATURAL JOIN</>, <literal>JOIN</>/<literal>USING</>,
28321       and <literal>JOIN</>/<literal>ON</> are available, as are
28322       column correlation names.
28323      </para>
28324     </listitem>
28325
28326    </varlistentry>
28327   </variablelist>
28328
28329   <sect2>
28330    <title>Migration to Version 7.0</title>
28331
28332    <para>
28333     A dump/restore using <application>pg_dump</application>
28334     is required for those wishing to migrate data from any
28335     previous release of <productname>PostgreSQL</productname>.
28336     For those upgrading from 6.5.*, you can instead use
28337     <application>pg_upgrade</application> to upgrade to this
28338     release; however, a full dump/reload installation is always the
28339     most robust method for upgrades.
28340    </para>
28341
28342    <para>
28343     Interface and compatibility issues to consider for the new
28344     release include:
28345    </para>
28346
28347    <itemizedlist>
28348     <listitem>
28349      <para>
28350       The date/time types <type>datetime</type> and
28351       <type>timespan</type> have been superseded by the
28352       SQL92-defined types <type>timestamp</type> and
28353       <type>interval</type>. Although there has been some effort to
28354       ease the transition by allowing
28355       <productname>PostgreSQL</productname> to recognize
28356       the deprecated type names and translate them to the new type
28357       names, this mechanism cannot be completely transparent to
28358       your existing application.
28359      </para>
28360     </listitem>
28361
28362     <listitem>
28363      <para>
28364       The optimizer has been substantially improved in the area of
28365       query cost estimation. In some cases, this will result in
28366       decreased query times as the optimizer makes a better choice
28367       for the preferred plan. However, in a small number of cases,
28368       usually involving pathological distributions of data, your
28369       query times might go up. If you are dealing with large amounts
28370       of data, you might want to check your queries to verify
28371       performance.
28372      </para>
28373     </listitem>
28374
28375     <listitem>
28376      <para>
28377       The <acronym>JDBC</acronym> and <acronym>ODBC</acronym>
28378       interfaces have been upgraded and extended.
28379      </para>
28380     </listitem>
28381
28382     <listitem>
28383      <para>
28384       The string function <function>CHAR_LENGTH</function> is now a
28385       native function. Previous versions translated this into a call
28386       to <function>LENGTH</function>, which could result in
28387       ambiguity with other types implementing
28388       <function>LENGTH</function> such as the geometric types.
28389      </para>
28390     </listitem>
28391    </itemizedlist>
28392   </sect2>
28393
28394   <sect2>
28395    <title>Changes</title>
28396
28397    <para>
28398     <programlisting>
28399 Bug Fixes
28400 ---------
28401 Prevent function calls exceeding maximum number of arguments (Tom)
28402 Improve CASE construct (Tom)
28403 Fix SELECT coalesce(f1,0) FROM int4_tbl GROUP BY f1 (Tom)
28404 Fix SELECT sentence.words[0] FROM sentence GROUP BY sentence.words[0] (Tom)
28405 Fix GROUP BY scan bug (Tom)
28406 Improvements in SQL grammar processing (Tom)
28407 Fix for views involved in INSERT ... SELECT ... (Tom)
28408 Fix for SELECT a/2, a/2 FROM test_missing_target GROUP BY a/2 (Tom)
28409 Fix for subselects in INSERT ... SELECT (Tom)
28410 Prevent INSERT ... SELECT ... ORDER BY (Tom)
28411 Fixes for relations greater than 2GB, including vacuum
28412 Improve propagating system table changes to other backends (Tom)
28413 Improve propagating user table changes to other backends (Tom)
28414 Fix handling of temp tables in complex situations (Bruce, Tom)
28415 Allow table locking at table open, improving concurrent reliability (Tom)
28416 Properly quote sequence names in pg_dump (Ross J. Reedstrom)
28417 Prevent DROP DATABASE while others accessing
28418 Prevent any rows from being returned by GROUP BY if no rows processed (Tom)
28419 Fix SELECT COUNT(1) FROM table WHERE ...' if no rows matching WHERE (Tom)
28420 Fix pg_upgrade so it works for MVCC (Tom)
28421 Fix for SELECT ... WHERE x IN (SELECT ... HAVING SUM(x) &gt; 1) (Tom)
28422 Fix for "f1 datetime DEFAULT 'now'"  (Tom)
28423 Fix problems with CURRENT_DATE used in DEFAULT (Tom)
28424 Allow comment-only lines, and ;;; lines too. (Tom)
28425 Improve recovery after failed disk writes, disk full (Hiroshi)
28426 Fix cases where table is mentioned in FROM but not joined (Tom)
28427 Allow HAVING clause without aggregate functions (Tom)
28428 Fix for "--" comment and no trailing newline, as seen in perl interface
28429 Improve pg_dump failure error reports (Bruce)
28430 Allow sorts and hashes to exceed 2GB file sizes (Tom)
28431 Fix for pg_dump dumping of inherited rules (Tom)
28432 Fix for NULL handling comparisons (Tom)
28433 Fix inconsistent state caused by failed CREATE/DROP commands (Hiroshi)
28434 Fix for dbname with dash
28435 Prevent DROP INDEX from interfering with other backends (Tom)
28436 Fix file descriptor leak in verify_password()
28437 Fix for "Unable to identify an operator =$" problem
28438 Fix ODBC so no segfault if CommLog and Debug enabled (Dirk Niggemann)
28439 Fix for recursive exit call (Massimo)
28440 Fix for extra-long timezones (Jeroen van Vianen)
28441 Make pg_dump preserve primary key information (Peter E)
28442 Prevent databases with single quotes (Peter E)
28443 Prevent DROP DATABASE inside  transaction (Peter E)
28444 ecpg memory leak fixes (Stephen Birch)
28445 Fix for SELECT null::text, SELECT int4fac(null) and SELECT 2 + (null) (Tom)
28446 Y2K timestamp fix (Massimo)
28447 Fix for VACUUM 'HEAP_MOVED_IN was not expected' errors (Tom)
28448 Fix for views with tables/columns containing spaces  (Tom)
28449 Prevent privileges on indexes (Peter E)
28450 Fix for spinlock stuck problem when error is generated (Hiroshi)
28451 Fix ipcclean on Linux
28452 Fix handling of NULL constraint conditions (Tom)
28453 Fix memory leak in odbc driver (Nick Gorham)
28454 Fix for privilege check on UNION tables (Tom)
28455 Fix to allow SELECT 'a' LIKE 'a' (Tom)
28456 Fix for SELECT 1 + NULL (Tom)
28457 Fixes to CHAR
28458 Fix log() on numeric type (Tom)
28459 Deprecate ':' and ';' operators
28460 Allow vacuum of temporary tables
28461 Disallow inherited columns with the same name as new columns
28462 Recover or force failure when disk space is exhausted (Hiroshi)
28463 Fix INSERT INTO ... SELECT with AS columns matching result columns
28464 Fix INSERT ... SELECT ... GROUP BY groups by target columns not source columns (Tom)
28465 Fix CREATE TABLE test (a char(5) DEFAULT text '', b int4) with INSERT (Tom)
28466 Fix UNION with LIMIT
28467 Fix CREATE TABLE x AS SELECT 1 UNION SELECT 2
28468 Fix CREATE TABLE test(col char(2) DEFAULT user)
28469 Fix mismatched types in CREATE TABLE ... DEFAULT
28470 Fix SELECT * FROM pg_class where oid in (0,-1)
28471 Fix SELECT COUNT('asdf') FROM pg_class WHERE oid=12
28472 Prevent user who can create databases can modifying pg_database table (Peter E)
28473 Fix btree to give a useful elog when key &gt; 1/2 (page - overhead) (Tom)
28474 Fix INSERT of 0.0 into DECIMAL(4,4) field (Tom)
28475
28476 Enhancements
28477 ------------
28478 New CLI interface include file sqlcli.h, based on SQL3/SQL98
28479 Remove all limits on query length, row length limit still exists (Tom)
28480 Update jdbc protocol to 2.0 (Jens Glaser <email>jens@jens.de</email>)
28481 Add TRUNCATE command to quickly truncate relation (Mike Mascari)
28482 Fix to give super user and createdb user proper update catalog rights (Peter E)
28483 Allow ecpg bool variables to have NULL values (Christof)
28484 Issue ecpg error if NULL value for variable with no NULL indicator (Christof)
28485 Allow ^C to cancel COPY command (Massimo)
28486 Add SET FSYNC and SHOW PG_OPTIONS commands(Massimo)
28487 Function name overloading for dynamically-loaded C functions (Frankpitt)
28488 Add CmdTuples() to libpq++(Vince)
28489 New CREATE CONSTRAINT TRIGGER and SET CONSTRAINTS commands(Jan)
28490 Allow CREATE FUNCTION/WITH clause to be used for all language types
28491 configure --enable-debug adds -g (Peter E)
28492 configure --disable-debug removes -g (Peter E)
28493 Allow more complex default expressions (Tom)
28494 First real FOREIGN KEY constraint trigger functionality (Jan)
28495 Add FOREIGN KEY ... MATCH FULL ... ON DELETE CASCADE (Jan)
28496 Add FOREIGN KEY ... MATCH &lt;unspecified&gt; referential actions (Don Baccus)
28497 Allow WHERE restriction on ctid (physical heap location) (Hiroshi)
28498 Move pginterface from contrib to interface directory, rename to pgeasy (Bruce)
28499 Change pgeasy connectdb() parameter ordering (Bruce)
28500 Require SELECT DISTINCT target list to have all ORDER BY columns (Tom)
28501 Add Oracle's COMMENT ON command (Mike Mascari <email>mascarim@yahoo.com</email>)
28502 libpq's PQsetNoticeProcessor function now returns previous hook(Peter E)
28503 Prevent PQsetNoticeProcessor from being set to NULL (Peter E)
28504 Make USING in COPY optional (Bruce)
28505 Allow subselects in the target list (Tom)
28506 Allow subselects on the left side of comparison operators (Tom)
28507 New parallel regression test (Jan)
28508 Change backend-side COPY to write files with permissions 644 not 666 (Tom)
28509 Force permissions on PGDATA directory to be secure, even if it exists (Tom)
28510 Added psql LASTOID variable to return last inserted oid (Peter E)
28511 Allow concurrent vacuum and remove pg_vlock vacuum lock file (Tom)
28512 Add privilege check for vacuum (Peter E)
28513 New libpq functions to allow asynchronous connections: PQconnectStart(),
28514   PQconnectPoll(), PQresetStart(), PQresetPoll(), PQsetenvStart(),
28515   PQsetenvPoll(), PQsetenvAbort (Ewan Mellor)
28516 New libpq PQsetenv() function (Ewan Mellor)
28517 create/alter user extension (Peter E)
28518 New postmaster.pid and postmaster.opts under $PGDATA (Tatsuo)
28519 New scripts for create/drop user/db (Peter E)
28520 Major psql overhaul (Peter E)
28521 Add const to libpq interface (Peter E)
28522 New libpq function PQoidValue (Peter E)
28523 Show specific non-aggregate causing problem with GROUP BY (Tom)
28524 Make changes to pg_shadow recreate pg_pwd file (Peter E)
28525 Add aggregate(DISTINCT ...) (Tom)
28526 Allow flag to control COPY input/output of NULLs (Peter E)
28527 Make postgres user have a password by default (Peter E)
28528 Add CREATE/ALTER/DROP GROUP (Peter E)
28529 All administration scripts now support --long options (Peter E, Karel)
28530 Vacuumdb script now supports --all option (Peter E)
28531 ecpg new portable FETCH syntax
28532 Add ecpg EXEC SQL IFDEF, EXEC SQL IFNDEF, EXEC SQL ELSE, EXEC SQL ELIF
28533        and EXEC SQL ENDIF directives
28534 Add pg_ctl script to control backend start-up (Tatsuo)
28535 Add postmaster.opts.default file to store start-up flags (Tatsuo)
28536 Allow --with-mb=SQL_ASCII
28537 Increase maximum number of index keys to 16 (Bruce)
28538 Increase maximum number of function arguments to 16 (Bruce)
28539 Allow configuration of maximum number of index keys and arguments (Bruce)
28540 Allow unprivileged users to change their passwords (Peter E)
28541 Password authentication enabled; required for new users (Peter E)
28542 Disallow dropping a user who owns a database (Peter E)
28543 Change initdb option --with-mb to --enable-multibyte
28544 Add option for initdb to prompts for superuser password (Peter E)
28545 Allow complex type casts like col::numeric(9,2) and col::int2::float8 (Tom)
28546 Updated user interfaces on initdb, initlocation, pg_dump, ipcclean (Peter E)
28547 New pg_char_to_encoding() and pg_encoding_to_char() functions (Tatsuo)
28548 libpq non-blocking mode (Alfred Perlstein)
28549 Improve conversion of types in casts that don't specify a length
28550 New plperl internal programming language (Mark Hollomon)
28551 Allow COPY IN to read file that do not end with a newline (Tom)
28552 Indicate when long identifiers are truncated (Tom)
28553 Allow aggregates to use type equivalency (Peter E)
28554 Add Oracle's to_char(), to_date(), to_datetime(), to_timestamp(), to_number()
28555        conversion functions (Karel Zak &lt;zakkr@zf.jcu.cz&gt;)
28556 Add SELECT DISTINCT ON (expr [, expr ...]) targetlist ... (Tom)
28557 Check to be sure ORDER BY is compatible with the DISTINCT operation (Tom)
28558 Add NUMERIC and int8 types to ODBC
28559 Improve EXPLAIN results for Append, Group, Agg, Unique (Tom)
28560 Add ALTER TABLE ... ADD FOREIGN KEY (Stephan Szabo)
28561 Allow SELECT .. FOR UPDATE in PL/pgSQL (Hiroshi)
28562 Enable backward sequential scan even after reaching EOF (Hiroshi)
28563 Add btree indexing of boolean values, &gt;= and &lt;= (Don Baccus)
28564 Print current line number when COPY FROM fails (Massimo)
28565 Recognize POSIX time zone e.g. "PST+8" and "GMT-8" (Thomas)
28566 Add DEC as synonym for DECIMAL (Thomas)
28567 Add SESSION_USER as SQL92 key word, same as CURRENT_USER (Thomas)
28568 Implement SQL92 column aliases (aka correlation names) (Thomas)
28569 Implement SQL92 join syntax (Thomas)
28570 Make INTERVAL reserved word allowed as a column identifier (Thomas)
28571 Implement REINDEX command (Hiroshi)
28572 Accept ALL in aggregate function SUM(ALL col) (Tom)
28573 Prevent GROUP BY from using column aliases (Tom)
28574 New psql \encoding option (Tatsuo)
28575 Allow PQrequestCancel() to terminate when in waiting-for-lock state (Hiroshi)
28576 Allow negation of a negative number in all cases
28577 Add ecpg descriptors (Christof, Michael)
28578 Allow CREATE VIEW v AS SELECT f1::char(8) FROM tbl
28579 Allow casts with length, like foo::char(8)
28580 New libpq functions PQsetClientEncoding(), PQclientEncoding() (Tatsuo)
28581 Add support for SJIS user defined characters (Tatsuo)
28582 Larger views/rules supported
28583 Make libpq's PQconndefaults() thread-safe (Tom)
28584 Disable // as comment to be ANSI conforming, should use -- (Tom)
28585 Allow column aliases on views CREATE VIEW name (collist)
28586 Fixes for views with subqueries (Tom)
28587 Allow UPDATE table SET fld = (SELECT ...) (Tom)
28588 SET command options no longer require quotes
28589 Update pgaccess to 0.98.6
28590 New SET SEED command
28591 New pg_options.sample file
28592 New SET FSYNC command (Massimo)
28593 Allow pg_descriptions when creating tables
28594 Allow pg_descriptions when creating types, columns, and functions
28595 Allow psql \copy to allow delimiters (Peter E)
28596 Allow psql to print nulls as distinct from "" [null] (Peter E)
28597
28598 Types
28599 -----
28600 Many array fixes (Tom)
28601 Allow bare column names to be subscripted as arrays (Tom)
28602 Improve type casting of int and float constants (Tom)
28603 Cleanups for int8 inputs, range checking, and type conversion (Tom)
28604 Fix for SELECT timespan('21:11:26'::time) (Tom)
28605 netmask('x.x.x.x/0') is 255.255.255.255 instead of 0.0.0.0 (Oleg Sharoiko)
28606 Add btree index on NUMERIC (Jan)
28607 Perl fix for large objects containing NUL characters (Douglas Thomson)
28608 ODBC fix for large objects (free)
28609 Fix indexing of cidr data type
28610 Fix for Ethernet MAC addresses (macaddr type) comparisons
28611 Fix for date/time types when overflows happened in computations (Tom)
28612 Allow array on int8 (Peter E)
28613 Fix for rounding/overflow of NUMERIC type, like NUMERIC(4,4) (Tom)
28614 Allow NUMERIC arrays
28615 Fix bugs in NUMERIC ceil() and floor() functions (Tom)
28616 Make char_length()/octet_length including trailing blanks (Tom)
28617 Made abstime/reltime use int4 instead of time_t (Peter E)
28618 New lztext data type for compressed text fields
28619 Revise code to handle coercion of int and float constants (Tom)
28620 Start at new code to implement a BIT and BIT VARYING type (Adriaan Joubert)
28621 NUMERIC now accepts scientific notation (Tom)
28622 NUMERIC to int4 rounds (Tom)
28623 Convert float4/8 to NUMERIC properly (Tom)
28624 Allow type conversion with NUMERIC (Thomas)
28625 Make ISO date style (2000-02-16 09:33) the default (Thomas)
28626 Add NATIONAL CHAR [ VARYING ] (Thomas)
28627 Allow NUMERIC round and trunc to accept negative scales (Tom)
28628 New TIME WITH TIME ZONE type (Thomas)
28629 Add MAX()/MIN() on time type (Thomas)
28630 Add abs(), mod(), fac() for int8 (Thomas)
28631 Rename functions to round(), sqrt(), cbrt(), pow() for float8 (Thomas)
28632 Add transcendental math functions (e.g. sin(), acos()) for float8 (Thomas)
28633 Add exp() and ln() for NUMERIC type
28634 Rename NUMERIC power() to pow() (Thomas)
28635 Improved TRANSLATE() function (Edwin Ramirez, Tom)
28636 Allow X=-Y operators  (Tom)
28637 Allow SELECT float8(COUNT(*))/(SELECT COUNT(*) FROM t) FROM t GROUP BY f1; (Tom)
28638 Allow LOCALE to use indexes in regular expression searches (Tom)
28639 Allow creation of functional indexes to use default types
28640
28641 Performance
28642 -----------
28643 Prevent exponential space consumption with many AND's and OR's (Tom)
28644 Collect attribute selectivity values for system columns (Tom)
28645 Reduce memory usage of aggregates (Tom)
28646 Fix for LIKE optimization to use indexes with multibyte encodings (Tom)
28647 Fix r-tree index optimizer selectivity (Thomas)
28648 Improve optimizer selectivity computations and functions (Tom)
28649 Optimize btree searching for cases where many equal keys exist (Tom)
28650 Enable fast LIKE index processing only if index present (Tom)
28651 Re-use free space on index pages with duplicates (Tom)
28652 Improve hash join processing (Tom)
28653 Prevent descending sort if result is already sorted(Hiroshi)
28654 Allow commuting of index scan query qualifications (Tom)
28655 Prefer index scans in cases where ORDER BY/GROUP BY is required (Tom)
28656 Allocate large memory requests in fix-sized chunks for performance (Tom)
28657 Fix vacuum's performance by reducing memory allocation requests (Tom)
28658 Implement constant-expression simplification (Bernard Frankpitt, Tom)
28659 Use secondary columns to be used to determine start of index scan (Hiroshi)
28660 Prevent quadruple use of disk space when doing internal sorting (Tom)
28661 Faster sorting by calling fewer functions (Tom)
28662 Create system indexes to match all system caches (Bruce, Hiroshi)
28663 Make system caches use system indexes (Bruce)
28664 Make all system indexes unique (Bruce)
28665 Improve pg_statistics management for VACUUM speed improvement (Tom)
28666 Flush backend cache less frequently (Tom, Hiroshi)
28667 COPY now reuses previous memory allocation, improving performance (Tom)
28668 Improve optimization cost estimation (Tom)
28669 Improve optimizer estimate of range queries x &gt; lowbound AND x &lt; highbound (Tom)
28670 Use DNF instead of CNF where appropriate (Tom, Taral)
28671 Further cleanup for OR-of-AND WHERE-clauses (Tom)
28672 Make use of index in OR clauses (x = 1 AND y = 2) OR (x = 2 AND y = 4) (Tom)
28673 Smarter optimizer computations for random index page access (Tom)
28674 New SET variable to control optimizer costs (Tom)
28675 Optimizer queries based on LIMIT, OFFSET, and EXISTS qualifications (Tom)
28676 Reduce optimizer internal housekeeping of join paths for speedup (Tom)
28677 Major subquery speedup (Tom)
28678 Fewer fsync writes when fsync is not disabled (Tom)
28679 Improved LIKE optimizer estimates (Tom)
28680 Prevent fsync in SELECT-only queries (Vadim)
28681 Make index creation use psort code, because it is now faster (Tom)
28682 Allow creation of sort temp tables &gt; 1 Gig
28683
28684 Source Tree Changes
28685 -------------------
28686 Fix for linux PPC compile
28687 New generic expression-tree-walker subroutine (Tom)
28688 Change form() to varargform() to prevent portability problems
28689 Improved range checking for large integers on Alphas
28690 Clean up #include in /include directory (Bruce)
28691 Add scripts for checking includes (Bruce)
28692 Remove un-needed #include's from *.c files (Bruce)
28693 Change #include's to use &lt;&gt; and "" as appropriate (Bruce)
28694 Enable Windows compilation of libpq
28695 Alpha spinlock fix from Uncle George <email>gatgul@voicenet.com</email>
28696 Overhaul of optimizer data structures (Tom)
28697 Fix to cygipc library (Yutaka Tanida)
28698 Allow pgsql to work on newer Cygwin snapshots (Dan)
28699 New catalog version number (Tom)
28700 Add Linux ARM
28701 Rename heap_replace to heap_update
28702 Update for QNX (Dr. Andreas Kardos)
28703 New platform-specific regression handling (Tom)
28704 Rename oid8 -&gt; oidvector and int28 -&gt; int2vector (Bruce)
28705 Included all yacc and lex files into the distribution (Peter E.)
28706 Remove lextest, no longer needed (Peter E)
28707 Fix for libpq and psql on Windows (Magnus)
28708 Internally change datetime and timespan into timestamp and interval (Thomas)
28709 Fix for plpgsql on BSD/OS
28710 Add SQL_ASCII test case to the regression test (Tatsuo)
28711 configure --with-mb now deprecated (Tatsuo)
28712 NT fixes
28713 NetBSD fixes (Johnny C. Lam <email>lamj@stat.cmu.edu</email>)
28714 Fixes for Alpha compiles
28715 New multibyte encodings
28716     </programlisting>
28717    </para>
28718   </sect2>
28719  </sect1>
28720
28721  <sect1 id="release-6-5-3">
28722   <title>Release 6.5.3</title>
28723
28724   <note>
28725   <title>Release date</title>
28726   <simpara>1999-10-13</simpara>
28727   </note>
28728
28729   <para>
28730    This is basically a cleanup release for 6.5.2.  We have added a new
28731    <application>PgAccess</> that was missing in 6.5.2, and installed an NT-specific fix.
28732   </para>
28733
28734
28735   <sect2>
28736    <title>Migration to Version 6.5.3</title>
28737
28738    <para>
28739     A dump/restore is <emphasis>not</emphasis> required for those running
28740     6.5.*.
28741    </para>
28742   </sect2>
28743   <sect2>
28744    <title>Changes</title>
28745
28746    <para>
28747     <programlisting>
28748 Updated version of pgaccess 0.98
28749 NT-specific patch
28750 Fix dumping rules on inherited tables
28751     </programlisting>
28752    </para>
28753   </sect2>
28754  </sect1>
28755
28756
28757  <sect1 id="release-6-5-2">
28758   <title>Release 6.5.2</title>
28759
28760   <note>
28761   <title>Release date</title>
28762   <simpara>1999-09-15</simpara>
28763   </note>
28764
28765   <para>
28766    This is basically a cleanup release for 6.5.1.  We have fixed a variety of
28767    problems reported by 6.5.1 users.
28768   </para>
28769
28770
28771   <sect2>
28772    <title>Migration to Version 6.5.2</title>
28773
28774    <para>
28775     A dump/restore is <emphasis>not</emphasis> required for those running
28776     6.5.*.
28777    </para>
28778   </sect2>
28779
28780   <sect2>
28781    <title>Changes</title>
28782
28783    <para>
28784     <programlisting>
28785 subselect+CASE fixes(Tom)
28786 Add SHLIB_LINK setting for solaris_i386 and solaris_sparc ports(Daren Sefcik)
28787 Fixes for CASE in WHERE join clauses(Tom)
28788 Fix BTScan abort(Tom)
28789 Repair the check for redundant UNIQUE and PRIMARY KEY indexes(Thomas)
28790 Improve it so that it checks for multicolumn constraints(Thomas)
28791 Fix for Windows making problem with MB enabled(Hiroki Kataoka)
28792 Allow BSD yacc and bison to compile pl code(Bruce)
28793 Fix SET NAMES working
28794 int8 fixes(Thomas)
28795 Fix vacuum's memory consumption(Hiroshi,Tatsuo)
28796 Reduce the total memory consumption of vacuum(Tom)
28797 Fix for timestamp(datetime)
28798 Rule deparsing bugfixes(Tom)
28799 Fix quoting problems in mkMakefile.tcldefs.sh.in and mkMakefile.tkdefs.sh.in(Tom)
28800 This is to re-use space on index pages freed by vacuum(Vadim)
28801 document -x for pg_dump(Bruce)
28802 Fix for unary operators in rule deparser(Tom)
28803 Comment out FileUnlink of excess segments during mdtruncate()(Tom)
28804 IRIX linking fix from Yu Cao &gt;yucao@falcon.kla-tencor.com&lt;
28805 Repair logic error in LIKE: should not return LIKE_ABORT
28806   when reach end of pattern before end of text(Tom)
28807 Repair incorrect cleanup of heap memory allocation during transaction abort(Tom)
28808 Updated version of pgaccess 0.98
28809     </programlisting>
28810    </para>
28811   </sect2>
28812  </sect1>
28813
28814  <sect1 id="release-6-5-1">
28815   <title>Release 6.5.1</title>
28816
28817   <note>
28818   <title>Release date</title>
28819   <simpara>1999-07-15</simpara>
28820   </note>
28821
28822   <para>
28823    This is basically a cleanup release for 6.5.  We have fixed a variety of
28824    problems reported by 6.5 users.
28825   </para>
28826
28827   <sect2>
28828    <title>Migration to Version 6.5.1</title>
28829
28830    <para>
28831     A dump/restore is <emphasis>not</emphasis> required for those running
28832     6.5.
28833    </para>
28834   </sect2>
28835
28836   <sect2>
28837    <title>Changes</title>
28838
28839    <para>
28840     <programlisting>
28841 Add NT README file
28842 Portability fixes for linux_ppc, IRIX, linux_alpha, OpenBSD, alpha
28843 Remove QUERY_LIMIT, use SELECT...LIMIT
28844 Fix for EXPLAIN on inheritance(Tom)
28845 Patch to allow vacuum on multisegment tables(Hiroshi)
28846 R-Tree optimizer selectivity fix(Tom)
28847 ACL file descriptor leak fix(Atsushi Ogawa)
28848 New expression subtree code(Tom)
28849 Avoid disk writes for read-only transactions(Vadim)
28850 Fix for removal of temp tables if last transaction was aborted(Bruce)
28851 Fix to prevent too large row from being created(Bruce)
28852 plpgsql fixes
28853 Allow port numbers 32k - 64k(Bruce)
28854 Add ^ precedence(Bruce)
28855 Rename sort files called pg_temp to pg_sorttemp(Bruce)
28856 Fix for microseconds in time values(Tom)
28857 Tutorial source cleanup
28858 New linux_m68k port
28859 Fix for sorting of NULL's in some cases(Tom)
28860 Shared library dependencies fixed (Tom)
28861 Fixed glitches affecting GROUP BY in subselects(Tom)
28862 Fix some compiler warnings (Tomoaki Nishiyama)
28863 Add Win1250 (Czech) support (Pavel Behal)
28864     </programlisting>
28865    </para>
28866   </sect2>
28867  </sect1>
28868
28869  <sect1 id="release-6-5">
28870   <title>Release 6.5</title>
28871
28872   <note>
28873   <title>Release date</title>
28874   <simpara>1999-06-09</simpara>
28875   </note>
28876
28877   <para>
28878    This release marks a major step in the development team's mastery of the source
28879    code we inherited from Berkeley.  You will see we are now easily adding
28880    major features, thanks to the increasing size and experience of our
28881    world-wide development team.
28882   </para>
28883
28884   <para>
28885    Here is a brief summary of the more notable changes:
28886
28887    <variablelist>
28888     <varlistentry>
28889      <term>
28890       Multiversion concurrency control(MVCC)
28891      </term>
28892      <listitem>
28893       <para>
28894        This removes our old table-level locking, and replaces it with
28895        a locking system that is superior to most commercial database
28896        systems.  In a traditional system, each row that is modified
28897        is locked until committed, preventing reads by other users.
28898        MVCC uses the natural multiversion nature of
28899        <productname>PostgreSQL</productname> to allow readers to
28900        continue reading consistent data during writer activity.
28901        Writers continue to use the compact pg_log transaction system.
28902        This is all performed without having to allocate a lock for
28903        every row like traditional database systems.  So, basically,
28904        we no longer are restricted by simple table-level locking; we
28905        have something better than row-level locking.
28906       </para>
28907      </listitem>
28908     </varlistentry>
28909
28910     <varlistentry>
28911      <term>
28912       Hot backups from <application>pg_dump</application>
28913      </term>
28914      <listitem>
28915       <para>
28916        <application>pg_dump</application> takes advantage of the new
28917        MVCC features to give a consistent database dump/backup while
28918        the database stays online and available for queries.
28919       </para>
28920      </listitem>
28921     </varlistentry>
28922
28923     <varlistentry>
28924      <term>
28925       Numeric data type
28926      </term>
28927      <listitem>
28928       <para>
28929        We now have a true numeric data type, with
28930        user-specified precision.
28931       </para>
28932      </listitem>
28933     </varlistentry>
28934
28935     <varlistentry>
28936      <term>
28937       Temporary tables
28938      </term>
28939      <listitem>
28940       <para>
28941        Temporary tables are guaranteed to have unique names
28942        within a database session, and are destroyed on session exit.
28943       </para>
28944      </listitem>
28945     </varlistentry>
28946
28947     <varlistentry>
28948      <term>
28949       New SQL features
28950      </term>
28951      <listitem>
28952       <para>
28953        We now have CASE, INTERSECT, and EXCEPT statement
28954        support.  We have new LIMIT/OFFSET, SET TRANSACTION ISOLATION LEVEL,
28955        SELECT ... FOR UPDATE, and an improved LOCK TABLE command.
28956       </para>
28957      </listitem>
28958     </varlistentry>
28959
28960     <varlistentry>
28961      <term>
28962       Speedups
28963      </term>
28964      <listitem>
28965       <para>
28966        We continue to speed up <productname>PostgreSQL</productname>,
28967        thanks to the variety of talents within our team.  We have
28968        sped up memory allocation, optimization, table joins, and row
28969        transfer routines.
28970       </para>
28971      </listitem>
28972     </varlistentry>
28973
28974     <varlistentry>
28975      <term>
28976       Ports
28977      </term>
28978      <listitem>
28979       <para>
28980        We continue to expand our port list, this time including
28981        <systemitem class="osname">Windows NT</>/<systemitem>ix86</> and <systemitem class="osname">NetBSD</>/<systemitem>arm32</>.
28982       </para>
28983      </listitem>
28984     </varlistentry>
28985
28986     <varlistentry>
28987      <term>
28988       Interfaces
28989      </term>
28990      <listitem>
28991       <para>
28992        Most interfaces have new versions, and existing functionality
28993        has been improved.
28994       </para>
28995      </listitem>
28996     </varlistentry>
28997
28998     <varlistentry>
28999      <term>
29000       Documentation
29001      </term>
29002      <listitem>
29003       <para>
29004        New and updated material is present throughout the
29005        documentation. New <acronym>FAQ</acronym>s have been
29006        contributed for <systemitem class="osname">SGI</> and <systemitem class="osname">AIX</> platforms.
29007        The <citetitle>Tutorial</citetitle> has introductory information
29008        on <acronym>SQL</acronym> from Stefan Simkovics.
29009        For the <citetitle>User's Guide</citetitle>, there are
29010        reference pages covering the postmaster and more utility
29011        programs, and a new appendix
29012        contains details on date/time behavior.
29013        The <citetitle>Administrator's Guide</citetitle> has a new
29014        chapter on troubleshooting from Tom Lane.
29015        And the <citetitle>Programmer's Guide</citetitle> has a
29016        description of query processing, also from Stefan, and details
29017        on obtaining the <productname>PostgreSQL</productname> source
29018        tree via anonymous <productname>CVS</productname> and
29019        <productname>CVSup</productname>.
29020       </para>
29021      </listitem>
29022     </varlistentry>
29023    </variablelist>
29024   </para>
29025
29026   <sect2>
29027    <title>Migration to Version 6.5</title>
29028
29029    <para>
29030     A dump/restore using <application>pg_dump</application>
29031     is required for those wishing to migrate data from any
29032     previous release of <productname>PostgreSQL</productname>.
29033     <application>pg_upgrade</application> can <emphasis>not</emphasis>
29034     be used to upgrade to this release because the on-disk structure
29035     of the tables has changed compared to previous releases.
29036    </para>
29037
29038    <para>
29039     The new Multiversion Concurrency Control (MVCC) features can
29040     give somewhat different behaviors in multiuser
29041     environments. <emphasis>Read and understand the following section
29042      to ensure that your existing applications will give you the
29043      behavior you need.</emphasis>
29044    </para>
29045
29046    <sect3>
29047     <title>Multiversion Concurrency Control</title>
29048
29049     <para>
29050      Because readers in 6.5 don't lock data, regardless of transaction
29051      isolation level, data read by one transaction can be overwritten by
29052      another. In other words, if a row is returned by
29053      <command>SELECT</command> it doesn't mean that this row really exists
29054      at the time it is returned (i.e. sometime after the statement or
29055      transaction began) nor that the row is protected from being deleted or
29056      updated by concurrent transactions before the current transaction does
29057      a commit or rollback.
29058     </para>
29059
29060     <para>
29061      To ensure the actual existence of a row and protect it against
29062      concurrent updates one must use <command>SELECT FOR UPDATE</command> or
29063      an appropriate <command>LOCK TABLE</command> statement. This should be
29064      taken into account when porting applications from previous releases of
29065      <productname>PostgreSQL</productname> and other environments.
29066     </para>
29067
29068     <para>
29069      Keep the above in mind if you are using
29070      <filename>contrib/refint.*</filename> triggers for
29071      referential integrity. Additional techniques are required now. One way is
29072      to use <command>LOCK parent_table IN SHARE ROW EXCLUSIVE MODE</command>
29073      command if a transaction is going to update/delete a primary key and
29074      use <command>LOCK parent_table IN SHARE MODE</command> command if a
29075      transaction is going to update/insert a foreign key.
29076
29077      <note>
29078       <para>
29079        Note that if you run a transaction in SERIALIZABLE mode then you must
29080        execute the <command>LOCK</command> commands above before execution of any
29081        <acronym>DML</acronym> statement
29082        (<command>SELECT/INSERT/DELETE/UPDATE/FETCH/COPY_TO</command>) in the
29083        transaction.
29084       </para>
29085      </note>
29086     </para>
29087
29088     <para>
29089      These inconveniences will disappear in the future
29090      when the ability to read dirty
29091      (uncommitted) data (regardless of isolation level) and true referential
29092      integrity will be implemented.
29093     </para>
29094    </sect3>
29095    </sect2>
29096
29097   <sect2>
29098    <title>Changes</title>
29099
29100    <para>
29101     <programlisting>
29102 Bug Fixes
29103 ---------
29104 Fix text&lt;-&gt;float8 and text&lt;-&gt;float4 conversion functions(Thomas)
29105 Fix for creating tables with mixed-case constraints(Billy)
29106 Change exp()/pow() behavior to generate error on underflow/overflow(Jan)
29107 Fix bug in pg_dump -z
29108 Memory overrun cleanups(Tatsuo)
29109 Fix for lo_import crash(Tatsuo)
29110 Adjust handling of data type names to suppress double quotes(Thomas)
29111 Use type coercion for matching columns and DEFAULT(Thomas)
29112 Fix deadlock so it only checks once after one second of sleep(Bruce)
29113 Fixes for aggregates and PL/pgsql(Hiroshi)
29114 Fix for subquery crash(Vadim)
29115 Fix for libpq function PQfnumber and case-insensitive names(Bahman Rafatjoo)
29116 Fix for large object write-in-middle, no extra block, memory consumption(Tatsuo)
29117 Fix for pg_dump -d or -D and  quote special characters in INSERT
29118 Repair serious problems with dynahash(Tom)
29119 Fix INET/CIDR portability problems
29120 Fix problem with selectivity error in ALTER TABLE ADD COLUMN(Bruce)
29121 Fix executor so mergejoin of different column types works(Tom)
29122 Fix for Alpha OR selectivity bug
29123 Fix OR index selectivity problem(Bruce)
29124 Fix so \d shows proper length for char()/varchar()(Ryan)
29125 Fix tutorial code(Clark)
29126 Improve destroyuser checking(Oliver)
29127 Fix for Kerberos(Rodney McDuff)
29128 Fix for dropping database while dirty buffers(Bruce)
29129 Fix so sequence nextval() can be case-sensitive(Bruce)
29130 Fix !!= operator
29131 Drop buffers before destroying database files(Bruce)
29132 Fix case where executor evaluates functions twice(Tatsuo)
29133 Allow sequence nextval actions to be case-sensitive(Bruce)
29134 Fix optimizer indexing not working for negative numbers(Bruce)
29135 Fix for memory leak in executor with fjIsNull
29136 Fix for aggregate memory leaks(Erik Riedel)
29137 Allow user name containing a dash to grant privileges
29138 Cleanup of NULL in inet types
29139 Clean up system table bugs(Tom)
29140 Fix problems of PAGER and \? command(Masaaki Sakaida)
29141 Reduce default multisegment file size limit to 1GB(Peter)
29142 Fix for dumping of CREATE OPERATOR(Tom)
29143 Fix for backward scanning of cursors(Hiroshi Inoue)
29144 Fix for COPY FROM STDIN when using \i(Tom)
29145 Fix for subselect is compared inside an expression(Jan)
29146 Fix handling of error reporting while returning rows(Tom)
29147 Fix problems with reference to array types(Tom,Jan)
29148 Prevent UPDATE SET oid(Jan)
29149 Fix pg_dump so -t option can handle case-sensitive tablenames
29150 Fixes for GROUP BY in special cases(Tom, Jan)
29151 Fix for memory leak in failed queries(Tom)
29152 DEFAULT now supports mixed-case identifiers(Tom)
29153 Fix for multisegment uses of DROP/RENAME table, indexes(Ole Gjerde)
29154 Disable use of pg_dump with both -o and -d options(Bruce)
29155 Allow pg_dump to properly dump group privileges(Bruce)
29156 Fix GROUP BY in INSERT INTO table SELECT * FROM table2(Jan)
29157 Fix for computations in views(Jan)
29158 Fix for aggregates on array indexes(Tom)
29159 Fix for DEFAULT handles single quotes in value requiring too many quotes
29160 Fix security problem with non-super users importing/exporting large objects(Tom)
29161 Rollback of transaction that creates table cleaned up properly(Tom)
29162 Fix to allow long table and column names to generate proper serial names(Tom)
29163
29164 Enhancements
29165 ------------
29166 Add "vacuumdb" utility
29167 Speed up libpq by allocating memory better(Tom)
29168 EXPLAIN all indexes used(Tom)
29169 Implement CASE, COALESCE, NULLIF  expression(Thomas)
29170 New pg_dump table output format(Constantin)
29171 Add string min()/max() functions(Thomas)
29172 Extend new type coercion techniques to aggregates(Thomas)
29173 New moddatetime contrib(Terry)
29174 Update to pgaccess 0.96(Constantin)
29175 Add routines for single-byte "char" type(Thomas)
29176 Improved substr() function(Thomas)
29177 Improved multibyte handling(Tatsuo)
29178 Multiversion concurrency control/MVCC(Vadim)
29179 New Serialized mode(Vadim)
29180 Fix for tables over 2gigs(Peter)
29181 New SET TRANSACTION ISOLATION LEVEL(Vadim)
29182 New LOCK TABLE IN ... MODE(Vadim)
29183 Update ODBC driver(Byron)
29184 New NUMERIC data type(Jan)
29185 New SELECT FOR UPDATE(Vadim)
29186 Handle "NaN" and "Infinity" for input values(Jan)
29187 Improved date/year handling(Thomas)
29188 Improved handling of backend connections(Magnus)
29189 New options ELOG_TIMESTAMPS and USE_SYSLOG options for log files(Massimo)
29190 New TCL_ARRAYS option(Massimo)
29191 New INTERSECT and EXCEPT(Stefan)
29192 New pg_index.indisprimary for primary key tracking(D'Arcy)
29193 New pg_dump option to allow dropping of tables before creation(Brook)
29194 Speedup of row output routines(Tom)
29195 New READ COMMITTED isolation level(Vadim)
29196 New TEMP tables/indexes(Bruce)
29197 Prevent sorting if result is already sorted(Jan)
29198 New memory allocation optimization(Jan)
29199 Allow psql to do \p\g(Bruce)
29200 Allow multiple rule actions(Jan)
29201 Added LIMIT/OFFSET functionality(Jan)
29202 Improve optimizer when joining a large number of tables(Bruce)
29203 New intro to SQL from S. Simkovics' Master's Thesis (Stefan, Thomas)
29204 New intro to backend processing from S. Simkovics' Master's Thesis (Stefan)
29205 Improved int8 support(Ryan Bradetich, Thomas, Tom)
29206 New routines to convert between int8 and text/varchar types(Thomas)
29207 New bushy plans, where meta-tables are joined(Bruce)
29208 Enable right-hand queries by default(Bruce)
29209 Allow reliable maximum number of backends to be set at configure time
29210      (--with-maxbackends and postmaster switch (-N backends))(Tom)
29211 GEQO default now 10 tables because of optimizer speedups(Tom)
29212 Allow NULL=Var for MS-SQL portability(Michael, Bruce)
29213 Modify contrib check_primary_key() so either "automatic" or "dependent"(Anand)
29214 Allow psql \d on a view show query(Ryan)
29215 Speedup for LIKE(Bruce)
29216 Ecpg fixes/features, see src/interfaces/ecpg/ChangeLog file(Michael)
29217 JDBC fixes/features, see src/interfaces/jdbc/CHANGELOG(Peter)
29218 Make % operator have precedence like /(Bruce)
29219 Add new postgres -O option to allow system table structure changes(Bruce)
29220 Update contrib/pginterface/findoidjoins script(Tom)
29221 Major speedup in vacuum of deleted rows with indexes(Vadim)
29222 Allow non-SQL functions to run different versions based on arguments(Tom)
29223 Add -E option that shows actual queries sent by \dt and friends(Masaaki Sakaida)
29224 Add version number in start-up banners for psql(Masaaki Sakaida)
29225 New contrib/vacuumlo removes large objects not referenced(Peter)
29226 New initialization for table sizes so non-vacuumed tables perform better(Tom)
29227 Improve error messages when a connection is rejected(Tom)
29228 Support for arrays of char() and varchar() fields(Massimo)
29229 Overhaul of hash code to increase reliability and performance(Tom)
29230 Update to PyGreSQL 2.4(D'Arcy)
29231 Changed debug options so -d4 and -d5 produce different node displays(Jan)
29232 New pg_options: pretty_plan, pretty_parse, pretty_rewritten(Jan)
29233 Better optimization statistics for system table access(Tom)
29234 Better handling of non-default block sizes(Massimo)
29235 Improve GEQO optimizer memory consumption(Tom)
29236 UNION now supports ORDER BY of columns not in target list(Jan)
29237 Major libpq++ improvements(Vince Vielhaber)
29238 pg_dump now uses -z(ACL's) as default(Bruce)
29239 backend cache, memory speedups(Tom)
29240 have pg_dump do everything in one snapshot transaction(Vadim)
29241 fix for large object memory leakage, fix for pg_dumping(Tom)
29242 INET type now respects netmask for comparisons
29243 Make VACUUM ANALYZE only use a readlock(Vadim)
29244 Allow VIEWs on UNIONS(Jan)
29245 pg_dump now can generate consistent snapshots on active databases(Vadim)
29246
29247 Source Tree Changes
29248 -------------------
29249 Improve port matching(Tom)
29250 Portability fixes for SunOS
29251 Add Windows NT backend port and enable dynamic loading(Magnus and Daniel Horak)
29252 New port to Cobalt Qube(Mips) running Linux(Tatsuo)
29253 Port to NetBSD/m68k(Mr. Mutsuki Nakajima)
29254 Port to NetBSD/sun3(Mr. Mutsuki Nakajima)
29255 Port to NetBSD/macppc(Toshimi Aoki)
29256 Fix for tcl/tk configuration(Vince)
29257 Removed CURRENT key word for rule queries(Jan)
29258 NT dynamic loading now works(Daniel Horak)
29259 Add ARM32 support(Andrew McMurry)
29260 Better support for HP-UX 11 and UnixWare
29261 Improve file handling to be more uniform, prevent file descriptor leak(Tom)
29262 New install commands for plpgsql(Jan)
29263     </programlisting>
29264    </para>
29265   </sect2>
29266  </sect1>
29267
29268
29269 <sect1 id="release-6-4-2">
29270 <title>Release 6.4.2</title>
29271
29272   <note>
29273   <title>Release date</title>
29274   <simpara>1998-12-20</simpara>
29275   </note>
29276
29277 <para>
29278 The 6.4.1 release was improperly packaged.  This also has one additional
29279 bug fix.
29280 </para>
29281
29282
29283 <sect2>
29284 <title>Migration to Version 6.4.2</title>
29285
29286 <para>
29287 A dump/restore is <emphasis>not</emphasis> required for those running
29288 6.4.*.
29289 </para>
29290 </sect2>
29291 <sect2>
29292 <title>Changes</title>
29293
29294 <para>
29295 <programlisting>
29296 Fix for datetime constant problem on some platforms(Thomas)
29297 </programlisting>
29298 </para>
29299 </sect2>
29300 </sect1>
29301
29302
29303
29304 <sect1 id="release-6-4-1">
29305 <title>Release 6.4.1</title>
29306
29307   <note>
29308   <title>Release date</title>
29309   <simpara>1998-12-18</simpara>
29310   </note>
29311
29312 <para>
29313 This is basically a cleanup release for 6.4.  We have fixed a variety of
29314 problems reported by 6.4 users.
29315 </para>
29316
29317
29318 <sect2>
29319 <title>Migration to Version 6.4.1</title>
29320
29321 <para>
29322 A dump/restore is <emphasis>not</emphasis> required for those running
29323 6.4.
29324 </para>
29325 </sect2>
29326 <sect2>
29327 <title>Changes</title>
29328
29329 <para>
29330 <programlisting>
29331 Add pg_dump -N flag to force double quotes around identifiers.  This is
29332        the default(Thomas)
29333 Fix for NOT in where clause causing crash(Bruce)
29334 EXPLAIN VERBOSE coredump fix(Vadim)
29335 Fix shared-library problems on Linux
29336 Fix test for table existence to allow mixed-case and whitespace in
29337        the table name(Thomas)
29338 Fix a couple of pg_dump bugs
29339 Configure matches template/.similar entries better(Tom)
29340 Change builtin function names from SPI_* to spi_*
29341 OR WHERE clause fix(Vadim)
29342 Fixes for mixed-case table names(Billy)
29343 contrib/linux/postgres.init.csh/sh fix(Thomas)
29344 libpq memory overrun fix
29345 SunOS fixes(Tom)
29346 Change exp() behavior to generate error on underflow(Thomas)
29347 pg_dump fixes for memory leak, inheritance constraints, layout change
29348 update pgaccess to 0.93
29349 Fix prototype for 64-bit platforms
29350 Multibyte fixes(Tatsuo)
29351 New ecpg man page
29352 Fix memory overruns(Tatsuo)
29353 Fix for lo_import() crash(Bruce)
29354 Better search for install program(Tom)
29355 Timezone fixes(Tom)
29356 HP-UX fixes(Tom)
29357 Use implicit type coercion for matching DEFAULT values(Thomas)
29358 Add routines to help with single-byte (internal) character type(Thomas)
29359 Compilation of libpq for Windows fixes(Magnus)
29360 Upgrade to PyGreSQL 2.2(D'Arcy)
29361 </programlisting>
29362 </para>
29363 </sect2>
29364 </sect1>
29365
29366
29367
29368 <sect1 id="release-6-4">
29369 <title>Release 6.4</title>
29370
29371   <note>
29372   <title>Release date</title>
29373   <simpara>1998-10-30</simpara>
29374   </note>
29375
29376 <para>
29377 There are <emphasis>many</emphasis> new features and improvements in this release.
29378 Thanks to our developers and maintainers, nearly every aspect of the system
29379 has received some attention since the previous release.
29380 Here is a brief, incomplete summary:
29381
29382 <itemizedlist>
29383 <listitem>
29384 <para>
29385 Views and rules are now functional thanks to extensive new code in the
29386 rewrite rules system from Jan Wieck. He also wrote a chapter on it
29387 for the <citetitle>Programmer's Guide</citetitle>.
29388 </para>
29389 </listitem>
29390 <listitem>
29391 <para>
29392 Jan also contributed a second procedural language, <application>PL/pgSQL</application>, to go with the
29393 original <application>PL/pgTCL</application> procedural language he contributed last release.
29394 </para>
29395 </listitem>
29396
29397 <listitem>
29398 <para>
29399 We have optional multiple-byte character set support from Tatsuo Ishii
29400 to complement our existing locale support.
29401 </para>
29402 </listitem>
29403
29404 <listitem>
29405 <para>
29406 Client/server communications has been cleaned up, with better support for
29407 asynchronous messages and interrupts thanks to Tom Lane.
29408 </para>
29409 </listitem>
29410
29411 <listitem>
29412 <para>
29413 The parser will now perform automatic type coercion to match arguments
29414 to available operators and functions, and to match columns and expressions
29415 with target columns. This uses a generic mechanism which supports
29416 the type extensibility features of <productname>PostgreSQL</productname>.
29417 There is a new chapter in the <citetitle>User's Guide</citetitle>
29418 which covers this topic.
29419 </para>
29420 </listitem>
29421
29422 <listitem>
29423 <para>
29424 Three new data types have been added.
29425 Two types, <type>inet</type> and <type>cidr</type>, support various forms
29426 of IP network, subnet, and machine addressing. There is now an 8-byte integer
29427 type available on some platforms. See the chapter on data types
29428 in the <citetitle>User's Guide</citetitle> for details.
29429 A fourth type, <type>serial</type>, is now supported by the parser as an
29430 amalgam of the <type>int4</type> type, a sequence, and a unique index.
29431 </para>
29432 </listitem>
29433
29434 <listitem>
29435 <para>
29436 Several more <acronym>SQL92</acronym>-compatible syntax features have been
29437 added, including <command>INSERT DEFAULT VALUES</command>
29438 </para>
29439 </listitem>
29440
29441 <listitem>
29442 <para>
29443 The automatic configuration and installation system has received some
29444 attention, and should be more robust for more platforms than it has ever
29445 been.
29446 </para>
29447 </listitem>
29448
29449 </itemizedlist>
29450 </para>
29451
29452 <sect2>
29453 <title>Migration to Version 6.4</title>
29454
29455 <para>
29456 A dump/restore using <application>pg_dump</application>
29457 or <application>pg_dumpall</application>
29458 is required for those wishing to migrate data from any
29459 previous release of <productname>PostgreSQL</productname>.
29460 </para>
29461 </sect2>
29462
29463   <sect2>
29464 <title>Changes</title>
29465
29466    <para>
29467     <programlisting>
29468 Bug Fixes
29469 ---------
29470 Fix for a tiny memory leak in PQsetdb/PQfinish(Bryan)
29471 Remove char2-16 data types, use char/varchar(Darren)
29472 Pqfn not handles a NOTICE message(Anders)
29473 Reduced busywaiting overhead for spinlocks with many backends (dg)
29474 Stuck spinlock detection (dg)
29475 Fix up "ISO-style" timespan decoding and encoding(Thomas)
29476 Fix problem with table drop after rollback of transaction(Vadim)
29477 Change error message and remove non-functional update message(Vadim)
29478 Fix for COPY array checking
29479 Fix for SELECT 1 UNION SELECT NULL
29480 Fix for buffer leaks in large object calls(Pascal)
29481 Change owner from oid to int4 type(Bruce)
29482 Fix a bug in the oracle compatibility functions btrim() ltrim() and rtrim()
29483 Fix for shared invalidation cache overflow(Massimo)
29484 Prevent file descriptor leaks in failed COPY's(Bruce)
29485 Fix memory leak in libpgtcl's pg_select(Constantin)
29486 Fix problems with username/passwords over 8 characters(Tom)
29487 Fix problems with handling of asynchronous NOTIFY in backend(Tom)
29488 Fix of many bad system table entries(Tom)
29489
29490 Enhancements
29491 ------------
29492 Upgrade ecpg and ecpglib,see src/interfaces/ecpc/ChangeLog(Michael)
29493 Show the index used in an EXPLAIN(Zeugswetter)
29494 EXPLAIN  invokes  rule system and shows plan(s) for rewritten queries(Jan)
29495 Multibyte awareness of many data types and functions, via configure(Tatsuo)
29496 New configure --with-mb option(Tatsuo)
29497 New initdb --pgencoding option(Tatsuo)
29498 New createdb -E multibyte option(Tatsuo)
29499 Select version(); now returns PostgreSQL version(Jeroen)
29500 libpq now allows asynchronous clients(Tom)
29501 Allow cancel from client of backend query(Tom)
29502 psql now cancels query with Control-C(Tom)
29503 libpq users need not issue dummy queries to get NOTIFY messages(Tom)
29504 NOTIFY now sends sender's PID, so you can tell whether it was your own(Tom)
29505 PGresult struct now includes associated error message, if any(Tom)
29506 Define "tz_hour" and "tz_minute" arguments to date_part()(Thomas)
29507 Add routines to convert between varchar and bpchar(Thomas)
29508 Add routines to allow sizing of varchar and bpchar into target columns(Thomas)
29509 Add bit flags to support timezonehour and minute in data retrieval(Thomas)
29510 Allow more variations on valid floating point numbers (e.g. ".1", "1e6")(Thomas)
29511 Fixes for unary minus parsing with leading spaces(Thomas)
29512 Implement TIMEZONE_HOUR, TIMEZONE_MINUTE per SQL92 specs(Thomas)
29513 Check for and properly ignore FOREIGN KEY column constraints(Thomas)
29514 Define USER as synonym for CURRENT_USER per SQL92 specs(Thomas)
29515 Enable HAVING clause but no fixes elsewhere yet.
29516 Make "char" type a synonym for "char(1)" (actually implemented as bpchar)(Thomas)
29517 Save string type if specified for DEFAULT clause handling(Thomas)
29518 Coerce operations involving different data types(Thomas)
29519 Allow some index use for columns of different types(Thomas)
29520 Add capabilities for automatic type conversion(Thomas)
29521 Cleanups for large objects, so file is truncated on open(Peter)
29522 Readline cleanups(Tom)
29523 Allow psql  \f \ to make spaces as delimiter(Bruce)
29524 Pass pg_attribute.atttypmod to the frontend for column field lengths(Tom,Bruce)
29525 Msql compatibility library in /contrib(Aldrin)
29526 Remove the requirement that ORDER/GROUP BY clause identifiers be
29527 included in the target list(David)
29528 Convert columns to match columns in UNION clauses(Thomas)
29529 Remove fork()/exec() and only do fork()(Bruce)
29530 Jdbc cleanups(Peter)
29531 Show backend status on ps command line(only works on some platforms)(Bruce)
29532 Pg_hba.conf now has a sameuser option in the database field
29533 Make lo_unlink take oid param, not int4
29534 New DISABLE_COMPLEX_MACRO for compilers that cannot handle our macros(Bruce)
29535 Libpgtcl now handles NOTIFY as a Tcl event, need not send dummy queries(Tom)
29536 libpgtcl cleanups(Tom)
29537 Add -error option to libpgtcl's pg_result command(Tom)
29538 New locale patch, see docs/README/locale(Oleg)
29539 Fix for pg_dump so CONSTRAINT and CHECK syntax is correct(ccb)
29540 New contrib/lo code for large object orphan removal(Peter)
29541 New psql command "SET CLIENT_ENCODING TO 'encoding'" for multibytes
29542 feature, see /doc/README.mb(Tatsuo)
29543 contrib/noupdate code to revoke update permission on a column
29544 libpq can now be compiled on Windows(Magnus)
29545 Add PQsetdbLogin() in libpq
29546 New 8-byte integer type, checked by configure for OS support(Thomas)
29547 Better support for quoted table/column names(Thomas)
29548 Surround table and column names with double-quotes in pg_dump(Thomas)
29549 PQreset() now works with passwords(Tom)
29550 Handle case of GROUP BY target list column number out of range(David)
29551 Allow UNION in subselects
29552 Add auto-size to screen to \d? commands(Bruce)
29553 Use UNION to show all \d? results in one query(Bruce)
29554 Add \d? field search feature(Bruce)
29555 Pg_dump issues fewer \connect requests(Tom)
29556 Make pg_dump -z flag work better, document it in manual page(Tom)
29557 Add HAVING clause with full support for subselects and unions(Stephan)
29558 Full text indexing routines in contrib/fulltextindex(Maarten)
29559 Transaction ids now stored in shared memory(Vadim)
29560 New PGCLIENTENCODING when issuing COPY command(Tatsuo)
29561 Support for SQL92 syntax "SET NAMES"(Tatsuo)
29562 Support for LATIN2-5(Tatsuo)
29563 Add UNICODE regression test case(Tatsuo)
29564 Lock manager cleanup, new locking modes for LLL(Vadim)
29565 Allow index use with OR clauses(Bruce)
29566 Allows "SELECT NULL ORDER BY 1;"
29567 Explain VERBOSE prints the plan, and now pretty-prints the plan to
29568 the postmaster log file(Bruce)
29569 Add indexes display to \d command(Bruce)
29570 Allow GROUP BY on functions(David)
29571 New pg_class.relkind for large objects(Bruce)
29572 New way to send libpq NOTICE messages to a different location(Tom)
29573 New \w write command to psql(Bruce)
29574 New /contrib/findoidjoins scans oid columns to find join relationships(Bruce)
29575 Allow binary-compatible indexes to be considered when checking for valid
29576 Indexes for restriction clauses containing a constant(Thomas)
29577 New ISBN/ISSN code in /contrib/isbn_issn
29578 Allow NOT LIKE, IN, NOT IN, BETWEEN, and NOT BETWEEN constraint(Thomas)
29579 New rewrite system fixes many problems with rules and views(Jan)
29580        * Rules on relations work
29581        * Event qualifications on insert/update/delete work
29582        * New OLD variable to reference CURRENT, CURRENT will be remove in future
29583        * Update rules can reference NEW and OLD in rule qualifications/actions
29584        * Insert/update/delete rules on views work
29585        * Multiple rule actions are now supported, surrounded by parentheses
29586        * Regular users can create views/rules on tables they have RULE permits
29587        * Rules and views inherit the privileges of the creator
29588        * No rules at the column level
29589        * No UPDATE NEW/OLD rules
29590        * New pg_tables, pg_indexes, pg_rules and pg_views system views
29591        * Only a single action on SELECT rules
29592        * Total rewrite overhaul, perhaps for 6.5
29593        * handle subselects
29594        * handle aggregates on views
29595        * handle insert into select from view works
29596 System indexes are now multikey(Bruce)
29597 Oidint2, oidint4, and oidname types are removed(Bruce)
29598 Use system cache for more system table lookups(Bruce)
29599 New backend programming language PL/pgSQL in backend/pl(Jan)
29600 New SERIAL data type, auto-creates sequence/index(Thomas)
29601 Enable assert checking without a recompile(Massimo)
29602 User lock enhancements(Massimo)
29603 New setval() command to set sequence value(Massimo)
29604 Auto-remove unix socket file on start-up if no postmaster running(Massimo)
29605 Conditional trace package(Massimo)
29606 New UNLISTEN command(Massimo)
29607 psql and libpq now compile under Windows using win32.mak(Magnus)
29608 Lo_read no longer stores trailing NULL(Bruce)
29609 Identifiers are now truncated to 31 characters internally(Bruce)
29610 Createuser options now available on the command line
29611 Code for 64-bit integer supported added, configure tested, int8 type(Thomas)
29612 Prevent file descriptor leaf from failed COPY(Bruce)
29613 New pg_upgrade command(Bruce)
29614 Updated /contrib directories(Massimo)
29615 New CREATE TABLE DEFAULT VALUES statement available(Thomas)
29616 New INSERT INTO TABLE DEFAULT VALUES statement available(Thomas)
29617 New DECLARE and FETCH feature(Thomas)
29618 libpq's internal structures now not exported(Tom)
29619 Allow up to 8 key indexes(Bruce)
29620 Remove ARCHIVE key word, that is no longer used(Thomas)
29621 pg_dump -n flag to suppress quotes around indentifiers
29622 disable system columns for views(Jan)
29623 new INET and CIDR types for network addresses(TomH, Paul)
29624 no more double quotes in psql output
29625 pg_dump now dumps views(Terry)
29626 new SET QUERY_LIMIT(Tatsuo,Jan)
29627
29628 Source Tree Changes
29629 -------------------
29630 /contrib cleanup(Jun)
29631 Inline some small functions called for every row(Bruce)
29632 Alpha/linux fixes
29633 HP-UX cleanups(Tom)
29634 Multibyte regression tests(Soonmyung.)
29635 Remove --disabled options from configure
29636 Define PGDOC to use POSTGRESDIR by default
29637 Make regression optional
29638 Remove extra braces code to pgindent(Bruce)
29639 Add bsdi shared library support(Bruce)
29640 New --without-CXX support configure option(Brook)
29641 New FAQ_CVS
29642 Update backend flowchart in tools/backend(Bruce)
29643 Change atttypmod from int16 to int32(Bruce, Tom)
29644 Getrusage() fix for platforms that do not have it(Tom)
29645 Add PQconnectdb, PGUSER, PGPASSWORD to libpq man page
29646 NS32K platform fixes(Phil Nelson, John Buller)
29647 SCO 7/UnixWare 2.x fixes(Billy,others)
29648 Sparc/Solaris 2.5 fixes(Ryan)
29649 Pgbuiltin.3 is obsolete, move to doc files(Thomas)
29650 Even more documentation(Thomas)
29651 Nextstep support(Jacek)
29652 Aix support(David)
29653 pginterface manual page(Bruce)
29654 shared libraries all have version numbers
29655 merged all OS-specific shared library defines into one file
29656 smarter TCL/TK configuration checking(Billy)
29657 smarter perl configuration(Brook)
29658 configure uses supplied install-sh if no install script found(Tom)
29659 new Makefile.shlib for shared library configuration(Tom)
29660 </programlisting>
29661 </para>
29662 </sect2>
29663 </sect1>
29664
29665 <sect1 id="release-6-3-2">
29666 <title>Release 6.3.2</title>
29667
29668   <note>
29669   <title>Release date</title>
29670   <simpara>1998-04-07</simpara>
29671   </note>
29672
29673 <para>
29674 This is a bug-fix release for 6.3.x.
29675 Refer to the release notes for version 6.3 for a more complete summary of new features.
29676 </para>
29677 <para>
29678 Summary:
29679
29680 <itemizedlist>
29681 <listitem>
29682 <para>
29683 Repairs automatic configuration support for some platforms, including Linux,
29684 from breakage inadvertently introduced in version 6.3.1.
29685 </para>
29686 </listitem>
29687
29688 <listitem>
29689 <para>
29690 Correctly handles function calls on the left side of BETWEEN and LIKE clauses.
29691 </para>
29692 </listitem>
29693
29694 </itemizedlist>
29695 </para>
29696 <para>
29697 A dump/restore is NOT required for those running 6.3 or 6.3.1.  A
29698 <literal>make distclean</>, <literal>make</>, and <literal>make install</> is all that is required.
29699 This last step should be performed while the postmaster is not running.
29700 You should re-link any custom applications that use <productname>PostgreSQL</productname> libraries.
29701 </para>
29702 <para>
29703 For upgrades from pre-6.3 installations,
29704 refer to the installation and migration instructions for version 6.3.
29705 </para>
29706
29707   <sect2>
29708    <title>Changes</title>
29709
29710    <para>
29711     <programlisting>
29712 Configure detection improvements for tcl/tk(Brook Milligan, Alvin)
29713 Manual page improvements(Bruce)
29714 BETWEEN and LIKE fix(Thomas)
29715 fix for psql \connect used by pg_dump(Oliver Elphick)
29716 New odbc driver
29717 pgaccess, version 0.86
29718 qsort removed, now uses libc version, cleanups(Jeroen)
29719 fix for buffer over-runs detected(Maurice Gittens)
29720 fix for buffer overrun in libpgtcl(Randy Kunkee)
29721 fix for UNION with DISTINCT or ORDER BY(Bruce)
29722 gettimeofday configure check(Doug Winterburn)
29723 Fix "indexes not used" bug(Vadim)
29724 docs additions(Thomas)
29725 Fix for backend memory leak(Bruce)
29726 libreadline cleanup(Erwan MAS)
29727 Remove DISTDIR(Bruce)
29728 Makefile dependency cleanup(Jeroen van Vianen)
29729 ASSERT fixes(Bruce)
29730     </programlisting>
29731    </para>
29732   </sect2>
29733  </sect1>
29734
29735  <sect1 id="release-6-3-1">
29736   <title>Release 6.3.1</title>
29737
29738   <note>
29739   <title>Release date</title>
29740   <simpara>1998-03-23</simpara>
29741   </note>
29742
29743   <para>
29744    Summary:
29745
29746 <itemizedlist>
29747 <listitem>
29748 <para>
29749 Additional support for multibyte character sets.
29750 </para>
29751 </listitem>
29752
29753 <listitem>
29754 <para>
29755 Repair byte ordering for mixed-endian clients and servers.
29756 </para>
29757 </listitem>
29758
29759 <listitem>
29760 <para>
29761 Minor updates to allowed SQL syntax.
29762 </para>
29763 </listitem>
29764
29765 <listitem>
29766 <para>
29767 Improvements to the configuration autodetection for installation.
29768 </para>
29769 </listitem>
29770
29771 </itemizedlist>
29772 </para>
29773 <para>
29774 A dump/restore is NOT required for those running 6.3.  A
29775 <literal>make distclean</>, <literal>make</>, and <literal>make install</> is all that is required.
29776 This last step should be performed while the postmaster is not running.
29777 You should re-link any custom applications that use <productname>PostgreSQL</productname> libraries.
29778 </para>
29779 <para>
29780 For upgrades from pre-6.3 installations,
29781 refer to the installation and migration instructions for version 6.3.
29782 </para>
29783
29784   <sect2>
29785    <title>Changes</title>
29786
29787    <para>
29788     <programlisting>
29789 ecpg cleanup/fixes, now version 1.1(Michael Meskes)
29790 pg_user cleanup(Bruce)
29791 large object fix for pg_dump and tclsh (alvin)
29792 LIKE fix for multiple adjacent underscores
29793 fix for redefining builtin functions(Thomas)
29794 ultrix4 cleanup
29795 upgrade to pg_access 0.83
29796 updated CLUSTER manual page
29797 multibyte character set support, see doc/README.mb(Tatsuo)
29798 configure --with-pgport fix
29799 pg_ident fix
29800 big-endian fix for backend communications(Kataoka)
29801 SUBSTR() and substring() fix(Jan)
29802 several jdbc fixes(Peter)
29803 libpgtcl improvements, see libptcl/README(Randy Kunkee)
29804 Fix for "Datasize = 0" error(Vadim)
29805 Prevent \do from wrapping(Bruce)
29806 Remove duplicate Russian character set entries
29807 Sunos4 cleanup
29808 Allow optional TABLE key word in LOCK and SELECT INTO(Thomas)
29809 CREATE SEQUENCE options to allow a negative integer(Thomas)
29810 Add "PASSWORD" as an allowed column identifier(Thomas)
29811 Add checks for UNION target fields(Bruce)
29812 Fix Alpha port(Dwayne Bailey)
29813 Fix for text arrays containing quotes(Doug Gibson)
29814 Solaris compile fix(Albert Chin-A-Young)
29815 Better identify tcl and tk libs and includes(Bruce)
29816     </programlisting>
29817    </para>
29818   </sect2>
29819  </sect1>
29820
29821  <sect1 id="release-6-3">
29822   <title>Release 6.3</title>
29823
29824   <note>
29825   <title>Release date</title>
29826   <simpara>1998-03-01</simpara>
29827   </note>
29828
29829   <para>
29830    There are <emphasis>many</emphasis> new features and improvements in this release.
29831    Here is a brief, incomplete summary:
29832
29833    <itemizedlist>
29834     <listitem>
29835      <para>
29836       Many new SQL features, including
29837       full <acronym>SQL92</acronym> subselect capability
29838       (everything is here but target-list subselects).
29839      </para>
29840     </listitem>
29841
29842     <listitem>
29843      <para>
29844       Support for client-side environment variables to specify time zone and date style.
29845      </para>
29846     </listitem>
29847
29848     <listitem>
29849      <para>
29850       Socket interface for client/server connection. This is the default now
29851       so you might need to start <application>postmaster</application> with the
29852       <option>-i</option> flag.
29853      </para>
29854     </listitem>
29855
29856     <listitem>
29857      <para>
29858       Better password authorization mechanisms. Default table privileges have changed.
29859      </para>
29860     </listitem>
29861
29862     <listitem>
29863      <para>
29864       Old-style <firstterm>time travel</firstterm>
29865       has been removed. Performance has been improved.
29866      </para>
29867     </listitem>
29868    </itemizedlist>
29869   </para>
29870
29871   <note>
29872    <para>
29873     Bruce Momjian wrote the following notes to introduce the new release.
29874    </para>
29875   </note>
29876
29877   <para>
29878    There are some general 6.3 issues that I want to mention.  These are
29879    only the big items that cannot be described in one sentence.  A review
29880    of the detailed changes list is still needed.
29881   </para>
29882   <para>
29883    First, we now have subselects.  Now that we have them, I would like to
29884    mention that without subselects, SQL is a very limited language.
29885    Subselects are a major feature, and you should review your code for
29886    places where subselects provide a better solution for your queries.  I
29887    think you will find that there are more uses for subselects than you might
29888    think.  Vadim has put us on the big SQL map with subselects, and fully
29889    functional ones too.  The only thing you cannot do with subselects is to
29890    use them in the target list.
29891   </para>
29892   <para>
29893    Second, 6.3 uses Unix domain sockets rather than TCP/IP by default.  To
29894    enable connections from other machines, you have to use the new
29895    postmaster -i option, and of course edit <filename>pg_hba.conf</filename>.  Also, for this
29896    reason, the format of <filename>pg_hba.conf</filename> has changed.
29897   </para>
29898   <para>
29899    Third, <type>char()</type> fields will now allow faster access than <type>varchar()</type> or
29900    <type>text</type>. Specifically, the <type>text</> and <type>varchar()</type> have a penalty for access to
29901    any columns after the first column of this type.  <type>char()</type> used to also
29902    have this access penalty, but it no longer does.  This might suggest that
29903    you redesign some of your tables, especially if you have short character
29904    columns that you have defined as <type>varchar()</type> or <type>text</type>.  This and other
29905    changes make 6.3 even faster than earlier releases.
29906   </para>
29907   <para>
29908    We now have passwords definable independent of any Unix file.  There are
29909    new SQL USER commands.
29910    See the <citetitle>Administrator's Guide</citetitle> for more
29911    information.  There is a new table, pg_shadow, which is used to store
29912    user information and user passwords, and it by default only SELECT-able
29913    by the <systemitem>postgres</systemitem> super-user.  pg_user is now a view of pg_shadow, and is
29914    SELECT-able by PUBLIC.  You should keep using pg_user in your
29915    application without changes.
29916   </para>
29917   <para>
29918    User-created tables now no longer have SELECT privilege to PUBLIC by
29919    default.  This was done because the ANSI standard requires it.  You can
29920    of course GRANT any privileges you want after the table is created.
29921    System tables continue to be SELECT-able by PUBLIC.
29922   </para>
29923   <para>
29924    We also have real deadlock detection code.  No more sixty-second
29925    timeouts.  And the new locking code implements a <acronym>FIFO</acronym> better, so there
29926    should be less resource starvation during heavy use.
29927   </para>
29928   <para>
29929    Many complaints have been made about inadequate documentation in previous
29930    releases.  Thomas has put much effort into many new manuals for this
29931    release.  Check out the doc/ directory.
29932   </para>
29933   <para>
29934    For performance reasons, time travel is gone, but can be implemented
29935    using triggers (see <filename>pgsql/contrib/spi/README</filename>).  Please check out the new
29936    \d command for types, operators, etc.  Also, views have their own
29937    privileges now, not based on the underlying tables, so privileges on
29938    them have to be set separately.  Check <filename>/pgsql/interfaces</filename> for some new
29939    ways to talk to <productname>PostgreSQL</productname>.
29940   </para>
29941   <para>
29942    This is the first release that really required an explanation for
29943    existing users.  In many ways, this was necessary because the new
29944    release removes many limitations, and the work-arounds people were using
29945    are no longer needed.
29946   </para>
29947
29948   <sect2>
29949    <title>Migration to Version 6.3</title>
29950
29951    <para>
29952     A dump/restore using <application>pg_dump</application>
29953     or <application>pg_dumpall</application>
29954     is required for those wishing to migrate data from any
29955     previous release of <productname>PostgreSQL</productname>.
29956    </para>
29957   </sect2>
29958
29959   <sect2>
29960    <title>Changes</title>
29961
29962    <para>
29963     <programlisting>
29964 Bug Fixes
29965 ---------
29966 Fix binary cursors broken by MOVE implementation(Vadim)
29967 Fix for tcl library crash(Jan)
29968 Fix for array handling, from Gerhard Hintermayer
29969 Fix acl error, and remove duplicate pqtrace(Bruce)
29970 Fix psql \e for empty file(Bruce)
29971 Fix for textcat on varchar() fields(Bruce)
29972 Fix for DBT Sendproc (Zeugswetter Andres)
29973 Fix vacuum analyze syntax problem(Bruce)
29974 Fix for international identifiers(Tatsuo)
29975 Fix aggregates on inherited tables(Bruce)
29976 Fix substr() for out-of-bounds data
29977 Fix for select 1=1 or 2=2, select 1=1 and 2=2, and select sum(2+2)(Bruce)
29978 Fix notty output to show status result.  -q option still turns it off(Bruce)
29979 Fix for count(*), aggs with views and multiple tables and sum(3)(Bruce)
29980 Fix cluster(Bruce)
29981 Fix for PQtrace start/stop several times(Bruce)
29982 Fix a variety of locking problems like newer lock waiters getting
29983        lock before older waiters, and having readlock people not share
29984        locks if a writer is waiting for a lock, and waiting writers not
29985        getting priority over waiting readers(Bruce)
29986 Fix crashes in psql when executing queries from external files(James)
29987 Fix problem with multiple order by columns, with the first one having
29988        NULL values(Jeroen)
29989 Use correct hash table support functions for float8 and int4(Thomas)
29990 Re-enable JOIN= option in CREATE OPERATOR statement (Thomas)
29991 Change precedence for boolean operators to match expected behavior(Thomas)
29992 Generate elog(ERROR) on over-large integer(Bruce)
29993 Allow multiple-argument functions in constraint clauses(Thomas)
29994 Check boolean input literals for 'true','false','yes','no','1','0'
29995        and throw elog(ERROR) if unrecognized(Thomas)
29996 Major large objects fix
29997 Fix for GROUP BY showing duplicates(Vadim)
29998 Fix for index scans in MergeJoin(Vadim)
29999
30000 Enhancements
30001 ------------
30002 Subselects with EXISTS, IN, ALL, ANY key words (Vadim, Bruce, Thomas)
30003 New User Manual(Thomas, others)
30004 Speedup by inlining some frequently-called functions
30005 Real deadlock detection, no more timeouts(Bruce)
30006 Add SQL92 "constants" CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP,
30007        CURRENT_USER(Thomas)
30008 Modify constraint syntax to be SQL92-compliant(Thomas)
30009 Implement SQL92 PRIMARY KEY and UNIQUE clauses using indexes(Thomas)
30010 Recognize SQL92 syntax for FOREIGN KEY. Throw elog notice(Thomas)
30011 Allow NOT NULL UNIQUE constraint clause (each allowed separately before)(Thomas)
30012 Allow PostgreSQL-style casting ("::") of non-constants(Thomas)
30013 Add support for SQL3 TRUE and FALSE boolean constants(Thomas)
30014 Support SQL92 syntax for IS TRUE/IS FALSE/IS NOT TRUE/IS NOT FALSE(Thomas)
30015 Allow shorter strings for boolean literals (e.g. "t", "tr", "tru")(Thomas)
30016 Allow SQL92 delimited identifiers(Thomas)
30017 Implement SQL92 binary and hexadecimal string decoding (b'10' and x'1F')(Thomas)
30018 Support SQL92 syntax for type coercion of literal strings
30019        (e.g. "DATETIME 'now'")(Thomas)
30020 Add conversions for int2, int4, and OID types to and from text(Thomas)
30021 Use shared lock when building indexes(Vadim)
30022 Free memory allocated for an user query inside transaction block after
30023        this query is done, was turned off in &lt;= 6.2.1(Vadim)
30024 New SQL statement CREATE PROCEDURAL LANGUAGE(Jan)
30025 New <productname>PostgreSQL</productname> Procedural Language (PL) backend interface(Jan)
30026 Rename pg_dump -H option to -h(Bruce)
30027 Add Java support for passwords, European dates(Peter)
30028 Use indexes for LIKE and ~, !~ operations(Bruce)
30029 Add hash functions for datetime and timespan(Thomas)
30030 Time Travel removed(Vadim, Bruce)
30031 Add paging for \d and \z, and fix \i(Bruce)
30032 Add Unix domain socket support to backend and to frontend library(Goran)
30033 Implement CREATE DATABASE/WITH LOCATION and initlocation utility(Thomas)
30034 Allow more SQL92 and/or <productname>PostgreSQL</productname> reserved words as column identifiers(Thomas)
30035 Augment support for SQL92 SET TIME ZONE...(Thomas)
30036 SET/SHOW/RESET TIME ZONE uses TZ backend environment variable(Thomas)
30037 Implement SET keyword = DEFAULT and SET TIME ZONE DEFAULT(Thomas)
30038 Enable SET TIME ZONE using TZ environment variable(Thomas)
30039 Add PGDATESTYLE environment variable to frontend and backend initialization(Thomas)
30040 Add PGTZ, PGCOSTHEAP, PGCOSTINDEX, PGRPLANS, PGGEQO
30041        frontend library initialization environment variables(Thomas)
30042 Regression tests time zone automatically set with "setenv PGTZ PST8PDT"(Thomas)
30043 Add pg_description table for info on tables, columns, operators, types, and
30044        aggregates(Bruce)
30045 Increase 16 char limit on system table/index names to 32 characters(Bruce)
30046 Rename system indexes(Bruce)
30047 Add 'GERMAN' option to SET DATESTYLE(Thomas)
30048 Define an "ISO-style" timespan output format with "hh:mm:ss" fields(Thomas)
30049 Allow fractional values for delta times (e.g. '2.5 days')(Thomas)
30050 Validate numeric input more carefully for delta times(Thomas)
30051 Implement day of year as possible input to date_part()(Thomas)
30052 Define timespan_finite() and text_timespan() functions(Thomas)
30053 Remove archive stuff(Bruce)
30054 Allow for a pg_password authentication database that is separate from
30055        the system password file(Todd)
30056 Dump ACLs, GRANT, REVOKE privileges(Matt)
30057 Define text, varchar, and bpchar string length functions(Thomas)
30058 Fix Query handling for inheritance, and cost computations(Bruce)
30059 Implement CREATE TABLE/AS SELECT (alternative to SELECT/INTO)(Thomas)
30060 Allow NOT, IS NULL, IS NOT NULL in constraints(Thomas)
30061 Implement UNIONs for SELECT(Bruce)
30062 Add UNION, GROUP, DISTINCT to INSERT(Bruce)
30063 varchar() stores only necessary bytes on disk(Bruce)
30064 Fix for BLOBs(Peter)
30065 Mega-Patch for JDBC...see README_6.3 for list of changes(Peter)
30066 Remove unused "option" from PQconnectdb()
30067 New LOCK command and lock manual page describing deadlocks(Bruce)
30068 Add new psql \da, \dd, \df, \do, \dS, and \dT commands(Bruce)
30069 Enhance psql \z to show sequences(Bruce)
30070 Show NOT NULL and DEFAULT in psql \d table(Bruce)
30071 New psql .psqlrc file start-up(Andrew)
30072 Modify sample start-up script in contrib/linux to show syslog(Thomas)
30073 New types for IP and MAC addresses in contrib/ip_and_mac(TomH)
30074 Unix system time conversions with date/time types in contrib/unixdate(Thomas)
30075 Update of contrib stuff(Massimo)
30076 Add Unix socket support to DBD::Pg(Goran)
30077 New python interface (PyGreSQL 2.0)(D'Arcy)
30078 New frontend/backend protocol has a version number, network byte order(Phil)
30079 Security features in pg_hba.conf enhanced and documented, many cleanups(Phil)
30080 CHAR() now faster access than VARCHAR() or TEXT
30081 ecpg embedded SQL preprocessor
30082 Reduce system column overhead(Vadmin)
30083 Remove pg_time table(Vadim)
30084 Add pg_type attribute to identify types that need length (bpchar, varchar)
30085 Add report of offending line when COPY command fails
30086 Allow VIEW privileges to be set separately from the underlying tables.
30087        For security, use GRANT/REVOKE on views as appropriate(Jan)
30088 Tables now have no default GRANT SELECT TO PUBLIC.  You must
30089        explicitly grant such privileges.
30090 Clean up tutorial examples(Darren)
30091
30092 Source Tree Changes
30093 -------------------
30094 Add new html development tools, and flow chart in /tools/backend
30095 Fix for SCO compiles
30096 Stratus computer port Robert Gillies
30097 Added support for shlib for BSD44_derived &amp; i386_solaris
30098 Make configure more automated(Brook)
30099 Add script to check regression test results
30100 Break parser functions into smaller files, group together(Bruce)
30101 Rename heap_create to heap_create_and_catalog, rename heap_creatr
30102        to heap_create()(Bruce)
30103 Sparc/Linux patch for locking(TomS)
30104 Remove PORTNAME and reorganize port-specific stuff(Marc)
30105 Add optimizer README file(Bruce)
30106 Remove some recursion in optimizer and clean up some code there(Bruce)
30107 Fix for NetBSD locking(Henry)
30108 Fix for libptcl make(Tatsuo)
30109 AIX patch(Darren)
30110 Change IS TRUE, IS FALSE, ... to expressions using "=" rather than
30111        function calls to istrue() or isfalse() to allow optimization(Thomas)
30112 Various fixes NetBSD/Sparc related(TomH)
30113 Alpha linux locking(Travis,Ryan)
30114 Change elog(WARN) to elog(ERROR)(Bruce)
30115 FAQ for FreeBSD(Marc)
30116 Bring in the PostODBC source tree as part of our standard distribution(Marc)
30117 A minor patch for HP/UX 10 vs 9(Stan)
30118 New pg_attribute.atttypmod for type-specific info like varchar length(Bruce)
30119 UnixWare patches(Billy)
30120 New i386 'lock' for spinlock asm(Billy)
30121 Support for multiplexed backends is removed
30122 Start an OpenBSD port
30123 Start an AUX port
30124 Start a Cygnus port
30125 Add string functions to regression suite(Thomas)
30126 Expand a few function names formerly truncated to 16 characters(Thomas)
30127 Remove un-needed malloc() calls and replace with palloc()(Bruce)
30128 </programlisting>
30129 </para>
30130 </sect2>
30131 </sect1>
30132
30133 <sect1 id="release-6-2-1">
30134 <title>Release 6.2.1</title>
30135
30136   <note>
30137   <title>Release date</title>
30138   <simpara>1997-10-17</simpara>
30139   </note>
30140
30141 <para>
30142 6.2.1 is a bug-fix and usability release on 6.2.
30143 </para>
30144 <para>
30145 Summary:
30146
30147 <itemizedlist>
30148 <listitem>
30149 <para>
30150 Allow strings to span lines, per <acronym>SQL92</acronym>.
30151 </para>
30152 </listitem>
30153
30154 <listitem>
30155 <para>
30156 Include example trigger function for inserting user names on table updates.
30157 </para>
30158 </listitem>
30159
30160 </itemizedlist>
30161 </para>
30162 <para>
30163 This is a minor bug-fix release on 6.2.
30164 For upgrades from pre-6.2 systems, a full dump/reload is required.
30165 Refer to the 6.2 release notes for instructions.
30166 </para>
30167
30168 <sect2>
30169 <title>Migration from version 6.2 to version 6.2.1</title>
30170
30171 <para>
30172 This is a minor bug-fix release. A dump/reload is not required from version 6.2,
30173 but is required from any release prior to 6.2.
30174 </para>
30175 <para>
30176 In upgrading from version 6.2, if you choose to dump/reload you will find that
30177 avg(money) is now calculated correctly. All other bug fixes take effect
30178 upon updating the executables.
30179 </para>
30180 <para>
30181 Another way to avoid dump/reload is to use the following SQL command
30182 from <command>psql</command> to update the existing system table:
30183
30184 <programlisting>
30185  update pg_aggregate set aggfinalfn = 'cash_div_flt8'
30186   where aggname = 'avg' and aggbasetype = 790;
30187 </programlisting>
30188 </para>
30189 <para>
30190 This will need to be done to every existing database, including template1.
30191 </para>
30192 </sect2>
30193
30194   <sect2>
30195    <title>Changes</title>
30196
30197    <para>
30198     <programlisting>
30199 Allow TIME and TYPE column names(Thomas)
30200 Allow larger range of true/false as boolean values(Thomas)
30201 Support output of "now" and "current"(Thomas)
30202 Handle DEFAULT with INSERT of NULL properly(Vadim)
30203 Fix for relation reference counts problem in buffer manager(Vadim)
30204 Allow strings to span lines, like ANSI(Thomas)
30205 Fix for backward cursor with ORDER BY(Vadim)
30206 Fix avg(cash) computation(Thomas)
30207 Fix for specifying a column twice in ORDER/GROUP BY(Vadim)
30208 Documented new libpq function to return affected rows, PQcmdTuples(Bruce)
30209 Trigger function for inserting user names for INSERT/UPDATE(Brook Milligan)
30210     </programlisting>
30211    </para>
30212   </sect2>
30213  </sect1>
30214
30215 <sect1 id="release-6-2">
30216 <title>Release 6.2</title>
30217
30218   <note>
30219   <title>Release date</title>
30220   <simpara>1997-10-02</simpara>
30221   </note>
30222
30223 <para>
30224 A dump/restore is required for those wishing to migrate data from
30225 previous releases of <productname>PostgreSQL</productname>.
30226 </para>
30227
30228 <sect2>
30229 <title>Migration from version 6.1 to version 6.2</title>
30230
30231 <para>
30232 This migration requires a complete dump of the 6.1 database and a
30233 restore of the database in 6.2.
30234 </para>
30235 <para>
30236 Note that the <command>pg_dump</command> and <command>pg_dumpall</command> utility from 6.2 should be used
30237 to dump the 6.1 database.
30238 </para>
30239 </sect2>
30240
30241 <sect2>
30242 <title>Migration from version 1.<replaceable>x</> to version 6.2</title>
30243
30244 <para>
30245 Those migrating from earlier 1.* releases should first upgrade to 1.09
30246 because the COPY output format was improved from the 1.02 release.
30247 </para>
30248 </sect2>
30249
30250   <sect2>
30251    <title>Changes</title>
30252
30253    <para>
30254     <programlisting>
30255 Bug Fixes
30256 ---------
30257 Fix problems with pg_dump for inheritance, sequences, archive tables(Bruce)
30258 Fix compile errors on overflow due to shifts, unsigned, and bad prototypes
30259         from Solaris(Diab Jerius)
30260 Fix bugs in geometric line arithmetic (bad intersection calculations)(Thomas)
30261 Check for geometric intersections at endpoints to avoid rounding ugliness(Thomas)
30262 Catch non-functional delete attempts(Vadim)
30263 Change time function names to be more consistent(Michael Reifenberg)
30264 Check for zero divides(Michael Reifenberg)
30265 Fix very old bug which made rows changed/inserted by a command
30266        visible to the command itself (so we had multiple update of
30267        updated rows, etc.)(Vadim)
30268 Fix for SELECT null, 'fail' FROM pg_am (Patrick)
30269 SELECT NULL as EMPTY_FIELD now allowed(Patrick)
30270 Remove un-needed signal stuff from contrib/pginterface
30271 Fix OR (where x != 1 or x isnull didn't return rows with x NULL) (Vadim)
30272 Fix time_cmp function (Vadim)
30273 Fix handling of functions with non-attribute first argument in
30274        WHERE clauses (Vadim)
30275 Fix GROUP BY when order of entries is different from order
30276        in target list (Vadim)
30277 Fix pg_dump for aggregates without sfunc1 (Vadim)
30278
30279 Enhancements
30280 ------------
30281 Default genetic optimizer GEQO parameter is now 8(Bruce)
30282 Allow use parameters in target list having aggregates in functions(Vadim)
30283 Added JDBC driver as an interface(Adrian &amp; Peter)
30284 pg_password utility
30285 Return number of rows inserted/affected by INSERT/UPDATE/DELETE etc.(Vadim)
30286 Triggers implemented with CREATE TRIGGER (SQL3)(Vadim)
30287 SPI (Server Programming Interface) allows execution of queries inside
30288        C-functions (Vadim)
30289 NOT NULL implemented (SQL92)(Robson Paniago de Miranda)
30290 Include reserved words for string handling, outer joins, and unions(Thomas)
30291 Implement extended comments ("/* ... */") using exclusive states(Thomas)
30292 Add "//" single-line comments(Bruce)
30293 Remove some restrictions on characters in operator names(Thomas)
30294 DEFAULT and CONSTRAINT for tables implemented (SQL92)(Vadim &amp; Thomas)
30295 Add text concatenation operator and function (SQL92)(Thomas)
30296 Support WITH TIME ZONE syntax (SQL92)(Thomas)
30297 Support INTERVAL unit TO unit syntax (SQL92)(Thomas)
30298 Define types DOUBLE PRECISION, INTERVAL, CHARACTER,
30299        and CHARACTER VARYING (SQL92)(Thomas)
30300 Define type FLOAT(p) and rudimentary DECIMAL(p,s), NUMERIC(p,s) (SQL92)(Thomas)
30301 Define EXTRACT(), POSITION(), SUBSTRING(), and TRIM() (SQL92)(Thomas)
30302 Define CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP (SQL92)(Thomas)
30303 Add syntax and warnings for UNION, HAVING, INNER and OUTER JOIN (SQL92)(Thomas)
30304 Add more reserved words, mostly for SQL92 compliance(Thomas)
30305 Allow hh:mm:ss time entry for timespan/reltime types(Thomas)
30306 Add center() routines for lseg, path, polygon(Thomas)
30307 Add distance() routines for circle-polygon, polygon-polygon(Thomas)
30308 Check explicitly for points and polygons contained within polygons
30309        using an axis-crossing algorithm(Thomas)
30310 Add routine to convert circle-box(Thomas)
30311 Merge conflicting operators for different geometric data types(Thomas)
30312 Replace distance operator "&lt;===&gt;" with "&lt;-&gt;"(Thomas)
30313 Replace "above" operator "!^" with "&gt;^" and "below" operator "!|" with "&lt;^"(Thomas)
30314 Add routines for text trimming on both ends, substring, and string position(Thomas)
30315 Added conversion routines circle(box) and poly(circle)(Thomas)
30316 Allow internal sorts to be stored in memory rather than in files(Bruce &amp; Vadim)
30317 Allow functions and operators on internally-identical types to succeed(Bruce)
30318 Speed up backend start-up after profiling analysis(Bruce)
30319 Inline frequently called functions for performance(Bruce)
30320 Reduce open() calls(Bruce)
30321 psql:  Add PAGER for \h and \?,\C fix
30322 Fix for psql pager when no tty(Bruce)
30323 New entab utility(Bruce)
30324 General trigger functions for referential integrity (Vadim)
30325 General trigger functions for time travel (Vadim)
30326 General trigger functions for AUTOINCREMENT/IDENTITY feature (Vadim)
30327 MOVE implementation (Vadim)
30328
30329 Source Tree Changes
30330 -------------------
30331 HP-UX 10 patches (Vladimir Turin)
30332 Added SCO support, (Daniel Harris)
30333 MkLinux patches (Tatsuo Ishii)
30334 Change geometric box terminology from "length" to "width"(Thomas)
30335 Deprecate temporary unstored slope fields in geometric code(Thomas)
30336 Remove restart instructions from INSTALL(Bruce)
30337 Look in /usr/ucb first for install(Bruce)
30338 Fix c++ copy example code(Thomas)
30339 Add -o to psql manual page(Bruce)
30340 Prevent relname unallocated string length from being copied into database(Bruce)
30341 Cleanup for NAMEDATALEN use(Bruce)
30342 Fix pg_proc names over 15 chars in output(Bruce)
30343 Add strNcpy() function(Bruce)
30344 remove some (void) casts that are unnecessary(Bruce)
30345 new interfaces directory(Marc)
30346 Replace fopen() calls with calls to fd.c functions(Bruce)
30347 Make functions static where possible(Bruce)
30348 enclose unused functions in #ifdef NOT_USED(Bruce)
30349 Remove call to difftime() in timestamp support to fix SunOS(Bruce &amp; Thomas)
30350 Changes for Digital Unix
30351 Portability fix for pg_dumpall(Bruce)
30352 Rename pg_attribute.attnvals to attdispersion(Bruce)
30353 "intro/unix" manual page now "pgintro"(Bruce)
30354 "built-in" manual page now "pgbuiltin"(Bruce)
30355 "drop" manual page now "drop_table"(Bruce)
30356 Add "create_trigger", "drop_trigger" manual pages(Thomas)
30357 Add constraints regression test(Vadim &amp; Thomas)
30358 Add comments syntax regression test(Thomas)
30359 Add PGINDENT and support program(Bruce)
30360 Massive commit to run PGINDENT on all *.c and *.h files(Bruce)
30361 Files moved to /src/tools directory(Bruce)
30362 SPI and Trigger programming guides (Vadim &amp; D'Arcy)
30363 </programlisting>
30364 </para>
30365 </sect2>
30366 </sect1>
30367
30368 <sect1 id="release-6-1-1">
30369 <title>Release 6.1.1</title>
30370
30371   <note>
30372   <title>Release date</title>
30373   <simpara>1997-07-22</simpara>
30374   </note>
30375
30376 <sect2>
30377 <title>Migration from version 6.1 to version 6.1.1</title>
30378
30379 <para>
30380 This is a minor bug-fix release. A dump/reload is not required from version 6.1,
30381 but is required from any release prior to 6.1.
30382 Refer to the release notes for 6.1 for more details.
30383 </para>
30384 </sect2>
30385
30386   <sect2>
30387    <title>Changes</title>
30388
30389    <para>
30390     <programlisting>
30391 fix for SET with options (Thomas)
30392 allow pg_dump/pg_dumpall to preserve ownership of all tables/objects(Bruce)
30393 new psql \connect option allows changing usernames without changing databases
30394 fix for initdb --debug option(Yoshihiko Ichikawa))
30395 lextest cleanup(Bruce)
30396 hash fixes(Vadim)
30397 fix date/time month boundary arithmetic(Thomas)
30398 fix timezone daylight handling for some ports(Thomas, Bruce, Tatsuo)
30399 timestamp overhauled to use standard functions(Thomas)
30400 other code cleanup in date/time routines(Thomas)
30401 psql's \d now case-insensitive(Bruce)
30402 psql's backslash commands can now have trailing semicolon(Bruce)
30403 fix memory leak in psql when using \g(Bruce)
30404 major fix for endian handling of communication to server(Thomas, Tatsuo)
30405 Fix for Solaris assembler and include files(Yoshihiko Ichikawa)
30406 allow underscores in usernames(Bruce)
30407 pg_dumpall now returns proper status, portability fix(Bruce)
30408     </programlisting>
30409    </para>
30410   </sect2>
30411  </sect1>
30412
30413 <sect1 id="release-6-1">
30414 <title>Release 6.1</title>
30415
30416   <note>
30417   <title>Release date</title>
30418   <simpara>1997-06-08</simpara>
30419   </note>
30420
30421 <para>
30422  The regression tests have been adapted and extensively modified for the
30423  6.1 release of <productname>PostgreSQL</productname>.
30424 </para>
30425
30426 <para>
30427  Three new data types (<type>datetime</type>, <type>timespan</type>, and <type>circle</type>) have been added to
30428  the native set of <productname>PostgreSQL</productname> types. Points, boxes, paths, and polygons
30429  have had their output formats made consistent across the data types.
30430  The polygon output in misc.out has only been spot-checked for correctness
30431  relative to the original regression output.
30432 </para>
30433
30434 <para>
30435  <productname>PostgreSQL</productname> 6.1 introduces a new, alternate
30436 optimizer which uses <firstterm>genetic</firstterm>
30437  algorithms. These algorithms introduce a random behavior in the ordering
30438  of query results when the query contains multiple qualifiers or multiple
30439  tables (giving the optimizer a choice on order of evaluation). Several
30440  regression tests have been modified to explicitly order the results, and
30441  hence are insensitive to optimizer choices. A few regression tests are
30442  for data types which are inherently unordered (e.g. points and time
30443  intervals) and tests involving those types are explicitly bracketed with
30444  <command>set geqo to 'off'</command> and <command>reset geqo</command>.
30445 </para>
30446
30447 <para>
30448  The interpretation of array specifiers (the curly braces around atomic
30449  values) appears to have changed sometime after the original regression
30450  tests were generated. The current <filename>./expected/*.out</filename> files reflect this
30451  new interpretation, which might not be correct!
30452 </para>
30453
30454 <para>
30455  The float8 regression test fails on at least some platforms. This is due
30456  to differences in implementations of <function>pow()</function> and <function>exp()</function> and the signaling
30457  mechanisms used for overflow and underflow conditions.
30458 </para>
30459
30460 <para>
30461  The <quote>random</> results in the random test should cause the
30462  <quote>random</quote> test to be <quote>failed</quote>, since the
30463  regression tests are evaluated using a simple diff. However,
30464  <quote>random</> does not seem to produce random results on my test
30465  machine (Linux/<application>gcc</>/i686).
30466 </para>
30467
30468 <sect2>
30469 <title>Migration to Version 6.1</title>
30470
30471 <para>
30472 This migration requires a complete dump of the 6.0 database and a
30473 restore of the database in 6.1.
30474 </para>
30475 <para>
30476 Those migrating from earlier 1.* releases should first upgrade to 1.09
30477 because the COPY output format was improved from the 1.02 release.
30478 </para>
30479 </sect2>
30480
30481   <sect2>
30482    <title>Changes</title>
30483
30484    <para>
30485     <programlisting>
30486 Bug Fixes
30487 ---------
30488 packet length checking in library routines
30489 lock manager priority patch
30490 check for under/over flow of float8(Bruce)
30491 multitable join fix(Vadim)
30492 SIGPIPE crash fix(Darren)
30493 large object fixes(Sven)
30494 allow btree indexes to handle NULLs(Vadim)
30495 timezone fixes(D'Arcy)
30496 select SUM(x) can return NULL on no rows(Thomas)
30497 internal optimizer, executor bug fixes(Vadim)
30498 fix problem where inner loop in &lt; or &lt;= has no rows(Vadim)
30499 prevent re-commuting join index clauses(Vadim)
30500 fix join clauses for multiple tables(Vadim)
30501 fix hash, hashjoin for arrays(Vadim)
30502 fix btree for abstime type(Vadim)
30503 large object fixes(Raymond)
30504 fix buffer leak in hash indexes (Vadim)
30505 fix rtree for use in inner scan (Vadim)
30506 fix gist for use in inner scan, cleanups (Vadim, Andrea)
30507 avoid unnecessary local buffers allocation (Vadim, Massimo)
30508 fix local buffers leak in transaction aborts (Vadim)
30509 fix file manager memmory leaks, cleanups (Vadim, Massimo)
30510 fix storage manager memmory leaks (Vadim)
30511 fix btree duplicates handling (Vadim)
30512 fix deleted rows reincarnation caused by vacuum (Vadim)
30513 fix SELECT varchar()/char() INTO TABLE made zero-length fields(Bruce)
30514 many psql, pg_dump, and libpq memory leaks fixed using Purify (Igor)
30515
30516 Enhancements
30517 ------------
30518 attribute optimization statistics(Bruce)
30519 much faster new btree bulk load code(Paul)
30520 BTREE UNIQUE added to bulk load code(Vadim)
30521 new lock debug code(Massimo)
30522 massive changes to libpg++(Leo)
30523 new GEQO optimizer speeds table multitable optimization(Martin)
30524 new WARN message for non-unique insert into unique key(Marc)
30525 update x=-3, no spaces, now valid(Bruce)
30526 remove case-sensitive identifier handling(Bruce,Thomas,Dan)
30527 debug backend now pretty-prints tree(Darren)
30528 new Oracle character functions(Edmund)
30529 new plaintext password functions(Dan)
30530 no such class or insufficient privilege changed to distinct messages(Dan)
30531 new ANSI timestamp function(Dan)
30532 new ANSI Time and Date types (Thomas)
30533 move large chunks of data in backend(Martin)
30534 multicolumn btree indexes(Vadim)
30535 new SET var TO value command(Martin)
30536 update transaction status on reads(Dan)
30537 new locale settings for character types(Oleg)
30538 new SEQUENCE serial number generator(Vadim)
30539 GROUP BY function now possible(Vadim)
30540 re-organize regression test(Thomas,Marc)
30541 new optimizer operation weights(Vadim)
30542 new psql \z grant/permit option(Marc)
30543 new MONEY data type(D'Arcy,Thomas)
30544 tcp socket communication speed improved(Vadim)
30545 new VACUUM option for attribute statistics, and for certain columns (Vadim)
30546 many geometric type improvements(Thomas,Keith)
30547 additional regression tests(Thomas)
30548 new datestyle variable(Thomas,Vadim,Martin)
30549 more comparison operators for sorting types(Thomas)
30550 new conversion functions(Thomas)
30551 new more compact btree format(Vadim)
30552 allow pg_dumpall to preserve database ownership(Bruce)
30553 new SET GEQO=# and R_PLANS variable(Vadim)
30554 old (!GEQO) optimizer can use right-sided plans (Vadim)
30555 typechecking improvement in SQL parser(Bruce)
30556 new SET, SHOW, RESET commands(Thomas,Vadim)
30557 new \connect database USER option
30558 new destroydb -i option (Igor)
30559 new \dt and \di psql commands (Darren)
30560 SELECT "\n" now escapes newline (A. Duursma)
30561 new geometry conversion functions from old format (Thomas)
30562
30563 Source tree changes
30564 -------------------
30565 new configuration script(Marc)
30566 readline configuration option added(Marc)
30567 OS-specific configuration options removed(Marc)
30568 new OS-specific template files(Marc)
30569 no more need to edit Makefile.global(Marc)
30570 re-arrange include files(Marc)
30571 nextstep patches (Gregor Hoffleit)
30572 removed Windows-specific code(Bruce)
30573 removed postmaster -e option, now only postgres -e option (Bruce)
30574 merge duplicate library code in front/backends(Martin)
30575 now works with eBones, international Kerberos(Jun)
30576 more shared library support
30577 c++ include file cleanup(Bruce)
30578 warn about buggy flex(Bruce)
30579 DG/UX, Ultrix, IRIX, AIX portability fixes
30580 </programlisting>
30581 </para>
30582 </sect2>
30583 </sect1>
30584
30585 <sect1 id="release-6-0">
30586 <title>Release 6.0</title>
30587
30588   <note>
30589   <title>Release date</title>
30590   <simpara>1997-01-29</simpara>
30591   </note>
30592
30593 <para>
30594 A dump/restore is required for those wishing to migrate data from
30595 previous releases of <productname>PostgreSQL</productname>.
30596 </para>
30597
30598 <sect2>
30599 <title>Migration from version 1.09 to version 6.0</title>
30600
30601 <para>
30602 This migration requires a complete dump of the 1.09 database and a
30603 restore of the database in 6.0.
30604 </para>
30605 </sect2>
30606
30607 <sect2>
30608 <title>Migration from pre-1.09 to version 6.0</title>
30609
30610 <para>
30611 Those migrating from earlier 1.* releases should first upgrade to 1.09
30612 because the COPY output format was improved from the 1.02 release.
30613 </para>
30614 </sect2>
30615
30616   <sect2>
30617    <title>Changes</title>
30618
30619    <para>
30620     <programlisting>
30621 Bug Fixes
30622 ---------
30623 ALTER TABLE bug - running postgres process needs to re-read table definition
30624 Allow vacuum to be run on one table or entire database(Bruce)
30625 Array fixes
30626 Fix array over-runs of memory writes(Kurt)
30627 Fix elusive btree range/non-range bug(Dan)
30628 Fix for hash indexes on some types like time and date
30629 Fix for pg_log size explosion
30630 Fix permissions on lo_export()(Bruce)
30631 Fix uninitialized reads of memory(Kurt)
30632 Fixed ALTER TABLE ... char(3) bug(Bruce)
30633 Fixed a few small memory leaks
30634 Fixed EXPLAIN handling of options and changed full_path option name
30635 Fixed output of group acl privileges
30636 Memory leaks (hunt and destroy with tools like Purify(Kurt)
30637 Minor improvements to rules system
30638 NOTIFY fixes
30639 New asserts for run-checking
30640 Overhauled parser/analyze code to properly report errors and increase speed
30641 Pg_dump -d now handles NULL's properly(Bruce)
30642 Prevent SELECT NULL from crashing server (Bruce)
30643 Properly report errors when INSERT ... SELECT columns did not match
30644 Properly report errors when insert column names were not correct
30645 psql \g filename now works(Bruce)
30646 psql fixed problem with multiple statements on one line with multiple outputs
30647 Removed duplicate system OIDs
30648 SELECT * INTO TABLE . GROUP/ORDER BY gives unlink error if table exists(Bruce)
30649 Several fixes for queries that crashed the backend
30650 Starting quote in insert string errors(Bruce)
30651 Submitting an empty query now returns empty status, not just " " query(Bruce)
30652
30653 Enhancements
30654 ------------
30655 Add EXPLAIN manual page(Bruce)
30656 Add UNIQUE index capability(Dan)
30657 Add hostname/user level access control rather than just hostname and user
30658 Add synonym of != for &lt;&gt;(Bruce)
30659 Allow "select oid,* from table"
30660 Allow BY,ORDER BY to specify columns by number, or by non-alias table.column(Bruce)
30661 Allow COPY from the frontend(Bryan)
30662 Allow GROUP BY to use alias column name(Bruce)
30663 Allow actual compression, not just reuse on the same page(Vadim)
30664 Allow installation-configuration option to auto-add all local users(Bryan)
30665 Allow libpq to distinguish between text value '' and null(Bruce)
30666 Allow non-postgres users with createdb privs to destroydb's
30667 Allow restriction on who can create C functions(Bryan)
30668 Allow restriction on who can do backend COPY(Bryan)
30669 Can shrink tables, pg_time and pg_log(Vadim &amp; Erich)
30670 Change debug level 2 to print queries only, changed debug heading layout(Bruce)
30671 Change default decimal constant representation from float4 to float8(Bruce)
30672 European date format now set when postmaster is started
30673 Execute lowercase function names if not found with exact case
30674 Fixes for aggregate/GROUP processing, allow 'select sum(func(x),sum(x+y) from z'
30675 Gist now included in the distribution(Marc)
30676 Idend authentication of local users(Bryan)
30677 Implement BETWEEN qualifier(Bruce)
30678 Implement IN qualifier(Bruce)
30679 libpq has PQgetisnull()(Bruce)
30680 libpq++ improvements
30681 New options to initdb(Bryan)
30682 Pg_dump allow dump of OIDs(Bruce)
30683 Pg_dump create indexes after tables are loaded for speed(Bruce)
30684 Pg_dumpall dumps all databases, and the user table
30685 Pginterface additions for NULL values(Bruce)
30686 Prevent postmaster from being run as root
30687 psql \h and \? is now readable(Bruce)
30688 psql allow backslashed, semicolons anywhere on the line(Bruce)
30689 psql changed command prompt for lines in query or in quotes(Bruce)
30690 psql char(3) now displays as (bp)char in \d output(Bruce)
30691 psql return code now more accurate(Bryan?)
30692 psql updated help syntax(Bruce)
30693 Re-visit and fix vacuum(Vadim)
30694 Reduce size of regression diffs, remove timezone name difference(Bruce)
30695 Remove compile-time parameters to enable binary distributions(Bryan)
30696 Reverse meaning of HBA masks(Bryan)
30697 Secure Authentication of local users(Bryan)
30698 Speed up vacuum(Vadim)
30699 Vacuum now had VERBOSE option(Bruce)
30700
30701 Source tree changes
30702 -------------------
30703 All functions now have prototypes that are compared against the calls
30704 Allow asserts to be disabled easily from Makefile.global(Bruce)
30705 Change oid constants used in code to #define names
30706 Decoupled sparc and solaris defines(Kurt)
30707 Gcc -Wall compiles cleanly with warnings only from unfixable constructs
30708 Major include file reorganization/reduction(Marc)
30709 Make now stops on compile failure(Bryan)
30710 Makefile restructuring(Bryan, Marc)
30711 Merge bsdi_2_1 to bsdi(Bruce)
30712 Monitor program removed
30713 Name change from Postgres95 to PostgreSQL
30714 New config.h file(Marc, Bryan)
30715 PG_VERSION now set to 6.0 and used by postmaster
30716 Portability additions, including Ultrix, DG/UX, AIX, and Solaris
30717 Reduced the number of #define's, centralized #define's
30718 Remove duplicate OIDS in system tables(Dan)
30719 Remove duplicate system catalog info or report mismatches(Dan)
30720 Removed many os-specific #define's
30721 Restructured object file generation/location(Bryan, Marc)
30722 Restructured port-specific file locations(Bryan, Marc)
30723 Unused/uninitialized variables corrected
30724 </programlisting>
30725 </para>
30726 </sect2>
30727 </sect1>
30728
30729 <sect1 id="release-1-09">
30730 <title>Release 1.09</title>
30731
30732   <note>
30733   <title>Release date</title>
30734   <simpara>1996-11-04</simpara>
30735   </note>
30736
30737 <para>
30738 Sorry, we didn't keep track of changes from 1.02 to 1.09.  Some of
30739 the changes listed in 6.0 were actually included in the 1.02.1 to 1.09
30740 releases.
30741 </para>
30742 </sect1>
30743
30744 <sect1 id="release-1-02">
30745 <title>Release 1.02</title>
30746
30747   <note>
30748   <title>Release date</title>
30749   <simpara>1996-08-01</simpara>
30750   </note>
30751
30752 <sect2>
30753 <title>Migration from version 1.02 to version 1.02.1</title>
30754
30755 <para>
30756 Here is a new migration file for 1.02.1.  It includes the 'copy' change
30757 and a script to convert old <acronym>ASCII</acronym> files.
30758 </para>
30759 <note>
30760 <para>
30761 The following notes are for the benefit of users who want to migrate
30762 databases from <productname>Postgres95</> 1.01 and 1.02 to <productname>Postgres95</> 1.02.1.
30763 </para>
30764 <para>
30765 If you are starting afresh with <productname>Postgres95</> 1.02.1 and do not need
30766 to migrate old databases, you do not need to read any further.
30767 </para>
30768 </note>
30769
30770 <para>
30771 In order to upgrade older <productname>Postgres95</> version 1.01 or 1.02 databases to
30772 version 1.02.1, the following steps are required:
30773 </para>
30774 <procedure>
30775 <step>
30776 <para>
30777 Start up a new 1.02.1 postmaster
30778 </para>
30779 </step>
30780 <step>
30781 <para>
30782 Add the new built-in functions and operators of 1.02.1 to 1.01 or 1.02
30783   databases.  This is done by running the new 1.02.1 server against
30784   your own 1.01 or 1.02 database and applying the queries attached at
30785   the end of the file.   This can be done easily through <command>psql</>.  If your
30786   1.01 or 1.02 database is named <literal>testdb</literal> and you have cut the commands
30787   from the end of this file and saved them in <filename>addfunc.sql</filename>:
30788 <programlisting>
30789        % psql testdb -f addfunc.sql
30790 </programlisting>
30791
30792 Those upgrading 1.02 databases will get a warning when executing the
30793 last two statements in the file because they are already present in 1.02.  This is
30794 not a cause for concern.
30795 </para>
30796 </step>
30797 </procedure>
30798 </sect2>
30799
30800 <sect2>
30801 <title>Dump/Reload Procedure</title>
30802
30803 <para>
30804 If you are trying to reload a pg_dump or text-mode, <literal>copy tablename to
30805 stdout</literal> generated with a previous version, you will need to run the
30806 attached <command>sed</command> script on the ASCII file before loading it into the
30807 database.  The old format used '.' as end-of-data, while '\.' is now the
30808 end-of-data marker.  Also, empty strings are now loaded in as '' rather
30809 than NULL. See the copy manual page for full details.
30810
30811 <programlisting>
30812        sed 's/^\.$/\\./g' &lt;in_file &gt;out_file
30813 </programlisting>
30814 </para>
30815 <para>
30816 If you are loading an older binary copy or non-<systemitem>stdout</> copy, there is no
30817 end-of-data character, and hence no conversion necessary.
30818
30819 <programlisting>
30820 -- following lines added by agc to reflect the case-insensitive
30821 -- regexp searching for varchar (in 1.02), and bpchar (in 1.02.1)
30822 create operator ~* (leftarg = bpchar, rightarg = text, procedure = texticregexeq);
30823 create operator !~* (leftarg = bpchar, rightarg = text, procedure = texticregexne);
30824 create operator ~* (leftarg = varchar, rightarg = text, procedure = texticregexeq);
30825 create operator !~* (leftarg = varchar, rightarg = text, procedure = texticregexne);
30826 </programlisting>
30827 </para>
30828 </sect2>
30829
30830 <sect2>
30831 <title>Changes</title>
30832
30833 <para>
30834 <programlisting>
30835 Source code maintenance and development
30836  * worldwide team of volunteers
30837  * the source tree now in CVS at ftp.ki.net
30838
30839 Enhancements
30840  * psql (and underlying libpq library) now has many more options for
30841    formatting output, including HTML
30842  * pg_dump now output the schema and/or the data, with many fixes to
30843    enhance completeness.
30844  * psql used in place of monitor in administration shell scripts.
30845    monitor to be deprecated in next release.
30846  * date/time functions enhanced
30847  * NULL insert/update/comparison fixed/enhanced
30848  * TCL/TK lib and shell fixed to work with both tck7.4/tk4.0 and tcl7.5/tk4.1
30849
30850 Bug Fixes (almost too numerous to mention)
30851  * indexes
30852  * storage management
30853  * check for NULL pointer before dereferencing
30854  * Makefile fixes
30855
30856 New Ports
30857  * added SolarisX86 port
30858  * added BSD/OS 2.1 port
30859  * added DG/UX port
30860 </programlisting>
30861 </para>
30862 <!--
30863 Contributors (apologies to any missed)
30864  * Kurt J. Lidl &lt;lidl@va.pubnix.com&gt;
30865         (missed in first run, but no less important)
30866  * Erich Stamberger &lt;eberger@gewi.kfunigraz.ac.at&gt;
30867  * Jason Wright &lt;jason@shiloh.vnet.net&gt;
30868  * Cees de Groot &lt;C.deGroot@inter.NL.net&gt;
30869  * ernst.molitor@uni-bonn.de
30870  * michael.siebenborn@ae3.Hypo.DE (Michael Siebenborn (6929))
30871  * Brian E. Gallew &lt;geek+@cmu.edu&gt;
30872  * Vadim B. Mikheev &lt;vadim@sable.krasnoyarsk.su&gt;
30873  * Adam Sussman &lt;myddryn@vidya.com&gt;
30874  * Chris Dunlop &lt;chris@onthe.net.au&gt;
30875  * Marc G. Fournier &lt;scrappy@ki.net&gt;
30876  * Dan McGuirk &lt;mcguirk@indirect.com&gt;
30877  * Dr_George_D_Detlefsen &lt;drgeorge@ilt.com&gt;
30878  * Erich Stamberger &lt;eberger@gewi.kfunigraz.ac.at&gt;
30879  * Massimo Dal Zotto &lt;dz@cs.unitn.it&gt;
30880  * Randy Kunkee &lt;kunkee@Starbase.NeoSoft.COM&gt;
30881  * Rick Weldon &lt;rick@wisetech.com&gt;
30882  * Thomas van Reimersdahl &lt;reimersd@dali.techinfo.rwth-aachen.de&gt;
30883  * david bennett &lt;dave@bensoft.com&gt;
30884  * ernst.molitor@uni-bonn.de
30885  * Julian Assange &lt;proff@suburbia.net&gt;
30886  * Bruce Momjian &lt;pgman@candle.pha.pa.us&gt;
30887  * Paul "Shag" Walmsley &lt;ccshag@cclabs.missouri.edu&gt;
30888  * "Alistair G. Crooks" &lt;azcb0@sde.uts.amdahl.com&gt;
30889 -->
30890 </sect2>
30891 </sect1>
30892
30893 <sect1 id="release-1-01">
30894 <title>Release 1.01</title>
30895
30896    <note>
30897    <title>Release date</title>
30898    <simpara>1996-02-23</simpara>
30899    </note>
30900
30901
30902 <sect2>
30903 <title>Migration from version 1.0 to version 1.01</title>
30904
30905 <para>
30906 The following notes are for the benefit of users who want to migrate
30907 databases from <productname>Postgres95</> 1.0 to <productname>Postgres95</> 1.01.
30908 </para>
30909 <para>
30910 If you are starting afresh with <productname>Postgres95</> 1.01 and do not need
30911 to migrate old databases, you do not need to read any further.
30912 </para>
30913 <para>
30914 In order to <productname>Postgres95</> version 1.01 with databases created with
30915 <productname>Postgres95</> version 1.0, the following steps are required:
30916 </para>
30917 <procedure>
30918 <step>
30919 <para>
30920 Set the definition of <symbol>NAMEDATALEN</symbol> in <filename>src/Makefile.global</filename> to 16
30921    and <symbol>OIDNAMELEN</symbol> to 20.
30922 </para>
30923 </step>
30924 <step>
30925 <para>
30926 Decide whether you want to use Host based authentication.
30927 </para>
30928 <substeps>
30929 <step>
30930 <para>
30931 If you do, you must create a file name <literal>pg_hba</literal> in your top-level data
30932    directory (typically the value of your <envar>$PGDATA</envar>).  <filename>src/libpq/pg_hba</filename>
30933    shows an example syntax.
30934 </para>
30935 </step>
30936 <step>
30937 <para>
30938 If you do not want host-based authentication, you can comment out
30939    the line:
30940 <programlisting>
30941         HBA = 1
30942 </programlisting>
30943    in <filename>src/Makefile.global</filename>
30944 </para>
30945 <para>
30946    Note that host-based authentication is turned on by default, and if
30947    you do not take steps A or B above, the out-of-the-box 1.01 will
30948    not allow you to connect to 1.0 databases.
30949 </para>
30950 </step>
30951 </substeps>
30952 </step>
30953
30954 <step>
30955 <para>
30956 Compile and install 1.01, but DO NOT do the <command>initdb</command> step.
30957 </para>
30958 </step>
30959 <step>
30960 <para>
30961 Before doing anything else, terminate your 1.0 postmaster, and
30962    backup your existing <envar>$PGDATA</envar> directory.
30963 </para>
30964 </step>
30965 <step>
30966 <para>
30967 Set your <envar>PGDATA</envar> environment variable to your 1.0 databases, but set up
30968    path up so that 1.01 binaries are being used.
30969 </para>
30970 </step>
30971 <step>
30972 <para>
30973 Modify the file <filename><envar>$PGDATA</envar>/PG_VERSION</filename> from 5.0 to 5.1
30974 </para>
30975 </step>
30976 <step>
30977 <para>
30978 Start up a new 1.01 postmaster
30979 </para>
30980 </step>
30981 <step>
30982 <para>
30983 Add the new built-in functions and operators of 1.01 to 1.0
30984    databases.  This is done by running the new 1.01 server against
30985    your own 1.0 database and applying the queries attached and saving
30986    in the file 1.0_to_1.01.sql.   This can be done easily through <command>psql</command>.
30987    If your 1.0 database is name <literal>testdb</literal>:
30988
30989 <programlisting>
30990         % psql testdb -f 1.0_to_1.01.sql
30991 </programlisting>
30992
30993 and then execute the following commands (cut and paste from here):
30994
30995 <programlisting>
30996 -- add builtin functions that are new to 1.01
30997
30998 create function int4eqoid (int4, oid) returns bool as 'foo'
30999 language 'internal';
31000 create function oideqint4 (oid, int4) returns bool as 'foo'
31001 language 'internal';
31002 create function char2icregexeq (char2, text) returns bool as 'foo'
31003 language 'internal';
31004 create function char2icregexne (char2, text) returns bool as 'foo'
31005 language 'internal';
31006 create function char4icregexeq (char4, text) returns bool as 'foo'
31007 language 'internal';
31008 create function char4icregexne (char4, text) returns bool as 'foo'
31009 language 'internal';
31010 create function char8icregexeq (char8, text) returns bool as 'foo'
31011 language 'internal';
31012 create function char8icregexne (char8, text) returns bool as 'foo'
31013 language 'internal';
31014 create function char16icregexeq (char16, text) returns bool as 'foo'
31015 language 'internal';
31016 create function char16icregexne (char16, text) returns bool as 'foo'
31017 language 'internal';
31018 create function texticregexeq (text, text) returns bool as 'foo'
31019 language 'internal';
31020 create function texticregexne (text, text) returns bool as 'foo'
31021 language 'internal';
31022
31023 -- add builtin functions that are new to 1.01
31024
31025 create operator = (leftarg = int4, rightarg = oid, procedure = int4eqoid);
31026 create operator = (leftarg = oid, rightarg = int4, procedure = oideqint4);
31027 create operator ~* (leftarg = char2, rightarg = text, procedure = char2icregexeq);
31028 create operator !~* (leftarg = char2, rightarg = text, procedure = char2icregexne);
31029 create operator ~* (leftarg = char4, rightarg = text, procedure = char4icregexeq);
31030 create operator !~* (leftarg = char4, rightarg = text, procedure = char4icregexne);
31031 create operator ~* (leftarg = char8, rightarg = text, procedure = char8icregexeq);
31032 create operator !~* (leftarg = char8, rightarg = text, procedure = char8icregexne);
31033 create operator ~* (leftarg = char16, rightarg = text, procedure = char16icregexeq);
31034 create operator !~* (leftarg = char16, rightarg = text, procedure = char16icregexne);
31035 create operator ~* (leftarg = text, rightarg = text, procedure = texticregexeq);
31036 create operator !~* (leftarg = text, rightarg = text, procedure = texticregexne);
31037 </programlisting>
31038 </para>
31039 </step>
31040 </procedure>
31041 </sect2>
31042
31043 <sect2>
31044 <title>Changes</title>
31045
31046 <para>
31047 <programlisting>
31048 Incompatibilities:
31049  * 1.01 is backwards compatible with 1.0 database provided the user
31050    follow the steps outlined in the MIGRATION_from_1.0_to_1.01 file.
31051    If those steps are not taken, 1.01 is not compatible with 1.0 database.
31052
31053 Enhancements:
31054  * added PQdisplayTuples() to libpq and changed monitor and psql to use it
31055  * added NeXT port (requires SysVIPC implementation)
31056  * added CAST .. AS ... syntax
31057  * added ASC and DESC key words
31058  * added 'internal' as a possible language for CREATE FUNCTION
31059    internal functions are C functions which have been statically linked
31060    into the postgres backend.
31061  * a new type "name" has been added for system identifiers (table names,
31062    attribute names, etc.)  This replaces the old char16 type.   The
31063    of name is set by the NAMEDATALEN #define in src/Makefile.global
31064  * a readable reference manual that describes the query language.
31065  * added host-based access control.  A configuration file ($PGDATA/pg_hba)
31066    is used to hold the configuration data.  If host-based access control
31067    is not desired, comment out HBA=1 in src/Makefile.global.
31068  * changed regex handling to be uniform use of Henry Spencer's regex code
31069    regardless of platform.  The regex code is included in the distribution
31070  * added functions and operators for case-insensitive regular expressions.
31071    The operators are ~* and !~*.
31072  * pg_dump uses COPY instead of SELECT loop for better performance
31073
31074 Bug fixes:
31075  * fixed an optimizer bug that was causing core dumps when
31076    functions calls were used in comparisons in the WHERE clause
31077  * changed all uses of getuid to geteuid so that effective uids are used
31078  * psql now returns non-zero status on errors when using -c
31079  * applied public patches 1-14
31080 </programlisting>
31081 </para>
31082 </sect2>
31083 </sect1>
31084
31085 <sect1 id="release-1-0">
31086 <title>Release 1.0</title>
31087
31088    <note>
31089    <title>Release date</title>
31090    <simpara>1995-09-05</simpara>
31091    </note>
31092
31093 <sect2>
31094 <title>Changes</title>
31095
31096 <para>
31097 <programlisting>
31098 Copyright change:
31099  * The copyright of <productname>Postgres</productname> 1.0 has been loosened to be freely modifiable
31100    and modifiable for any purpose.  Please read the COPYRIGHT file.
31101    Thanks to Professor Michael Stonebraker for making this possible.
31102
31103 Incompatibilities:
31104  *  date formats have to be MM-DD-YYYY (or DD-MM-YYYY if you're using
31105    EUROPEAN STYLE).  This follows SQL-92 specs.
31106  *  "delimiters" is now a key word
31107
31108 Enhancements:
31109  *  sql LIKE syntax has been added
31110  *  copy command now takes an optional USING DELIMITER specification.
31111    delimiters can be any single-character string.
31112  *  IRIX 5.3 port has been added.
31113    Thanks to Paul Walmsley and others.
31114  *  updated pg_dump to work with new libpq
31115  *  \d has been added psql
31116    Thanks to Keith Parks
31117  *  regexp performance for architectures that use POSIX regex has been
31118    improved due to caching of precompiled patterns.
31119    Thanks to Alistair Crooks
31120  *  a new version of libpq++
31121    Thanks to William Wanders
31122
31123 Bug fixes:
31124  *  arbitrary userids can be specified in the createuser script
31125  *  \c to connect to other databases in psql now works.
31126  *  bad pg_proc entry for float4inc() is fixed
31127  *  users with usecreatedb field set can now create databases without
31128    having to be usesuper
31129  *  remove access control entries when the entry no longer has any
31130    privileges
31131  *  fixed non-portable datetimes implementation
31132  *  added kerberos flags to the src/backend/Makefile
31133  *  libpq now works with kerberos
31134  *  typographic errors in the user manual have been corrected.
31135  *  btrees with multiple index never worked, now we tell you they don't
31136    work when you try to use them
31137 </programlisting>
31138 </para>
31139 </sect2>
31140 </sect1>
31141
31142 <sect1 id="release-0-03">
31143 <title><productname>Postgres95</productname> Release 0.03</title>
31144
31145    <note>
31146    <title>Release date</title>
31147    <simpara>1995-07-21</simpara>
31148    </note>
31149
31150 <sect2>
31151 <title>Changes</title>
31152 <para>
31153 <programlisting>
31154 Incompatible changes:
31155  * BETA-0.3 IS INCOMPATIBLE WITH DATABASES CREATED WITH PREVIOUS VERSIONS
31156    (due to system catalog changes and indexing structure changes).
31157  * double-quote (") is deprecated as a quoting character for string literals;
31158    you need to convert them to single quotes ('). <!-- " -->
31159  * name of aggregates (eg. int4sum) are renamed in accordance with the
31160    SQL standard (eg. sum).
31161  * CHANGE ACL syntax is replaced by GRANT/REVOKE syntax.
31162  * float literals (eg. 3.14) are now of type float4 (instead of float8 in
31163    previous releases); you might have to do typecasting if you depend on it
31164    being of type float8.  If you neglect to do the typecasting and you assign
31165    a float literal to a field of type float8, you might get incorrect values
31166    stored!
31167  * LIBPQ has been totally revamped so that frontend applications
31168    can connect to multiple backends
31169  * the usesysid field in pg_user has been changed from int2 to int4 to
31170    allow wider range of Unix user ids.
31171  * the netbsd/freebsd/bsd o/s ports have been consolidated into a
31172    single BSD44_derived port.  (thanks to Alistair Crooks)
31173
31174 SQL standard-compliance (the following details changes that makes postgres95
31175 more compliant to the SQL-92 standard):
31176  * the following SQL types are now built-in: smallint, int(eger), float, real,
31177    char(N), varchar(N), date and time.
31178
31179    The following are aliases to existing postgres types:
31180                 smallint -&gt; int2
31181                 integer, int -&gt; int4
31182                 float, real  -&gt; float4
31183    char(N) and varchar(N) are implemented as truncated text types. In
31184    addition, char(N) does blank-padding.
31185  * single-quote (') is used for quoting string literals; '' (in addition to
31186    \') is supported as means of inserting a single quote in a string
31187  * SQL standard aggregate names (MAX, MIN, AVG, SUM, COUNT) are used
31188    (Also, aggregates can now be overloaded, i.e. you can define your
31189    own MAX aggregate to take in a user-defined type.)
31190  * CHANGE ACL removed. GRANT/REVOKE syntax added.
31191    - Privileges can be given to a group using the "GROUP" key word.
31192         For example:
31193                 GRANT SELECT ON foobar TO GROUP my_group;
31194         The key word 'PUBLIC' is also supported to mean all users.
31195
31196         Privileges can only be granted or revoked to one user or group
31197         at a time.
31198
31199         "WITH GRANT OPTION" is not supported.  Only class owners can change
31200         access control
31201    - The default access control is to grant users readonly access.
31202      You must explicitly grant insert/update access to users.  To change
31203      this, modify the line in
31204                 src/backend/utils/acl.h
31205      that defines ACL_WORLD_DEFAULT
31206
31207 Bug fixes:
31208  * the bug where aggregates of empty tables were not run has been fixed. Now,
31209    aggregates run on empty tables will return the initial conditions of the
31210    aggregates. Thus, COUNT of an empty  table will now properly return 0.
31211    MAX/MIN of an empty table will return a row of value NULL.
31212  * allow the use of \; inside the monitor
31213  * the LISTEN/NOTIFY asynchronous notification mechanism now work
31214  * NOTIFY in rule action bodies now work
31215  * hash indexes work, and access methods in general should perform better.
31216    creation of large btree indexes should be much faster.  (thanks to Paul
31217    Aoki)
31218
31219 Other changes and enhancements:
31220  * addition of an EXPLAIN statement used for explaining the query execution
31221    plan (eg. "EXPLAIN SELECT * FROM EMP" prints out the execution plan for
31222    the query).
31223  * WARN and NOTICE messages no longer have timestamps on them. To turn on
31224    timestamps of error messages, uncomment the line in
31225    src/backend/utils/elog.h:
31226         /* define ELOG_TIMESTAMPS */
31227  * On an access control violation, the message
31228         "Either no such class or insufficient privilege"
31229    will be given.  This is the same message that is returned when
31230    a class is not found.  This dissuades non-privileged users from
31231    guessing the existence of privileged classes.
31232  * some additional system catalog changes have been made that are not
31233    visible to the user.
31234
31235 libpgtcl changes:
31236  * The -oid option has been added to the "pg_result" tcl command.
31237    pg_result -oid returns oid of the last row inserted.   If the
31238    last command was not an INSERT, then pg_result -oid returns "".
31239  * the large object interface is available as pg_lo* tcl commands:
31240    pg_lo_open, pg_lo_close, pg_lo_creat, etc.
31241
31242 Portability enhancements and New Ports:
31243  * flex/lex problems have been cleared up.  Now, you should be able to use
31244    flex instead of lex on any platforms.  We no longer make assumptions of
31245    what lexer you use based on the platform you use.
31246  * The Linux-ELF port is now supported.  Various configuration have been
31247    tested:  The following configuration is known to work:
31248         kernel 1.2.10, gcc 2.6.3, libc 4.7.2, flex 2.5.2, bison 1.24
31249    with everything in ELF format,
31250
31251 New utilities:
31252  * ipcclean added to the distribution
31253    ipcclean usually does not need to be run, but if your backend crashes
31254    and leaves shared memory segments hanging around, ipcclean will
31255    clean them up for you.
31256
31257 New documentation:
31258  * the user manual has been revised and libpq documentation added.
31259 </programlisting>
31260 </para>
31261 </sect2>
31262 </sect1>
31263
31264 <sect1 id="release-0-02">
31265 <title><productname>Postgres95</productname> Release 0.02</title>
31266
31267    <note>
31268    <title>Release date</title>
31269    <simpara>1995-05-25</simpara>
31270    </note>
31271
31272 <sect2>
31273 <title>Changes</title>
31274
31275 <para>
31276 <programlisting>
31277 Incompatible changes:
31278  * The SQL statement for creating a database is 'CREATE DATABASE' instead
31279    of 'CREATEDB'. Similarly, dropping a database is 'DROP DATABASE' instead
31280    of 'DESTROYDB'. However, the names of the executables 'createdb' and
31281    'destroydb' remain the same.
31282
31283 New tools:
31284  * pgperl - a Perl (4.036) interface to Postgres95
31285  * pg_dump - a utility for dumping out a postgres database into a
31286         script file containing query commands. The script files are in a ASCII
31287         format and can be used to reconstruct the database, even on other
31288         machines and other architectures. (Also good for converting
31289         a Postgres 4.2 database to Postgres95 database.)
31290
31291 The following ports have been incorporated into postgres95-beta-0.02:
31292  * the NetBSD port by Alistair Crooks
31293  * the AIX port by Mike Tung
31294  * the Windows NT port by Jon Forrest (more stuff but not done yet)
31295  * the Linux ELF port by Brian Gallew
31296
31297 The following bugs have been fixed in postgres95-beta-0.02:
31298  * new lines not escaped in COPY OUT and problem with COPY OUT when first
31299    attribute is a '.'
31300  * cannot type return to use the default user id in createuser
31301  * SELECT DISTINCT on big tables crashes
31302  * Linux installation problems
31303  * monitor doesn't allow use of 'localhost' as PGHOST
31304  * psql core dumps when doing \c or \l
31305  * the "pgtclsh" target missing from src/bin/pgtclsh/Makefile
31306  * libpgtcl has a hard-wired default port number
31307  * SELECT DISTINCT INTO TABLE hangs
31308  * CREATE TYPE doesn't accept 'variable' as the internallength
31309  * wrong result using more than 1 aggregate in a SELECT
31310 </programlisting>
31311 </para>
31312 </sect2>
31313 </sect1>
31314
31315 <sect1 id="release-0-01">
31316 <title><productname>Postgres95</productname> Release 0.01</title>
31317
31318    <note>
31319    <title>Release date</title>
31320    <simpara>1995-05-01</simpara>
31321    </note>
31322
31323 <para>
31324 Initial release.
31325 </para>
31326 </sect1>
31327
31328 <![IGNORE[
31329   <sect1 id="timing-results">
31330    <title>Timing Results</title>
31331
31332    <para>
31333     These timing results are from running the regression test with the commands
31334
31335     <programlisting>
31336 % cd src/test/regress
31337 % make all
31338 % time make runtest
31339     </programlisting>
31340    </para>
31341    <para>
31342     Timing under Linux 2.0.27 seems to have a roughly 5% variation from run
31343     to run, presumably due to the scheduling vagaries of multitasking systems.
31344    </para>
31345
31346    <sect2>
31347     <title>Version 6.5</title>
31348
31349     <para>
31350      As has been the case for previous releases, timing between
31351      releases is not directly comparable since new regression tests
31352      have been added. In general, 6.5 is faster than previous
31353      releases.
31354     </para>
31355
31356     <para>
31357      Timing with <function>fsync()</function> disabled:
31358
31359      <programlisting>
31360   Time   System
31361   02:00  Dual Pentium Pro 180, 224MB, UW-SCSI, Linux 2.0.36, gcc 2.7.2.3 -O2 -m486
31362   04:38  Sparc Ultra 1 143MHz, 64MB, Solaris 2.6
31363      </programlisting>
31364     </para>
31365
31366     <para>
31367      Timing with <function>fsync()</function> enabled:
31368
31369      <programlisting>
31370   Time   System
31371   04:21  Dual Pentium Pro 180, 224MB, UW-SCSI, Linux 2.0.36, gcc 2.7.2.3 -O2 -m486
31372      </programlisting>
31373
31374      For the <systemitem class="osname">Linux</systemitem> system above, using <acronym>UW-SCSI</acronym> disks rather than (older) <acronym>IDE</acronym>
31375      disks leads to a 50% improvement in speed on the regression test.
31376     </para>
31377    </sect2>
31378
31379 <sect2>
31380 <title>Version 6.4beta</title>
31381
31382 <para>
31383 The times for this release are not directly comparable to those for previous releases
31384 since some additional regression tests have been included.
31385 In general, however, 6.4 should be slightly faster than the previous release (thanks, Bruce!).
31386 </para>
31387 <para>
31388 <programlisting>
31389   Time   System
31390   02:26  Dual Pentium Pro 180, 96MB, UW-SCSI, Linux 2.0.30, gcc 2.7.2.1 -O2 -m486
31391 </programlisting>
31392 </para>
31393 </sect2>
31394
31395 <sect2>
31396 <title>Version 6.3</title>
31397
31398 <para>
31399 The times for this release are not directly comparable to those for previous releases
31400 since some additional regression tests have been included and some obsolete tests involving
31401 time travel have been removed.
31402 In general, however, 6.3 is substantially faster than previous releases (thanks, Bruce!).
31403 </para>
31404 <para>
31405 <programlisting>
31406   Time   System
31407   02:30  Dual Pentium Pro 180, 96MB, UW-SCSI, Linux 2.0.30, gcc 2.7.2.1 -O2 -m486
31408   04:12  Dual Pentium Pro 180, 96MB, EIDE, Linux 2.0.30, gcc 2.7.2.1 -O2 -m486
31409 </programlisting>
31410 </para>
31411 </sect2>
31412
31413 <sect2>
31414 <title>Version 6.1</title>
31415
31416 <para>
31417 <programlisting>
31418   Time   System
31419   06:12  Pentium Pro 180, 32MB, EIDE, Linux 2.0.30, gcc 2.7.2 -O2 -m486
31420   12:06  P-100, 48MB, Linux 2.0.29, gcc
31421   39:58  Sparc IPC 32MB, Solaris 2.5, gcc 2.7.2.1 -O -g
31422 </programlisting>
31423 </para>
31424 </sect2>
31425 </sect1>
31426 ]]>
31427 </appendix>