The code to unlink dropped relations in FinishPreparedTransaction() was
[PostgreSQL.git] / doc / src / sgml / release-7.4.sgml
blobfaf895d79dd2238c5acbb8fa9aa9d178726309e4
1 <!-- $PostgreSQL$ -->
2 <!-- See header comment in release.sgml about typical markup -->
4 <sect1 id="release-7-4-25">
5 <title>Release 7.4.25</title>
7 <note>
8 <title>Release date</title>
9 <simpara>2009-03-16</simpara>
10 </note>
12 <para>
13 This release contains a variety of fixes from 7.4.24.
14 For information about new features in the 7.4 major release, see
15 <xref linkend="release-7-4">.
16 </para>
18 <sect2>
19 <title>Migration to Version 7.4.25</title>
21 <para>
22 A dump/restore is not required for those running 7.4.X.
23 However, if you are upgrading from a version earlier than 7.4.11,
24 see the release notes for 7.4.11.
25 </para>
27 </sect2>
29 <sect2>
30 <title>Changes</title>
32 <itemizedlist>
34 <listitem>
35 <para>
36 Prevent error recursion crashes when encoding conversion fails (Tom)
37 </para>
39 <para>
40 This change extends fixes made in the last two minor releases for
41 related failure scenarios. The previous fixes were narrowly tailored
42 for the original problem reports, but we have now recognized that
43 <emphasis>any</> error thrown by an encoding conversion function could
44 potentially lead to infinite recursion while trying to report the
45 error. The solution therefore is to disable translation and encoding
46 conversion and report the plain-ASCII form of any error message,
47 if we find we have gotten into a recursive error reporting situation.
48 (CVE-2009-0922)
49 </para>
50 </listitem>
52 <listitem>
53 <para>
54 Disallow <command>CREATE CONVERSION</> with the wrong encodings
55 for the specified conversion function (Heikki)
56 </para>
58 <para>
59 This prevents one possible scenario for encoding conversion failure.
60 The previous change is a backstop to guard against other kinds of
61 failures in the same area.
62 </para>
63 </listitem>
65 <listitem>
66 <para>
67 Fix core dump when <function>to_char()</> is given format codes that
68 are inappropriate for the type of the data argument (Tom)
69 </para>
70 </listitem>
72 <listitem>
73 <para>
74 Add <literal>MUST</> (Mauritius Island Summer Time) to the default list
75 of known timezone abbreviations (Xavier Bugaud)
76 </para>
77 </listitem>
79 </itemizedlist>
81 </sect2>
82 </sect1>
84 <sect1 id="release-7-4-24">
85 <title>Release 7.4.24</title>
87 <note>
88 <title>Release date</title>
89 <simpara>2009-02-02</simpara>
90 </note>
92 <para>
93 This release contains a variety of fixes from 7.4.23.
94 For information about new features in the 7.4 major release, see
95 <xref linkend="release-7-4">.
96 </para>
98 <sect2>
99 <title>Migration to Version 7.4.24</title>
101 <para>
102 A dump/restore is not required for those running 7.4.X.
103 However, if you are upgrading from a version earlier than 7.4.11,
104 see the release notes for 7.4.11.
105 </para>
107 </sect2>
109 <sect2>
110 <title>Changes</title>
112 <itemizedlist>
114 <listitem>
115 <para>
116 Improve handling of URLs in <function>headline()</> function (Teodor)
117 </para>
118 </listitem>
120 <listitem>
121 <para>
122 Improve handling of overlength headlines in <function>headline()</>
123 function (Teodor)
124 </para>
125 </listitem>
127 <listitem>
128 <para>
129 Prevent possible Assert failure or misconversion if an encoding
130 conversion is created with the wrong conversion function for the
131 specified pair of encodings (Tom, Heikki)
132 </para>
133 </listitem>
135 <listitem>
136 <para>
137 Avoid unnecessary locking of small tables in <command>VACUUM</>
138 (Heikki)
139 </para>
140 </listitem>
142 <listitem>
143 <para>
144 Fix uninitialized variables in <filename>contrib/tsearch2</>'s
145 <function>get_covers()</> function (Teodor)
146 </para>
147 </listitem>
149 <listitem>
150 <para>
151 Fix bug in <function>to_char()</>'s handling of <literal>TH</>
152 format codes (Andreas Scherbaum)
153 </para>
154 </listitem>
156 <listitem>
157 <para>
158 Make all documentation reference <literal>pgsql-bugs</> and/or
159 <literal>pgsql-hackers</> as appropriate, instead of the
160 now-decommissioned <literal>pgsql-ports</> and <literal>pgsql-patches</>
161 mailing lists (Tom)
162 </para>
163 </listitem>
165 </itemizedlist>
167 </sect2>
168 </sect1>
170 <sect1 id="release-7-4-23">
171 <title>Release 7.4.23</title>
173 <note>
174 <title>Release date</title>
175 <simpara>2008-11-03</simpara>
176 </note>
178 <para>
179 This release contains a variety of fixes from 7.4.22.
180 For information about new features in the 7.4 major release, see
181 <xref linkend="release-7-4">.
182 </para>
184 <sect2>
185 <title>Migration to Version 7.4.23</title>
187 <para>
188 A dump/restore is not required for those running 7.4.X.
189 However, if you are upgrading from a version earlier than 7.4.11,
190 see the release notes for 7.4.11.
191 </para>
193 </sect2>
195 <sect2>
196 <title>Changes</title>
198 <itemizedlist>
200 <listitem>
201 <para>
202 Fix backend crash when the client encoding cannot represent a localized
203 error message (Tom)
204 </para>
206 <para>
207 We have addressed similar issues before, but it would still fail if
208 the <quote>character has no equivalent</> message itself couldn't
209 be converted. The fix is to disable localization and send the plain
210 ASCII error message when we detect such a situation.
211 </para>
212 </listitem>
214 <listitem>
215 <para>
216 Fix incorrect tsearch2 headline generation when single query
217 item matches first word of text (Sushant Sinha)
218 </para>
219 </listitem>
221 <listitem>
222 <para>
223 Fix improper display of fractional seconds in interval values when
224 using a non-ISO datestyle in an <option>--enable-integer-datetimes</>
225 build (Ron Mayer)
226 </para>
227 </listitem>
229 <listitem>
230 <para>
231 Ensure <function>SPI_getvalue</> and <function>SPI_getbinval</>
232 behave correctly when the passed tuple and tuple descriptor have
233 different numbers of columns (Tom)
234 </para>
236 <para>
237 This situation is normal when a table has had columns added or removed,
238 but these two functions didn't handle it properly.
239 The only likely consequence is an incorrect error indication.
240 </para>
241 </listitem>
243 <listitem>
244 <para>
245 Fix <application>ecpg</>'s parsing of <command>CREATE USER</> (Michael)
246 </para>
247 </listitem>
249 </itemizedlist>
251 </sect2>
252 </sect1>
254 <sect1 id="release-7-4-22">
255 <title>Release 7.4.22</title>
257 <note>
258 <title>Release date</title>
259 <simpara>2008-09-22</simpara>
260 </note>
262 <para>
263 This release contains a variety of fixes from 7.4.21.
264 For information about new features in the 7.4 major release, see
265 <xref linkend="release-7-4">.
266 </para>
268 <sect2>
269 <title>Migration to Version 7.4.22</title>
271 <para>
272 A dump/restore is not required for those running 7.4.X.
273 However, if you are upgrading from a version earlier than 7.4.11,
274 see the release notes for 7.4.11.
275 </para>
277 </sect2>
279 <sect2>
280 <title>Changes</title>
282 <itemizedlist>
284 <listitem>
285 <para>
286 Fix datetime input functions to correctly detect integer overflow when
287 running on a 64-bit platform (Tom)
288 </para>
289 </listitem>
291 <listitem>
292 <para>
293 Improve performance of writing very long log messages to syslog (Tom)
294 </para>
295 </listitem>
297 <listitem>
298 <para>
299 Fix bug in backwards scanning of a cursor on a <literal>SELECT DISTINCT
300 ON</> query (Tom)
301 </para>
302 </listitem>
304 <listitem>
305 <para>
306 Fix planner to estimate that <literal>GROUP BY</> expressions yielding
307 boolean results always result in two groups, regardless of the
308 expressions' contents (Tom)
309 </para>
311 <para>
312 This is very substantially more accurate than the regular <literal>GROUP
313 BY</> estimate for certain boolean tests like <replaceable>col</>
314 <literal>IS NULL</>.
315 </para>
316 </listitem>
318 <listitem>
319 <para>
320 Improve <application>pg_dump</> and <application>pg_restore</>'s
321 error reporting after failure to send a SQL command (Tom)
322 </para>
323 </listitem>
325 </itemizedlist>
327 </sect2>
328 </sect1>
330 <sect1 id="release-7-4-21">
331 <title>Release 7.4.21</title>
333 <note>
334 <title>Release date</title>
335 <simpara>2008-06-12</simpara>
336 </note>
338 <para>
339 This release contains one serious bug fix over 7.4.20.
340 For information about new features in the 7.4 major release, see
341 <xref linkend="release-7-4">.
342 </para>
344 <sect2>
345 <title>Migration to Version 7.4.21</title>
347 <para>
348 A dump/restore is not required for those running 7.4.X.
349 However, if you are upgrading from a version earlier than 7.4.11,
350 see the release notes for 7.4.11.
351 </para>
353 </sect2>
355 <sect2>
356 <title>Changes</title>
358 <itemizedlist>
360 <listitem>
361 <para>
362 Make <function>pg_get_ruledef()</> parenthesize negative constants (Tom)
363 </para>
365 <para>
366 Before this fix, a negative constant in a view or rule might be dumped
367 as, say, <literal>-42::integer</>, which is subtly incorrect: it should
368 be <literal>(-42)::integer</> due to operator precedence rules.
369 Usually this would make little difference, but it could interact with
370 another recent patch to cause
371 <productname>PostgreSQL</> to reject what had been a valid
372 <command>SELECT DISTINCT</> view query. Since this could result in
373 <application>pg_dump</> output failing to reload, it is being treated
374 as a high-priority fix. The only released versions in which dump
375 output is actually incorrect are 8.3.1 and 8.2.7.
376 </para>
377 </listitem>
379 </itemizedlist>
381 </sect2>
382 </sect1>
384 <sect1 id="release-7-4-20">
385 <title>Release 7.4.20</title>
387 <note>
388 <title>Release date</title>
389 <simpara>never released</simpara>
390 </note>
392 <para>
393 This release contains a variety of fixes from 7.4.19.
394 For information about new features in the 7.4 major release, see
395 <xref linkend="release-7-4">.
396 </para>
398 <sect2>
399 <title>Migration to Version 7.4.20</title>
401 <para>
402 A dump/restore is not required for those running 7.4.X.
403 However, if you are upgrading from a version earlier than 7.4.11,
404 see the release notes for 7.4.11.
405 </para>
407 </sect2>
409 <sect2>
410 <title>Changes</title>
412 <itemizedlist>
414 <listitem>
415 <para>
416 Fix conversions between ISO-8859-5 and other encodings to handle
417 Cyrillic <quote>Yo</> characters (<literal>e</> and <literal>E</> with
418 two dots) (Sergey Burladyan)
419 </para>
420 </listitem>
422 <listitem>
423 <para>
424 Fix a few datatype input functions
425 that were allowing unused bytes in their results to contain
426 uninitialized, unpredictable values (Tom)
427 </para>
429 <para>
430 This could lead to failures in which two apparently identical literal
431 values were not seen as equal, resulting in the parser complaining
432 about unmatched <literal>ORDER BY</> and <literal>DISTINCT</>
433 expressions.
434 </para>
435 </listitem>
437 <listitem>
438 <para>
439 Fix a corner case in regular-expression substring matching
440 (<literal>substring(<replaceable>string</> from
441 <replaceable>pattern</>)</literal>) (Tom)
442 </para>
444 <para>
445 The problem occurs when there is a match to the pattern overall but
446 the user has specified a parenthesized subexpression and that
447 subexpression hasn't got a match. An example is
448 <literal>substring('foo' from 'foo(bar)?')</>.
449 This should return NULL, since <literal>(bar)</> isn't matched, but
450 it was mistakenly returning the whole-pattern match instead (ie,
451 <literal>foo</>).
452 </para>
453 </listitem>
455 <listitem>
456 <para>
457 Fix incorrect result from <application>ecpg</>'s
458 <function>PGTYPEStimestamp_sub()</> function (Michael)
459 </para>
460 </listitem>
462 <listitem>
463 <para>
464 Fix <literal>DatumGetBool</> macro to not fail with <application>gcc</>
465 4.3 (Tom)
466 </para>
468 <para>
469 This problem affects <quote>old style</> (V0) C functions that
470 return boolean. The fix is already in 8.3, but the need to
471 back-patch it was not realized at the time.
472 </para>
473 </listitem>
475 <listitem>
476 <para>
477 Fix longstanding <command>LISTEN</>/<command>NOTIFY</>
478 race condition (Tom)
479 </para>
481 <para>
482 In rare cases a session that had just executed a
483 <command>LISTEN</> might not get a notification, even though
484 one would be expected because the concurrent transaction executing
485 <command>NOTIFY</> was observed to commit later.
486 </para>
488 <para>
489 A side effect of the fix is that a transaction that has executed
490 a not-yet-committed <command>LISTEN</> command will not see any
491 row in <structname>pg_listener</> for the <command>LISTEN</>,
492 should it choose to look; formerly it would have. This behavior
493 was never documented one way or the other, but it is possible that
494 some applications depend on the old behavior.
495 </para>
496 </listitem>
498 <listitem>
499 <para>
500 Fix display of constant expressions in <literal>ORDER BY</>
501 and <literal>GROUP BY</> (Tom)
502 </para>
504 <para>
505 An explictly casted constant would be shown incorrectly. This could
506 for example lead to corruption of a view definition during
507 dump and reload.
508 </para>
509 </listitem>
511 <listitem>
512 <para>
513 Fix <application>libpq</> to handle NOTICE messages correctly
514 during COPY OUT (Tom)
515 </para>
517 <para>
518 This failure has only been observed to occur when a user-defined
519 datatype's output routine issues a NOTICE, but there is no
520 guarantee it couldn't happen due to other causes.
521 </para>
522 </listitem>
524 </itemizedlist>
526 </sect2>
527 </sect1>
529 <sect1 id="release-7-4-19">
530 <title>Release 7.4.19</title>
532 <note>
533 <title>Release date</title>
534 <simpara>2008-01-07</simpara>
535 </note>
537 <para>
538 This release contains a variety of fixes from 7.4.18,
539 including fixes for significant security issues.
540 For information about new features in the 7.4 major release, see
541 <xref linkend="release-7-4">.
542 </para>
544 <sect2>
545 <title>Migration to Version 7.4.19</title>
547 <para>
548 A dump/restore is not required for those running 7.4.X. However,
549 if you are upgrading from a version earlier than 7.4.11, see the release
550 notes for 7.4.11.
551 </para>
553 </sect2>
555 <sect2>
556 <title>Changes</title>
558 <itemizedlist>
560 <listitem>
561 <para>
562 Prevent functions in indexes from executing with the privileges of
563 the user running <command>VACUUM</>, <command>ANALYZE</>, etc (Tom)
564 </para>
566 <para>
567 Functions used in index expressions and partial-index
568 predicates are evaluated whenever a new table entry is made. It has
569 long been understood that this poses a risk of trojan-horse code
570 execution if one modifies a table owned by an untrustworthy user.
571 (Note that triggers, defaults, check constraints, etc. pose the
572 same type of risk.) But functions in indexes pose extra danger
573 because they will be executed by routine maintenance operations
574 such as <command>VACUUM FULL</>, which are commonly performed
575 automatically under a superuser account. For example, a nefarious user
576 can execute code with superuser privileges by setting up a
577 trojan-horse index definition and waiting for the next routine vacuum.
578 The fix arranges for standard maintenance operations
579 (including <command>VACUUM</>, <command>ANALYZE</>, <command>REINDEX</>,
580 and <command>CLUSTER</>) to execute as the table owner rather than
581 the calling user, using the same privilege-switching mechanism already
582 used for <literal>SECURITY DEFINER</> functions. To prevent bypassing
583 this security measure, execution of <command>SET SESSION
584 AUTHORIZATION</> and <command>SET ROLE</> is now forbidden within a
585 <literal>SECURITY DEFINER</> context. (CVE-2007-6600)
586 </para>
587 </listitem>
589 <listitem>
590 <para>
591 Repair assorted bugs in the regular-expression package (Tom, Will Drewry)
592 </para>
594 <para>
595 Suitably crafted regular-expression patterns could cause crashes,
596 infinite or near-infinite looping, and/or massive memory consumption,
597 all of which pose denial-of-service hazards for applications that
598 accept regex search patterns from untrustworthy sources.
599 (CVE-2007-4769, CVE-2007-4772, CVE-2007-6067)
600 </para>
601 </listitem>
603 <listitem>
604 <para>
605 Require non-superusers who use <filename>/contrib/dblink</> to use only
606 password authentication, as a security measure (Joe)
607 </para>
609 <para>
610 The fix that appeared for this in 7.4.18 was incomplete, as it plugged
611 the hole for only some <filename>dblink</> functions. (CVE-2007-6601,
612 CVE-2007-3278)
613 </para>
614 </listitem>
616 <listitem>
617 <para>
618 Fix planner failure in some cases of <literal>WHERE false AND var IN
619 (SELECT ...)</> (Tom)
620 </para>
621 </listitem>
623 <listitem>
624 <para>
625 Fix potential crash in <function>translate()</> when using a multibyte
626 database encoding (Tom)
627 </para>
628 </listitem>
630 <listitem>
631 <para>
632 Fix PL/Python to not crash on long exception messages (Alvaro)
633 </para>
634 </listitem>
636 <listitem>
637 <para>
638 <application>ecpg</> parser fixes (Michael)
639 </para>
640 </listitem>
642 <listitem>
643 <para>
644 Make <filename>contrib/tablefunc</>'s <function>crosstab()</> handle
645 NULL rowid as a category in its own right, rather than crashing (Joe)
646 </para>
647 </listitem>
649 <listitem>
650 <para>
651 Fix <type>tsvector</> and <type>tsquery</> output routines to
652 escape backslashes correctly (Teodor, Bruce)
653 </para>
654 </listitem>
656 <listitem>
657 <para>
658 Fix crash of <function>to_tsvector()</> on huge input strings (Teodor)
659 </para>
660 </listitem>
662 <listitem>
663 <para>
664 Require a specific version of <productname>Autoconf</> to be used
665 when re-generating the <command>configure</> script (Peter)
666 </para>
668 <para>
669 This affects developers and packagers only. The change was made
670 to prevent accidental use of untested combinations of
671 <productname>Autoconf</> and <productname>PostgreSQL</> versions.
672 You can remove the version check if you really want to use a
673 different <productname>Autoconf</> version, but it's
674 your responsibility whether the result works or not.
675 </para>
676 </listitem>
678 </itemizedlist>
680 </sect2>
681 </sect1>
683 <sect1 id="release-7-4-18">
684 <title>Release 7.4.18</title>
686 <note>
687 <title>Release date</title>
688 <simpara>2007-09-17</simpara>
689 </note>
691 <para>
692 This release contains fixes from 7.4.17.
693 For information about new features in the 7.4 major release, see
694 <xref linkend="release-7-4">.
695 </para>
697 <sect2>
698 <title>Migration to Version 7.4.18</title>
700 <para>
701 A dump/restore is not required for those running 7.4.X. However,
702 if you are upgrading from a version earlier than 7.4.11, see the release
703 notes for 7.4.11.
704 </para>
706 </sect2>
708 <sect2>
709 <title>Changes</title>
711 <itemizedlist>
713 <listitem>
714 <para>
715 Prevent index corruption when a transaction inserts rows and
716 then aborts close to the end of a concurrent <command>VACUUM</>
717 on the same table (Tom)
718 </para>
719 </listitem>
721 <listitem>
722 <para>
723 Make <command>CREATE DOMAIN ... DEFAULT NULL</> work properly (Tom)
724 </para>
725 </listitem>
727 <listitem>
728 <para>
729 Fix excessive logging of <acronym>SSL</> error messages (Tom)
730 </para>
731 </listitem>
733 <listitem>
734 <para>
735 Fix crash when <varname>log_min_error_statement</> logging runs out
736 of memory (Tom)
737 </para>
738 </listitem>
740 <listitem>
741 <para>
742 Prevent <command>CLUSTER</> from failing
743 due to attempting to process temporary tables of other sessions (Alvaro)
744 </para>
745 </listitem>
747 <listitem>
748 <para>
749 Require non-superusers who use <filename>/contrib/dblink</> to use only
750 password authentication, as a security measure (Joe)
751 </para>
752 </listitem>
754 </itemizedlist>
756 </sect2>
757 </sect1>
759 <sect1 id="release-7-4-17">
760 <title>Release 7.4.17</title>
762 <note>
763 <title>Release date</title>
764 <simpara>2007-04-23</simpara>
765 </note>
767 <para>
768 This release contains fixes from 7.4.16,
769 including a security fix.
770 For information about new features in the 7.4 major release, see
771 <xref linkend="release-7-4">.
772 </para>
774 <sect2>
775 <title>Migration to Version 7.4.17</title>
777 <para>
778 A dump/restore is not required for those running 7.4.X. However,
779 if you are upgrading from a version earlier than 7.4.11, see the release
780 notes for 7.4.11.
781 </para>
783 </sect2>
785 <sect2>
786 <title>Changes</title>
788 <itemizedlist>
790 <listitem>
791 <para>
792 Support explicit placement of the temporary-table schema within
793 <varname>search_path</>, and disable searching it for functions
794 and operators (Tom)
795 </para>
796 <para>
797 This is needed to allow a security-definer function to set a
798 truly secure value of <varname>search_path</>. Without it,
799 an unprivileged SQL user can use temporary objects to execute code
800 with the privileges of the security-definer function (CVE-2007-2138).
801 See <command>CREATE FUNCTION</> for more information.
802 </para>
803 </listitem>
805 <listitem>
806 <para>
807 <filename>/contrib/tsearch2</> crash fixes (Teodor)
808 </para>
809 </listitem>
811 <listitem>
812 <para>
813 Fix potential-data-corruption bug in how <command>VACUUM FULL</> handles
814 <command>UPDATE</> chains (Tom, Pavan Deolasee)
815 </para>
816 </listitem>
818 <listitem>
819 <para>
820 Fix PANIC during enlargement of a hash index (bug introduced in 7.4.15)
821 (Tom)
822 </para>
823 </listitem>
825 </itemizedlist>
827 </sect2>
828 </sect1>
830 <sect1 id="release-7-4-16">
831 <title>Release 7.4.16</title>
833 <note>
834 <title>Release date</title>
835 <simpara>2007-02-05</simpara>
836 </note>
838 <para>
839 This release contains a variety of fixes from 7.4.15, including
840 a security fix.
841 For information about new features in the 7.4 major release, see
842 <xref linkend="release-7-4">.
843 </para>
845 <sect2>
846 <title>Migration to Version 7.4.16</title>
848 <para>
849 A dump/restore is not required for those running 7.4.X. However,
850 if you are upgrading from a version earlier than 7.4.11, see the release
851 notes for 7.4.11.
852 </para>
854 </sect2>
856 <sect2>
857 <title>Changes</title>
859 <itemizedlist>
861 <listitem>
862 <para>
863 Remove security vulnerability that allowed connected users
864 to read backend memory (Tom)
865 </para>
866 <para>
867 The vulnerability involves suppressing the normal check that a SQL
868 function returns the data type it's declared to, or changing the
869 data type of a table column used in a SQL function (CVE-2007-0555).
870 This error can easily be exploited to cause a backend crash, and in
871 principle might be used to read database content that the user
872 should not be able to access.
873 </para>
874 </listitem>
876 <listitem>
877 <para>
878 Fix rare bug wherein btree index page splits could fail
879 due to choosing an infeasible split point (Heikki Linnakangas)
880 </para>
881 </listitem>
883 <listitem>
884 <para>
885 Fix for rare Assert() crash triggered by <literal>UNION</> (Tom)
886 </para>
887 </listitem>
889 <listitem>
890 <para>
891 Tighten security of multi-byte character processing for UTF8 sequences
892 over three bytes long (Tom)
893 </para>
894 </listitem>
896 </itemizedlist>
898 </sect2>
899 </sect1>
901 <sect1 id="release-7-4-15">
902 <title>Release 7.4.15</title>
904 <note>
905 <title>Release date</title>
906 <simpara>2007-01-08</simpara>
907 </note>
909 <para>
910 This release contains a variety of fixes from 7.4.14.
911 For information about new features in the 7.4 major release, see
912 <xref linkend="release-7-4">.
913 </para>
915 <sect2>
916 <title>Migration to Version 7.4.15</title>
918 <para>
919 A dump/restore is not required for those running 7.4.X. However,
920 if you are upgrading from a version earlier than 7.4.11, see the release
921 notes for 7.4.11.
922 </para>
924 </sect2>
926 <sect2>
927 <title>Changes</title>
929 <itemizedlist>
931 <listitem>
932 <para>
933 Improve handling of <function>getaddrinfo()</> on AIX (Tom)
934 </para>
936 <para>
937 This fixes a problem with starting the statistics collector,
938 among other things.
939 </para>
940 </listitem>
942 <listitem>
943 <para>
944 Fix <quote>failed to re-find parent key</> errors in
945 <command>VACUUM</> (Tom)
946 </para>
947 </listitem>
949 <listitem>
950 <para>
951 Fix bugs affecting multi-gigabyte hash indexes (Tom)
952 </para>
953 </listitem>
955 <listitem>
956 <para>
957 Fix error when constructing an <literal>ARRAY[]</> made up of multiple
958 empty elements (Tom)
959 </para>
960 </listitem>
962 <listitem>
963 <para>
964 <function>to_number()</> and <function>to_char(numeric)</>
965 are now <literal>STABLE</>, not <literal>IMMUTABLE</>, for
966 new <application>initdb</> installs (Tom)
967 </para>
969 <para>
970 This is because <varname>lc_numeric</> can potentially
971 change the output of these functions.
972 </para>
973 </listitem>
975 <listitem>
976 <para>
977 Improve index usage of regular expressions that use parentheses (Tom)
978 </para>
980 <para>
981 This improves <application>psql</> <literal>\d</> performance also.
982 </para>
983 </listitem>
985 </itemizedlist>
987 </sect2>
988 </sect1>
990 <sect1 id="release-7-4-14">
991 <title>Release 7.4.14</title>
993 <note>
994 <title>Release date</title>
995 <simpara>2006-10-16</simpara>
996 </note>
998 <para>
999 This release contains a variety of fixes from 7.4.13.
1000 For information about new features in the 7.4 major release, see
1001 <xref linkend="release-7-4">.
1002 </para>
1004 <sect2>
1005 <title>Migration to Version 7.4.14</title>
1007 <para>
1008 A dump/restore is not required for those running 7.4.X. However,
1009 if you are upgrading from a version earlier than 7.4.11, see the release
1010 notes for 7.4.11.
1011 </para>
1013 </sect2>
1015 <sect2>
1016 <title>Changes</title>
1018 <itemizedlist>
1019 <listitem><para>Fix core dump when an untyped literal is taken as
1020 ANYARRAY</para></listitem>
1021 <listitem><para>Fix <function>string_to_array()</> to handle overlapping
1022 matches for the separator string</para>
1023 <para>For example, <literal>string_to_array('123xx456xxx789', 'xx')</>.
1024 </para></listitem>
1025 <listitem><para>Fix corner cases in pattern matching for
1026 <application>psql</>'s <literal>\d</> commands</para></listitem>
1027 <listitem><para>Fix index-corrupting bugs in /contrib/ltree
1028 (Teodor)</para></listitem>
1029 <listitem><para>Fix backslash escaping in /contrib/dbmirror</para></listitem>
1030 <listitem><para>Adjust regression tests for recent changes in US DST laws
1031 </para> </listitem>
1032 </itemizedlist>
1034 </sect2>
1035 </sect1>
1037 <sect1 id="release-7-4-13">
1038 <title>Release 7.4.13</title>
1040 <note>
1041 <title>Release date</title>
1042 <simpara>2006-05-23</simpara>
1043 </note>
1045 <para>
1046 This release contains a variety of fixes from 7.4.12,
1047 including patches for extremely serious security issues.
1048 For information about new features in the 7.4 major release, see
1049 <xref linkend="release-7-4">.
1050 </para>
1052 <sect2>
1053 <title>Migration to Version 7.4.13</title>
1055 <para>
1056 A dump/restore is not required for those running 7.4.X. However,
1057 if you are upgrading from a version earlier than 7.4.11, see the release
1058 notes for 7.4.11.
1059 </para>
1061 <para>
1062 Full security against the SQL-injection attacks described in
1063 CVE-2006-2313 and CVE-2006-2314 might require changes in application
1064 code. If you have applications that embed untrustworthy strings
1065 into SQL commands, you should examine them as soon as possible to
1066 ensure that they are using recommended escaping techniques. In
1067 most cases, applications should be using subroutines provided by
1068 libraries or drivers (such as <application>libpq</>'s
1069 <function>PQescapeStringConn()</>) to perform string escaping,
1070 rather than relying on <foreignphrase>ad hoc</> code to do it.
1071 </para>
1072 </sect2>
1074 <sect2>
1075 <title>Changes</title>
1077 <itemizedlist>
1078 <listitem><para>Change the server to reject invalidly-encoded multibyte
1079 characters in all cases (Tatsuo, Tom)</para>
1080 <para>While <productname>PostgreSQL</> has been moving in this direction for
1081 some time, the checks are now applied uniformly to all encodings and all
1082 textual input, and are now always errors not merely warnings. This change
1083 defends against SQL-injection attacks of the type described in CVE-2006-2313.
1084 </para></listitem>
1086 <listitem><para>Reject unsafe uses of <literal>\'</> in string literals</para>
1087 <para>As a server-side defense against SQL-injection attacks of the type
1088 described in CVE-2006-2314, the server now only accepts <literal>''</> and not
1089 <literal>\'</> as a representation of ASCII single quote in SQL string
1090 literals. By default, <literal>\'</> is rejected only when
1091 <varname>client_encoding</> is set to a client-only encoding (SJIS, BIG5, GBK,
1092 GB18030, or UHC), which is the scenario in which SQL injection is possible.
1093 A new configuration parameter <varname>backslash_quote</> is available to
1094 adjust this behavior when needed. Note that full security against
1095 CVE-2006-2314 might require client-side changes; the purpose of
1096 <varname>backslash_quote</> is in part to make it obvious that insecure
1097 clients are insecure.
1098 </para></listitem>
1100 <listitem><para>Modify <application>libpq</>'s string-escaping routines to be
1101 aware of encoding considerations and
1102 <varname>standard_conforming_strings</></para>
1103 <para>This fixes <application>libpq</>-using applications for the security
1104 issues described in CVE-2006-2313 and CVE-2006-2314, and also future-proofs
1105 them against the planned changeover to SQL-standard string literal syntax.
1106 Applications that use multiple <productname>PostgreSQL</> connections
1107 concurrently should migrate to <function>PQescapeStringConn()</> and
1108 <function>PQescapeByteaConn()</> to ensure that escaping is done correctly
1109 for the settings in use in each database connection. Applications that
1110 do string escaping <quote>by hand</> should be modified to rely on library
1111 routines instead.
1112 </para></listitem>
1114 <listitem><para>Fix some incorrect encoding conversion functions</para>
1115 <para><function>win1251_to_iso</>, <function>alt_to_iso</>,
1116 <function>euc_tw_to_big5</>, <function>euc_tw_to_mic</>,
1117 <function>mic_to_euc_tw</> were all broken to varying
1118 extents.
1119 </para></listitem>
1121 <listitem><para>Clean up stray remaining uses of <literal>\'</> in strings
1122 (Bruce, Jan)</para></listitem>
1124 <listitem><para>Fix bug that sometimes caused OR'd index scans to
1125 miss rows they should have returned</para></listitem>
1127 <listitem><para>Fix WAL replay for case where a btree index has been
1128 truncated</para></listitem>
1130 <listitem><para>Fix <literal>SIMILAR TO</> for patterns involving
1131 <literal>|</> (Tom)</para></listitem>
1133 <listitem><para>Fix server to use custom DH SSL parameters correctly (Michael
1134 Fuhr)</para></listitem>
1136 <listitem><para>Fix for Bonjour on Intel Macs (Ashley Clark)</para></listitem>
1138 <listitem><para>Fix various minor memory leaks</para></listitem>
1139 </itemizedlist>
1141 </sect2>
1142 </sect1>
1144 <sect1 id="release-7-4-12">
1145 <title>Release 7.4.12</title>
1147 <note>
1148 <title>Release date</title>
1149 <simpara>2006-02-14</simpara>
1150 </note>
1152 <para>
1153 This release contains a variety of fixes from 7.4.11.
1154 For information about new features in the 7.4 major release, see
1155 <xref linkend="release-7-4">.
1156 </para>
1158 <sect2>
1159 <title>Migration to Version 7.4.12</title>
1161 <para>
1162 A dump/restore is not required for those running 7.4.X. However,
1163 if you are upgrading from a version earlier than 7.4.11, see the release
1164 notes for 7.4.11.
1165 </para>
1166 </sect2>
1168 <sect2>
1169 <title>Changes</title>
1171 <itemizedlist>
1173 <listitem><para>Fix potential crash in <command>SET
1174 SESSION AUTHORIZATION</> (CVE-2006-0553)</para>
1175 <para>An unprivileged user could crash the server process, resulting in
1176 momentary denial of service to other users, if the server has been compiled
1177 with Asserts enabled (which is not the default).
1178 Thanks to Akio Ishida for reporting this problem.
1179 </para></listitem>
1181 <listitem><para>Fix bug with row visibility logic in self-inserted
1182 rows (Tom)</para>
1183 <para>Under rare circumstances a row inserted by the current command
1184 could be seen as already valid, when it should not be. Repairs bug
1185 created in 7.4.9 and 7.3.11 releases.
1186 </para></listitem>
1188 <listitem><para>Fix race condition that could lead to <quote>file already
1189 exists</> errors during pg_clog file creation
1190 (Tom)</para></listitem>
1192 <listitem><para>Properly check <literal>DOMAIN</> constraints for
1193 <literal>UNKNOWN</> parameters in prepared statements
1194 (Neil)</para></listitem>
1196 <listitem><para>Fix to allow restoring dumps that have cross-schema
1197 references to custom operators (Tom)</para></listitem>
1199 <listitem><para>Portability fix for testing presence of <function>finite</>
1200 and <function>isinf</> during configure (Tom)</para></listitem>
1202 </itemizedlist>
1204 </sect2>
1205 </sect1>
1207 <sect1 id="release-7-4-11">
1208 <title>Release 7.4.11</title>
1210 <note>
1211 <title>Release date</title>
1212 <simpara>2006-01-09</simpara>
1213 </note>
1215 <para>
1216 This release contains a variety of fixes from 7.4.10.
1217 For information about new features in the 7.4 major release, see
1218 <xref linkend="release-7-4">.
1219 </para>
1221 <sect2>
1222 <title>Migration to Version 7.4.11</title>
1224 <para>
1225 A dump/restore is not required for those running 7.4.X. However,
1226 if you are upgrading from a version earlier than 7.4.8, see the release
1227 notes for 7.4.8.
1228 Also, you might need to <command>REINDEX</> indexes on textual
1229 columns after updating, if you are affected by the locale or
1230 <application>plperl</> issues described below.
1231 </para>
1232 </sect2>
1234 <sect2>
1235 <title>Changes</title>
1237 <itemizedlist>
1239 <listitem><para>Fix for protocol-level Describe messages issued
1240 outside a transaction or in a failed transaction (Tom)</para></listitem>
1242 <listitem><para>Fix character string comparison for locales that consider
1243 different character combinations as equal, such as Hungarian (Tom)</para>
1244 <para>This might require <command>REINDEX</> to fix existing indexes on
1245 textual columns.</para></listitem>
1247 <listitem><para>Set locale environment variables during postmaster startup
1248 to ensure that <application>plperl</> won't change the locale later</para>
1249 <para>This fixes a problem that occurred if the <application>postmaster</> was
1250 started with environment variables specifying a different locale than what
1251 <application>initdb</> had been told. Under these conditions, any use of
1252 <application>plperl</> was likely to lead to corrupt indexes. You might need
1253 <command>REINDEX</> to fix existing indexes on
1254 textual columns if this has happened to you.</para></listitem>
1256 <listitem><para>Fix longstanding bug in strpos() and regular expression
1257 handling in certain rarely used Asian multi-byte character sets (Tatsuo)
1258 </para></listitem>
1260 <listitem><para>Fix bug in <filename>/contrib/pgcrypto</> gen_salt,
1261 which caused it not to use all available salt space for MD5 and
1262 XDES algorithms (Marko Kreen, Solar Designer)</para>
1263 <para>Salts for Blowfish and standard DES are unaffected.</para></listitem>
1265 <listitem><para>Fix <filename>/contrib/dblink</> to throw an error,
1266 rather than crashing, when the number of columns specified is different from
1267 what's actually returned by the query (Joe)</para></listitem>
1269 </itemizedlist>
1271 </sect2>
1272 </sect1>
1274 <sect1 id="release-7-4-10">
1275 <title>Release 7.4.10</title>
1277 <note>
1278 <title>Release date</title>
1279 <simpara>2005-12-12</simpara>
1280 </note>
1282 <para>
1283 This release contains a variety of fixes from 7.4.9.
1284 For information about new features in the 7.4 major release, see
1285 <xref linkend="release-7-4">.
1286 </para>
1288 <sect2>
1289 <title>Migration to Version 7.4.10</title>
1291 <para>
1292 A dump/restore is not required for those running 7.4.X. However,
1293 if you are upgrading from a version earlier than 7.4.8, see the release
1294 notes for 7.4.8.
1295 </para>
1296 </sect2>
1298 <sect2>
1299 <title>Changes</title>
1301 <itemizedlist>
1303 <listitem><para>Fix race condition in transaction log management</para>
1304 <para>There was a narrow window in which an I/O operation could be initiated
1305 for the wrong page, leading to an Assert failure or data
1306 corruption.</para>
1307 </listitem>
1309 <listitem><para>Prevent failure if client sends Bind protocol message
1310 when current transaction is already aborted</para></listitem>
1312 <listitem><para><filename>/contrib/ltree</> fixes (Teodor)</para></listitem>
1314 <listitem><para>AIX and HPUX compile fixes (Tom)</para></listitem>
1316 <listitem><para>Fix longstanding planning error for outer joins</para>
1317 <para>This bug sometimes caused a bogus error <quote>RIGHT JOIN is
1318 only supported with merge-joinable join conditions</>.</para></listitem>
1320 <listitem><para>Prevent core dump in <application>pg_autovacuum</> when a
1321 table has been dropped</para></listitem>
1322 </itemizedlist>
1324 </sect2>
1325 </sect1>
1327 <sect1 id="release-7-4-9">
1328 <title>Release 7.4.9</title>
1330 <note>
1331 <title>Release date</title>
1332 <simpara>2005-10-04</simpara>
1333 </note>
1335 <para>
1336 This release contains a variety of fixes from 7.4.8.
1337 For information about new features in the 7.4 major release, see
1338 <xref linkend="release-7-4">.
1339 </para>
1341 <sect2>
1342 <title>Migration to Version 7.4.9</title>
1344 <para>
1345 A dump/restore is not required for those running 7.4.X. However,
1346 if you are upgrading from a version earlier than 7.4.8, see the release
1347 notes for 7.4.8.
1348 </para>
1349 </sect2>
1351 <sect2>
1352 <title>Changes</title>
1354 <itemizedlist>
1355 <listitem><para>Fix error that allowed <command>VACUUM</> to remove
1356 <literal>ctid</> chains too soon, and add more checking in code that follows
1357 <literal>ctid</> links</para>
1358 <para>This fixes a long-standing problem that could cause crashes in very rare
1359 circumstances.</para></listitem>
1360 <listitem><para>Fix <type>CHAR()</> to properly pad spaces to the specified
1361 length when using a multiple-byte character set (Yoshiyuki Asaba)</para>
1362 <para>In prior releases, the padding of <type>CHAR()</> was incorrect
1363 because it only padded to the specified number of bytes without
1364 considering how many characters were stored.</para></listitem>
1365 <listitem><para>Fix the sense of the test for read-only transaction
1366 in <command>COPY</></para>
1367 <para>The code formerly prohibited <command>COPY TO</>, where it should
1368 prohibit <command>COPY FROM</>.
1369 </para></listitem>
1370 <listitem><para>Fix planning problem with outer-join ON clauses that reference
1371 only the inner-side relation</para></listitem>
1372 <listitem><para>Further fixes for <literal>x FULL JOIN y ON true</> corner
1373 cases</para></listitem>
1374 <listitem><para>Make <function>array_in</> and <function>array_recv</> more
1375 paranoid about validating their OID parameter</para></listitem>
1376 <listitem><para>Fix missing rows in queries like <literal>UPDATE a=... WHERE
1377 a...</> with GiST index on column <literal>a</></para></listitem>
1378 <listitem><para>Improve robustness of datetime parsing</para></listitem>
1379 <listitem><para>Improve checking for partially-written WAL
1380 pages</para></listitem>
1381 <listitem><para>Improve robustness of signal handling when SSL is
1382 enabled</para></listitem>
1383 <listitem><para>Don't try to open more than <literal>max_files_per_process</>
1384 files during postmaster startup</para></listitem>
1385 <listitem><para>Various memory leakage fixes</para></listitem>
1386 <listitem><para>Various portability improvements</para></listitem>
1387 <listitem><para>Fix PL/PgSQL to handle <literal>var := var</> correctly when
1388 the variable is of pass-by-reference type</para></listitem>
1389 <listitem><para>Update <filename>contrib/tsearch2</> to use current Snowball
1390 code</para></listitem>
1391 </itemizedlist>
1393 </sect2>
1394 </sect1>
1396 <sect1 id="release-7-4-8">
1397 <title>Release 7.4.8</title>
1399 <note>
1400 <title>Release date</title>
1401 <simpara>2005-05-09</simpara>
1402 </note>
1404 <para>
1405 This release contains a variety of fixes from 7.4.7, including several
1406 security-related issues.
1407 For information about new features in the 7.4 major release, see
1408 <xref linkend="release-7-4">.
1409 </para>
1411 <sect2>
1412 <title>Migration to Version 7.4.8</title>
1414 <para>
1415 A dump/restore is not required for those running 7.4.X. However,
1416 it is one possible way of handling two significant security problems
1417 that have been found in the initial contents of 7.4.X system
1418 catalogs. A dump/initdb/reload sequence using 7.4.8's initdb will
1419 automatically correct these problems.
1420 </para>
1422 <para>
1423 The larger security problem is that the built-in character set encoding
1424 conversion functions can be invoked from SQL commands by unprivileged
1425 users, but the functions were not designed for such use and are not
1426 secure against malicious choices of arguments. The fix involves changing
1427 the declared parameter list of these functions so that they can no longer
1428 be invoked from SQL commands. (This does not affect their normal use
1429 by the encoding conversion machinery.)
1430 </para>
1432 <para>
1433 The lesser problem is that the <filename>contrib/tsearch2</> module
1434 creates several functions that are misdeclared to return
1435 <type>internal</> when they do not accept <type>internal</> arguments.
1436 This breaks type safety for all functions using <type>internal</>
1437 arguments.
1438 </para>
1440 <para>
1441 It is strongly recommended that all installations repair these errors,
1442 either by initdb or by following the manual repair procedures given
1443 below. The errors at least allow unprivileged database users to crash
1444 their server process, and might allow unprivileged users to gain the
1445 privileges of a database superuser.
1446 </para>
1448 <para>
1449 If you wish not to do an initdb, perform the following procedures instead.
1450 As the database superuser, do:
1452 <programlisting>
1453 BEGIN;
1454 UPDATE pg_proc SET proargtypes[3] = 'internal'::regtype
1455 WHERE pronamespace = 11 AND pronargs = 5
1456 AND proargtypes[2] = 'cstring'::regtype;
1457 -- The command should report having updated 90 rows;
1458 -- if not, rollback and investigate instead of committing!
1459 COMMIT;
1460 </programlisting>
1462 Next, if you have installed <filename>contrib/tsearch2</>, do:
1464 <programlisting>
1465 BEGIN;
1466 UPDATE pg_proc SET proargtypes[0] = 'internal'::regtype
1467 WHERE oid IN (
1468 'dex_init(text)'::regprocedure,
1469 'snb_en_init(text)'::regprocedure,
1470 'snb_ru_init(text)'::regprocedure,
1471 'spell_init(text)'::regprocedure,
1472 'syn_init(text)'::regprocedure
1474 -- The command should report having updated 5 rows;
1475 -- if not, rollback and investigate instead of committing!
1476 COMMIT;
1477 </programlisting>
1479 If this command fails with a message like <quote>function
1480 "dex_init(text)" does not exist</>, then either <filename>tsearch2</>
1481 is not installed in this database, or you already did the update.
1482 </para>
1484 <para>
1485 The above procedures must be carried out in <emphasis>each</> database
1486 of an installation, including <literal>template1</>, and ideally
1487 including <literal>template0</> as well. If you do not fix the
1488 template databases then any subsequently created databases will contain
1489 the same errors. <literal>template1</> can be fixed in the same way
1490 as any other database, but fixing <literal>template0</> requires
1491 additional steps. First, from any database issue:
1492 <programlisting>
1493 UPDATE pg_database SET datallowconn = true WHERE datname = 'template0';
1494 </programlisting>
1495 Next connect to <literal>template0</> and perform the above repair
1496 procedures. Finally, do:
1497 <programlisting>
1498 -- re-freeze template0:
1499 VACUUM FREEZE;
1500 -- and protect it against future alterations:
1501 UPDATE pg_database SET datallowconn = false WHERE datname = 'template0';
1502 </programlisting>
1503 </para>
1504 </sect2>
1506 <sect2>
1507 <title>Changes</title>
1509 <itemizedlist>
1510 <listitem><para>Change encoding function signature to prevent
1511 misuse</para></listitem>
1512 <listitem><para>Change <filename>contrib/tsearch2</> to avoid unsafe use of
1513 <type>INTERNAL</> function results</para></listitem>
1514 <listitem><para>Repair ancient race condition that allowed a transaction to be
1515 seen as committed for some purposes (eg SELECT FOR UPDATE) slightly sooner
1516 than for other purposes</para>
1517 <para>This is an extremely serious bug since it could lead to apparent
1518 data inconsistencies being briefly visible to applications.</para></listitem>
1519 <listitem><para>Repair race condition between relation extension and
1520 VACUUM</para>
1521 <para>This could theoretically have caused loss of a page's worth of
1522 freshly-inserted data, although the scenario seems of very low probability.
1523 There are no known cases of it having caused more than an Assert failure.
1524 </para></listitem>
1525 <listitem><para>Fix comparisons of <type>TIME WITH TIME ZONE</> values</para>
1526 <para>
1527 The comparison code was wrong in the case where the
1528 <literal>--enable-integer-datetimes</> configuration switch had been used.
1529 NOTE: if you have an index on a <type>TIME WITH TIME ZONE</> column,
1530 it will need to be <command>REINDEX</>ed after installing this update, because
1531 the fix corrects the sort order of column values.
1532 </para></listitem>
1533 <listitem><para>Fix <function>EXTRACT(EPOCH)</> for
1534 <type>TIME WITH TIME ZONE</> values</para></listitem>
1535 <listitem><para>Fix mis-display of negative fractional seconds in
1536 <type>INTERVAL</> values</para>
1537 <para>
1538 This error only occurred when the
1539 <literal>--enable-integer-datetimes</> configuration switch had been used.
1540 </para></listitem>
1541 <listitem><para>Ensure operations done during backend shutdown are counted by
1542 statistics collector</para>
1543 <para>
1544 This is expected to resolve reports of <application>pg_autovacuum</>
1545 not vacuuming the system catalogs often enough &mdash; it was not being
1546 told about catalog deletions caused by temporary table removal during
1547 backend exit.
1548 </para></listitem>
1549 <listitem><para>Additional buffer overrun checks in plpgsql
1550 (Neil)</para></listitem>
1551 <listitem><para>Fix pg_dump to dump trigger names containing <literal>%</>
1552 correctly (Neil)</para></listitem>
1553 <listitem><para>Fix <filename>contrib/pgcrypto</> for newer OpenSSL builds
1554 (Marko Kreen)</para></listitem>
1555 <listitem><para>Still more 64-bit fixes for
1556 <filename>contrib/intagg</></para></listitem>
1557 <listitem><para>Prevent incorrect optimization of functions returning
1558 <type>RECORD</></para></listitem>
1559 <listitem><para>Prevent <function>to_char(interval)</> from dumping core for
1560 month-related formats</para></listitem>
1561 <listitem><para>Prevent crash on <literal>COALESCE(NULL,NULL)</></para></listitem>
1562 <listitem><para>Fix <function>array_map</> to call PL functions correctly</para></listitem>
1563 <listitem><para>Fix permission checking in <command>ALTER DATABASE RENAME</></para></listitem>
1564 <listitem><para>Fix <command>ALTER LANGUAGE RENAME</></para></listitem>
1565 <listitem><para>Make <function>RemoveFromWaitQueue</> clean up after itself</para>
1566 <para>
1567 This fixes a lock management error that would only be visible if a transaction
1568 was kicked out of a wait for a lock (typically by query cancel) and then the
1569 holder of the lock released it within a very narrow window.
1570 </para></listitem>
1571 <listitem><para>Fix problem with untyped parameter appearing in
1572 <command>INSERT ... SELECT</></para></listitem>
1573 <listitem><para>Fix <command>CLUSTER</> failure after
1574 <command>ALTER TABLE SET WITHOUT OIDS</></para></listitem>
1575 </itemizedlist>
1577 </sect2>
1578 </sect1>
1580 <sect1 id="release-7-4-7">
1581 <title>Release 7.4.7</title>
1583 <note>
1584 <title>Release date</title>
1585 <simpara>2005-01-31</simpara>
1586 </note>
1588 <para>
1589 This release contains a variety of fixes from 7.4.6, including several
1590 security-related issues.
1591 For information about new features in the 7.4 major release, see
1592 <xref linkend="release-7-4">.
1593 </para>
1595 <sect2>
1596 <title>Migration to Version 7.4.7</title>
1598 <para>
1599 A dump/restore is not required for those running 7.4.X.
1600 </para>
1601 </sect2>
1603 <sect2>
1604 <title>Changes</title>
1606 <itemizedlist>
1607 <listitem><para>Disallow <command>LOAD</> to non-superusers</para>
1608 <para>
1609 On platforms that will automatically execute initialization functions of a
1610 shared library (this includes at least Windows and ELF-based Unixen),
1611 <command>LOAD</> can be used to make the server execute arbitrary code.
1612 Thanks to NGS Software for reporting this.</para></listitem>
1613 <listitem><para>Check that creator of an aggregate function has the right to
1614 execute the specified transition functions</para>
1615 <para>
1616 This oversight made it possible to bypass denial of EXECUTE
1617 permission on a function.</para></listitem>
1618 <listitem><para>Fix security and 64-bit issues in
1619 contrib/intagg</para></listitem>
1620 <listitem><para>Add needed STRICT marking to some contrib functions (Kris
1621 Jurka)</para></listitem>
1622 <listitem><para>Avoid buffer overrun when plpgsql cursor declaration has too
1623 many parameters (Neil)</para></listitem>
1624 <listitem><para>Fix planning error for FULL and RIGHT outer joins</para>
1625 <para>
1626 The result of the join was mistakenly supposed to be sorted the same as the
1627 left input. This could not only deliver mis-sorted output to the user, but
1628 in case of nested merge joins could give outright wrong answers.
1629 </para></listitem>
1630 <listitem><para>Fix plperl for quote marks in tuple fields</para></listitem>
1631 <listitem><para>Fix display of negative intervals in SQL and GERMAN
1632 datestyles</para></listitem>
1633 <listitem><para>Make age(timestamptz) do calculation in local timezone not
1634 GMT</para></listitem>
1635 </itemizedlist>
1637 </sect2>
1638 </sect1>
1640 <sect1 id="release-7-4-6">
1641 <title>Release 7.4.6</title>
1643 <note>
1644 <title>Release date</title>
1645 <simpara>2004-10-22</simpara>
1646 </note>
1648 <para>
1649 This release contains a variety of fixes from 7.4.5.
1650 For information about new features in the 7.4 major release, see
1651 <xref linkend="release-7-4">.
1652 </para>
1655 <sect2>
1656 <title>Migration to Version 7.4.6</title>
1658 <para>
1659 A dump/restore is not required for those running 7.4.X.
1660 </para>
1661 </sect2>
1663 <sect2>
1664 <title>Changes</title>
1666 <itemizedlist>
1667 <listitem><para>Repair possible failure to update hint bits on disk</para>
1668 <para>
1669 Under rare circumstances this oversight could lead to
1670 <quote>could not access transaction status</> failures, which qualifies
1671 it as a potential-data-loss bug.
1672 </para></listitem>
1673 <listitem><para>Ensure that hashed outer join does not miss tuples</para>
1674 <para>
1675 Very large left joins using a hash join plan could fail to output unmatched
1676 left-side rows given just the right data distribution.
1677 </para></listitem>
1678 <listitem><para>Disallow running <application>pg_ctl</> as root</para>
1679 <para>
1680 This is to guard against any possible security issues.
1681 </para></listitem>
1682 <listitem><para>Avoid using temp files in <filename>/tmp</> in <command>make_oidjoins_check</command></para>
1683 <para>
1684 This has been reported as a security issue, though it's hardly worthy of
1685 concern since there is no reason for non-developers to use this script anyway.
1686 </para></listitem>
1687 <listitem><para>Prevent forced backend shutdown from re-emitting prior command
1688 result</para>
1689 <para>
1690 In rare cases, a client might think that its last command had succeeded when
1691 it really had been aborted by forced database shutdown.
1692 </para></listitem>
1693 <listitem><para>Repair bug in <function>pg_stat_get_backend_idset</function></para>
1694 <para>
1695 This could lead to misbehavior in some of the system-statistics views.
1696 </para></listitem>
1697 <listitem><para>Fix small memory leak in postmaster</para></listitem>
1698 <listitem><para>Fix <quote>expected both swapped tables to have TOAST
1699 tables</> bug</para>
1700 <para>
1701 This could arise in cases such as CLUSTER after ALTER TABLE DROP COLUMN.
1702 </para></listitem>
1703 <listitem><para>Prevent <literal>pg_ctl restart</> from adding <literal>-D</> multiple times</para></listitem>
1704 <listitem><para>Fix problem with NULL values in GiST indexes</para></listitem>
1705 <listitem><para><literal>::</> is no longer interpreted as a variable in an
1706 ECPG prepare statement</para></listitem>
1707 </itemizedlist>
1709 </sect2>
1710 </sect1>
1712 <sect1 id="release-7-4-5">
1713 <title>Release 7.4.5</title>
1715 <note>
1716 <title>Release date</title>
1717 <simpara>2004-08-18</simpara>
1718 </note>
1720 <para>
1721 This release contains one serious bug fix over 7.4.4.
1722 For information about new features in the 7.4 major release, see
1723 <xref linkend="release-7-4">.
1724 </para>
1727 <sect2>
1728 <title>Migration to Version 7.4.5</title>
1730 <para>
1731 A dump/restore is not required for those running 7.4.X.
1732 </para>
1733 </sect2>
1735 <sect2>
1736 <title>Changes</title>
1738 <itemizedlist>
1739 <listitem><para>Repair possible crash during concurrent B-tree index insertions</para>
1740 <para>
1741 This patch fixes a rare case in which concurrent insertions into a B-tree index
1742 could result in a server panic. No permanent damage would result, but it's
1743 still worth a re-release. The bug does not exist in pre-7.4 releases.
1744 </para></listitem>
1745 </itemizedlist>
1747 </sect2>
1748 </sect1>
1750 <sect1 id="release-7-4-4">
1751 <title>Release 7.4.4</title>
1753 <note>
1754 <title>Release date</title>
1755 <simpara>2004-08-16</simpara>
1756 </note>
1758 <para>
1759 This release contains a variety of fixes from 7.4.3.
1760 For information about new features in the 7.4 major release, see
1761 <xref linkend="release-7-4">.
1762 </para>
1765 <sect2>
1766 <title>Migration to Version 7.4.4</title>
1768 <para>
1769 A dump/restore is not required for those running 7.4.X.
1770 </para>
1771 </sect2>
1773 <sect2>
1774 <title>Changes</title>
1776 <itemizedlist>
1777 <listitem><para>Prevent possible loss of committed transactions during crash</para>
1778 <para>
1779 Due to insufficient interlocking between transaction commit and checkpointing,
1780 it was possible for transactions committed just before the most recent
1781 checkpoint to be lost, in whole or in part, following a database crash and
1782 restart. This is a serious bug that has existed
1783 since <productname>PostgreSQL</productname> 7.1.
1784 </para></listitem>
1785 <listitem><para>Check HAVING restriction before evaluating result list of an
1786 aggregate plan</para></listitem>
1787 <listitem><para>Avoid crash when session's current user ID is deleted</para></listitem>
1788 <listitem><para>Fix hashed crosstab for zero-rows case (Joe)</para></listitem>
1789 <listitem><para>Force cache update after renaming a column in a foreign key</para></listitem>
1790 <listitem><para>Pretty-print UNION queries correctly</para></listitem>
1791 <listitem><para>Make psql handle <literal>\r\n</> newlines properly in COPY IN</para></listitem>
1792 <listitem><para><application>pg_dump</> handled ACLs with grant options incorrectly</para></listitem>
1793 <listitem><para>Fix thread support for OS X and Solaris</para></listitem>
1794 <listitem><para>Updated JDBC driver (build 215) with various fixes</para></listitem>
1795 <listitem><para>ECPG fixes</para></listitem>
1796 <listitem><para>Translation updates (various contributors)</para></listitem>
1797 </itemizedlist>
1799 </sect2>
1800 </sect1>
1802 <sect1 id="release-7-4-3">
1803 <title>Release 7.4.3</title>
1805 <note>
1806 <title>Release date</title>
1807 <simpara>2004-06-14</simpara>
1808 </note>
1810 <para>
1811 This release contains a variety of fixes from 7.4.2.
1812 For information about new features in the 7.4 major release, see
1813 <xref linkend="release-7-4">.
1814 </para>
1817 <sect2>
1818 <title>Migration to Version 7.4.3</title>
1820 <para>
1821 A dump/restore is not required for those running 7.4.X.
1822 </para>
1823 </sect2>
1825 <sect2>
1826 <title>Changes</title>
1828 <itemizedlist>
1829 <listitem><para>Fix temporary memory leak when using non-hashed aggregates (Tom)</para></listitem>
1830 <listitem><para>ECPG fixes, including some for Informix compatibility (Michael)</para></listitem>
1831 <listitem><para>Fixes for compiling with thread-safety, particularly Solaris (Bruce)</para></listitem>
1832 <listitem><para>Fix error in COPY IN termination when using the old network protocol (ljb)</para></listitem>
1833 <listitem><para>Several important fixes in pg_autovacuum, including fixes for
1834 large tables, unsigned oids, stability, temp tables, and debug mode
1835 (Matthew T. O'Connor)</para></listitem>
1836 <listitem><para>Fix problem with reading tar-format dumps on NetBSD and BSD/OS (Bruce)</para></listitem>
1837 <listitem><para>Several JDBC fixes</para></listitem>
1838 <listitem><para>Fix ALTER SEQUENCE RESTART where last_value equals the restart value (Tom)</para></listitem>
1839 <listitem><para>Repair failure to recalculate nested sub-selects (Tom)</para></listitem>
1840 <listitem><para>Fix problems with non-constant expressions in LIMIT/OFFSET</para></listitem>
1841 <listitem><para>Support FULL JOIN with no join clause, such as X FULL JOIN Y ON TRUE (Tom)</para></listitem>
1842 <listitem><para>Fix another zero-column table bug (Tom)</para></listitem>
1843 <listitem><para>Improve handling of non-qualified identifiers in GROUP BY clauses in sub-selects (Tom)</para>
1844 <para>
1845 Select-list aliases within the sub-select will now take precedence over
1846 names from outer query levels.
1847 </para></listitem>
1848 <listitem><para>Do not generate <quote>NATURAL CROSS JOIN</> when decompiling rules (Tom)</para></listitem>
1849 <listitem><para>Add checks for invalid field length in binary COPY (Tom)</para>
1850 <para>
1851 This fixes a difficult-to-exploit security hole.
1852 </para></listitem>
1853 <listitem><para>Avoid locking conflict between <command>ANALYZE</command> and <command>LISTEN</command>/<command>NOTIFY</command></para></listitem>
1854 <listitem><para>Numerous translation updates (various contributors)</para></listitem>
1855 </itemizedlist>
1857 </sect2>
1858 </sect1>
1860 <sect1 id="release-7-4-2">
1861 <title>Release 7.4.2</title>
1863 <note>
1864 <title>Release date</title>
1865 <simpara>2004-03-08</simpara>
1866 </note>
1868 <para>
1869 This release contains a variety of fixes from 7.4.1.
1870 For information about new features in the 7.4 major release, see
1871 <xref linkend="release-7-4">.
1872 </para>
1875 <sect2>
1876 <title>Migration to Version 7.4.2</title>
1878 <para>
1879 A dump/restore is not required for those running 7.4.X. However,
1880 it might be advisable as the easiest method of incorporating fixes for
1881 two errors that have been found in the initial contents of 7.4.X system
1882 catalogs. A dump/initdb/reload sequence using 7.4.2's initdb will
1883 automatically correct these problems.
1884 </para>
1886 <para>
1887 The more severe of the two errors is that data type <type>anyarray</>
1888 has the wrong alignment label; this is a problem because the
1889 <structname>pg_statistic</> system catalog uses <type>anyarray</>
1890 columns. The mislabeling can cause planner misestimations and even
1891 crashes when planning queries that involve <literal>WHERE</> clauses on
1892 double-aligned columns (such as <type>float8</> and <type>timestamp</>).
1893 It is strongly recommended that all installations repair this error,
1894 either by initdb or by following the manual repair procedure given
1895 below.
1896 </para>
1898 <para>
1899 The lesser error is that the system view <structname>pg_settings</>
1900 ought to be marked as having public update access, to allow
1901 <literal>UPDATE pg_settings</> to be used as a substitute for
1902 <command>SET</>. This can also be fixed either by initdb or manually,
1903 but it is not necessary to fix unless you want to use <literal>UPDATE
1904 pg_settings</>.
1905 </para>
1907 <para>
1908 If you wish not to do an initdb, the following procedure will work
1909 for fixing <structname>pg_statistic</>. As the database superuser,
1912 <programlisting>
1913 -- clear out old data in pg_statistic:
1914 DELETE FROM pg_statistic;
1915 VACUUM pg_statistic;
1916 -- this should update 1 row:
1917 UPDATE pg_type SET typalign = 'd' WHERE oid = 2277;
1918 -- this should update 6 rows:
1919 UPDATE pg_attribute SET attalign = 'd' WHERE atttypid = 2277;
1921 -- At this point you MUST start a fresh backend to avoid a crash!
1923 -- repopulate pg_statistic:
1924 ANALYZE;
1925 </programlisting>
1927 This can be done in a live database, but beware that all backends
1928 running in the altered database must be restarted before it is safe to
1929 repopulate <structname>pg_statistic</>.
1930 </para>
1932 <para>
1933 To repair the <structname>pg_settings</> error, simply do:
1934 <programlisting>
1935 GRANT SELECT, UPDATE ON pg_settings TO PUBLIC;
1936 </programlisting>
1937 </para>
1939 <para>
1940 The above procedures must be carried out in <emphasis>each</> database
1941 of an installation, including <literal>template1</>, and ideally
1942 including <literal>template0</> as well. If you do not fix the
1943 template databases then any subsequently created databases will contain
1944 the same errors. <literal>template1</> can be fixed in the same way
1945 as any other database, but fixing <literal>template0</> requires
1946 additional steps. First, from any database issue:
1947 <programlisting>
1948 UPDATE pg_database SET datallowconn = true WHERE datname = 'template0';
1949 </programlisting>
1950 Next connect to <literal>template0</> and perform the above repair
1951 procedures. Finally, do:
1952 <programlisting>
1953 -- re-freeze template0:
1954 VACUUM FREEZE;
1955 -- and protect it against future alterations:
1956 UPDATE pg_database SET datallowconn = false WHERE datname = 'template0';
1957 </programlisting>
1958 </para>
1959 </sect2>
1961 <sect2>
1962 <title>Changes</title>
1964 <para>
1965 Release 7.4.2 incorporates all the fixes included in release 7.3.6,
1966 plus the following fixes:
1967 </para>
1969 <itemizedlist>
1970 <listitem><para>Fix <structname>pg_statistics</> alignment bug that could crash optimizer</para>
1971 <para>See above for details about this problem.</para></listitem>
1972 <listitem><para>Allow non-super users to update <structname>pg_settings</></para></listitem>
1973 <listitem><para>Fix several optimizer bugs, most of which led to
1974 <quote>variable not found in subplan target lists</> errors</para></listitem>
1975 <listitem><para>Avoid out-of-memory failure during startup of large multiple
1976 index scan</para></listitem>
1977 <listitem><para>Fix multibyte problem that could lead to <quote>out of
1978 memory</> error during <command>COPY IN</></para></listitem>
1979 <listitem><para>Fix problems with <command>SELECT INTO</> / <command>CREATE
1980 TABLE AS</> from tables without OIDs</para></listitem>
1981 <listitem><para>Fix problems with <filename>alter_table</> regression test
1982 during parallel testing</para></listitem>
1983 <listitem><para>Fix problems with hitting open file limit, especially on OS X (Tom)</para></listitem>
1984 <listitem><para>Partial fix for Turkish-locale issues</para>
1985 <para>initdb will succeed now in Turkish locale, but there are still some
1986 inconveniences associated with the <literal>i/I</> problem.</para></listitem>
1987 <listitem><para>Make pg_dump set client encoding on restore</para></listitem>
1988 <listitem><para>Other minor pg_dump fixes</para></listitem>
1989 <listitem><para>Allow ecpg to again use C keywords as column names (Michael)</para></listitem>
1990 <listitem><para>Added ecpg <literal>WHENEVER NOT_FOUND</> to
1991 <literal>SELECT/INSERT/UPDATE/DELETE</> (Michael)</para></listitem>
1992 <listitem><para>Fix ecpg crash for queries calling set-returning functions (Michael)</para></listitem>
1993 <listitem><para>Various other ecpg fixes (Michael)</para></listitem>
1994 <listitem><para>Fixes for Borland compiler</para></listitem>
1995 <listitem><para>Thread build improvements (Bruce)</para></listitem>
1996 <listitem><para>Various other build fixes</para></listitem>
1997 <listitem><para>Various JDBC fixes</para></listitem>
1998 </itemizedlist>
2000 </sect2>
2001 </sect1>
2003 <sect1 id="release-7-4-1">
2004 <title>Release 7.4.1</title>
2006 <note>
2007 <title>Release date</title>
2008 <simpara>2003-12-22</simpara>
2009 </note>
2011 <para>
2012 This release contains a variety of fixes from 7.4.
2013 For information about new features in the 7.4 major release, see
2014 <xref linkend="release-7-4">.
2015 </para>
2018 <sect2>
2019 <title>Migration to Version 7.4.1</title>
2021 <para>
2022 A dump/restore is <emphasis>not</emphasis> required for those
2023 running 7.4.
2024 </para>
2026 <para>
2027 If you want to install the fixes in the information schema
2028 you need to reload it into the database.
2029 This is either accomplished by initializing a new cluster
2030 by running <command>initdb</command>, or by running the following
2031 sequence of SQL commands in each database (ideally including
2032 <literal>template1</literal>) as a superuser in
2033 <application>psql</application>, after installing the new release:
2034 <programlisting>
2035 DROP SCHEMA information_schema CASCADE;
2036 \i /usr/local/pgsql/share/information_schema.sql
2037 </programlisting>
2038 Substitute your installation path in the second command.
2039 </para>
2041 </sect2>
2043 <sect2>
2044 <title>Changes</title>
2046 <itemizedlist>
2047 <listitem><para>Fixed bug in <command>CREATE SCHEMA</command> parsing in ECPG (Michael)</para></listitem>
2048 <listitem><para>Fix compile error when <option>--enable-thread-safety</option> and <option>--with-perl</option> are used together (Peter)</para></listitem>
2049 <listitem><para>Fix for subqueries that used hash joins (Tom)</para>
2050 <para>
2051 Certain subqueries that used hash joins would crash because of
2052 improperly shared structures.
2053 </para></listitem>
2054 <listitem><para>Fix free space map compaction bug (Tom)</para>
2055 <para>
2056 This fixes a bug where compaction of the free space map could lead
2057 to a database server shutdown.
2058 </para>
2059 </listitem>
2060 <listitem><para>Fix for Borland compiler build of libpq (Bruce)</para></listitem>
2061 <listitem><para>Fix <function>netmask()</function> and <function>hostmask()</function> to return the maximum-length masklen (Tom)</para>
2062 <para>
2063 Fix these functions to return values consistent with pre-7.4
2064 releases.
2065 </para>
2066 </listitem>
2067 <listitem><para>Several <filename>contrib/pg_autovacuum</filename> fixes</para>
2068 <para>
2069 Fixes include improper variable initialization, missing vacuum after
2070 <command>TRUNCATE</command>, and duration computation overflow for long vacuums.
2071 </para>
2072 </listitem>
2073 <listitem><para>Allow compile of <filename>contrib/cube</filename> under Cygwin (Jason Tishler)</para></listitem>
2074 <listitem><para>Fix Solaris use of password file when no passwords are defined (Tom)</para>
2075 <para>
2076 Fix crash on Solaris caused by use of any type of password
2077 authentication when no passwords were defined.
2078 </para>
2079 </listitem>
2080 <listitem><para>JDBC fix for thread problems, other fixes</para></listitem>
2081 <listitem><para>Fix for <type>bytea</type> index lookups (Joe)</para></listitem>
2082 <listitem><para>Fix information schema for bit data types (Peter)</para></listitem>
2083 <listitem><para>Force zero_damaged_pages to be on during recovery from WAL</para></listitem>
2084 <listitem><para>Prevent some obscure cases of <quote>variable not in subplan target lists</quote></para></listitem>
2085 <listitem><para>Make <function>PQescapeBytea</function> and <function>byteaout</function> consistent with each other (Joe)</para></listitem>
2086 <listitem><para>Escape <type>bytea</type> output for bytes &gt; 0x7e(Joe)</para>
2087 <para>
2088 If different client encodings are used for <type>bytea</type> output and input, it
2089 is possible for <type>bytea</type> values to be corrupted by the differing
2090 encodings. This fix escapes all bytes that might be affected.
2091 </para>
2092 </listitem>
2093 <listitem><para>Added missing <function>SPI_finish()</function> calls to dblink's <function>get_tuple_of_interest()</function> (Joe)</para></listitem>
2094 <listitem><para>New Czech FAQ</para></listitem>
2095 <listitem><para>Fix information schema view <literal>constraint_column_usage</literal> for foreign keys (Peter)</para></listitem>
2096 <listitem><para>ECPG fixes (Michael)</para></listitem>
2097 <listitem><para>Fix bug with multiple <literal>IN</literal> subqueries and joins in the subqueries (Tom)</para></listitem>
2098 <listitem><para>Allow <literal>COUNT('x')</literal> to work (Tom)</para></listitem>
2099 <listitem><para>Install ECPG include files for Informix compatibility into separate directory (Peter)</para>
2100 <para>
2101 Some names of ECPG include files for Informix compatibility conflicted with operating system include files.
2102 By installing them in their own directory, name conflicts have been reduced.
2103 </para>
2104 </listitem>
2105 <listitem><para>Fix SSL memory leak (Neil)</para>
2106 <para>
2107 This release fixes a bug in 7.4 where SSL didn't free all memory it allocated.
2108 </para>
2109 </listitem>
2110 <listitem><para>Prevent <filename>pg_service.conf</filename> from using service name as default dbname (Bruce)</para></listitem>
2111 <listitem><para>Fix local ident authentication on FreeBSD (Tom)</para></listitem>
2112 </itemizedlist>
2114 </sect2>
2115 </sect1>
2117 <sect1 id="release-7-4">
2118 <title>Release 7.4</title>
2120 <note>
2121 <title>Release date</title>
2122 <simpara>2003-11-17</simpara>
2123 </note>
2125 <sect2>
2126 <title>Overview</title>
2128 <para>
2129 Major changes in this release:
2130 </para>
2132 <variablelist>
2133 <varlistentry>
2134 <term>
2135 <literal>IN</literal> / <literal>NOT IN</literal> subqueries are
2136 now much more efficient
2137 </term>
2139 <listitem>
2140 <para>
2141 In previous releases, <literal>IN</literal>/<literal>NOT
2142 IN</literal> subqueries were joined to the upper query by
2143 sequentially scanning the subquery looking for a match. The
2144 7.4 code uses the same sophisticated techniques used by
2145 ordinary joins and so is much faster. An
2146 <literal>IN</literal> will now usually be as fast as or faster
2147 than an equivalent <literal>EXISTS</literal> subquery; this
2148 reverses the conventional wisdom that applied to previous
2149 releases.
2150 </para>
2151 </listitem>
2152 </varlistentry>
2154 <varlistentry>
2155 <term>
2156 Improved <literal>GROUP BY</literal> processing by using hash buckets
2157 </term>
2159 <listitem>
2160 <para>
2161 In previous releases, rows to be grouped had to be sorted
2162 first. The 7.4 code can do <literal>GROUP BY</literal>
2163 without sorting, by accumulating results into a hash table
2164 with one entry per group. It will still use the sort
2165 technique, however, if the hash table is estimated to be too
2166 large to fit in <varname>sort_mem</>.
2167 </para>
2168 </listitem>
2169 </varlistentry>
2171 <varlistentry>
2172 <term>
2173 New multikey hash join capability
2174 </term>
2176 <listitem>
2177 <para>
2178 In previous releases, hash joins could only occur on single
2179 keys. This release allows multicolumn hash joins.
2180 </para>
2181 </listitem>
2182 </varlistentry>
2184 <varlistentry>
2185 <term>
2186 Queries using the explicit <literal>JOIN</literal> syntax are
2187 now better optimized
2188 </term>
2190 <listitem>
2191 <para>
2192 Prior releases evaluated queries using the explicit
2193 <literal>JOIN</literal> syntax only in the order implied by
2194 the syntax. 7.4 allows full optimization of these queries,
2195 meaning the optimizer considers all possible join orderings
2196 and chooses the most efficient. Outer joins, however, must
2197 still follow the declared ordering.
2198 </para>
2199 </listitem>
2200 </varlistentry>
2202 <varlistentry>
2203 <term>
2204 Faster and more powerful regular expression code
2205 </term>
2207 <listitem>
2208 <para>
2209 The entire regular expression module has been replaced with a
2210 new version by Henry Spencer, originally written for Tcl. The
2211 code greatly improves performance and supports several flavors
2212 of regular expressions.
2213 </para>
2214 </listitem>
2215 </varlistentry>
2217 <varlistentry>
2218 <term>
2219 Function-inlining for simple SQL functions
2220 </term>
2222 <listitem>
2223 <para>
2224 Simple SQL functions can now be inlined by including their SQL
2225 in the main query. This improves performance by eliminating
2226 per-call overhead. That means simple SQL functions now
2227 behave like macros.
2228 </para>
2229 </listitem>
2230 </varlistentry>
2232 <varlistentry>
2233 <term>
2234 Full support for IPv6 connections and IPv6 address data types
2235 </term>
2237 <listitem>
2238 <para>
2239 Previous releases allowed only IPv4 connections, and the IP
2240 data types only supported IPv4 addresses. This release adds
2241 full IPv6 support in both of these areas.
2242 </para>
2243 </listitem>
2244 </varlistentry>
2246 <varlistentry>
2247 <term>
2248 Major improvements in SSL performance and reliability
2249 </term>
2251 <listitem>
2252 <para>
2253 Several people very familiar with the SSL API have overhauled
2254 our SSL code to improve SSL key negotiation and error
2255 recovery.
2256 </para>
2257 </listitem>
2258 </varlistentry>
2260 <varlistentry>
2261 <term>
2262 Make free space map efficiently reuse empty index pages,
2263 and other free space management improvements
2264 </term>
2266 <listitem>
2267 <para>
2268 In previous releases, B-tree index pages that were left empty
2269 because of deleted rows could only be reused by rows with
2270 index values similar to the rows originally indexed on that
2271 page. In 7.4, <command>VACUUM</command> records empty index
2272 pages and allows them to be reused for any future index rows.
2273 </para>
2274 </listitem>
2275 </varlistentry>
2277 <varlistentry>
2278 <term>
2279 SQL-standard information schema
2280 </term>
2282 <listitem>
2283 <para>
2284 The information schema provides a standardized and stable way
2285 to access information about the schema objects defined in a
2286 database.
2287 </para>
2288 </listitem>
2289 </varlistentry>
2291 <varlistentry>
2292 <term>
2293 Cursors conform more closely to the SQL standard
2294 </term>
2296 <listitem>
2297 <para>
2298 The commands <command>FETCH</command> and
2299 <command>MOVE</command> have been overhauled to conform more
2300 closely to the SQL standard.
2301 </para>
2302 </listitem>
2303 </varlistentry>
2305 <varlistentry>
2306 <term>
2307 Cursors can exist outside transactions
2308 </term>
2310 <listitem>
2311 <para>
2312 These cursors are also called holdable cursors.
2313 </para>
2314 </listitem>
2315 </varlistentry>
2317 <varlistentry>
2318 <term>
2319 New client-to-server protocol
2320 </term>
2322 <listitem>
2323 <para>
2324 The new protocol adds error codes, more status information,
2325 faster startup, better support for binary data transmission,
2326 parameter values separated from SQL commands, prepared
2327 statements available at the protocol level, and cleaner
2328 recovery from <command>COPY</command> failures. The older
2329 protocol is still supported by both server and clients.
2330 </para>
2331 </listitem>
2332 </varlistentry>
2334 <varlistentry>
2335 <term>
2336 <application>libpq</application> and
2337 <application>ECPG</application> applications are now fully
2338 thread-safe
2339 </term>
2341 <listitem>
2342 <para>
2343 While previous <application>libpq</application> releases
2344 already supported threads, this release improves thread safety
2345 by fixing some non-thread-safe code that was used during
2346 database connection startup. The <command>configure</command>
2347 option <option>--enable-thread-safety</option> must be used to
2348 enable this feature.
2349 </para>
2350 </listitem>
2351 </varlistentry>
2353 <varlistentry>
2354 <term>
2355 New version of full-text indexing
2356 </term>
2358 <listitem>
2359 <para>
2360 A new full-text indexing suite is available in
2361 <filename>contrib/tsearch2</filename>.
2362 </para>
2363 </listitem>
2364 </varlistentry>
2366 <varlistentry>
2367 <term>
2368 New autovacuum tool
2369 </term>
2371 <listitem>
2372 <para>
2373 The new autovacuum tool in
2374 <filename>contrib/autovacuum</filename> monitors the database
2375 statistics tables for
2376 <command>INSERT</command>/<command>UPDATE</command>/<command>DELETE</command>
2377 activity and automatically vacuums tables when needed.
2378 </para>
2379 </listitem>
2380 </varlistentry>
2382 <varlistentry>
2383 <term>
2384 Array handling has been improved and moved into the server core
2385 </term>
2387 <listitem>
2388 <para>
2389 Many array limitations have been removed, and arrays behave
2390 more like fully-supported data types.
2391 </para>
2392 </listitem>
2393 </varlistentry>
2395 </variablelist>
2396 </sect2>
2398 <sect2>
2399 <title>Migration to Version 7.4</title>
2401 <para>
2402 A dump/restore using <application>pg_dump</application> is
2403 required for those wishing to migrate data from any previous
2404 release.
2405 </para>
2407 <para>
2408 Observe the following incompatibilities:
2409 </para>
2411 <itemizedlist>
2412 <listitem>
2413 <para>
2414 The server-side autocommit setting was removed and
2415 reimplemented in client applications and languages.
2416 Server-side autocommit was causing too many problems with
2417 languages and applications that wanted to control their own
2418 autocommit behavior, so autocommit was removed from the server
2419 and added to individual client APIs as appropriate.
2420 </para>
2421 </listitem>
2423 <listitem>
2424 <para>
2425 Error message wording has changed substantially in this
2426 release. Significant effort was invested to make the messages
2427 more consistent and user-oriented. If your applications try to
2428 detect different error conditions by parsing the error message,
2429 you are strongly encouraged to use the new error code facility instead.
2430 </para>
2431 </listitem>
2433 <listitem>
2434 <para>
2435 Inner joins using the explicit <literal>JOIN</literal> syntax
2436 might behave differently because they are now better
2437 optimized.
2438 </para>
2439 </listitem>
2441 <listitem>
2442 <para>
2443 A number of server configuration parameters have been renamed
2444 for clarity, primarily those related to
2445 logging.
2446 </para>
2447 </listitem>
2449 <listitem>
2450 <para>
2451 <literal>FETCH 0</literal> or <literal>MOVE 0</literal> now
2452 does nothing. In prior releases, <literal>FETCH 0</literal>
2453 would fetch all remaining rows, and <literal>MOVE 0</literal>
2454 would move to the end of the cursor.
2455 </para>
2456 </listitem>
2458 <listitem>
2459 <para>
2460 <command>FETCH</command> and <command>MOVE</command> now return
2461 the actual number of rows fetched/moved, or zero if at the
2462 beginning/end of the cursor. Prior releases would return the
2463 row count passed to the command, not the number of rows
2464 actually fetched or moved.
2465 </para>
2466 </listitem>
2468 <listitem>
2469 <para>
2470 <command>COPY</command> now can process files that use
2471 carriage-return or carriage-return/line-feed end-of-line
2472 sequences. Literal carriage-returns and line-feeds are no
2473 longer accepted in data values; use <literal>\r</literal> and
2474 <literal>\n</literal> instead.
2475 </para>
2476 </listitem>
2478 <listitem>
2479 <para>
2480 Trailing spaces are now trimmed when converting from type
2481 <type>char(<replaceable>n</>)</type> to
2482 <type>varchar(<replaceable>n</>)</type> or <type>text</type>.
2483 This is what most people always expected to happen anyway.
2484 </para>
2485 </listitem>
2487 <listitem>
2488 <para>
2489 The data type <type>float(<replaceable>p</>)</type> now
2490 measures <replaceable>p</> in binary digits, not decimal
2491 digits. The new behavior follows the SQL standard.
2492 </para>
2493 </listitem>
2495 <listitem>
2496 <para>
2497 Ambiguous date values now must match the ordering specified by
2498 the <varname>datestyle</varname> setting. In prior releases, a
2499 date specification of <literal>10/20/03</> was interpreted as a
2500 date in October even if <varname>datestyle</> specified that
2501 the day should be first. 7.4 will throw an error if a date
2502 specification is invalid for the current setting of
2503 <varname>datestyle</>.
2504 </para>
2505 </listitem>
2507 <listitem>
2508 <para>
2509 The functions <function>oidrand</function>,
2510 <function>oidsrand</function>, and
2511 <function>userfntest</function> have been removed. These
2512 functions were determined to be no longer useful.
2513 </para>
2514 </listitem>
2516 <listitem>
2517 <para>
2518 String literals specifying time-varying date/time values, such
2519 as <literal>'now'</literal> or <literal>'today'</literal> will
2520 no longer work as expected in column default expressions; they
2521 now cause the time of the table creation to be the default, not
2522 the time of the insertion. Functions such as
2523 <function>now()</>, <function>current_timestamp</>, or
2524 <function>current_date</function> should be used instead.
2525 </para>
2527 <para>
2528 In previous releases, there was special code so that strings
2529 such as <literal>'now'</literal> were interpreted at
2530 <command>INSERT</> time and not at table creation time, but
2531 this work around didn't cover all cases. Release 7.4 now
2532 requires that defaults be defined properly using functions such
2533 as <function>now()</> or <function>current_timestamp</>. These
2534 will work in all situations.
2535 </para>
2536 </listitem>
2538 <listitem>
2539 <para>
2540 The dollar sign (<literal>$</>) is no longer allowed in
2541 operator names. It can instead be a non-first character in
2542 identifiers. This was done to improve compatibility with other
2543 database systems, and to avoid syntax problems when parameter
2544 placeholders (<literal>$<replaceable>n</></>) are written
2545 adjacent to operators.
2546 </para>
2547 </listitem>
2549 </itemizedlist>
2550 </sect2>
2552 <sect2>
2553 <title>Changes</title>
2555 <para>
2556 Below you will find a detailed account of the changes between
2557 release 7.4 and the previous major release.
2558 </para>
2560 <sect3>
2561 <title>Server Operation Changes</title>
2563 <itemizedlist>
2564 <listitem>
2565 <para>
2566 Allow IPv6 server connections (Nigel Kukard, Johan Jordaan,
2567 Bruce, Tom, Kurt Roeckx, Andrew Dunstan)
2568 </para>
2569 </listitem>
2571 <listitem>
2572 <para>
2573 Fix SSL to handle errors cleanly (Nathan Mueller)
2574 </para>
2575 <para>
2576 In prior releases, certain SSL API error reports were not
2577 handled correctly. This release fixes those problems.
2578 </para>
2579 </listitem>
2581 <listitem>
2582 <para>
2583 SSL protocol security and performance improvements (Sean Chittenden)
2584 </para>
2585 <para>
2586 SSL key renegotiation was happening too frequently, causing poor
2587 SSL performance. Also, initial key handling was improved.
2588 </para>
2589 </listitem>
2591 <listitem>
2592 <para>
2593 Print lock information when a deadlock is detected (Tom)
2594 </para>
2595 <para>
2596 This allows easier debugging of deadlock situations.
2597 </para>
2598 </listitem>
2600 <listitem>
2601 <para>
2602 Update <filename>/tmp</filename> socket modification times
2603 regularly to avoid their removal (Tom)
2604 </para>
2605 <para>
2606 This should help prevent <filename>/tmp</filename> directory
2607 cleaner administration scripts from removing server socket
2608 files.
2609 </para>
2610 </listitem>
2612 <listitem><para>Enable PAM for Mac OS X (Aaron Hillegass)</para></listitem>
2614 <listitem>
2615 <para>Make B-tree indexes fully WAL-safe (Tom)</para>
2616 <para>
2617 In prior releases, under certain rare cases, a server crash
2618 could cause B-tree indexes to become corrupt. This release
2619 removes those last few rare cases.
2620 </para>
2621 </listitem>
2623 <listitem><para>Allow B-tree index compaction and empty page reuse (Tom)</para></listitem>
2625 <listitem>
2626 <para>
2627 Fix inconsistent index lookups during split of first root page (Tom)
2628 </para>
2629 <para>
2630 In prior releases, when a single-page index split into two
2631 pages, there was a brief period when another database session
2632 could miss seeing an index entry. This release fixes that rare
2633 failure case.
2634 </para>
2635 </listitem>
2637 <listitem><para>Improve free space map allocation logic (Tom)</para></listitem>
2639 <listitem>
2640 <para>Preserve free space information between server restarts (Tom)</para>
2641 <para>
2642 In prior releases, the free space map was not saved when the
2643 postmaster was stopped, so newly started servers had no free
2644 space information. This release saves the free space map, and
2645 reloads it when the server is restarted.
2646 </para>
2647 </listitem>
2649 <listitem><para>Add start time to <literal>pg_stat_activity</literal> (Neil)</para></listitem>
2650 <listitem><para>New code to detect corrupt disk pages; erase with <varname>zero_damaged_pages</varname> (Tom)</para></listitem>
2651 <listitem><para>New client/server protocol: faster, no username length limit, allow clean exit from <command>COPY</command> (Tom)</para></listitem>
2652 <listitem><para>Add transaction status, table ID, column ID to client/server protocol (Tom)</para></listitem>
2653 <listitem><para>Add binary I/O to client/server protocol (Tom)</para></listitem>
2654 <listitem><para>Remove autocommit server setting; move to client applications (Tom)</para></listitem>
2655 <listitem><para>New error message wording, error codes, and three levels of error detail (Tom, Joe, Peter)</para></listitem>
2656 </itemizedlist>
2657 </sect3>
2659 <sect3>
2660 <title>Performance Improvements</title>
2662 <itemizedlist>
2663 <listitem><para>Add hashing for <literal>GROUP BY</literal> aggregates (Tom)</para></listitem>
2664 <listitem><para>Make nested-loop joins be smarter about multicolumn indexes (Tom)</para></listitem>
2665 <listitem><para>Allow multikey hash joins (Tom)</para></listitem>
2666 <listitem><para>Improve constant folding (Tom)</para></listitem>
2667 <listitem><para>Add ability to inline simple SQL functions (Tom)</para></listitem>
2669 <listitem>
2670 <para>Reduce memory usage for queries using complex functions (Tom)</para>
2671 <para>
2672 In prior releases, functions returning allocated memory would
2673 not free it until the query completed. This release allows the
2674 freeing of function-allocated memory when the function call
2675 completes, reducing the total memory used by functions.
2676 </para>
2677 </listitem>
2679 <listitem>
2680 <para>Improve GEQO optimizer performance (Tom)</para>
2681 <para>
2682 This release fixes several inefficiencies in the way the GEQO optimizer
2683 manages potential query paths.
2684 </para>
2685 </listitem>
2687 <listitem>
2688 <para>
2689 Allow <literal>IN</>/<literal>NOT IN</> to be handled via hash
2690 tables (Tom)
2691 </para>
2692 </listitem>
2694 <listitem>
2695 <para>
2696 Improve <literal>NOT IN (<replaceable>subquery</>)</literal>
2697 performance (Tom)
2698 </para>
2699 </listitem>
2701 <listitem>
2702 <para>
2703 Allow most <literal>IN</literal> subqueries to be processed as
2704 joins (Tom)
2705 </para>
2706 </listitem>
2708 <listitem>
2709 <para>
2710 Pattern matching operations can use indexes regardless of
2711 locale (Peter)
2712 </para>
2713 <para>
2714 There is no way for non-ASCII locales to use the standard
2715 indexes for <literal>LIKE</literal> comparisons. This release
2716 adds a way to create a special index for
2717 <literal>LIKE</literal>.
2718 </para>
2719 </listitem>
2721 <listitem>
2722 <para>Allow the postmaster to preload libraries using <varname>preload_libraries</varname> (Joe)</para>
2723 <para>
2724 For shared libraries that require a long time to load, this
2725 option is available so the library can be preloaded in the
2726 postmaster and inherited by all database sessions.
2727 </para>
2728 </listitem>
2730 <listitem>
2731 <para>
2732 Improve optimizer cost computations, particularly for subqueries (Tom)
2733 </para>
2734 </listitem>
2736 <listitem>
2737 <para>
2738 Avoid sort when subquery <literal>ORDER BY</literal> matches upper query (Tom)
2739 </para>
2740 </listitem>
2742 <listitem>
2743 <para>
2744 Deduce that <literal>WHERE a.x = b.y AND b.y = 42</literal> also
2745 means <literal>a.x = 42</literal> (Tom)
2746 </para>
2747 </listitem>
2749 <listitem>
2750 <para>
2751 Allow hash/merge joins on complex joins (Tom)
2752 </para>
2753 </listitem>
2755 <listitem>
2756 <para>
2757 Allow hash joins for more data types (Tom)
2758 </para>
2759 </listitem>
2761 <listitem>
2762 <para>
2763 Allow join optimization of explicit inner joins, disable with
2764 <varname>join_collapse_limit</varname> (Tom)
2765 </para>
2766 </listitem>
2768 <listitem>
2769 <para>
2770 Add parameter <varname>from_collapse_limit</varname> to control
2771 conversion of subqueries to joins (Tom)
2772 </para>
2773 </listitem>
2775 <listitem>
2776 <para>
2777 Use faster and more powerful regular expression code from Tcl
2778 (Henry Spencer, Tom)
2779 </para>
2780 </listitem>
2782 <listitem>
2783 <para>
2784 Use bit-mapped relation sets in the optimizer (Tom)
2785 </para>
2786 </listitem>
2788 <listitem>
2789 <para>Improve connection startup time (Tom)</para>
2790 <para>
2791 The new client/server protocol requires fewer network packets to
2792 start a database session.
2793 </para>
2794 </listitem>
2796 <listitem>
2797 <para>
2798 Improve trigger/constraint performance (Stephan)
2799 </para>
2800 </listitem>
2802 <listitem>
2803 <para>
2804 Improve speed of <literal>col IN (const, const, const, ...)</literal> (Tom)
2805 </para>
2806 </listitem>
2808 <listitem>
2809 <para>
2810 Fix hash indexes which were broken in rare cases (Tom)
2811 </para>
2812 </listitem>
2814 <listitem><para>Improve hash index concurrency and speed (Tom)</para>
2815 <para>
2816 Prior releases suffered from poor hash index performance,
2817 particularly for high concurrency situations. This release fixes
2818 that, and the development group is interested in reports
2819 comparing B-tree and hash index performance.
2820 </para>
2821 </listitem>
2823 <listitem>
2824 <para>Align shared buffers on 32-byte boundary for copy speed improvement (Manfred Spraul)</para>
2825 <para>
2826 Certain CPU's perform faster data copies when addresses are
2827 32-byte aligned.
2828 </para>
2829 </listitem>
2831 <listitem>
2832 <para>Data type <type>numeric</type> reimplemented for better performance (Tom)</para>
2833 <para>
2834 <type>numeric</type> used to be stored in base 100. The new code
2835 uses base 10000, for significantly better performance.
2836 </para>
2837 </listitem>
2838 </itemizedlist>
2839 </sect3>
2841 <sect3>
2842 <title>Server Configuration Changes</title>
2844 <itemizedlist>
2845 <listitem>
2846 <para>Rename server parameter <varname>server_min_messages</> to <varname>log_min_messages</> (Bruce)</para>
2847 <para>
2848 This was done so most parameters that control the server logs
2849 begin with <literal>log_</>.
2850 </para>
2851 </listitem>
2853 <listitem><para>Rename <varname>show_*_stats</> to <varname>log_*_stats</> (Bruce)</para></listitem>
2854 <listitem><para>Rename <varname>show_source_port</> to <varname>log_source_port</> (Bruce)</para></listitem>
2855 <listitem><para>Rename <varname>hostname_lookup</> to <varname>log_hostname</> (Bruce)</para></listitem>
2857 <listitem>
2858 <para>Add <varname>checkpoint_warning</> to warn of excessive checkpointing (Bruce)</para>
2859 <para>
2860 In prior releases, it was difficult to determine if checkpoint
2861 was happening too frequently. This feature adds a warning to the
2862 server logs when excessive checkpointing happens.
2863 </para>
2864 </listitem>
2866 <listitem><para>New read-only server parameters for localization (Tom)</para></listitem>
2868 <listitem>
2869 <para>
2870 Change debug server log messages to output as <literal>DEBUG</>
2871 rather than <literal>LOG</> (Bruce)
2872 </para>
2873 </listitem>
2875 <listitem>
2876 <para>Prevent server log variables from being turned off by non-superusers (Bruce)</para>
2877 <para>
2878 This is a security feature so non-superusers cannot disable
2879 logging that was enabled by the administrator.
2880 </para>
2881 </listitem>
2883 <listitem>
2884 <para>
2885 <varname>log_min_messages</>/<varname>client_min_messages</> now
2886 controls <varname>debug_*</> output (Bruce)
2887 </para>
2888 <para>
2889 This centralizes client debug information so all debug output
2890 can be sent to either the client or server logs.
2891 </para>
2892 </listitem>
2894 <listitem>
2895 <para>Add Mac OS X Rendezvous server support (Chris Campbell)</para>
2896 <para>
2897 This allows Mac OS X hosts to query the network for available
2898 <productname>PostgreSQL</productname> servers.
2899 </para>
2900 </listitem>
2902 <listitem>
2903 <para>
2904 Add ability to print only slow statements using
2905 <varname>log_min_duration_statement</varname>
2906 (Christopher)
2907 </para>
2908 <para>
2909 This is an often requested debugging feature that allows
2910 administrators to see only slow queries in their server logs.
2911 </para>
2912 </listitem>
2914 <listitem>
2915 <para>Allow <filename>pg_hba.conf</filename> to accept netmasks in CIDR format (Andrew Dunstan)</para>
2916 <para>
2917 This allows administrators to merge the host IP address and
2918 netmask fields into a single CIDR field in <filename>pg_hba.conf</filename>.
2919 </para>
2920 </listitem>
2922 <listitem><para>New read-only parameter <varname>is_superuser</varname> (Tom)</para></listitem>
2924 <listitem>
2925 <para>New parameter <varname>log_error_verbosity</varname> to control error detail (Tom)</para>
2926 <para>
2927 This works with the new error reporting feature to supply
2928 additional error information like hints, file names and line
2929 numbers.
2930 </para>
2931 </listitem>
2933 <listitem>
2934 <para><literal>postgres --describe-config</literal> now dumps server config variables (Aizaz Ahmed, Peter)</para>
2935 <para>
2936 This option is useful for administration tools that need to know
2937 the configuration variable names and their minimums, maximums,
2938 defaults, and descriptions.
2939 </para>
2940 </listitem>
2942 <listitem>
2943 <para>
2944 Add new columns in <literal>pg_settings</literal>:
2945 <literal>context</>, <literal>type</>, <literal>source</>,
2946 <literal>min_val</>, <literal>max_val</> (Joe)
2947 </para>
2948 </listitem>
2950 <listitem>
2951 <para>
2952 Make default <varname>shared_buffers</> 1000 and
2953 <varname>max_connections</> 100, if possible (Tom)
2954 </para>
2955 <para>
2956 Prior versions defaulted to 64 shared buffers so <productname>PostgreSQL</productname>
2957 would start on even very old systems. This release tests the
2958 amount of shared memory allowed by the platform and selects more
2959 reasonable default values if possible. Of course, users are
2960 still encouraged to evaluate their resource load and size
2961 <varname>shared_buffers</varname> accordingly.
2962 </para>
2963 </listitem>
2965 <listitem>
2966 <para>
2967 New <filename>pg_hba.conf</filename> record type
2968 <literal>hostnossl</> to prevent SSL connections (Jon
2969 Jensen)
2970 </para>
2971 <para>
2972 In prior releases, there was no way to prevent SSL connections
2973 if both the client and server supported SSL. This option allows
2974 that capability.
2975 </para>
2976 </listitem>
2978 <listitem>
2979 <para>
2980 Remove parameter <varname>geqo_random_seed</varname>
2981 (Tom)
2982 </para>
2983 </listitem>
2985 <listitem>
2986 <para>
2987 Add server parameter <varname>regex_flavor</varname> to control regular expression processing (Tom)
2988 </para>
2989 </listitem>
2991 <listitem>
2992 <para>
2993 Make <command>pg_ctl</command> better handle nonstandard ports (Greg)
2994 </para>
2995 </listitem>
2996 </itemizedlist>
2997 </sect3>
2999 <sect3>
3000 <title>Query Changes</title>
3002 <itemizedlist>
3003 <listitem><para>New SQL-standard information schema (Peter)</para></listitem>
3004 <listitem><para>Add read-only transactions (Peter)</para></listitem>
3005 <listitem><para>Print key name and value in foreign-key violation messages (Dmitry Tkach)</para></listitem>
3007 <listitem>
3008 <para>Allow users to see their own queries in <literal>pg_stat_activity</literal> (Kevin Brown)</para>
3009 <para>
3010 In prior releases, only the superuser could see query strings
3011 using <literal>pg_stat_activity</literal>. Now ordinary users
3012 can see their own query strings.
3013 </para>
3014 </listitem>
3016 <listitem>
3017 <para>Fix aggregates in subqueries to match SQL standard (Tom)</para>
3018 <para>
3019 The SQL standard says that an aggregate function appearing
3020 within a nested subquery belongs to the outer query if its
3021 argument contains only outer-query variables. Prior
3022 <productname>PostgreSQL</productname> releases did not handle
3023 this fine point correctly.
3024 </para>
3025 </listitem>
3027 <listitem>
3028 <para>Add option to prevent auto-addition of tables referenced in query (Nigel J. Andrews)</para>
3029 <para>
3030 By default, tables mentioned in the query are automatically
3031 added to the <literal>FROM</> clause if they are not already
3032 there. This is compatible with historic
3033 <productname>POSTGRES</productname> behavior but is contrary to
3034 the SQL standard. This option allows selecting
3035 standard-compatible behavior.
3036 </para>
3037 </listitem>
3039 <listitem>
3040 <para>Allow <literal>UPDATE ... SET col = DEFAULT</literal> (Rod)</para>
3041 <para>
3042 This allows <command>UPDATE</command> to set a column to its
3043 declared default value.
3044 </para>
3045 </listitem>
3047 <listitem>
3048 <para>Allow expressions to be used in <literal>LIMIT</>/<literal>OFFSET</> (Tom)</para>
3049 <para>
3050 In prior releases, <literal>LIMIT</>/<literal>OFFSET</> could
3051 only use constants, not expressions.
3052 </para>
3053 </listitem>
3055 <listitem>
3056 <para>Implement <literal>CREATE TABLE AS EXECUTE</literal> (Neil, Peter)</para>
3057 </listitem>
3058 </itemizedlist>
3059 </sect3>
3061 <sect3>
3062 <title>Object Manipulation Changes</title>
3064 <itemizedlist>
3065 <listitem>
3066 <para>Make <command>CREATE SEQUENCE</command> grammar more conforming to SQL:2003 (Neil)</para>
3067 </listitem>
3069 <listitem>
3070 <para>Add statement-level triggers (Neil)</para>
3071 <para>
3072 While this allows a trigger to fire at the end of a statement,
3073 it does not allow the trigger to access all rows modified by the
3074 statement. This capability is planned for a future release.
3075 </para>
3076 </listitem>
3078 <listitem>
3079 <para>Add check constraints for domains (Rod)</para>
3080 <para>
3081 This greatly increases the usefulness of domains by allowing
3082 them to use check constraints.
3083 </para>
3084 </listitem>
3086 <listitem>
3087 <para>Add <command>ALTER DOMAIN</command> (Rod)</para>
3088 <para>
3089 This allows manipulation of existing domains.
3090 </para>
3091 </listitem>
3093 <listitem>
3094 <para>Fix several zero-column table bugs (Tom)</para>
3095 <para>
3096 <productname>PostgreSQL</productname> supports zero-column tables. This fixes various bugs
3097 that occur when using such tables.
3098 </para>
3099 </listitem>
3101 <listitem>
3102 <para>Have <literal>ALTER TABLE ... ADD PRIMARY KEY</literal> add not-null constraint (Rod)</para>
3103 <para>
3104 In prior releases, <literal>ALTER TABLE ... ADD
3105 PRIMARY</literal> would add a unique index, but not a not-null
3106 constraint. That is fixed in this release.
3107 </para>
3108 </listitem>
3110 <listitem><para>Add <literal>ALTER TABLE ... WITHOUT OIDS</literal> (Rod)</para>
3111 <para>
3112 This allows control over whether new and updated rows will have
3113 an OID column. This is most useful for saving storage space.
3114 </para>
3115 </listitem>
3117 <listitem>
3118 <para>
3119 Add <literal>ALTER SEQUENCE</literal> to modify minimum, maximum,
3120 increment, cache, cycle values (Rod)
3121 </para>
3122 </listitem>
3124 <listitem>
3125 <para>Add <literal>ALTER TABLE ... CLUSTER ON</literal> (Alvaro Herrera)</para>
3126 <para>
3127 This command is used by <command>pg_dump</command> to record the
3128 cluster column for each table previously clustered. This
3129 information is used by database-wide cluster to cluster all
3130 previously clustered tables.
3131 </para>
3132 </listitem>
3134 <listitem><para>Improve automatic type casting for domains (Rod, Tom)</para></listitem>
3135 <listitem><para>Allow dollar signs in identifiers, except as first character (Tom)</para></listitem>
3136 <listitem><para>Disallow dollar signs in operator names, so <literal>x=$1</> works (Tom)</para></listitem>
3138 <listitem>
3139 <para>
3140 Allow copying table schema using <literal>LIKE
3141 <replaceable>subtable</replaceable></literal>, also SQL:2003
3142 feature <literal>INCLUDING DEFAULTS</literal> (Rod)
3143 </para>
3144 </listitem>
3146 <listitem>
3147 <para>
3148 Add <literal>WITH GRANT OPTION</literal> clause to
3149 <command>GRANT</command> (Peter)
3150 </para>
3151 <para>
3152 This enabled <command>GRANT</command> to give other users the
3153 ability to grant privileges on a object.
3154 </para>
3155 </listitem>
3156 </itemizedlist>
3157 </sect3>
3159 <sect3>
3160 <title>Utility Command Changes</title>
3162 <itemizedlist>
3163 <listitem>
3164 <para>Add <literal>ON COMMIT</literal> clause to <command>CREATE TABLE</command> for temporary tables (Gavin)</para>
3165 <para>
3166 This adds the ability for a table to be dropped or all rows
3167 deleted on transaction commit.
3168 </para>
3169 </listitem>
3171 <listitem>
3172 <para>Allow cursors outside transactions using <literal>WITH HOLD</literal> (Neil)</para>
3173 <para>
3174 In previous releases, cursors were removed at the end of the
3175 transaction that created them. Cursors can now be created with
3176 the <literal>WITH HOLD</literal> option, which allows them to
3177 continue to be accessed after the creating transaction has
3178 committed.
3179 </para>
3180 </listitem>
3182 <listitem>
3183 <para><literal>FETCH 0</literal> and <literal>MOVE 0 </literal> now do nothing (Bruce)</para>
3184 <para>
3185 In previous releases, <literal>FETCH 0</literal> fetched all
3186 remaining rows, and <literal>MOVE 0</literal> moved to the end
3187 of the cursor.
3188 </para>
3189 </listitem>
3191 <listitem>
3192 <para>
3193 Cause <command>FETCH</command> and <command>MOVE</command> to
3194 return the number of rows fetched/moved, or zero if at the
3195 beginning/end of cursor, per SQL standard (Bruce)
3196 </para>
3197 <para>
3198 In prior releases, the row count returned by
3199 <command>FETCH</command> and <command>MOVE</command> did not
3200 accurately reflect the number of rows processed.
3201 </para>
3202 </listitem>
3204 <listitem>
3205 <para>Properly handle <literal>SCROLL</literal> with cursors, or
3206 report an error (Neil)</para>
3207 <para>
3208 Allowing random access (both forward and backward scrolling) to
3209 some kinds of queries cannot be done without some additional
3210 work. If <literal>SCROLL</literal> is specified when the cursor
3211 is created, this additional work will be performed. Furthermore,
3212 if the cursor has been created with <literal>NO SCROLL</literal>,
3213 no random access is allowed.
3214 </para>
3215 </listitem>
3217 <listitem>
3218 <para>
3219 Implement SQL-compatible options <literal>FIRST</>,
3220 <literal>LAST</>, <literal>ABSOLUTE <replaceable>n</></>,
3221 <literal>RELATIVE <replaceable>n</></> for
3222 <command>FETCH</command> and <command>MOVE</command> (Tom)
3223 </para>
3224 </listitem>
3226 <listitem>
3227 <para>Allow <command>EXPLAIN</command> on <command>DECLARE CURSOR</command> (Tom)</para>
3228 </listitem>
3230 <listitem>
3231 <para>Allow <command>CLUSTER</command> to use index marked as pre-clustered by default (Alvaro Herrera)</para>
3232 </listitem>
3234 <listitem>
3235 <para>Allow <command>CLUSTER</command> to cluster all tables (Alvaro Herrera)</para>
3236 <para>
3237 This allows all previously clustered tables in a database to be
3238 reclustered with a single command.
3239 </para>
3240 </listitem>
3242 <listitem><para>Prevent <command>CLUSTER</command> on partial indexes (Tom)</para></listitem>
3244 <listitem><para>Allow DOS and Mac line-endings in <command>COPY</> files (Bruce)</para></listitem>
3246 <listitem>
3247 <para>
3248 Disallow literal carriage return as a data value,
3249 backslash-carriage-return and <literal>\r</> are still allowed
3250 (Bruce)
3251 </para>
3252 </listitem>
3254 <listitem>
3255 <para><command>COPY</> changes (binary, <literal>\.</>) (Tom)</para>
3256 </listitem>
3258 <listitem>
3259 <para>Recover from <command>COPY</command> failure cleanly (Tom)</para>
3260 </listitem>
3262 <listitem>
3263 <para>Prevent possible memory leaks in <command>COPY</command> (Tom)</para>
3264 </listitem>
3266 <listitem>
3267 <para>Make <command>TRUNCATE</command> transaction-safe (Rod)</para>
3268 <para>
3269 <command>TRUNCATE</command> can now be used inside a
3270 transaction. If the transaction aborts, the changes made by the
3271 <command>TRUNCATE</command> are automatically rolled back.
3272 </para>
3273 </listitem>
3275 <listitem>
3276 <para>
3277 Allow prepare/bind of utility commands like
3278 <command>FETCH</command> and <command>EXPLAIN</command> (Tom)
3279 </para>
3280 </listitem>
3282 <listitem>
3283 <para>Add <command>EXPLAIN EXECUTE</command> (Neil)</para>
3284 </listitem>
3286 <listitem>
3287 <para>Improve <command>VACUUM</command> performance on indexes by reducing WAL traffic (Tom)</para>
3288 </listitem>
3290 <listitem>
3291 <para>Functional indexes have been generalized into indexes on expressions (Tom)</para>
3292 <para>
3293 In prior releases, functional indexes only supported a simple
3294 function applied to one or more column names. This release
3295 allows any type of scalar expression.
3296 </para>
3297 </listitem>
3299 <listitem>
3300 <para>
3301 Have <command>SHOW TRANSACTION ISOLATION</command> match input
3302 to <command>SET TRANSACTION ISOLATION</command>
3303 (Tom)
3304 </para>
3305 </listitem>
3307 <listitem>
3308 <para>
3309 Have <command>COMMENT ON DATABASE</command> on nonlocal
3310 database generate a warning, rather than an error (Rod)
3311 </para>
3313 <para>
3314 Database comments are stored in database-local tables so
3315 comments on a database have to be stored in each database.
3316 </para>
3317 </listitem>
3319 <listitem>
3320 <para>
3321 Improve reliability of <command>LISTEN</>/<command>NOTIFY</> (Tom)
3322 </para>
3323 </listitem>
3325 <listitem>
3326 <para>Allow <command>REINDEX</command> to reliably reindex nonshared system catalog indexes (Tom)</para>
3327 <para>
3328 This allows system tables to be reindexed without the
3329 requirement of a standalone session, which was necessary in
3330 previous releases. The only tables that now require a standalone
3331 session for reindexing are the global system tables
3332 <literal>pg_database</>, <literal>pg_shadow</>, and
3333 <literal>pg_group</>.
3334 </para>
3335 </listitem>
3336 </itemizedlist>
3337 </sect3>
3339 <sect3>
3340 <title>Data Type and Function Changes</title>
3342 <itemizedlist>
3343 <listitem>
3344 <para>
3345 New server parameter <varname>extra_float_digits</varname> to
3346 control precision display of floating-point numbers (Pedro
3347 Ferreira, Tom)
3348 </para>
3349 <para>
3350 This controls output precision which was causing regression
3351 testing problems.
3352 </para>
3353 </listitem>
3355 <listitem><para>Allow <literal>+1300</literal> as a numeric time-zone specifier, for FJST (Tom)</para></listitem>
3357 <listitem>
3358 <para>
3359 Remove rarely used functions <function>oidrand</>,
3360 <function>oidsrand</>, and <function>userfntest</> functions
3361 (Neil)
3362 </para>
3363 </listitem>
3365 <listitem>
3366 <para>Add <function>md5()</> function to main server, already in <filename>contrib/pgcrypto</filename> (Joe)</para>
3367 <para>
3368 An MD5 function was frequently requested. For more complex
3369 encryption capabilities, use
3370 <filename>contrib/pgcrypto</filename>.
3371 </para>
3372 </listitem>
3374 <listitem><para>Increase date range of <type>timestamp</type> (John Cochran)</para></listitem>
3376 <listitem>
3377 <para>
3378 Change <literal>EXTRACT(EPOCH FROM timestamp)</literal> so
3379 <type>timestamp without time zone</type> is assumed to be in
3380 local time, not GMT (Tom)
3381 </para>
3382 </listitem>
3384 <listitem><para>Trap division by zero in case the operating system doesn't prevent it (Tom)</para></listitem>
3385 <listitem><para>Change the <type>numeric</type> data type internally to base 10000 (Tom)</para></listitem>
3386 <listitem><para>New <function>hostmask()</function> function (Greg Wickham)</para></listitem>
3387 <listitem><para>Fixes for <function>to_char()</function> and <function>to_timestamp()</function> (Karel)</para></listitem>
3389 <listitem>
3390 <para>
3391 Allow functions that can take any argument data type and return
3392 any data type, using <type>anyelement</type> and
3393 <type>anyarray</type> (Joe)
3394 </para>
3395 <para>
3396 This allows the creation of functions that can work with any
3397 data type.
3398 </para>
3399 </listitem>
3401 <listitem>
3402 <para>
3403 Arrays can now be specified as <literal>ARRAY[1,2,3]</literal>,
3404 <literal>ARRAY[['a','b'],['c','d']]</literal>, or
3405 <literal>ARRAY[ARRAY[ARRAY[2]]]</literal> (Joe)
3406 </para>
3407 </listitem>
3409 <listitem>
3410 <para>
3411 Allow proper comparisons for arrays, including <literal>ORDER
3412 BY</literal> and <literal>DISTINCT</literal> support
3413 (Joe)
3414 </para>
3415 </listitem>
3417 <listitem><para>Allow indexes on array columns (Joe)</para></listitem>
3418 <listitem><para>Allow array concatenation with <literal>||</literal> (Joe)</para></listitem>
3420 <listitem>
3421 <para>
3422 Allow <literal>WHERE</literal> qualification
3423 <literal><replaceable>expr</> <replaceable>op</> ANY/SOME/ALL
3424 (<replaceable>array_expr</>)</literal> (Joe)
3425 </para>
3426 <para>
3427 This allows arrays to behave like a list of values, for purposes
3428 like <literal>SELECT * FROM tab WHERE col IN
3429 (array_val)</literal>.
3430 </para>
3431 </listitem>
3433 <listitem>
3434 <para>
3435 New array functions <function>array_append</>,
3436 <function>array_cat</>, <function>array_lower</>,
3437 <function>array_prepend</>, <function>array_to_string</>,
3438 <function>array_upper</>, <function>string_to_array</> (Joe)
3439 </para>
3440 </listitem>
3442 <listitem><para>Allow user defined aggregates to use polymorphic functions (Joe)</para></listitem>
3443 <listitem><para>Allow assignments to empty arrays (Joe)</para></listitem>
3445 <listitem>
3446 <para>
3447 Allow 60 in seconds fields of <type>time</type>,
3448 <type>timestamp</type>, and <type>interval</type> input values
3449 (Tom)
3450 </para>
3451 <para>
3452 Sixty-second values are needed for leap seconds.
3453 </para>
3454 </listitem>
3456 <listitem><para>Allow <type>cidr</type> data type to be cast to <type>text</type> (Tom)</para></listitem>
3458 <listitem><para>Disallow invalid time zone names in SET TIMEZONE</para></listitem>
3460 <listitem>
3461 <para>
3462 Trim trailing spaces when <type>char</type> is cast to
3463 <type>varchar</> or <type>text</> (Tom)
3464 </para>
3465 </listitem>
3467 <listitem>
3468 <para>
3469 Make <type>float(<replaceable>p</>)</> measure the precision
3470 <replaceable>p</> in binary digits, not decimal digits
3471 (Tom)
3472 </para>
3473 </listitem>
3475 <listitem>
3476 <para>Add IPv6 support to the <type>inet</type> and <type>cidr</type> data types (Michael Graff)</para>
3477 </listitem>
3479 <listitem>
3480 <para>Add <function>family()</function> function to report whether address is IPv4 or IPv6 (Michael Graff)</para>
3481 </listitem>
3483 <listitem>
3484 <para>
3485 Have <literal>SHOW datestyle</literal> generate output similar
3486 to that used by <literal>SET datestyle</literal> (Tom)
3487 </para>
3488 </listitem>
3490 <listitem>
3491 <para>
3492 Make <literal>EXTRACT(TIMEZONE)</literal> and <literal>SET/SHOW
3493 TIME ZONE</literal> follow the SQL convention for the sign of
3494 time zone offsets, i.e., positive is east from UTC (Tom)
3495 </para>
3496 </listitem>
3498 <listitem>
3499 <para>Fix <literal>date_trunc('quarter', ...)</literal> (Böjthe Zoltán)</para>
3500 <para>
3501 Prior releases returned an incorrect value for this function call.
3502 </para>
3503 </listitem>
3505 <listitem>
3506 <para>Make <function>initcap()</function> more compatible with Oracle (Mike Nolan)</para>
3507 <para>
3508 <function>initcap()</function> now uppercases a letter appearing
3509 after any non-alphanumeric character, rather than only after
3510 whitespace.
3511 </para>
3512 </listitem>
3514 <listitem>
3515 <para>Allow only <varname>datestyle</varname> field order for date values not in ISO-8601 format (Greg)</para>
3516 </listitem>
3518 <listitem>
3519 <para>
3520 Add new <varname>datestyle</varname> values <literal>MDY</>,
3521 <literal>DMY</>, and <literal>YMD</> to set input field order;
3522 honor <literal>US</> and <literal>European</> for backward
3523 compatibility (Tom)
3524 </para>
3525 </listitem>
3527 <listitem>
3528 <para>
3529 String literals like <literal>'now'</literal> or
3530 <literal>'today'</literal> will no longer work as a column
3531 default. Use functions such as <function>now()</function>,
3532 <function>current_timestamp</function> instead. (change
3533 required for prepared statements) (Tom)
3534 </para>
3535 </listitem>
3537 <listitem>
3538 <para>Treat NaN as larger than any other value in <function>min()</>/<function>max()</> (Tom)</para>
3539 <para>
3540 NaN was already sorted after ordinary numeric values for most
3541 purposes, but <function>min()</> and <function>max()</> didn't
3542 get this right.
3543 </para>
3544 </listitem>
3546 <listitem>
3547 <para>Prevent interval from suppressing <literal>:00</literal>
3548 seconds display</para>
3549 </listitem>
3551 <listitem>
3552 <para>
3553 New functions <function>pg_get_triggerdef(prettyprint)</function>
3554 and <function>pg_conversion_is_visible()</function> (Christopher)
3555 </para>
3556 </listitem>
3558 <listitem>
3559 <para>Allow time to be specified as <literal>040506</> or <literal>0405</> (Tom)</para>
3560 </listitem>
3562 <listitem>
3563 <para>
3564 Input date order must now be <literal>YYYY-MM-DD</literal> (with 4-digit year) or
3565 match <varname>datestyle</varname>
3566 </para>
3567 </listitem>
3569 <listitem>
3570 <para>
3571 Make <function>pg_get_constraintdef</function> support
3572 unique, primary-key, and check constraints (Christopher)
3573 </para>
3574 </listitem>
3575 </itemizedlist>
3576 </sect3>
3578 <sect3>
3579 <title>Server-Side Language Changes</title>
3581 <itemizedlist>
3582 <listitem>
3583 <para>
3584 Prevent PL/pgSQL crash when <literal>RETURN NEXT</literal> is
3585 used on a zero-row record variable (Tom)
3586 </para>
3587 </listitem>
3589 <listitem>
3590 <para>
3591 Make PL/Python's <function>spi_execute</function> interface
3592 handle null values properly (Andrew Bosma)
3593 </para>
3594 </listitem>
3596 <listitem>
3597 <para>Allow PL/pgSQL to declare variables of composite types without <literal>%ROWTYPE</literal> (Tom)</para>
3598 </listitem>
3600 <listitem>
3601 <para>Fix PL/Python's <function>_quote()</function> function to handle big integers</para>
3602 </listitem>
3604 <listitem>
3605 <para>Make PL/Python an untrusted language, now called <literal>plpythonu</literal> (Kevin Jacobs, Tom)</para>
3606 <para>
3607 The Python language no longer supports a restricted execution
3608 environment, so the trusted version of PL/Python was removed. If
3609 this situation changes, a version of PL/Python that can be used
3610 by non-superusers will be readded.
3611 </para>
3612 </listitem>
3614 <listitem>
3615 <para>Allow polymorphic PL/pgSQL functions (Joe, Tom)</para>
3616 </listitem>
3618 <listitem>
3619 <para>Allow polymorphic SQL functions (Joe)</para>
3620 </listitem>
3622 <listitem>
3623 <para>
3624 Improved compiled function caching mechanism in PL/pgSQL with
3625 full support for polymorphism (Joe)
3626 </para>
3627 </listitem>
3629 <listitem>
3630 <para>
3631 Add new parameter <literal>$0</> in PL/pgSQL representing the
3632 function's actual return type (Joe)
3633 </para>
3634 </listitem>
3636 <listitem>
3637 <para>
3638 Allow PL/Tcl and PL/Python to use the same trigger on multiple tables (Tom)
3639 </para>
3640 </listitem>
3642 <listitem>
3643 <para>
3644 Fixed PL/Tcl's <function>spi_prepare</function> to accept fully
3645 qualified type names in the parameter type list
3646 (Jan)
3647 </para>
3648 </listitem>
3649 </itemizedlist>
3650 </sect3>
3652 <sect3>
3653 <title>psql Changes</title>
3655 <itemizedlist>
3656 <listitem>
3657 <para>Add <literal>\pset pager always</literal> to always use pager (Greg)</para>
3658 <para>
3659 This forces the pager to be used even if the number of rows is
3660 less than the screen height. This is valuable for rows that
3661 wrap across several screen rows.
3662 </para>
3663 </listitem>
3665 <listitem><para>Improve tab completion (Rod, Ross Reedstrom, Ian Barwick)</para></listitem>
3666 <listitem><para>Reorder <literal>\?</> help into groupings (Harald Armin Massa, Bruce)</para></listitem>
3667 <listitem><para>Add backslash commands for listing schemas, casts, and conversions (Christopher)</para></listitem>
3669 <listitem>
3670 <para>
3671 <command>\encoding</> now changes based on the server parameter
3672 <varname>client_encoding</varname> (Tom)
3673 </para>
3674 <para>
3675 In previous versions, <command>\encoding</command> was not aware
3676 of encoding changes made using <literal>SET
3677 client_encoding</literal>.
3678 </para>
3679 </listitem>
3681 <listitem>
3682 <para>Save editor buffer into readline history (Ross)</para>
3683 <para>
3684 When <command>\e</> is used to edit a query, the result is saved
3685 in the readline history for retrieval using the up arrow.
3686 </para>
3687 </listitem>
3689 <listitem><para>Improve <command>\d</command> display (Christopher)</para></listitem>
3690 <listitem><para>Enhance HTML mode to be more standards-conforming (Greg)</para></listitem>
3692 <listitem>
3693 <para>New <command>\set AUTOCOMMIT off</command> capability (Tom)</para>
3694 <para>
3695 This takes the place of the removed server parameter <varname>autocommit</varname>.
3696 </para>
3697 </listitem>
3699 <listitem>
3700 <para>New <command>\set VERBOSITY</command> to control error detail (Tom)</para>
3701 <para>
3702 This controls the new error reporting details.
3703 </para>
3704 </listitem>
3706 <listitem><para>New prompt escape sequence <literal>%x</literal> to show transaction status (Tom)</para></listitem>
3707 <listitem><para>Long options for <application>psql</application> are now available on all platforms</para></listitem>
3708 </itemizedlist>
3709 </sect3>
3711 <sect3>
3712 <title>pg_dump Changes</title>
3714 <itemizedlist>
3715 <listitem><para>Multiple pg_dump fixes, including tar format and large objects</para></listitem>
3716 <listitem><para>Allow pg_dump to dump specific schemas (Neil)</para></listitem>
3718 <listitem>
3719 <para>Make pg_dump preserve column storage characteristics (Christopher)</para>
3720 <para>
3721 This preserves <literal>ALTER TABLE ... SET STORAGE</literal> information.
3722 </para>
3723 </listitem>
3725 <listitem><para>Make pg_dump preserve <command>CLUSTER</command> characteristics (Christopher)</para></listitem>
3727 <listitem>
3728 <para>
3729 Have pg_dumpall use <command>GRANT</>/<command>REVOKE</> to dump database-level privileges (Tom)
3730 </para>
3731 </listitem>
3733 <listitem>
3734 <para>
3735 Allow pg_dumpall to support the options <option>-a</>,
3736 <option>-s</>, <option>-x</> of pg_dump (Tom)
3737 </para>
3738 </listitem>
3740 <listitem><para>Prevent pg_dump from lowercasing identifiers specified on the command line (Tom)</para></listitem>
3742 <listitem>
3743 <para>
3744 pg_dump options <option>--use-set-session-authorization</option>
3745 and <option>--no-reconnect</option> now do nothing, all dumps
3746 use <command>SET SESSION AUTHORIZATION</command>
3747 </para>
3748 <para>
3749 pg_dump no longer reconnects to switch users, but instead always
3750 uses <command>SET SESSION AUTHORIZATION</command>. This will
3751 reduce password prompting during restores.
3752 </para>
3753 </listitem>
3755 <listitem>
3756 <para>Long options for <application>pg_dump</application> are now available on all platforms</para>
3757 <para>
3758 <productname>PostgreSQL</productname> now includes its own
3759 long-option processing routines.
3760 </para>
3761 </listitem>
3762 </itemizedlist>
3763 </sect3>
3765 <sect3>
3766 <title>libpq Changes</title>
3768 <itemizedlist>
3769 <listitem>
3770 <para>
3771 Add function <function>PQfreemem</function> for freeing memory on
3772 Windows, suggested for <command>NOTIFY</command> (Bruce)
3773 </para>
3774 <para>
3775 Windows requires that memory allocated in a library be freed by
3776 a function in the same library, hence
3777 <function>free()</function> doesn't work for freeing memory
3778 allocated by libpq. <function>PQfreemem</function> is the proper
3779 way to free libpq memory, especially on Windows, and is
3780 recommended for other platforms as well.
3781 </para>
3782 </listitem>
3784 <listitem>
3785 <para>Document service capability, and add sample file (Bruce)</para>
3786 <para>
3787 This allows clients to look up connection information in a
3788 central file on the client machine.
3789 </para>
3790 </listitem>
3792 <listitem>
3793 <para>
3794 Make <function>PQsetdbLogin</function> have the same defaults as
3795 <function>PQconnectdb</function> (Tom)
3796 </para>
3797 </listitem>
3799 <listitem><para>Allow libpq to cleanly fail when result sets are too large (Tom)</para></listitem>
3801 <listitem>
3802 <para>
3803 Improve performance of function <function>PQunescapeBytea</function> (Ben Lamb)
3804 </para>
3805 </listitem>
3807 <listitem>
3808 <para>
3809 Allow thread-safe libpq with <filename>configure</filename>
3810 option <option>--enable-thread-safety</option> (Lee Kindness,
3811 Philip Yarra)
3812 </para>
3813 </listitem>
3815 <listitem>
3816 <para>
3817 Allow function <function>pqInternalNotice</function> to accept a
3818 format string and arguments instead of just a preformatted
3819 message (Tom, Sean Chittenden)
3820 </para>
3821 </listitem>
3823 <listitem>
3824 <para>
3825 Control SSL negotiation with <literal>sslmode</literal> values
3826 <literal>disable</literal>, <literal>allow</literal>,
3827 <literal>prefer</literal>, and <literal>require</literal> (Jon
3828 Jensen)
3829 </para>
3830 </listitem>
3832 <listitem>
3833 <para>Allow new error codes and levels of text (Tom)</para>
3834 </listitem>
3836 <listitem>
3837 <para>Allow access to the underlying table and column of a query result (Tom)</para>
3838 <para>
3839 This is helpful for query-builder applications that want to know
3840 the underlying table and column names associated with a specific
3841 result set.
3842 </para>
3843 </listitem>
3845 <listitem><para>Allow access to the current transaction status (Tom)</para></listitem>
3846 <listitem><para>Add ability to pass binary data directly to the server (Tom)</para></listitem>
3848 <listitem>
3849 <para>
3850 Add function <function>PQexecPrepared</function> and
3851 <function>PQsendQueryPrepared</function> functions which perform
3852 bind/execute of previously prepared statements (Tom)
3853 </para>
3854 </listitem>
3855 </itemizedlist>
3856 </sect3>
3858 <sect3>
3859 <title>JDBC Changes</title>
3861 <itemizedlist>
3862 <listitem><para>Allow <function>setNull</function> on updateable result sets</para></listitem>
3863 <listitem><para>Allow <function>executeBatch</function> on a prepared statement (Barry)</para></listitem>
3864 <listitem><para>Support SSL connections (Barry)</para></listitem>
3865 <listitem><para>Handle schema names in result sets (Paul Sorenson)</para></listitem>
3866 <listitem><para>Add refcursor support (Nic Ferrier)</para></listitem>
3867 </itemizedlist>
3868 </sect3>
3870 <sect3>
3871 <title>Miscellaneous Interface Changes</title>
3873 <itemizedlist>
3874 <listitem>
3875 <para>Prevent possible memory leak or core dump during libpgtcl shutdown (Tom)</para>
3876 </listitem>
3877 <listitem>
3878 <para>Add Informix compatibility to ECPG (Michael)</para>
3879 <para>
3880 This allows ECPG to process embedded C programs that were
3881 written using certain Informix extensions.
3882 </para>
3883 </listitem>
3885 <listitem>
3886 <para>Add type <type>decimal</type> to ECPG that is fixed length, for Informix (Michael)</para>
3887 </listitem>
3889 <listitem>
3890 <para>
3891 Allow thread-safe embedded SQL programs with
3892 <filename>configure</filename> option
3893 <option>--enable-thread-safety</option> (Lee Kindness, Bruce)
3894 </para>
3895 <para>
3896 This allows multiple threads to access the database at the same
3897 time.
3898 </para>
3899 </listitem>
3901 <listitem>
3902 <para>Moved Python client PyGreSQL to <ulink url="http://www.pygresql.org"></ulink> (Marc)</para>
3903 </listitem>
3904 </itemizedlist>
3905 </sect3>
3907 <sect3>
3908 <title>Source Code Changes</title>
3910 <itemizedlist>
3911 <listitem><para>Prevent need for separate platform geometry regression result files (Tom)</para></listitem>
3912 <listitem><para>Improved PPC locking primitive (Reinhard Max)</para></listitem>
3913 <listitem><para>New function <function>palloc0</function> to allocate and clear memory (Bruce)</para></listitem>
3914 <listitem><para>Fix locking code for s390x CPU (64-bit) (Tom)</para></listitem>
3915 <listitem><para>Allow OpenBSD to use local ident credentials (William Ahern)</para></listitem>
3916 <listitem><para>Make query plan trees read-only to executor (Tom)</para></listitem>
3917 <listitem><para>Add Darwin startup scripts (David Wheeler)</para></listitem>
3918 <listitem><para>Allow libpq to compile with Borland C++ compiler (Lester Godwin, Karl Waclawek)</para></listitem>
3919 <listitem><para>Use our own version of <function>getopt_long()</function> if needed (Peter)</para></listitem>
3920 <listitem><para>Convert administration scripts to C (Peter)</para></listitem>
3921 <listitem><para> Bison &gt;= 1.85 is now required to build the <productname>PostgreSQL</> grammar, if building from CVS</para></listitem>
3922 <listitem><para>Merge documentation into one book (Peter)</para></listitem>
3923 <listitem><para>Add Windows compatibility functions (Bruce)</para></listitem>
3924 <listitem><para>Allow client interfaces to compile under MinGW (Bruce)</para></listitem>
3925 <listitem><para>New <function>ereport()</function> function for error reporting (Tom)</para></listitem>
3926 <listitem><para>Support Intel compiler on Linux (Peter)</para></listitem>
3927 <listitem><para>Improve Linux startup scripts (Slawomir Sudnik, Darko Prenosil)</para></listitem>
3928 <listitem><para>Add support for AMD Opteron and Itanium (Jeffrey W. Baker, Bruce)</para></listitem>
3929 <listitem>
3930 <para>Remove <option>--enable-recode</option> option from <command>configure</command></para>
3931 <para>
3932 This was no longer needed now that we have <command>CREATE CONVERSION</command>.
3933 </para>
3934 </listitem>
3935 <listitem>
3936 <para>Generate a compile error if spinlock code is not found (Bruce)</para>
3937 <para>
3938 Platforms without spinlock code will now fail to compile, rather
3939 than silently using semaphores. This failure can be disabled
3940 with a new <command>configure</command> option.
3941 </para>
3942 </listitem>
3943 </itemizedlist>
3944 </sect3>
3946 <sect3>
3947 <title>Contrib Changes</title>
3949 <itemizedlist>
3950 <listitem><para>Change dbmirror license to BSD</para></listitem>
3951 <listitem><para>Improve earthdistance (Bruno Wolff III)</para></listitem>
3952 <listitem><para>Portability improvements to pgcrypto (Marko Kreen)</para></listitem>
3953 <listitem><para>Prevent crash in xml (John Gray, Michael Richards)</para></listitem>
3954 <listitem><para>Update oracle</para></listitem>
3955 <listitem><para>Update mysql</para></listitem>
3956 <listitem><para>Update cube (Bruno Wolff III)</para></listitem>
3957 <listitem><para>Update earthdistance to use cube (Bruno Wolff III)</para></listitem>
3958 <listitem><para>Update btree_gist (Oleg)</para></listitem>
3959 <listitem><para>New tsearch2 full-text search module (Oleg, Teodor)</para></listitem>
3960 <listitem><para>Add hash-based crosstab function to tablefuncs (Joe)</para></listitem>
3961 <listitem><para>Add serial column to order <function>connectby()</> siblings in tablefuncs (Nabil Sayegh,Joe)</para></listitem>
3962 <listitem><para>Add named persistent connections to dblink (Shridhar Daithanka)</para></listitem>
3963 <listitem><para>New pg_autovacuum allows automatic <command>VACUUM</command> (Matthew T. O'Connor)</para></listitem>
3964 <listitem><para>Make pgbench honor environment variables <envar>PGHOST</>, <envar>PGPORT</>, <envar>PGUSER</> (Tatsuo)</para></listitem>
3965 <listitem><para>Improve intarray (Teodor Sigaev)</para></listitem>
3966 <listitem><para>Improve pgstattuple (Rod)</para></listitem>
3967 <listitem><para>Fix bug in <function>metaphone()</function> in fuzzystrmatch</para></listitem>
3968 <listitem><para>Improve adddepend (Rod)</para></listitem>
3969 <listitem><para>Update spi/timetravel (Böjthe Zoltán)</para></listitem>
3970 <listitem><para>Fix dbase <option>-s</> option and improve non-ASCII handling (Thomas Behr, Márcio Smiderle)</para></listitem>
3971 <listitem><para>Remove array module because features now included by default (Joe)</para></listitem>
3972 </itemizedlist>
3973 </sect3>
3974 </sect2>
3975 </sect1>