~ubuntu-branches/debian/sid/postgresql-9.3/sid

« back to all changes in this revision

Viewing changes to doc/src/sgml/release-7.4.sgml

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2013-05-08 05:39:52 UTC
  • Revision ID: package-import@ubuntu.com-20130508053952-1j7uilp7mjtrvq8q
Tags: upstream-9.3~beta1
ImportĀ upstreamĀ versionĀ 9.3~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!-- doc/src/sgml/release-7.4.sgml -->
 
2
<!-- See header comment in release.sgml about typical markup -->
 
3
 
 
4
 <sect1 id="release-7-4-30">
 
5
  <title>Release 7.4.30</title>
 
6
 
 
7
  <note>
 
8
  <title>Release Date</title>
 
9
  <simpara>2010-10-04</simpara>
 
10
  </note>
 
11
 
 
12
  <para>
 
13
   This release contains a variety of fixes from 7.4.29.
 
14
   For information about new features in the 7.4 major release, see
 
15
   <xref linkend="release-7-4">.
 
16
  </para>
 
17
 
 
18
  <para>
 
19
   This is expected to be the last <productname>PostgreSQL</> release
 
20
   in the 7.4.X series.  Users are encouraged to update to a newer
 
21
   release branch soon.
 
22
  </para>
 
23
 
 
24
  <sect2>
 
25
   <title>Migration to Version 7.4.30</title>
 
26
 
 
27
   <para>
 
28
    A dump/restore is not required for those running 7.4.X.
 
29
    However, if you are upgrading from a version earlier than 7.4.26,
 
30
    see the release notes for 7.4.26.
 
31
   </para>
 
32
 
 
33
  </sect2>
 
34
 
 
35
  <sect2>
 
36
   <title>Changes</title>
 
37
 
 
38
   <itemizedlist>
 
39
 
 
40
    <listitem>
 
41
     <para>
 
42
      Use a separate interpreter for each calling SQL userid in PL/Perl and
 
43
      PL/Tcl (Tom Lane)
 
44
     </para>
 
45
 
 
46
     <para>
 
47
      This change prevents security problems that can be caused by subverting
 
48
      Perl or Tcl code that will be executed later in the same session under
 
49
      another SQL user identity (for example, within a <literal>SECURITY
 
50
      DEFINER</> function).  Most scripting languages offer numerous ways that
 
51
      that might be done, such as redefining standard functions or operators
 
52
      called by the target function.  Without this change, any SQL user with
 
53
      Perl or Tcl language usage rights can do essentially anything with the
 
54
      SQL privileges of the target function's owner.
 
55
     </para>
 
56
 
 
57
     <para>
 
58
      The cost of this change is that intentional communication among Perl
 
59
      and Tcl functions becomes more difficult.  To provide an escape hatch,
 
60
      PL/PerlU and PL/TclU functions continue to use only one interpreter
 
61
      per session.  This is not considered a security issue since all such
 
62
      functions execute at the trust level of a database superuser already.
 
63
     </para>
 
64
 
 
65
     <para>
 
66
      It is likely that third-party procedural languages that claim to offer
 
67
      trusted execution have similar security issues.  We advise contacting
 
68
      the authors of any PL you are depending on for security-critical
 
69
      purposes.
 
70
     </para>
 
71
 
 
72
     <para>
 
73
      Our thanks to Tim Bunce for pointing out this issue (CVE-2010-3433).
 
74
     </para>
 
75
    </listitem>
 
76
 
 
77
    <listitem>
 
78
     <para>
 
79
      Prevent possible crashes in <function>pg_get_expr()</> by disallowing
 
80
      it from being called with an argument that is not one of the system
 
81
      catalog columns it's intended to be used with
 
82
      (Heikki Linnakangas, Tom Lane)
 
83
     </para>
 
84
    </listitem>
 
85
 
 
86
    <listitem>
 
87
     <para>
 
88
      Fix <quote>cannot handle unplanned sub-select</quote> error (Tom Lane)
 
89
     </para>
 
90
 
 
91
     <para>
 
92
      This occurred when a sub-select contains a join alias reference that
 
93
      expands into an expression containing another sub-select.
 
94
     </para>
 
95
    </listitem>
 
96
 
 
97
    <listitem>
 
98
     <para>
 
99
      Take care to fsync the contents of lockfiles (both
 
100
      <filename>postmaster.pid</> and the socket lockfile) while writing them
 
101
      (Tom Lane)
 
102
     </para>
 
103
 
 
104
     <para>
 
105
      This omission could result in corrupted lockfile contents if the
 
106
      machine crashes shortly after postmaster start.  That could in turn
 
107
      prevent subsequent attempts to start the postmaster from succeeding,
 
108
      until the lockfile is manually removed.
 
109
     </para>
 
110
    </listitem>
 
111
 
 
112
    <listitem>
 
113
     <para>
 
114
      Improve <filename>contrib/dblink</>'s handling of tables containing
 
115
      dropped columns (Tom Lane)
 
116
     </para>
 
117
    </listitem>
 
118
 
 
119
    <listitem>
 
120
     <para>
 
121
      Fix connection leak after <quote>duplicate connection name</quote>
 
122
      errors in <filename>contrib/dblink</> (Itagaki Takahiro)
 
123
     </para>
 
124
    </listitem>
 
125
 
 
126
    <listitem>
 
127
     <para>
 
128
      Update build infrastructure and documentation to reflect the source code
 
129
      repository's move from CVS to Git (Magnus Hagander and others)
 
130
     </para>
 
131
    </listitem>
 
132
 
 
133
   </itemizedlist>
 
134
 
 
135
  </sect2>
 
136
 </sect1>
 
137
 
 
138
 <sect1 id="release-7-4-29">
 
139
  <title>Release 7.4.29</title>
 
140
 
 
141
  <note>
 
142
  <title>Release Date</title>
 
143
  <simpara>2010-05-17</simpara>
 
144
  </note>
 
145
 
 
146
  <para>
 
147
   This release contains a variety of fixes from 7.4.28.
 
148
   For information about new features in the 7.4 major release, see
 
149
   <xref linkend="release-7-4">.
 
150
  </para>
 
151
 
 
152
  <para>
 
153
   The <productname>PostgreSQL</> community will stop releasing updates
 
154
   for the 7.4.X release series in July 2010.
 
155
   Users are encouraged to update to a newer release branch soon.
 
156
  </para>
 
157
 
 
158
  <sect2>
 
159
   <title>Migration to Version 7.4.29</title>
 
160
 
 
161
   <para>
 
162
    A dump/restore is not required for those running 7.4.X.
 
163
    However, if you are upgrading from a version earlier than 7.4.26,
 
164
    see the release notes for 7.4.26.
 
165
   </para>
 
166
 
 
167
  </sect2>
 
168
 
 
169
  <sect2>
 
170
   <title>Changes</title>
 
171
 
 
172
   <itemizedlist>
 
173
 
 
174
    <listitem>
 
175
     <para>
 
176
      Enforce restrictions in <literal>plperl</> using an opmask applied to
 
177
      the whole interpreter, instead of using <filename>Safe.pm</>
 
178
      (Tim Bunce, Andrew Dunstan)
 
179
     </para>
 
180
 
 
181
     <para>
 
182
      Recent developments have convinced us that <filename>Safe.pm</> is too
 
183
      insecure to rely on for making <literal>plperl</> trustable.  This
 
184
      change removes use of <filename>Safe.pm</> altogether, in favor of using
 
185
      a separate interpreter with an opcode mask that is always applied.
 
186
      Pleasant side effects of the change include that it is now possible to
 
187
      use Perl's <literal>strict</> pragma in a natural way in
 
188
      <literal>plperl</>, and that Perl's <literal>$a</> and <literal>$b</>
 
189
      variables work as expected in sort routines, and that function
 
190
      compilation is significantly faster.  (CVE-2010-1169)
 
191
     </para>
 
192
    </listitem>
 
193
 
 
194
    <listitem>
 
195
     <para>
 
196
      Prevent PL/Tcl from executing untrustworthy code from
 
197
      <structname>pltcl_modules</> (Tom)
 
198
     </para>
 
199
 
 
200
     <para>
 
201
      PL/Tcl's feature for autoloading Tcl code from a database table
 
202
      could be exploited for trojan-horse attacks, because there was no
 
203
      restriction on who could create or insert into that table.  This change
 
204
      disables the feature unless <structname>pltcl_modules</> is owned by a
 
205
      superuser.  (However, the permissions on the table are not checked, so
 
206
      installations that really need a less-than-secure modules table can
 
207
      still grant suitable privileges to trusted non-superusers.)  Also,
 
208
      prevent loading code into the unrestricted <quote>normal</> Tcl
 
209
      interpreter unless we are really going to execute a <literal>pltclu</>
 
210
      function.  (CVE-2010-1170)
 
211
     </para>
 
212
    </listitem>
 
213
 
 
214
    <listitem>
 
215
     <para>
 
216
      Do not allow an unprivileged user to reset superuser-only parameter
 
217
      settings (Alvaro)
 
218
     </para>
 
219
 
 
220
     <para>
 
221
      Previously, if an unprivileged user ran <literal>ALTER USER ... RESET
 
222
      ALL</> for himself, or <literal>ALTER DATABASE ... RESET ALL</> for
 
223
      a database he owns, this would remove all special parameter settings
 
224
      for the user or database, even ones that are only supposed to be
 
225
      changeable by a superuser.  Now, the <command>ALTER</> will only
 
226
      remove the parameters that the user has permission to change.
 
227
     </para>
 
228
    </listitem>
 
229
 
 
230
    <listitem>
 
231
     <para>
 
232
      Avoid possible crash during backend shutdown if shutdown occurs
 
233
      when a <literal>CONTEXT</> addition would be made to log entries (Tom)
 
234
     </para>
 
235
 
 
236
     <para>
 
237
      In some cases the context-printing function would fail because the
 
238
      current transaction had already been rolled back when it came time
 
239
      to print a log message.
 
240
     </para>
 
241
    </listitem>
 
242
 
 
243
    <listitem>
 
244
     <para>
 
245
      Update pl/perl's <filename>ppport.h</> for modern Perl versions
 
246
      (Andrew)
 
247
     </para>
 
248
    </listitem>
 
249
 
 
250
    <listitem>
 
251
     <para>
 
252
      Fix assorted memory leaks in pl/python (Andreas Freund, Tom)
 
253
     </para>
 
254
    </listitem>
 
255
 
 
256
    <listitem>
 
257
     <para>
 
258
      Ensure that <filename>contrib/pgstattuple</> functions respond to cancel
 
259
      interrupts promptly (Tatsuhito Kasahara)
 
260
     </para>
 
261
    </listitem>
 
262
 
 
263
    <listitem>
 
264
     <para>
 
265
      Make server startup deal properly with the case that
 
266
      <function>shmget()</> returns <literal>EINVAL</> for an existing
 
267
      shared memory segment (Tom)
 
268
     </para>
 
269
 
 
270
     <para>
 
271
      This behavior has been observed on BSD-derived kernels including OS X.
 
272
      It resulted in an entirely-misleading startup failure complaining that
 
273
      the shared memory request size was too large.
 
274
     </para>
 
275
    </listitem>
 
276
 
 
277
   </itemizedlist>
 
278
 
 
279
  </sect2>
 
280
 </sect1>
 
281
 
 
282
 <sect1 id="release-7-4-28">
 
283
  <title>Release 7.4.28</title>
 
284
 
 
285
  <note>
 
286
  <title>Release Date</title>
 
287
  <simpara>2010-03-15</simpara>
 
288
  </note>
 
289
 
 
290
  <para>
 
291
   This release contains a variety of fixes from 7.4.27.
 
292
   For information about new features in the 7.4 major release, see
 
293
   <xref linkend="release-7-4">.
 
294
  </para>
 
295
 
 
296
  <para>
 
297
   The <productname>PostgreSQL</> community will stop releasing updates
 
298
   for the 7.4.X release series in July 2010.
 
299
   Users are encouraged to update to a newer release branch soon.
 
300
  </para>
 
301
 
 
302
  <sect2>
 
303
   <title>Migration to Version 7.4.28</title>
 
304
 
 
305
   <para>
 
306
    A dump/restore is not required for those running 7.4.X.
 
307
    However, if you are upgrading from a version earlier than 7.4.26,
 
308
    see the release notes for 7.4.26.
 
309
   </para>
 
310
 
 
311
  </sect2>
 
312
 
 
313
  <sect2>
 
314
   <title>Changes</title>
 
315
 
 
316
   <itemizedlist>
 
317
 
 
318
    <listitem>
 
319
     <para>
 
320
      Add new configuration parameter <varname>ssl_renegotiation_limit</> to
 
321
      control how often we do session key renegotiation for an SSL connection
 
322
      (Magnus)
 
323
     </para>
 
324
 
 
325
     <para>
 
326
      This can be set to zero to disable renegotiation completely, which may
 
327
      be required if a broken SSL library is used.  In particular, some
 
328
      vendors are shipping stopgap patches for CVE-2009-3555 that cause
 
329
      renegotiation attempts to fail.
 
330
     </para>
 
331
    </listitem>
 
332
 
 
333
    <listitem>
 
334
     <para>
 
335
      Make <function>substring()</> for <type>bit</> types treat any negative
 
336
      length as meaning <quote>all the rest of the string</> (Tom)
 
337
     </para>
 
338
 
 
339
     <para>
 
340
      The previous coding treated only -1 that way, and would produce an
 
341
      invalid result value for other negative values, possibly leading to
 
342
      a crash (CVE-2010-0442).
 
343
     </para>
 
344
    </listitem>
 
345
 
 
346
    <listitem>
 
347
     <para>
 
348
      Fix some cases of pathologically slow regular expression matching (Tom)
 
349
     </para>
 
350
    </listitem>
 
351
 
 
352
    <listitem>
 
353
     <para>
 
354
      When reading <filename>pg_hba.conf</> and related files, do not treat
 
355
      <literal>@something</> as a file inclusion request if the <literal>@</>
 
356
      appears inside quote marks; also, never treat <literal>@</> by itself
 
357
      as a file inclusion request (Tom)
 
358
     </para>
 
359
 
 
360
     <para>
 
361
      This prevents erratic behavior if a role or database name starts with
 
362
      <literal>@</>.  If you need to include a file whose path name
 
363
      contains spaces, you can still do so, but you must write
 
364
      <literal>@"/path to/file"</> rather than putting the quotes around
 
365
      the whole construct.
 
366
     </para>
 
367
    </listitem>
 
368
 
 
369
    <listitem>
 
370
     <para>
 
371
      Prevent infinite loop on some platforms if a directory is named as
 
372
      an inclusion target in <filename>pg_hba.conf</> and related files
 
373
      (Tom)
 
374
     </para>
 
375
    </listitem>
 
376
 
 
377
    <listitem>
 
378
     <para>
 
379
      Ensure PL/Tcl initializes the Tcl interpreter fully (Tom)
 
380
     </para>
 
381
 
 
382
     <para>
 
383
      The only known symptom of this oversight is that the Tcl
 
384
      <literal>clock</> command misbehaves if using Tcl 8.5 or later.
 
385
     </para>
 
386
    </listitem>
 
387
 
 
388
    <listitem>
 
389
     <para>
 
390
      Prevent crash in <filename>contrib/dblink</> when too many key
 
391
      columns are specified to a <function>dblink_build_sql_*</> function
 
392
      (Rushabh Lathia, Joe Conway)
 
393
     </para>
 
394
    </listitem>
 
395
 
 
396
   </itemizedlist>
 
397
 
 
398
  </sect2>
 
399
 </sect1>
 
400
 
 
401
 <sect1 id="release-7-4-27">
 
402
  <title>Release 7.4.27</title>
 
403
 
 
404
  <note>
 
405
  <title>Release Date</title>
 
406
  <simpara>2009-12-14</simpara>
 
407
  </note>
 
408
 
 
409
  <para>
 
410
   This release contains a variety of fixes from 7.4.26.
 
411
   For information about new features in the 7.4 major release, see
 
412
   <xref linkend="release-7-4">.
 
413
  </para>
 
414
 
 
415
  <sect2>
 
416
   <title>Migration to Version 7.4.27</title>
 
417
 
 
418
   <para>
 
419
    A dump/restore is not required for those running 7.4.X.
 
420
    However, if you are upgrading from a version earlier than 7.4.26,
 
421
    see the release notes for 7.4.26.
 
422
   </para>
 
423
 
 
424
  </sect2>
 
425
 
 
426
  <sect2>
 
427
   <title>Changes</title>
 
428
 
 
429
   <itemizedlist>
 
430
 
 
431
    <listitem>
 
432
     <para>
 
433
      Protect against indirect security threats caused by index functions
 
434
      changing session-local state (Gurjeet Singh, Tom)
 
435
     </para>
 
436
 
 
437
     <para>
 
438
      This change prevents allegedly-immutable index functions from possibly
 
439
      subverting a superuser's session (CVE-2009-4136).
 
440
     </para>
 
441
    </listitem>
 
442
 
 
443
    <listitem>
 
444
     <para>
 
445
      Reject SSL certificates containing an embedded null byte in the common
 
446
      name (CN) field (Magnus)
 
447
     </para>
 
448
 
 
449
     <para>
 
450
      This prevents unintended matching of a certificate to a server or client
 
451
      name during SSL validation (CVE-2009-4034).
 
452
     </para>
 
453
    </listitem>
 
454
 
 
455
    <listitem>
 
456
     <para>
 
457
      Fix possible crash during backend-startup-time cache initialization (Tom)
 
458
     </para>
 
459
    </listitem>
 
460
 
 
461
    <listitem>
 
462
     <para>
 
463
      Prevent signals from interrupting <literal>VACUUM</> at unsafe times
 
464
      (Alvaro)
 
465
     </para>
 
466
 
 
467
     <para>
 
468
      This fix prevents a PANIC if a <literal>VACUUM FULL</> is canceled
 
469
      after it's already committed its tuple movements, as well as transient
 
470
      errors if a plain <literal>VACUUM</> is interrupted after having
 
471
      truncated the table.
 
472
     </para>
 
473
    </listitem>
 
474
 
 
475
    <listitem>
 
476
     <para>
 
477
      Fix possible crash due to integer overflow in hash table size
 
478
      calculation (Tom)
 
479
     </para>
 
480
 
 
481
     <para>
 
482
      This could occur with extremely large planner estimates for the size of
 
483
      a hashjoin's result.
 
484
     </para>
 
485
    </listitem>
 
486
 
 
487
    <listitem>
 
488
     <para>
 
489
      Fix very rare crash in <type>inet</>/<type>cidr</> comparisons (Chris
 
490
      Mikkelson)
 
491
     </para>
 
492
    </listitem>
 
493
 
 
494
    <listitem>
 
495
     <para>
 
496
      Fix PAM password processing to be more robust (Tom)
 
497
     </para>
 
498
 
 
499
     <para>
 
500
      The previous code is known to fail with the combination of the Linux
 
501
      <literal>pam_krb5</> PAM module with Microsoft Active Directory as the
 
502
      domain controller.  It might have problems elsewhere too, since it was
 
503
      making unjustified assumptions about what arguments the PAM stack would
 
504
      pass to it.
 
505
     </para>
 
506
    </listitem>
 
507
 
 
508
    <listitem>
 
509
     <para>
 
510
      Make the postmaster ignore any <literal>application_name</> parameter in
 
511
      connection request packets, to improve compatibility with future libpq
 
512
      versions (Tom)
 
513
     </para>
 
514
    </listitem>
 
515
 
 
516
   </itemizedlist>
 
517
 
 
518
  </sect2>
 
519
 </sect1>
 
520
 
 
521
 <sect1 id="release-7-4-26">
 
522
  <title>Release 7.4.26</title>
 
523
 
 
524
  <note>
 
525
  <title>Release Date</title>
 
526
  <simpara>2009-09-09</simpara>
 
527
  </note>
 
528
 
 
529
  <para>
 
530
   This release contains a variety of fixes from 7.4.25.
 
531
   For information about new features in the 7.4 major release, see
 
532
   <xref linkend="release-7-4">.
 
533
  </para>
 
534
 
 
535
  <sect2>
 
536
   <title>Migration to Version 7.4.26</title>
 
537
 
 
538
   <para>
 
539
    A dump/restore is not required for those running 7.4.X.
 
540
    However, if you have any hash indexes on <type>interval</> columns,
 
541
    you must <command>REINDEX</> them after updating to 7.4.26.
 
542
    Also, if you are upgrading from a version earlier than 7.4.11,
 
543
    see the release notes for 7.4.11.
 
544
   </para>
 
545
 
 
546
  </sect2>
 
547
 
 
548
  <sect2>
 
549
   <title>Changes</title>
 
550
 
 
551
   <itemizedlist>
 
552
 
 
553
    <listitem>
 
554
     <para>
 
555
      Disallow <command>RESET ROLE</> and <command>RESET SESSION
 
556
      AUTHORIZATION</> inside security-definer functions (Tom, Heikki)
 
557
     </para>
 
558
 
 
559
     <para>
 
560
      This covers a case that was missed in the previous patch that
 
561
      disallowed <command>SET ROLE</> and <command>SET SESSION
 
562
      AUTHORIZATION</> inside security-definer functions.
 
563
      (See CVE-2007-6600)
 
564
     </para>
 
565
    </listitem>
 
566
 
 
567
    <listitem>
 
568
     <para>
 
569
      Fix handling of sub-SELECTs appearing in the arguments of
 
570
      an outer-level aggregate function (Tom)
 
571
     </para>
 
572
    </listitem>
 
573
 
 
574
    <listitem>
 
575
     <para>
 
576
      Fix hash calculation for data type <type>interval</> (Tom)
 
577
     </para>
 
578
 
 
579
     <para>
 
580
      This corrects wrong results for hash joins on interval values.
 
581
      It also changes the contents of hash indexes on interval columns.
 
582
      If you have any such indexes, you must <command>REINDEX</> them
 
583
      after updating.
 
584
     </para>
 
585
    </listitem>
 
586
 
 
587
    <listitem>
 
588
     <para>
 
589
      Fix overflow for <literal>INTERVAL '<replaceable>x</> ms'</literal>
 
590
      when <replaceable>x</> is more than 2 million and integer
 
591
      datetimes are in use (Alex Hunsaker)
 
592
     </para>
 
593
    </listitem>
 
594
 
 
595
    <listitem>
 
596
     <para>
 
597
      Fix calculation of distance between a point and a line segment (Tom)
 
598
     </para>
 
599
 
 
600
     <para>
 
601
      This led to incorrect results from a number of geometric operators.
 
602
     </para>
 
603
    </listitem>
 
604
 
 
605
    <listitem>
 
606
     <para>
 
607
      Fix <type>money</> data type to work in locales where currency
 
608
      amounts have no fractional digits, e.g. Japan (Itagaki Takahiro)
 
609
     </para>
 
610
    </listitem>
 
611
 
 
612
    <listitem>
 
613
     <para>
 
614
      Properly round datetime input like
 
615
      <literal>00:12:57.9999999999999999999999999999</> (Tom)
 
616
     </para>
 
617
    </listitem>
 
618
 
 
619
    <listitem>
 
620
     <para>
 
621
      Fix poor choice of page split point in GiST R-tree operator classes
 
622
      (Teodor)
 
623
     </para>
 
624
    </listitem>
 
625
 
 
626
    <listitem>
 
627
     <para>
 
628
      Fix portability issues in plperl initialization (Andrew Dunstan)
 
629
     </para>
 
630
    </listitem>
 
631
 
 
632
    <listitem>
 
633
     <para>
 
634
      Improve robustness of <application>libpq</>'s code to recover
 
635
      from errors during <command>COPY FROM STDIN</> (Tom)
 
636
     </para>
 
637
    </listitem>
 
638
 
 
639
    <listitem>
 
640
     <para>
 
641
      Avoid including conflicting readline and editline header files
 
642
      when both libraries are installed (Zdenek Kotala)
 
643
     </para>
 
644
    </listitem>
 
645
 
 
646
   </itemizedlist>
 
647
 
 
648
  </sect2>
 
649
 </sect1>
 
650
 
 
651
 <sect1 id="release-7-4-25">
 
652
  <title>Release 7.4.25</title>
 
653
 
 
654
  <note>
 
655
  <title>Release Date</title>
 
656
  <simpara>2009-03-16</simpara>
 
657
  </note>
 
658
 
 
659
  <para>
 
660
   This release contains a variety of fixes from 7.4.24.
 
661
   For information about new features in the 7.4 major release, see
 
662
   <xref linkend="release-7-4">.
 
663
  </para>
 
664
 
 
665
  <sect2>
 
666
   <title>Migration to Version 7.4.25</title>
 
667
 
 
668
   <para>
 
669
    A dump/restore is not required for those running 7.4.X.
 
670
    However, if you are upgrading from a version earlier than 7.4.11,
 
671
    see the release notes for 7.4.11.
 
672
   </para>
 
673
 
 
674
  </sect2>
 
675
 
 
676
  <sect2>
 
677
   <title>Changes</title>
 
678
 
 
679
   <itemizedlist>
 
680
 
 
681
    <listitem>
 
682
     <para>
 
683
      Prevent error recursion crashes when encoding conversion fails (Tom)
 
684
     </para>
 
685
 
 
686
     <para>
 
687
      This change extends fixes made in the last two minor releases for
 
688
      related failure scenarios.  The previous fixes were narrowly tailored
 
689
      for the original problem reports, but we have now recognized that
 
690
      <emphasis>any</> error thrown by an encoding conversion function could
 
691
      potentially lead to infinite recursion while trying to report the
 
692
      error.  The solution therefore is to disable translation and encoding
 
693
      conversion and report the plain-ASCII form of any error message,
 
694
      if we find we have gotten into a recursive error reporting situation.
 
695
      (CVE-2009-0922)
 
696
     </para>
 
697
    </listitem>
 
698
 
 
699
    <listitem>
 
700
     <para>
 
701
      Disallow <command>CREATE CONVERSION</> with the wrong encodings
 
702
      for the specified conversion function (Heikki)
 
703
     </para>
 
704
 
 
705
     <para>
 
706
      This prevents one possible scenario for encoding conversion failure.
 
707
      The previous change is a backstop to guard against other kinds of
 
708
      failures in the same area.
 
709
     </para>
 
710
    </listitem>
 
711
 
 
712
    <listitem>
 
713
     <para>
 
714
      Fix core dump when <function>to_char()</> is given format codes that
 
715
      are inappropriate for the type of the data argument (Tom)
 
716
     </para>
 
717
    </listitem>
 
718
 
 
719
    <listitem>
 
720
     <para>
 
721
      Add <literal>MUST</> (Mauritius Island Summer Time) to the default list
 
722
      of known timezone abbreviations (Xavier Bugaud)
 
723
     </para>
 
724
    </listitem>
 
725
 
 
726
   </itemizedlist>
 
727
 
 
728
  </sect2>
 
729
 </sect1>
 
730
 
 
731
 <sect1 id="release-7-4-24">
 
732
  <title>Release 7.4.24</title>
 
733
 
 
734
  <note>
 
735
  <title>Release Date</title>
 
736
  <simpara>2009-02-02</simpara>
 
737
  </note>
 
738
 
 
739
  <para>
 
740
   This release contains a variety of fixes from 7.4.23.
 
741
   For information about new features in the 7.4 major release, see
 
742
   <xref linkend="release-7-4">.
 
743
  </para>
 
744
 
 
745
  <sect2>
 
746
   <title>Migration to Version 7.4.24</title>
 
747
 
 
748
   <para>
 
749
    A dump/restore is not required for those running 7.4.X.
 
750
    However, if you are upgrading from a version earlier than 7.4.11,
 
751
    see the release notes for 7.4.11.
 
752
   </para>
 
753
 
 
754
  </sect2>
 
755
 
 
756
  <sect2>
 
757
   <title>Changes</title>
 
758
 
 
759
   <itemizedlist>
 
760
 
 
761
    <listitem>
 
762
     <para>
 
763
      Improve handling of URLs in <function>headline()</> function (Teodor)
 
764
     </para>
 
765
    </listitem>
 
766
 
 
767
    <listitem>
 
768
     <para>
 
769
      Improve handling of overlength headlines in <function>headline()</>
 
770
      function (Teodor)
 
771
     </para>
 
772
    </listitem>
 
773
 
 
774
    <listitem>
 
775
     <para>
 
776
      Prevent possible Assert failure or misconversion if an encoding
 
777
      conversion is created with the wrong conversion function for the
 
778
      specified pair of encodings (Tom, Heikki)
 
779
     </para>
 
780
    </listitem>
 
781
 
 
782
    <listitem>
 
783
     <para>
 
784
      Avoid unnecessary locking of small tables in <command>VACUUM</>
 
785
      (Heikki)
 
786
     </para>
 
787
    </listitem>
 
788
 
 
789
    <listitem>
 
790
     <para>
 
791
      Fix uninitialized variables in <filename>contrib/tsearch2</>'s
 
792
      <function>get_covers()</> function (Teodor)
 
793
     </para>
 
794
    </listitem>
 
795
 
 
796
    <listitem>
 
797
     <para>
 
798
      Fix bug in <function>to_char()</>'s handling of <literal>TH</>
 
799
      format codes (Andreas Scherbaum)
 
800
     </para>
 
801
    </listitem>
 
802
 
 
803
    <listitem>
 
804
     <para>
 
805
      Make all documentation reference <literal>pgsql-bugs</> and/or
 
806
      <literal>pgsql-hackers</> as appropriate, instead of the
 
807
      now-decommissioned <literal>pgsql-ports</> and <literal>pgsql-patches</>
 
808
      mailing lists (Tom)
 
809
     </para>
 
810
    </listitem>
 
811
 
 
812
   </itemizedlist>
 
813
 
 
814
  </sect2>
 
815
 </sect1>
 
816
 
 
817
 <sect1 id="release-7-4-23">
 
818
  <title>Release 7.4.23</title>
 
819
 
 
820
  <note>
 
821
  <title>Release Date</title>
 
822
  <simpara>2008-11-03</simpara>
 
823
  </note>
 
824
 
 
825
  <para>
 
826
   This release contains a variety of fixes from 7.4.22.
 
827
   For information about new features in the 7.4 major release, see
 
828
   <xref linkend="release-7-4">.
 
829
  </para>
 
830
 
 
831
  <sect2>
 
832
   <title>Migration to Version 7.4.23</title>
 
833
 
 
834
   <para>
 
835
    A dump/restore is not required for those running 7.4.X.
 
836
    However, if you are upgrading from a version earlier than 7.4.11,
 
837
    see the release notes for 7.4.11.
 
838
   </para>
 
839
 
 
840
  </sect2>
 
841
 
 
842
  <sect2>
 
843
   <title>Changes</title>
 
844
 
 
845
   <itemizedlist>
 
846
 
 
847
    <listitem>
 
848
     <para>
 
849
      Fix backend crash when the client encoding cannot represent a localized
 
850
      error message (Tom)
 
851
     </para>
 
852
 
 
853
     <para>
 
854
      We have addressed similar issues before, but it would still fail if
 
855
      the <quote>character has no equivalent</> message itself couldn't
 
856
      be converted.  The fix is to disable localization and send the plain
 
857
      ASCII error message when we detect such a situation.
 
858
     </para>
 
859
    </listitem>
 
860
 
 
861
    <listitem>
 
862
     <para>
 
863
      Fix incorrect tsearch2 headline generation when single query
 
864
      item matches first word of text (Sushant Sinha)
 
865
     </para>
 
866
    </listitem>
 
867
 
 
868
    <listitem>
 
869
     <para>
 
870
      Fix improper display of fractional seconds in interval values when
 
871
      using a non-ISO datestyle in an <option>--enable-integer-datetimes</>
 
872
      build (Ron Mayer)
 
873
     </para>
 
874
    </listitem>
 
875
 
 
876
    <listitem>
 
877
     <para>
 
878
      Ensure <function>SPI_getvalue</> and <function>SPI_getbinval</>
 
879
      behave correctly when the passed tuple and tuple descriptor have
 
880
      different numbers of columns (Tom)
 
881
     </para>
 
882
 
 
883
     <para>
 
884
      This situation is normal when a table has had columns added or removed,
 
885
      but these two functions didn't handle it properly.
 
886
      The only likely consequence is an incorrect error indication.
 
887
     </para>
 
888
    </listitem>
 
889
 
 
890
    <listitem>
 
891
     <para>
 
892
      Fix <application>ecpg</>'s parsing of <command>CREATE USER</> (Michael)
 
893
     </para>
 
894
    </listitem>
 
895
 
 
896
   </itemizedlist>
 
897
 
 
898
  </sect2>
 
899
 </sect1>
 
900
 
 
901
 <sect1 id="release-7-4-22">
 
902
  <title>Release 7.4.22</title>
 
903
 
 
904
  <note>
 
905
  <title>Release Date</title>
 
906
  <simpara>2008-09-22</simpara>
 
907
  </note>
 
908
 
 
909
  <para>
 
910
   This release contains a variety of fixes from 7.4.21.
 
911
   For information about new features in the 7.4 major release, see
 
912
   <xref linkend="release-7-4">.
 
913
  </para>
 
914
 
 
915
  <sect2>
 
916
   <title>Migration to Version 7.4.22</title>
 
917
 
 
918
   <para>
 
919
    A dump/restore is not required for those running 7.4.X.
 
920
    However, if you are upgrading from a version earlier than 7.4.11,
 
921
    see the release notes for 7.4.11.
 
922
   </para>
 
923
 
 
924
  </sect2>
 
925
 
 
926
  <sect2>
 
927
   <title>Changes</title>
 
928
 
 
929
   <itemizedlist>
 
930
 
 
931
    <listitem>
 
932
     <para>
 
933
      Fix datetime input functions to correctly detect integer overflow when
 
934
      running on a 64-bit platform (Tom)
 
935
     </para>
 
936
    </listitem>
 
937
 
 
938
    <listitem>
 
939
     <para>
 
940
      Improve performance of writing very long log messages to syslog (Tom)
 
941
     </para>
 
942
    </listitem>
 
943
 
 
944
    <listitem>
 
945
     <para>
 
946
      Fix bug in backwards scanning of a cursor on a <literal>SELECT DISTINCT
 
947
      ON</> query (Tom)
 
948
     </para>
 
949
    </listitem>
 
950
 
 
951
    <listitem>
 
952
     <para>
 
953
      Fix planner to estimate that <literal>GROUP BY</> expressions yielding
 
954
      boolean results always result in two groups, regardless of the
 
955
      expressions' contents (Tom)
 
956
     </para>
 
957
 
 
958
     <para>
 
959
      This is very substantially more accurate than the regular <literal>GROUP
 
960
      BY</> estimate for certain boolean tests like <replaceable>col</>
 
961
      <literal>IS NULL</>.
 
962
     </para>
 
963
    </listitem>
 
964
 
 
965
    <listitem>
 
966
     <para>
 
967
      Improve <application>pg_dump</> and <application>pg_restore</>'s
 
968
      error reporting after failure to send a SQL command (Tom)
 
969
     </para>
 
970
    </listitem>
 
971
 
 
972
   </itemizedlist>
 
973
 
 
974
  </sect2>
 
975
 </sect1>
 
976
 
 
977
 <sect1 id="release-7-4-21">
 
978
  <title>Release 7.4.21</title>
 
979
 
 
980
  <note>
 
981
  <title>Release Date</title>
 
982
  <simpara>2008-06-12</simpara>
 
983
  </note>
 
984
 
 
985
  <para>
 
986
   This release contains one serious bug fix over 7.4.20.
 
987
   For information about new features in the 7.4 major release, see
 
988
   <xref linkend="release-7-4">.
 
989
  </para>
 
990
 
 
991
  <sect2>
 
992
   <title>Migration to Version 7.4.21</title>
 
993
 
 
994
   <para>
 
995
    A dump/restore is not required for those running 7.4.X.
 
996
    However, if you are upgrading from a version earlier than 7.4.11,
 
997
    see the release notes for 7.4.11.
 
998
   </para>
 
999
 
 
1000
  </sect2>
 
1001
 
 
1002
  <sect2>
 
1003
   <title>Changes</title>
 
1004
 
 
1005
   <itemizedlist>
 
1006
 
 
1007
    <listitem>
 
1008
     <para>
 
1009
      Make <function>pg_get_ruledef()</> parenthesize negative constants (Tom)
 
1010
     </para>
 
1011
 
 
1012
     <para>
 
1013
      Before this fix, a negative constant in a view or rule might be dumped
 
1014
      as, say, <literal>-42::integer</>, which is subtly incorrect: it should
 
1015
      be <literal>(-42)::integer</> due to operator precedence rules.
 
1016
      Usually this would make little difference, but it could interact with
 
1017
      another recent patch to cause
 
1018
      <productname>PostgreSQL</> to reject what had been a valid
 
1019
      <command>SELECT DISTINCT</> view query.  Since this could result in
 
1020
      <application>pg_dump</> output failing to reload, it is being treated
 
1021
      as a high-priority fix.  The only released versions in which dump
 
1022
      output is actually incorrect are 8.3.1 and 8.2.7.
 
1023
     </para>
 
1024
    </listitem>
 
1025
 
 
1026
   </itemizedlist>
 
1027
 
 
1028
  </sect2>
 
1029
 </sect1>
 
1030
 
 
1031
 <sect1 id="release-7-4-20">
 
1032
  <title>Release 7.4.20</title>
 
1033
 
 
1034
  <note>
 
1035
  <title>Release Date</title>
 
1036
  <simpara>never released</simpara>
 
1037
  </note>
 
1038
 
 
1039
  <para>
 
1040
   This release contains a variety of fixes from 7.4.19.
 
1041
   For information about new features in the 7.4 major release, see
 
1042
   <xref linkend="release-7-4">.
 
1043
  </para>
 
1044
 
 
1045
  <sect2>
 
1046
   <title>Migration to Version 7.4.20</title>
 
1047
 
 
1048
   <para>
 
1049
    A dump/restore is not required for those running 7.4.X.
 
1050
    However, if you are upgrading from a version earlier than 7.4.11,
 
1051
    see the release notes for 7.4.11.
 
1052
   </para>
 
1053
 
 
1054
  </sect2>
 
1055
 
 
1056
  <sect2>
 
1057
   <title>Changes</title>
 
1058
 
 
1059
   <itemizedlist>
 
1060
 
 
1061
    <listitem>
 
1062
     <para>
 
1063
      Fix conversions between ISO-8859-5 and other encodings to handle
 
1064
      Cyrillic <quote>Yo</> characters (<literal>e</> and <literal>E</> with
 
1065
      two dots) (Sergey Burladyan)
 
1066
     </para>
 
1067
    </listitem>
 
1068
 
 
1069
    <listitem>
 
1070
     <para>
 
1071
      Fix a few datatype input functions
 
1072
      that were allowing unused bytes in their results to contain
 
1073
      uninitialized, unpredictable values (Tom)
 
1074
     </para>
 
1075
 
 
1076
     <para>
 
1077
      This could lead to failures in which two apparently identical literal
 
1078
      values were not seen as equal, resulting in the parser complaining
 
1079
      about unmatched <literal>ORDER BY</> and <literal>DISTINCT</>
 
1080
      expressions.
 
1081
     </para>
 
1082
    </listitem>
 
1083
 
 
1084
    <listitem>
 
1085
     <para>
 
1086
      Fix a corner case in regular-expression substring matching
 
1087
      (<literal>substring(<replaceable>string</> from
 
1088
      <replaceable>pattern</>)</literal>) (Tom)
 
1089
     </para>
 
1090
 
 
1091
     <para>
 
1092
      The problem occurs when there is a match to the pattern overall but
 
1093
      the user has specified a parenthesized subexpression and that
 
1094
      subexpression hasn't got a match.  An example is
 
1095
      <literal>substring('foo' from 'foo(bar)?')</>.
 
1096
      This should return NULL, since <literal>(bar)</> isn't matched, but
 
1097
      it was mistakenly returning the whole-pattern match instead (ie,
 
1098
      <literal>foo</>).
 
1099
     </para>
 
1100
    </listitem>
 
1101
 
 
1102
    <listitem>
 
1103
     <para>
 
1104
      Fix incorrect result from <application>ecpg</>'s
 
1105
      <function>PGTYPEStimestamp_sub()</> function (Michael)
 
1106
     </para>
 
1107
    </listitem>
 
1108
 
 
1109
    <listitem>
 
1110
     <para>
 
1111
      Fix <literal>DatumGetBool</> macro to not fail with <application>gcc</>
 
1112
      4.3 (Tom)
 
1113
     </para>
 
1114
 
 
1115
     <para>
 
1116
      This problem affects <quote>old style</> (V0) C functions that
 
1117
      return boolean.  The fix is already in 8.3, but the need to
 
1118
      back-patch it was not realized at the time.
 
1119
     </para>
 
1120
    </listitem>
 
1121
 
 
1122
    <listitem>
 
1123
     <para>
 
1124
      Fix longstanding <command>LISTEN</>/<command>NOTIFY</>
 
1125
      race condition (Tom)
 
1126
     </para>
 
1127
 
 
1128
     <para>
 
1129
      In rare cases a session that had just executed a
 
1130
      <command>LISTEN</> might not get a notification, even though
 
1131
      one would be expected because the concurrent transaction executing
 
1132
      <command>NOTIFY</> was observed to commit later.
 
1133
     </para>
 
1134
 
 
1135
     <para>
 
1136
      A side effect of the fix is that a transaction that has executed
 
1137
      a not-yet-committed <command>LISTEN</> command will not see any
 
1138
      row in <structname>pg_listener</> for the <command>LISTEN</>,
 
1139
      should it choose to look; formerly it would have.  This behavior
 
1140
      was never documented one way or the other, but it is possible that
 
1141
      some applications depend on the old behavior.
 
1142
     </para>
 
1143
    </listitem>
 
1144
 
 
1145
    <listitem>
 
1146
     <para>
 
1147
      Fix display of constant expressions in <literal>ORDER BY</>
 
1148
      and <literal>GROUP BY</> (Tom)
 
1149
     </para>
 
1150
 
 
1151
     <para>
 
1152
      An explicitly casted constant would be shown incorrectly.  This could
 
1153
      for example lead to corruption of a view definition during
 
1154
      dump and reload.
 
1155
     </para>
 
1156
    </listitem>
 
1157
 
 
1158
    <listitem>
 
1159
     <para>
 
1160
      Fix <application>libpq</> to handle NOTICE messages correctly
 
1161
      during COPY OUT (Tom)
 
1162
     </para>
 
1163
 
 
1164
     <para>
 
1165
      This failure has only been observed to occur when a user-defined
 
1166
      datatype's output routine issues a NOTICE, but there is no
 
1167
      guarantee it couldn't happen due to other causes.
 
1168
     </para>
 
1169
    </listitem>
 
1170
 
 
1171
   </itemizedlist>
 
1172
 
 
1173
  </sect2>
 
1174
 </sect1>
 
1175
 
 
1176
 <sect1 id="release-7-4-19">
 
1177
  <title>Release 7.4.19</title>
 
1178
 
 
1179
  <note>
 
1180
  <title>Release Date</title>
 
1181
  <simpara>2008-01-07</simpara>
 
1182
  </note>
 
1183
 
 
1184
  <para>
 
1185
   This release contains a variety of fixes from 7.4.18,
 
1186
   including fixes for significant security issues.
 
1187
   For information about new features in the 7.4 major release, see
 
1188
   <xref linkend="release-7-4">.
 
1189
  </para>
 
1190
 
 
1191
  <sect2>
 
1192
   <title>Migration to Version 7.4.19</title>
 
1193
 
 
1194
   <para>
 
1195
    A dump/restore is not required for those running 7.4.X.  However,
 
1196
    if you are upgrading from a version earlier than 7.4.11, see the release
 
1197
    notes for 7.4.11.
 
1198
   </para>
 
1199
 
 
1200
  </sect2>
 
1201
 
 
1202
  <sect2>
 
1203
   <title>Changes</title>
 
1204
 
 
1205
   <itemizedlist>
 
1206
 
 
1207
    <listitem>
 
1208
     <para>
 
1209
      Prevent functions in indexes from executing with the privileges of
 
1210
      the user running <command>VACUUM</>, <command>ANALYZE</>, etc (Tom)
 
1211
     </para>
 
1212
 
 
1213
     <para>
 
1214
      Functions used in index expressions and partial-index
 
1215
      predicates are evaluated whenever a new table entry is made.  It has
 
1216
      long been understood that this poses a risk of trojan-horse code
 
1217
      execution if one modifies a table owned by an untrustworthy user.
 
1218
      (Note that triggers, defaults, check constraints, etc. pose the
 
1219
      same type of risk.)  But functions in indexes pose extra danger
 
1220
      because they will be executed by routine maintenance operations
 
1221
      such as <command>VACUUM FULL</>, which are commonly performed
 
1222
      automatically under a superuser account.  For example, a nefarious user
 
1223
      can execute code with superuser privileges by setting up a
 
1224
      trojan-horse index definition and waiting for the next routine vacuum.
 
1225
      The fix arranges for standard maintenance operations
 
1226
      (including <command>VACUUM</>, <command>ANALYZE</>, <command>REINDEX</>,
 
1227
      and <command>CLUSTER</>) to execute as the table owner rather than
 
1228
      the calling user, using the same privilege-switching mechanism already
 
1229
      used for <literal>SECURITY DEFINER</> functions.  To prevent bypassing
 
1230
      this security measure, execution of <command>SET SESSION
 
1231
      AUTHORIZATION</> and <command>SET ROLE</> is now forbidden within a
 
1232
      <literal>SECURITY DEFINER</> context.  (CVE-2007-6600)
 
1233
     </para>
 
1234
    </listitem>
 
1235
 
 
1236
    <listitem>
 
1237
     <para>
 
1238
      Repair assorted bugs in the regular-expression package (Tom, Will Drewry)
 
1239
     </para>
 
1240
 
 
1241
     <para>
 
1242
      Suitably crafted regular-expression patterns could cause crashes,
 
1243
      infinite or near-infinite looping, and/or massive memory consumption,
 
1244
      all of which pose denial-of-service hazards for applications that
 
1245
      accept regex search patterns from untrustworthy sources.
 
1246
      (CVE-2007-4769, CVE-2007-4772, CVE-2007-6067)
 
1247
     </para>
 
1248
    </listitem>
 
1249
 
 
1250
    <listitem>
 
1251
     <para>
 
1252
      Require non-superusers who use <filename>/contrib/dblink</> to use only
 
1253
      password authentication, as a security measure (Joe)
 
1254
     </para>
 
1255
 
 
1256
     <para>
 
1257
      The fix that appeared for this in 7.4.18 was incomplete, as it plugged
 
1258
      the hole for only some <filename>dblink</> functions.  (CVE-2007-6601,
 
1259
      CVE-2007-3278)
 
1260
     </para>
 
1261
    </listitem>
 
1262
 
 
1263
    <listitem>
 
1264
     <para>
 
1265
      Fix planner failure in some cases of <literal>WHERE false AND var IN
 
1266
      (SELECT ...)</> (Tom)
 
1267
     </para>
 
1268
    </listitem>
 
1269
 
 
1270
    <listitem>
 
1271
     <para>
 
1272
      Fix potential crash in <function>translate()</> when using a multibyte
 
1273
      database encoding (Tom)
 
1274
     </para>
 
1275
    </listitem>
 
1276
 
 
1277
    <listitem>
 
1278
     <para>
 
1279
      Fix PL/Python to not crash on long exception messages (Alvaro)
 
1280
     </para>
 
1281
    </listitem>
 
1282
 
 
1283
    <listitem>
 
1284
     <para>
 
1285
      <application>ecpg</> parser fixes (Michael)
 
1286
     </para>
 
1287
    </listitem>
 
1288
 
 
1289
    <listitem>
 
1290
     <para>
 
1291
      Make <filename>contrib/tablefunc</>'s <function>crosstab()</> handle
 
1292
      NULL rowid as a category in its own right, rather than crashing (Joe)
 
1293
     </para>
 
1294
    </listitem>
 
1295
 
 
1296
    <listitem>
 
1297
     <para>
 
1298
      Fix <type>tsvector</> and <type>tsquery</> output routines to
 
1299
      escape backslashes correctly (Teodor, Bruce)
 
1300
     </para>
 
1301
    </listitem>
 
1302
 
 
1303
    <listitem>
 
1304
     <para>
 
1305
      Fix crash of <function>to_tsvector()</> on huge input strings (Teodor)
 
1306
     </para>
 
1307
    </listitem>
 
1308
 
 
1309
    <listitem>
 
1310
     <para>
 
1311
      Require a specific version of <productname>Autoconf</> to be used
 
1312
      when re-generating the <command>configure</> script (Peter)
 
1313
     </para>
 
1314
 
 
1315
     <para>
 
1316
      This affects developers and packagers only.  The change was made
 
1317
      to prevent accidental use of untested combinations of
 
1318
      <productname>Autoconf</> and <productname>PostgreSQL</> versions.
 
1319
      You can remove the version check if you really want to use a
 
1320
      different <productname>Autoconf</> version, but it's
 
1321
      your responsibility whether the result works or not.
 
1322
     </para>
 
1323
    </listitem>
 
1324
 
 
1325
   </itemizedlist>
 
1326
 
 
1327
  </sect2>
 
1328
 </sect1>
 
1329
 
 
1330
 <sect1 id="release-7-4-18">
 
1331
  <title>Release 7.4.18</title>
 
1332
 
 
1333
  <note>
 
1334
  <title>Release Date</title>
 
1335
  <simpara>2007-09-17</simpara>
 
1336
  </note>
 
1337
 
 
1338
  <para>
 
1339
   This release contains fixes from 7.4.17.
 
1340
   For information about new features in the 7.4 major release, see
 
1341
   <xref linkend="release-7-4">.
 
1342
  </para>
 
1343
 
 
1344
  <sect2>
 
1345
   <title>Migration to Version 7.4.18</title>
 
1346
 
 
1347
   <para>
 
1348
    A dump/restore is not required for those running 7.4.X.  However,
 
1349
    if you are upgrading from a version earlier than 7.4.11, see the release
 
1350
    notes for 7.4.11.
 
1351
   </para>
 
1352
 
 
1353
  </sect2>
 
1354
 
 
1355
  <sect2>
 
1356
   <title>Changes</title>
 
1357
 
 
1358
   <itemizedlist>
 
1359
 
 
1360
    <listitem>
 
1361
     <para>
 
1362
      Prevent index corruption when a transaction inserts rows and
 
1363
      then aborts close to the end of a concurrent <command>VACUUM</>
 
1364
      on the same table (Tom)
 
1365
     </para>
 
1366
    </listitem>
 
1367
 
 
1368
    <listitem>
 
1369
     <para>
 
1370
      Make <command>CREATE DOMAIN ... DEFAULT NULL</> work properly (Tom)
 
1371
     </para>
 
1372
    </listitem>
 
1373
 
 
1374
    <listitem>
 
1375
     <para>
 
1376
      Fix excessive logging of <acronym>SSL</> error messages (Tom)
 
1377
     </para>
 
1378
    </listitem>
 
1379
 
 
1380
    <listitem>
 
1381
     <para>
 
1382
      Fix crash when <varname>log_min_error_statement</> logging runs out
 
1383
      of memory (Tom)
 
1384
     </para>
 
1385
    </listitem>
 
1386
 
 
1387
    <listitem>
 
1388
     <para>
 
1389
      Prevent <command>CLUSTER</> from failing
 
1390
      due to attempting to process temporary tables of other sessions (Alvaro)
 
1391
     </para>
 
1392
    </listitem>
 
1393
 
 
1394
    <listitem>
 
1395
     <para>
 
1396
      Require non-superusers who use <filename>/contrib/dblink</> to use only
 
1397
      password authentication, as a security measure (Joe)
 
1398
     </para>
 
1399
    </listitem>
 
1400
 
 
1401
   </itemizedlist>
 
1402
 
 
1403
  </sect2>
 
1404
 </sect1>
 
1405
 
 
1406
 <sect1 id="release-7-4-17">
 
1407
  <title>Release 7.4.17</title>
 
1408
 
 
1409
  <note>
 
1410
  <title>Release Date</title>
 
1411
  <simpara>2007-04-23</simpara>
 
1412
  </note>
 
1413
 
 
1414
  <para>
 
1415
   This release contains fixes from 7.4.16,
 
1416
   including a security fix.
 
1417
   For information about new features in the 7.4 major release, see
 
1418
   <xref linkend="release-7-4">.
 
1419
  </para>
 
1420
 
 
1421
  <sect2>
 
1422
   <title>Migration to Version 7.4.17</title>
 
1423
 
 
1424
   <para>
 
1425
    A dump/restore is not required for those running 7.4.X.  However,
 
1426
    if you are upgrading from a version earlier than 7.4.11, see the release
 
1427
    notes for 7.4.11.
 
1428
   </para>
 
1429
 
 
1430
  </sect2>
 
1431
 
 
1432
  <sect2>
 
1433
   <title>Changes</title>
 
1434
 
 
1435
   <itemizedlist>
 
1436
 
 
1437
    <listitem>
 
1438
    <para>
 
1439
     Support explicit placement of the temporary-table schema within
 
1440
     <varname>search_path</>, and disable searching it for functions
 
1441
     and operators (Tom)
 
1442
    </para>
 
1443
    <para>
 
1444
     This is needed to allow a security-definer function to set a
 
1445
     truly secure value of <varname>search_path</>.  Without it,
 
1446
     an unprivileged SQL user can use temporary objects to execute code
 
1447
     with the privileges of the security-definer function (CVE-2007-2138).
 
1448
     See <command>CREATE FUNCTION</> for more information.
 
1449
    </para>
 
1450
    </listitem>
 
1451
 
 
1452
    <listitem>
 
1453
    <para>
 
1454
     <filename>/contrib/tsearch2</> crash fixes (Teodor)
 
1455
    </para>
 
1456
    </listitem>
 
1457
 
 
1458
    <listitem>
 
1459
    <para>
 
1460
     Fix potential-data-corruption bug in how <command>VACUUM FULL</> handles
 
1461
     <command>UPDATE</> chains (Tom, Pavan Deolasee)
 
1462
    </para>
 
1463
    </listitem>
 
1464
 
 
1465
    <listitem>
 
1466
    <para>
 
1467
     Fix PANIC during enlargement of a hash index (bug introduced in 7.4.15)
 
1468
     (Tom)
 
1469
    </para>
 
1470
    </listitem>
 
1471
 
 
1472
   </itemizedlist>
 
1473
 
 
1474
  </sect2>
 
1475
 </sect1>
 
1476
 
 
1477
 <sect1 id="release-7-4-16">
 
1478
  <title>Release 7.4.16</title>
 
1479
 
 
1480
  <note>
 
1481
  <title>Release Date</title>
 
1482
  <simpara>2007-02-05</simpara>
 
1483
  </note>
 
1484
 
 
1485
  <para>
 
1486
   This release contains a variety of fixes from 7.4.15, including
 
1487
   a security fix.
 
1488
   For information about new features in the 7.4 major release, see
 
1489
   <xref linkend="release-7-4">.
 
1490
  </para>
 
1491
 
 
1492
  <sect2>
 
1493
   <title>Migration to Version 7.4.16</title>
 
1494
 
 
1495
   <para>
 
1496
    A dump/restore is not required for those running 7.4.X.  However,
 
1497
    if you are upgrading from a version earlier than 7.4.11, see the release
 
1498
    notes for 7.4.11.
 
1499
   </para>
 
1500
 
 
1501
  </sect2>
 
1502
 
 
1503
  <sect2>
 
1504
   <title>Changes</title>
 
1505
 
 
1506
   <itemizedlist>
 
1507
 
 
1508
    <listitem>
 
1509
    <para>
 
1510
     Remove security vulnerability that allowed connected users
 
1511
     to read backend memory (Tom)
 
1512
    </para>
 
1513
    <para>
 
1514
     The vulnerability involves suppressing the normal check that a SQL
 
1515
     function returns the data type it's declared to, or changing the
 
1516
     data type of a table column used in a SQL function (CVE-2007-0555).
 
1517
     This error can easily be exploited to cause a backend crash, and in
 
1518
     principle might be used to read database content that the user
 
1519
     should not be able to access.
 
1520
    </para>
 
1521
    </listitem>
 
1522
 
 
1523
    <listitem>
 
1524
    <para>
 
1525
     Fix rare bug wherein btree index page splits could fail
 
1526
     due to choosing an infeasible split point (Heikki Linnakangas)
 
1527
    </para>
 
1528
    </listitem>
 
1529
 
 
1530
    <listitem>
 
1531
    <para>
 
1532
     Fix for rare Assert() crash triggered by <literal>UNION</> (Tom)
 
1533
    </para>
 
1534
    </listitem>
 
1535
 
 
1536
    <listitem>
 
1537
    <para>
 
1538
     Tighten security of multi-byte character processing for UTF8 sequences
 
1539
     over three bytes long (Tom)
 
1540
    </para>
 
1541
    </listitem>
 
1542
 
 
1543
   </itemizedlist>
 
1544
 
 
1545
  </sect2>
 
1546
 </sect1>
 
1547
 
 
1548
 <sect1 id="release-7-4-15">
 
1549
  <title>Release 7.4.15</title>
 
1550
 
 
1551
  <note>
 
1552
  <title>Release Date</title>
 
1553
  <simpara>2007-01-08</simpara>
 
1554
  </note>
 
1555
 
 
1556
  <para>
 
1557
   This release contains a variety of fixes from 7.4.14.
 
1558
   For information about new features in the 7.4 major release, see
 
1559
   <xref linkend="release-7-4">.
 
1560
  </para>
 
1561
 
 
1562
  <sect2>
 
1563
   <title>Migration to Version 7.4.15</title>
 
1564
 
 
1565
   <para>
 
1566
    A dump/restore is not required for those running 7.4.X.  However,
 
1567
    if you are upgrading from a version earlier than 7.4.11, see the release
 
1568
    notes for 7.4.11.
 
1569
   </para>
 
1570
 
 
1571
  </sect2>
 
1572
 
 
1573
  <sect2>
 
1574
   <title>Changes</title>
 
1575
 
 
1576
   <itemizedlist>
 
1577
 
 
1578
    <listitem>
 
1579
     <para>
 
1580
      Improve handling of <function>getaddrinfo()</> on AIX (Tom)
 
1581
     </para>
 
1582
 
 
1583
     <para>
 
1584
      This fixes a problem with starting the statistics collector,
 
1585
      among other things.
 
1586
     </para>
 
1587
    </listitem>
 
1588
 
 
1589
     <listitem>
 
1590
      <para>
 
1591
       Fix <quote>failed to re-find parent key</> errors in
 
1592
       <command>VACUUM</> (Tom)
 
1593
      </para>
 
1594
     </listitem>
 
1595
 
 
1596
     <listitem>
 
1597
      <para>
 
1598
       Fix bugs affecting multi-gigabyte hash indexes (Tom)
 
1599
      </para>
 
1600
     </listitem>
 
1601
 
 
1602
    <listitem>
 
1603
     <para>
 
1604
      Fix error when constructing an <literal>ARRAY[]</> made up of multiple
 
1605
      empty elements (Tom)
 
1606
     </para>
 
1607
    </listitem>
 
1608
 
 
1609
    <listitem>
 
1610
     <para>
 
1611
      <function>to_number()</> and <function>to_char(numeric)</>
 
1612
      are now <literal>STABLE</>, not <literal>IMMUTABLE</>, for
 
1613
      new <application>initdb</> installs (Tom)
 
1614
     </para>
 
1615
 
 
1616
     <para>
 
1617
      This is because <varname>lc_numeric</> can potentially
 
1618
      change the output of these functions.
 
1619
     </para>
 
1620
    </listitem>
 
1621
 
 
1622
    <listitem>
 
1623
     <para>
 
1624
      Improve index usage of regular expressions that use parentheses (Tom)
 
1625
     </para>
 
1626
 
 
1627
     <para>
 
1628
      This improves <application>psql</> <literal>\d</> performance also.
 
1629
     </para>
 
1630
    </listitem>
 
1631
 
 
1632
   </itemizedlist>
 
1633
 
 
1634
  </sect2>
 
1635
 </sect1>
 
1636
 
 
1637
 <sect1 id="release-7-4-14">
 
1638
  <title>Release 7.4.14</title>
 
1639
 
 
1640
  <note>
 
1641
  <title>Release Date</title>
 
1642
  <simpara>2006-10-16</simpara>
 
1643
  </note>
 
1644
 
 
1645
  <para>
 
1646
   This release contains a variety of fixes from 7.4.13.
 
1647
   For information about new features in the 7.4 major release, see
 
1648
   <xref linkend="release-7-4">.
 
1649
  </para>
 
1650
 
 
1651
  <sect2>
 
1652
   <title>Migration to Version 7.4.14</title>
 
1653
 
 
1654
   <para>
 
1655
    A dump/restore is not required for those running 7.4.X.  However,
 
1656
    if you are upgrading from a version earlier than 7.4.11, see the release
 
1657
    notes for 7.4.11.
 
1658
   </para>
 
1659
 
 
1660
  </sect2>
 
1661
 
 
1662
  <sect2>
 
1663
   <title>Changes</title>
 
1664
 
 
1665
<itemizedlist>
 
1666
<listitem><para>Fix core dump when an untyped literal is taken as
 
1667
ANYARRAY</para></listitem>
 
1668
<listitem><para>Fix <function>string_to_array()</> to handle overlapping
 
1669
 matches for the separator string</para>
 
1670
<para>For example, <literal>string_to_array('123xx456xxx789', 'xx')</>.
 
1671
</para></listitem>
 
1672
<listitem><para>Fix corner cases in pattern matching for
 
1673
 <application>psql</>'s <literal>\d</> commands</para></listitem>
 
1674
<listitem><para>Fix index-corrupting bugs in /contrib/ltree
 
1675
 (Teodor)</para></listitem>
 
1676
<listitem><para>Fix backslash escaping in /contrib/dbmirror</para></listitem>
 
1677
<listitem><para>Adjust regression tests for recent changes in US DST laws
 
1678
</para> </listitem>
 
1679
</itemizedlist>
 
1680
 
 
1681
  </sect2>
 
1682
 </sect1>
 
1683
 
 
1684
 <sect1 id="release-7-4-13">
 
1685
  <title>Release 7.4.13</title>
 
1686
 
 
1687
  <note>
 
1688
  <title>Release Date</title>
 
1689
  <simpara>2006-05-23</simpara>
 
1690
  </note>
 
1691
 
 
1692
  <para>
 
1693
   This release contains a variety of fixes from 7.4.12,
 
1694
   including patches for extremely serious security issues.
 
1695
   For information about new features in the 7.4 major release, see
 
1696
   <xref linkend="release-7-4">.
 
1697
  </para>
 
1698
 
 
1699
  <sect2>
 
1700
   <title>Migration to Version 7.4.13</title>
 
1701
 
 
1702
   <para>
 
1703
    A dump/restore is not required for those running 7.4.X.  However,
 
1704
    if you are upgrading from a version earlier than 7.4.11, see the release
 
1705
    notes for 7.4.11.
 
1706
   </para>
 
1707
 
 
1708
   <para>
 
1709
    Full security against the SQL-injection attacks described in
 
1710
    CVE-2006-2313 and CVE-2006-2314 might require changes in application
 
1711
    code.  If you have applications that embed untrustworthy strings
 
1712
    into SQL commands, you should examine them as soon as possible to
 
1713
    ensure that they are using recommended escaping techniques.  In
 
1714
    most cases, applications should be using subroutines provided by
 
1715
    libraries or drivers (such as <application>libpq</>'s
 
1716
    <function>PQescapeStringConn()</>) to perform string escaping,
 
1717
    rather than relying on <foreignphrase>ad hoc</> code to do it.
 
1718
   </para>
 
1719
  </sect2>
 
1720
 
 
1721
  <sect2>
 
1722
   <title>Changes</title>
 
1723
 
 
1724
<itemizedlist>
 
1725
<listitem><para>Change the server to reject invalidly-encoded multibyte
 
1726
characters in all cases (Tatsuo, Tom)</para>
 
1727
<para>While <productname>PostgreSQL</> has been moving in this direction for
 
1728
some time, the checks are now applied uniformly to all encodings and all
 
1729
textual input, and are now always errors not merely warnings.  This change
 
1730
defends against SQL-injection attacks of the type described in CVE-2006-2313.
 
1731
</para></listitem>
 
1732
 
 
1733
<listitem><para>Reject unsafe uses of <literal>\'</> in string literals</para>
 
1734
<para>As a server-side defense against SQL-injection attacks of the type
 
1735
described in CVE-2006-2314, the server now only accepts <literal>''</> and not
 
1736
<literal>\'</> as a representation of ASCII single quote in SQL string
 
1737
literals.  By default, <literal>\'</> is rejected only when
 
1738
<varname>client_encoding</> is set to a client-only encoding (SJIS, BIG5, GBK,
 
1739
GB18030, or UHC), which is the scenario in which SQL injection is possible.
 
1740
A new configuration parameter <varname>backslash_quote</> is available to
 
1741
adjust this behavior when needed.  Note that full security against
 
1742
CVE-2006-2314 might require client-side changes; the purpose of
 
1743
<varname>backslash_quote</> is in part to make it obvious that insecure
 
1744
clients are insecure.
 
1745
</para></listitem>
 
1746
 
 
1747
<listitem><para>Modify <application>libpq</>'s string-escaping routines to be
 
1748
aware of encoding considerations and
 
1749
<varname>standard_conforming_strings</></para>
 
1750
<para>This fixes <application>libpq</>-using applications for the security
 
1751
issues described in CVE-2006-2313 and CVE-2006-2314, and also future-proofs
 
1752
them against the planned changeover to SQL-standard string literal syntax.
 
1753
Applications that use multiple <productname>PostgreSQL</> connections
 
1754
concurrently should migrate to <function>PQescapeStringConn()</> and
 
1755
<function>PQescapeByteaConn()</> to ensure that escaping is done correctly
 
1756
for the settings in use in each database connection.  Applications that
 
1757
do string escaping <quote>by hand</> should be modified to rely on library
 
1758
routines instead.
 
1759
</para></listitem>
 
1760
 
 
1761
<listitem><para>Fix some incorrect encoding conversion functions</para>
 
1762
<para><function>win1251_to_iso</>, <function>alt_to_iso</>,
 
1763
<function>euc_tw_to_big5</>, <function>euc_tw_to_mic</>,
 
1764
<function>mic_to_euc_tw</> were all broken to varying
 
1765
extents.
 
1766
</para></listitem>
 
1767
 
 
1768
<listitem><para>Clean up stray remaining uses of <literal>\'</> in strings
 
1769
(Bruce, Jan)</para></listitem>
 
1770
 
 
1771
<listitem><para>Fix bug that sometimes caused OR'd index scans to
 
1772
miss rows they should have returned</para></listitem>
 
1773
 
 
1774
<listitem><para>Fix WAL replay for case where a btree index has been
 
1775
truncated</para></listitem>
 
1776
 
 
1777
<listitem><para>Fix <literal>SIMILAR TO</> for patterns involving
 
1778
<literal>|</> (Tom)</para></listitem>
 
1779
 
 
1780
<listitem><para>Fix server to use custom DH SSL parameters correctly (Michael
 
1781
Fuhr)</para></listitem>
 
1782
 
 
1783
<listitem><para>Fix for Bonjour on Intel Macs (Ashley Clark)</para></listitem>
 
1784
 
 
1785
<listitem><para>Fix various minor memory leaks</para></listitem>
 
1786
</itemizedlist>
 
1787
 
 
1788
  </sect2>
 
1789
 </sect1>
 
1790
 
 
1791
 <sect1 id="release-7-4-12">
 
1792
  <title>Release 7.4.12</title>
 
1793
 
 
1794
  <note>
 
1795
  <title>Release Date</title>
 
1796
  <simpara>2006-02-14</simpara>
 
1797
  </note>
 
1798
 
 
1799
  <para>
 
1800
   This release contains a variety of fixes from 7.4.11.
 
1801
   For information about new features in the 7.4 major release, see
 
1802
   <xref linkend="release-7-4">.
 
1803
  </para>
 
1804
 
 
1805
  <sect2>
 
1806
   <title>Migration to Version 7.4.12</title>
 
1807
 
 
1808
   <para>
 
1809
    A dump/restore is not required for those running 7.4.X.  However,
 
1810
    if you are upgrading from a version earlier than 7.4.11, see the release
 
1811
    notes for 7.4.11.
 
1812
   </para>
 
1813
  </sect2>
 
1814
 
 
1815
  <sect2>
 
1816
   <title>Changes</title>
 
1817
 
 
1818
<itemizedlist>
 
1819
 
 
1820
<listitem><para>Fix potential crash in <command>SET
 
1821
SESSION AUTHORIZATION</> (CVE-2006-0553)</para>
 
1822
<para>An unprivileged user could crash the server process, resulting in
 
1823
momentary denial of service to other users, if the server has been compiled
 
1824
with Asserts enabled (which is not the default).
 
1825
Thanks to Akio Ishida for reporting this problem.
 
1826
</para></listitem>
 
1827
 
 
1828
<listitem><para>Fix bug with row visibility logic in self-inserted
 
1829
rows (Tom)</para>
 
1830
<para>Under rare circumstances a row inserted by the current command
 
1831
could be seen as already valid, when it should not be.  Repairs bug
 
1832
created in 7.4.9 and 7.3.11 releases.
 
1833
</para></listitem>
 
1834
 
 
1835
<listitem><para>Fix race condition that could lead to <quote>file already
 
1836
exists</> errors during pg_clog file creation
 
1837
(Tom)</para></listitem>
 
1838
 
 
1839
<listitem><para>Properly check <literal>DOMAIN</> constraints for
 
1840
<literal>UNKNOWN</> parameters in prepared statements
 
1841
(Neil)</para></listitem>
 
1842
 
 
1843
<listitem><para>Fix to allow restoring dumps that have cross-schema
 
1844
references to custom operators (Tom)</para></listitem>
 
1845
 
 
1846
<listitem><para>Portability fix for testing presence of <function>finite</>
 
1847
and <function>isinf</> during configure (Tom)</para></listitem>
 
1848
 
 
1849
</itemizedlist>
 
1850
 
 
1851
  </sect2>
 
1852
 </sect1>
 
1853
 
 
1854
 <sect1 id="release-7-4-11">
 
1855
  <title>Release 7.4.11</title>
 
1856
 
 
1857
  <note>
 
1858
  <title>Release Date</title>
 
1859
  <simpara>2006-01-09</simpara>
 
1860
  </note>
 
1861
 
 
1862
  <para>
 
1863
   This release contains a variety of fixes from 7.4.10.
 
1864
   For information about new features in the 7.4 major release, see
 
1865
   <xref linkend="release-7-4">.
 
1866
  </para>
 
1867
 
 
1868
  <sect2>
 
1869
   <title>Migration to Version 7.4.11</title>
 
1870
 
 
1871
   <para>
 
1872
    A dump/restore is not required for those running 7.4.X.  However,
 
1873
    if you are upgrading from a version earlier than 7.4.8, see the release
 
1874
    notes for 7.4.8.
 
1875
    Also, you might need to <command>REINDEX</> indexes on textual
 
1876
    columns after updating, if you are affected by the locale or
 
1877
    <application>plperl</> issues described below.
 
1878
   </para>
 
1879
  </sect2>
 
1880
 
 
1881
  <sect2>
 
1882
   <title>Changes</title>
 
1883
 
 
1884
<itemizedlist>
 
1885
 
 
1886
<listitem><para>Fix for protocol-level Describe messages issued
 
1887
outside a transaction or in a failed transaction (Tom)</para></listitem>
 
1888
 
 
1889
<listitem><para>Fix character string comparison for locales that consider
 
1890
different character combinations as equal, such as Hungarian (Tom)</para>
 
1891
<para>This might require <command>REINDEX</> to fix existing indexes on
 
1892
textual columns.</para></listitem>
 
1893
 
 
1894
<listitem><para>Set locale environment variables during postmaster startup
 
1895
to ensure that <application>plperl</> won't change the locale later</para>
 
1896
<para>This fixes a problem that occurred if the <application>postmaster</> was
 
1897
started with environment variables specifying a different locale than what
 
1898
<application>initdb</> had been told.  Under these conditions, any use of
 
1899
<application>plperl</> was likely to lead to corrupt indexes.  You might need
 
1900
<command>REINDEX</> to fix existing indexes on
 
1901
textual columns if this has happened to you.</para></listitem>
 
1902
 
 
1903
<listitem><para>Fix longstanding bug in strpos() and regular expression
 
1904
handling in certain rarely used Asian multi-byte character sets (Tatsuo)
 
1905
</para></listitem>
 
1906
 
 
1907
<listitem><para>Fix bug in <filename>/contrib/pgcrypto</> gen_salt,
 
1908
which caused it not to use all available salt space for MD5 and
 
1909
XDES algorithms (Marko Kreen, Solar Designer)</para>
 
1910
<para>Salts for Blowfish and standard DES are unaffected.</para></listitem>
 
1911
 
 
1912
<listitem><para>Fix <filename>/contrib/dblink</> to throw an error,
 
1913
rather than crashing, when the number of columns specified is different from
 
1914
what's actually returned by the query (Joe)</para></listitem>
 
1915
 
 
1916
</itemizedlist>
 
1917
 
 
1918
  </sect2>
 
1919
 </sect1>
 
1920
 
 
1921
 <sect1 id="release-7-4-10">
 
1922
  <title>Release 7.4.10</title>
 
1923
 
 
1924
  <note>
 
1925
  <title>Release Date</title>
 
1926
  <simpara>2005-12-12</simpara>
 
1927
  </note>
 
1928
 
 
1929
  <para>
 
1930
   This release contains a variety of fixes from 7.4.9.
 
1931
   For information about new features in the 7.4 major release, see
 
1932
   <xref linkend="release-7-4">.
 
1933
  </para>
 
1934
 
 
1935
  <sect2>
 
1936
   <title>Migration to Version 7.4.10</title>
 
1937
 
 
1938
   <para>
 
1939
    A dump/restore is not required for those running 7.4.X.  However,
 
1940
    if you are upgrading from a version earlier than 7.4.8, see the release
 
1941
    notes for 7.4.8.
 
1942
   </para>
 
1943
  </sect2>
 
1944
 
 
1945
  <sect2>
 
1946
   <title>Changes</title>
 
1947
 
 
1948
<itemizedlist>
 
1949
 
 
1950
<listitem><para>Fix race condition in transaction log management</para>
 
1951
<para>There was a narrow window in which an I/O operation could be initiated
 
1952
for the wrong page, leading to an Assert failure or data
 
1953
corruption.</para>
 
1954
</listitem>
 
1955
 
 
1956
<listitem><para>Prevent failure if client sends Bind protocol message
 
1957
when current transaction is already aborted</para></listitem>
 
1958
 
 
1959
<listitem><para><filename>/contrib/ltree</> fixes (Teodor)</para></listitem>
 
1960
 
 
1961
<listitem><para>AIX and HPUX compile fixes (Tom)</para></listitem>
 
1962
 
 
1963
<listitem><para>Fix longstanding planning error for outer joins</para>
 
1964
<para>This bug sometimes caused a bogus error <quote>RIGHT JOIN is
 
1965
only supported with merge-joinable join conditions</>.</para></listitem>
 
1966
 
 
1967
<listitem><para>Prevent core dump in <application>pg_autovacuum</> when a
 
1968
table has been dropped</para></listitem>
 
1969
</itemizedlist>
 
1970
 
 
1971
  </sect2>
 
1972
 </sect1>
 
1973
 
 
1974
 <sect1 id="release-7-4-9">
 
1975
  <title>Release 7.4.9</title>
 
1976
 
 
1977
  <note>
 
1978
  <title>Release Date</title>
 
1979
  <simpara>2005-10-04</simpara>
 
1980
  </note>
 
1981
 
 
1982
  <para>
 
1983
   This release contains a variety of fixes from 7.4.8.
 
1984
   For information about new features in the 7.4 major release, see
 
1985
   <xref linkend="release-7-4">.
 
1986
  </para>
 
1987
 
 
1988
  <sect2>
 
1989
   <title>Migration to Version 7.4.9</title>
 
1990
 
 
1991
   <para>
 
1992
    A dump/restore is not required for those running 7.4.X.  However,
 
1993
    if you are upgrading from a version earlier than 7.4.8, see the release
 
1994
    notes for 7.4.8.
 
1995
   </para>
 
1996
  </sect2>
 
1997
 
 
1998
  <sect2>
 
1999
   <title>Changes</title>
 
2000
 
 
2001
<itemizedlist>
 
2002
<listitem><para>Fix error that allowed <command>VACUUM</> to remove
 
2003
<literal>ctid</> chains too soon, and add more checking in code that follows
 
2004
<literal>ctid</> links</para>
 
2005
<para>This fixes a long-standing problem that could cause crashes in very rare
 
2006
circumstances.</para></listitem>
 
2007
<listitem><para>Fix <type>CHAR()</> to properly pad spaces to the specified
 
2008
length when using a multiple-byte character set (Yoshiyuki Asaba)</para>
 
2009
<para>In prior releases, the padding of <type>CHAR()</> was incorrect
 
2010
because it only padded to the specified number of bytes without
 
2011
considering how many characters were stored.</para></listitem>
 
2012
<listitem><para>Fix the sense of the test for read-only transaction
 
2013
in <command>COPY</></para>
 
2014
<para>The code formerly prohibited <command>COPY TO</>, where it should
 
2015
prohibit <command>COPY FROM</>.
 
2016
</para></listitem>
 
2017
<listitem><para>Fix planning problem with outer-join ON clauses that reference
 
2018
only the inner-side relation</para></listitem>
 
2019
<listitem><para>Further fixes for <literal>x FULL JOIN y ON true</> corner
 
2020
cases</para></listitem>
 
2021
<listitem><para>Make <function>array_in</> and <function>array_recv</> more
 
2022
paranoid about validating their OID parameter</para></listitem>
 
2023
<listitem><para>Fix missing rows in queries like <literal>UPDATE a=... WHERE
 
2024
a...</> with GiST index on column <literal>a</></para></listitem>
 
2025
<listitem><para>Improve robustness of datetime parsing</para></listitem>
 
2026
<listitem><para>Improve checking for partially-written WAL
 
2027
pages</para></listitem>
 
2028
<listitem><para>Improve robustness of signal handling when SSL is
 
2029
enabled</para></listitem>
 
2030
<listitem><para>Don't try to open more than <literal>max_files_per_process</>
 
2031
files during postmaster startup</para></listitem>
 
2032
<listitem><para>Various memory leakage fixes</para></listitem>
 
2033
<listitem><para>Various portability improvements</para></listitem>
 
2034
<listitem><para>Fix PL/pgSQL to handle <literal>var := var</> correctly when
 
2035
the variable is of pass-by-reference type</para></listitem>
 
2036
<listitem><para>Update <filename>contrib/tsearch2</> to use current Snowball
 
2037
code</para></listitem>
 
2038
</itemizedlist>
 
2039
 
 
2040
  </sect2>
 
2041
 </sect1>
 
2042
 
 
2043
 <sect1 id="release-7-4-8">
 
2044
  <title>Release 7.4.8</title>
 
2045
 
 
2046
  <note>
 
2047
  <title>Release Date</title>
 
2048
  <simpara>2005-05-09</simpara>
 
2049
  </note>
 
2050
 
 
2051
  <para>
 
2052
   This release contains a variety of fixes from 7.4.7, including several
 
2053
   security-related issues.
 
2054
   For information about new features in the 7.4 major release, see
 
2055
   <xref linkend="release-7-4">.
 
2056
  </para>
 
2057
 
 
2058
  <sect2>
 
2059
   <title>Migration to Version 7.4.8</title>
 
2060
 
 
2061
   <para>
 
2062
    A dump/restore is not required for those running 7.4.X.  However,
 
2063
    it is one possible way of handling two significant security problems
 
2064
    that have been found in the initial contents of 7.4.X system
 
2065
    catalogs.  A dump/initdb/reload sequence using 7.4.8's initdb will
 
2066
    automatically correct these problems.
 
2067
   </para>
 
2068
 
 
2069
   <para>
 
2070
    The larger security problem is that the built-in character set encoding
 
2071
    conversion functions can be invoked from SQL commands by unprivileged
 
2072
    users, but the functions were not designed for such use and are not
 
2073
    secure against malicious choices of arguments.  The fix involves changing
 
2074
    the declared parameter list of these functions so that they can no longer
 
2075
    be invoked from SQL commands.  (This does not affect their normal use
 
2076
    by the encoding conversion machinery.)
 
2077
   </para>
 
2078
 
 
2079
   <para>
 
2080
    The lesser problem is that the <filename>contrib/tsearch2</> module
 
2081
    creates several functions that are misdeclared to return
 
2082
    <type>internal</> when they do not accept <type>internal</> arguments.
 
2083
    This breaks type safety for all functions using <type>internal</>
 
2084
    arguments.
 
2085
   </para>
 
2086
 
 
2087
   <para>
 
2088
    It is strongly recommended that all installations repair these errors,
 
2089
    either by initdb or by following the manual repair procedures given
 
2090
    below.  The errors at least allow unprivileged database users to crash
 
2091
    their server process, and might allow unprivileged users to gain the
 
2092
    privileges of a database superuser.
 
2093
   </para>
 
2094
 
 
2095
   <para>
 
2096
    If you wish not to do an initdb, perform the following procedures instead.
 
2097
    As the database superuser, do:
 
2098
 
 
2099
<programlisting>
 
2100
BEGIN;
 
2101
UPDATE pg_proc SET proargtypes[3] = 'internal'::regtype
 
2102
WHERE pronamespace = 11 AND pronargs = 5
 
2103
     AND proargtypes[2] = 'cstring'::regtype;
 
2104
-- The command should report having updated 90 rows;
 
2105
-- if not, rollback and investigate instead of committing!
 
2106
COMMIT;
 
2107
</programlisting>
 
2108
 
 
2109
    Next, if you have installed <filename>contrib/tsearch2</>, do:
 
2110
 
 
2111
<programlisting>
 
2112
BEGIN;
 
2113
UPDATE pg_proc SET proargtypes[0] = 'internal'::regtype
 
2114
WHERE oid IN (
 
2115
   'dex_init(text)'::regprocedure,
 
2116
   'snb_en_init(text)'::regprocedure,
 
2117
   'snb_ru_init(text)'::regprocedure,
 
2118
   'spell_init(text)'::regprocedure,
 
2119
   'syn_init(text)'::regprocedure
 
2120
);
 
2121
-- The command should report having updated 5 rows;
 
2122
-- if not, rollback and investigate instead of committing!
 
2123
COMMIT;
 
2124
</programlisting>
 
2125
 
 
2126
    If this command fails with a message like <quote>function
 
2127
    "dex_init(text)" does not exist</>, then either <filename>tsearch2</>
 
2128
    is not installed in this database, or you already did the update.
 
2129
   </para>
 
2130
 
 
2131
   <para>
 
2132
    The above procedures must be carried out in <emphasis>each</> database
 
2133
    of an installation, including <literal>template1</>, and ideally
 
2134
    including <literal>template0</> as well.  If you do not fix the
 
2135
    template databases then any subsequently created databases will contain
 
2136
    the same errors.  <literal>template1</> can be fixed in the same way
 
2137
    as any other database, but fixing <literal>template0</> requires
 
2138
    additional steps.  First, from any database issue:
 
2139
<programlisting>
 
2140
UPDATE pg_database SET datallowconn = true WHERE datname = 'template0';
 
2141
</programlisting>
 
2142
     Next connect to <literal>template0</> and perform the above repair
 
2143
     procedures.  Finally, do:
 
2144
<programlisting>
 
2145
-- re-freeze template0:
 
2146
VACUUM FREEZE;
 
2147
-- and protect it against future alterations:
 
2148
UPDATE pg_database SET datallowconn = false WHERE datname = 'template0';
 
2149
</programlisting>
 
2150
   </para>
 
2151
  </sect2>
 
2152
 
 
2153
  <sect2>
 
2154
   <title>Changes</title>
 
2155
 
 
2156
<itemizedlist>
 
2157
<listitem><para>Change encoding function signature to prevent
 
2158
misuse</para></listitem>
 
2159
<listitem><para>Change <filename>contrib/tsearch2</> to avoid unsafe use of
 
2160
<type>INTERNAL</> function results</para></listitem>
 
2161
<listitem><para>Repair ancient race condition that allowed a transaction to be
 
2162
seen as committed for some purposes (eg SELECT FOR UPDATE) slightly sooner
 
2163
than for other purposes</para>
 
2164
<para>This is an extremely serious bug since it could lead to apparent
 
2165
data inconsistencies being briefly visible to applications.</para></listitem>
 
2166
<listitem><para>Repair race condition between relation extension and
 
2167
VACUUM</para>
 
2168
<para>This could theoretically have caused loss of a page's worth of
 
2169
freshly-inserted data, although the scenario seems of very low probability.
 
2170
There are no known cases of it having caused more than an Assert failure.
 
2171
</para></listitem>
 
2172
<listitem><para>Fix comparisons of <type>TIME WITH TIME ZONE</> values</para>
 
2173
<para>
 
2174
The comparison code was wrong in the case where the
 
2175
<literal>--enable-integer-datetimes</> configuration switch had been used.
 
2176
NOTE: if you have an index on a <type>TIME WITH TIME ZONE</> column,
 
2177
it will need to be <command>REINDEX</>ed after installing this update, because
 
2178
the fix corrects the sort order of column values.
 
2179
</para></listitem>
 
2180
<listitem><para>Fix <function>EXTRACT(EPOCH)</> for
 
2181
<type>TIME WITH TIME ZONE</> values</para></listitem>
 
2182
<listitem><para>Fix mis-display of negative fractional seconds in
 
2183
<type>INTERVAL</> values</para>
 
2184
<para>
 
2185
This error only occurred when the
 
2186
<literal>--enable-integer-datetimes</> configuration switch had been used.
 
2187
</para></listitem>
 
2188
<listitem><para>Ensure operations done during backend shutdown are counted by
 
2189
statistics collector</para>
 
2190
<para>
 
2191
This is expected to resolve reports of <application>pg_autovacuum</>
 
2192
not vacuuming the system catalogs often enough &mdash; it was not being
 
2193
told about catalog deletions caused by temporary table removal during
 
2194
backend exit.
 
2195
</para></listitem>
 
2196
<listitem><para>Additional buffer overrun checks in plpgsql
 
2197
(Neil)</para></listitem>
 
2198
<listitem><para>Fix pg_dump to dump trigger names containing <literal>%</>
 
2199
correctly (Neil)</para></listitem>
 
2200
<listitem><para>Fix <filename>contrib/pgcrypto</> for newer OpenSSL builds
 
2201
(Marko Kreen)</para></listitem>
 
2202
<listitem><para>Still more 64-bit fixes for
 
2203
<filename>contrib/intagg</></para></listitem>
 
2204
<listitem><para>Prevent incorrect optimization of functions returning
 
2205
<type>RECORD</></para></listitem>
 
2206
<listitem><para>Prevent <function>to_char(interval)</> from dumping core for
 
2207
month-related formats</para></listitem>
 
2208
<listitem><para>Prevent crash on <literal>COALESCE(NULL,NULL)</></para></listitem>
 
2209
<listitem><para>Fix <function>array_map</> to call PL functions correctly</para></listitem>
 
2210
<listitem><para>Fix permission checking in <command>ALTER DATABASE RENAME</></para></listitem>
 
2211
<listitem><para>Fix <command>ALTER LANGUAGE RENAME</></para></listitem>
 
2212
<listitem><para>Make <function>RemoveFromWaitQueue</> clean up after itself</para>
 
2213
<para>
 
2214
This fixes a lock management error that would only be visible if a transaction
 
2215
was kicked out of a wait for a lock (typically by query cancel) and then the
 
2216
holder of the lock released it within a very narrow window.
 
2217
</para></listitem>
 
2218
<listitem><para>Fix problem with untyped parameter appearing in
 
2219
<command>INSERT ... SELECT</></para></listitem>
 
2220
<listitem><para>Fix <command>CLUSTER</> failure after
 
2221
<command>ALTER TABLE SET WITHOUT OIDS</></para></listitem>
 
2222
</itemizedlist>
 
2223
 
 
2224
  </sect2>
 
2225
 </sect1>
 
2226
 
 
2227
 <sect1 id="release-7-4-7">
 
2228
  <title>Release 7.4.7</title>
 
2229
 
 
2230
  <note>
 
2231
  <title>Release Date</title>
 
2232
  <simpara>2005-01-31</simpara>
 
2233
  </note>
 
2234
 
 
2235
  <para>
 
2236
   This release contains a variety of fixes from 7.4.6, including several
 
2237
   security-related issues.
 
2238
   For information about new features in the 7.4 major release, see
 
2239
   <xref linkend="release-7-4">.
 
2240
  </para>
 
2241
 
 
2242
  <sect2>
 
2243
   <title>Migration to Version 7.4.7</title>
 
2244
 
 
2245
   <para>
 
2246
    A dump/restore is not required for those running 7.4.X.
 
2247
   </para>
 
2248
  </sect2>
 
2249
 
 
2250
  <sect2>
 
2251
   <title>Changes</title>
 
2252
 
 
2253
<itemizedlist>
 
2254
<listitem><para>Disallow <command>LOAD</> to non-superusers</para>
 
2255
<para>
 
2256
On platforms that will automatically execute initialization functions of a
 
2257
shared library (this includes at least Windows and ELF-based Unixen),
 
2258
<command>LOAD</> can be used to make the server execute arbitrary code.
 
2259
Thanks to NGS Software for reporting this.</para></listitem>
 
2260
<listitem><para>Check that creator of an aggregate function has the right to
 
2261
execute the specified transition functions</para>
 
2262
<para>
 
2263
This oversight made it possible to bypass denial of EXECUTE
 
2264
permission on a function.</para></listitem>
 
2265
<listitem><para>Fix security and 64-bit issues in
 
2266
contrib/intagg</para></listitem>
 
2267
<listitem><para>Add needed STRICT marking to some contrib functions (Kris
 
2268
Jurka)</para></listitem>
 
2269
<listitem><para>Avoid buffer overrun when plpgsql cursor declaration has too
 
2270
many parameters (Neil)</para></listitem>
 
2271
<listitem><para>Fix planning error for FULL and RIGHT outer joins</para>
 
2272
<para>
 
2273
The result of the join was mistakenly supposed to be sorted the same as the
 
2274
left input.  This could not only deliver mis-sorted output to the user, but
 
2275
in case of nested merge joins could give outright wrong answers.
 
2276
</para></listitem>
 
2277
<listitem><para>Fix plperl for quote marks in tuple fields</para></listitem>
 
2278
<listitem><para>Fix display of negative intervals in SQL and GERMAN
 
2279
datestyles</para></listitem>
 
2280
<listitem><para>Make age(timestamptz) do calculation in local timezone not
 
2281
GMT</para></listitem>
 
2282
</itemizedlist>
 
2283
 
 
2284
  </sect2>
 
2285
 </sect1>
 
2286
 
 
2287
 <sect1 id="release-7-4-6">
 
2288
  <title>Release 7.4.6</title>
 
2289
 
 
2290
  <note>
 
2291
  <title>Release Date</title>
 
2292
  <simpara>2004-10-22</simpara>
 
2293
  </note>
 
2294
 
 
2295
  <para>
 
2296
   This release contains a variety of fixes from 7.4.5.
 
2297
   For information about new features in the 7.4 major release, see
 
2298
   <xref linkend="release-7-4">.
 
2299
  </para>
 
2300
 
 
2301
 
 
2302
  <sect2>
 
2303
   <title>Migration to Version 7.4.6</title>
 
2304
 
 
2305
   <para>
 
2306
    A dump/restore is not required for those running 7.4.X.
 
2307
   </para>
 
2308
  </sect2>
 
2309
 
 
2310
  <sect2>
 
2311
   <title>Changes</title>
 
2312
 
 
2313
<itemizedlist>
 
2314
<listitem><para>Repair possible failure to update hint bits on disk</para>
 
2315
<para>
 
2316
Under rare circumstances this oversight could lead to
 
2317
<quote>could not access transaction status</> failures, which qualifies
 
2318
it as a potential-data-loss bug.
 
2319
</para></listitem>
 
2320
<listitem><para>Ensure that hashed outer join does not miss tuples</para>
 
2321
<para>
 
2322
Very large left joins using a hash join plan could fail to output unmatched
 
2323
left-side rows given just the right data distribution.
 
2324
</para></listitem>
 
2325
<listitem><para>Disallow running <application>pg_ctl</> as root</para>
 
2326
<para>
 
2327
This is to guard against any possible security issues.
 
2328
</para></listitem>
 
2329
<listitem><para>Avoid using temp files in <filename>/tmp</> in <command>make_oidjoins_check</command></para>
 
2330
<para>
 
2331
This has been reported as a security issue, though it's hardly worthy of
 
2332
concern since there is no reason for non-developers to use this script anyway.
 
2333
</para></listitem>
 
2334
<listitem><para>Prevent forced backend shutdown from re-emitting prior command
 
2335
result</para>
 
2336
<para>
 
2337
In rare cases, a client might think that its last command had succeeded when
 
2338
it really had been aborted by forced database shutdown.
 
2339
</para></listitem>
 
2340
<listitem><para>Repair bug in <function>pg_stat_get_backend_idset</function></para>
 
2341
<para>
 
2342
This could lead to misbehavior in some of the system-statistics views.
 
2343
</para></listitem>
 
2344
<listitem><para>Fix small memory leak in postmaster</para></listitem>
 
2345
<listitem><para>Fix <quote>expected both swapped tables to have TOAST
 
2346
tables</> bug</para>
 
2347
<para>
 
2348
This could arise in cases such as CLUSTER after ALTER TABLE DROP COLUMN.
 
2349
</para></listitem>
 
2350
<listitem><para>Prevent <literal>pg_ctl restart</> from adding <literal>-D</> multiple times</para></listitem>
 
2351
<listitem><para>Fix problem with NULL values in GiST indexes</para></listitem>
 
2352
<listitem><para><literal>::</> is no longer interpreted as a variable in an
 
2353
ECPG prepare statement</para></listitem>
 
2354
</itemizedlist>
 
2355
 
 
2356
  </sect2>
 
2357
 </sect1>
 
2358
 
 
2359
 <sect1 id="release-7-4-5">
 
2360
  <title>Release 7.4.5</title>
 
2361
 
 
2362
  <note>
 
2363
  <title>Release Date</title>
 
2364
  <simpara>2004-08-18</simpara>
 
2365
  </note>
 
2366
 
 
2367
  <para>
 
2368
   This release contains one serious bug fix over 7.4.4.
 
2369
   For information about new features in the 7.4 major release, see
 
2370
   <xref linkend="release-7-4">.
 
2371
  </para>
 
2372
 
 
2373
 
 
2374
  <sect2>
 
2375
   <title>Migration to Version 7.4.5</title>
 
2376
 
 
2377
   <para>
 
2378
    A dump/restore is not required for those running 7.4.X.
 
2379
   </para>
 
2380
  </sect2>
 
2381
 
 
2382
  <sect2>
 
2383
   <title>Changes</title>
 
2384
 
 
2385
<itemizedlist>
 
2386
<listitem><para>Repair possible crash during concurrent B-tree index insertions</para>
 
2387
<para>
 
2388
This patch fixes a rare case in which concurrent insertions into a B-tree index
 
2389
could result in a server panic.  No permanent damage would result, but it's
 
2390
still worth a re-release.  The bug does not exist in pre-7.4 releases.
 
2391
</para></listitem>
 
2392
</itemizedlist>
 
2393
 
 
2394
  </sect2>
 
2395
 </sect1>
 
2396
 
 
2397
 <sect1 id="release-7-4-4">
 
2398
  <title>Release 7.4.4</title>
 
2399
 
 
2400
  <note>
 
2401
  <title>Release Date</title>
 
2402
  <simpara>2004-08-16</simpara>
 
2403
  </note>
 
2404
 
 
2405
  <para>
 
2406
   This release contains a variety of fixes from 7.4.3.
 
2407
   For information about new features in the 7.4 major release, see
 
2408
   <xref linkend="release-7-4">.
 
2409
  </para>
 
2410
 
 
2411
 
 
2412
  <sect2>
 
2413
   <title>Migration to Version 7.4.4</title>
 
2414
 
 
2415
   <para>
 
2416
    A dump/restore is not required for those running 7.4.X.
 
2417
   </para>
 
2418
  </sect2>
 
2419
 
 
2420
  <sect2>
 
2421
   <title>Changes</title>
 
2422
 
 
2423
<itemizedlist>
 
2424
<listitem><para>Prevent possible loss of committed transactions during crash</para>
 
2425
<para>
 
2426
Due to insufficient interlocking between transaction commit and checkpointing,
 
2427
it was possible for transactions committed just before the most recent
 
2428
checkpoint to be lost, in whole or in part, following a database crash and
 
2429
restart.  This is a serious bug that has existed
 
2430
since <productname>PostgreSQL</productname> 7.1.
 
2431
</para></listitem>
 
2432
<listitem><para>Check HAVING restriction before evaluating result list of an
 
2433
aggregate plan</para></listitem>
 
2434
<listitem><para>Avoid crash when session's current user ID is deleted</para></listitem>
 
2435
<listitem><para>Fix hashed crosstab for zero-rows case (Joe)</para></listitem>
 
2436
<listitem><para>Force cache update after renaming a column in a foreign key</para></listitem>
 
2437
<listitem><para>Pretty-print UNION queries correctly</para></listitem>
 
2438
<listitem><para>Make psql handle <literal>\r\n</> newlines properly in COPY IN</para></listitem>
 
2439
<listitem><para><application>pg_dump</> handled ACLs with grant options incorrectly</para></listitem>
 
2440
<listitem><para>Fix thread support for OS X and Solaris</para></listitem>
 
2441
<listitem><para>Updated JDBC driver (build 215) with various fixes</para></listitem>
 
2442
<listitem><para>ECPG fixes</para></listitem>
 
2443
<listitem><para>Translation updates (various contributors)</para></listitem>
 
2444
</itemizedlist>
 
2445
 
 
2446
  </sect2>
 
2447
 </sect1>
 
2448
 
 
2449
 <sect1 id="release-7-4-3">
 
2450
  <title>Release 7.4.3</title>
 
2451
 
 
2452
  <note>
 
2453
  <title>Release Date</title>
 
2454
  <simpara>2004-06-14</simpara>
 
2455
  </note>
 
2456
 
 
2457
  <para>
 
2458
   This release contains a variety of fixes from 7.4.2.
 
2459
   For information about new features in the 7.4 major release, see
 
2460
   <xref linkend="release-7-4">.
 
2461
  </para>
 
2462
 
 
2463
 
 
2464
  <sect2>
 
2465
   <title>Migration to Version 7.4.3</title>
 
2466
 
 
2467
   <para>
 
2468
    A dump/restore is not required for those running 7.4.X.
 
2469
   </para>
 
2470
  </sect2>
 
2471
 
 
2472
  <sect2>
 
2473
   <title>Changes</title>
 
2474
 
 
2475
<itemizedlist>
 
2476
<listitem><para>Fix temporary memory leak when using non-hashed aggregates (Tom)</para></listitem>
 
2477
<listitem><para>ECPG fixes, including some for Informix compatibility (Michael)</para></listitem>
 
2478
<listitem><para>Fixes for compiling with thread-safety, particularly Solaris (Bruce)</para></listitem>
 
2479
<listitem><para>Fix error in COPY IN termination when using the old network protocol (ljb)</para></listitem>
 
2480
<listitem><para>Several important fixes in pg_autovacuum, including fixes for
 
2481
large tables, unsigned oids, stability, temp tables, and debug mode
 
2482
(Matthew T. O'Connor)</para></listitem>
 
2483
<listitem><para>Fix problem with reading tar-format dumps on NetBSD and BSD/OS (Bruce)</para></listitem>
 
2484
<listitem><para>Several JDBC fixes</para></listitem>
 
2485
<listitem><para>Fix ALTER SEQUENCE RESTART where last_value equals the restart value (Tom)</para></listitem>
 
2486
<listitem><para>Repair failure to recalculate nested sub-selects (Tom)</para></listitem>
 
2487
<listitem><para>Fix problems with non-constant expressions in LIMIT/OFFSET</para></listitem>
 
2488
<listitem><para>Support FULL JOIN with no join clause, such as X FULL JOIN Y ON TRUE (Tom)</para></listitem>
 
2489
<listitem><para>Fix another zero-column table bug (Tom)</para></listitem>
 
2490
<listitem><para>Improve handling of non-qualified identifiers in GROUP BY clauses in sub-selects (Tom)</para>
 
2491
<para>
 
2492
Select-list aliases within the sub-select will now take precedence over
 
2493
names from outer query levels.
 
2494
</para></listitem>
 
2495
<listitem><para>Do not generate <quote>NATURAL CROSS JOIN</> when decompiling rules (Tom)</para></listitem>
 
2496
<listitem><para>Add checks for invalid field length in binary COPY (Tom)</para>
 
2497
<para>
 
2498
 This fixes a difficult-to-exploit security hole.
 
2499
</para></listitem>
 
2500
<listitem><para>Avoid locking conflict between <command>ANALYZE</command> and <command>LISTEN</command>/<command>NOTIFY</command></para></listitem>
 
2501
<listitem><para>Numerous translation updates (various contributors)</para></listitem>
 
2502
</itemizedlist>
 
2503
 
 
2504
  </sect2>
 
2505
 </sect1>
 
2506
 
 
2507
 <sect1 id="release-7-4-2">
 
2508
  <title>Release 7.4.2</title>
 
2509
 
 
2510
  <note>
 
2511
  <title>Release Date</title>
 
2512
  <simpara>2004-03-08</simpara>
 
2513
  </note>
 
2514
 
 
2515
  <para>
 
2516
   This release contains a variety of fixes from 7.4.1.
 
2517
   For information about new features in the 7.4 major release, see
 
2518
   <xref linkend="release-7-4">.
 
2519
  </para>
 
2520
 
 
2521
 
 
2522
  <sect2>
 
2523
   <title>Migration to Version 7.4.2</title>
 
2524
 
 
2525
   <para>
 
2526
    A dump/restore is not required for those running 7.4.X.  However,
 
2527
    it might be advisable as the easiest method of incorporating fixes for
 
2528
    two errors that have been found in the initial contents of 7.4.X system
 
2529
    catalogs.  A dump/initdb/reload sequence using 7.4.2's initdb will
 
2530
    automatically correct these problems.
 
2531
   </para>
 
2532
 
 
2533
   <para>
 
2534
    The more severe of the two errors is that data type <type>anyarray</>
 
2535
    has the wrong alignment label; this is a problem because the
 
2536
    <structname>pg_statistic</> system catalog uses <type>anyarray</>
 
2537
    columns.  The mislabeling can cause planner misestimations and even
 
2538
    crashes when planning queries that involve <literal>WHERE</> clauses on
 
2539
    double-aligned columns (such as <type>float8</> and <type>timestamp</>).
 
2540
    It is strongly recommended that all installations repair this error,
 
2541
    either by initdb or by following the manual repair procedure given
 
2542
    below.
 
2543
   </para>
 
2544
 
 
2545
   <para>
 
2546
    The lesser error is that the system view <structname>pg_settings</>
 
2547
    ought to be marked as having public update access, to allow
 
2548
    <literal>UPDATE pg_settings</> to be used as a substitute for
 
2549
    <command>SET</>.  This can also be fixed either by initdb or manually,
 
2550
    but it is not necessary to fix unless you want to use <literal>UPDATE
 
2551
    pg_settings</>.
 
2552
   </para>
 
2553
 
 
2554
   <para>
 
2555
    If you wish not to do an initdb, the following procedure will work
 
2556
    for fixing <structname>pg_statistic</>.  As the database superuser,
 
2557
    do:
 
2558
 
 
2559
<programlisting>
 
2560
-- clear out old data in pg_statistic:
 
2561
DELETE FROM pg_statistic;
 
2562
VACUUM pg_statistic;
 
2563
-- this should update 1 row:
 
2564
UPDATE pg_type SET typalign = 'd' WHERE oid = 2277;
 
2565
-- this should update 6 rows:
 
2566
UPDATE pg_attribute SET attalign = 'd' WHERE atttypid = 2277;
 
2567
--
 
2568
-- At this point you MUST start a fresh backend to avoid a crash!
 
2569
--
 
2570
-- repopulate pg_statistic:
 
2571
ANALYZE;
 
2572
</programlisting>
 
2573
 
 
2574
    This can be done in a live database, but beware that all backends
 
2575
    running in the altered database must be restarted before it is safe to
 
2576
    repopulate <structname>pg_statistic</>.
 
2577
   </para>
 
2578
 
 
2579
   <para>
 
2580
    To repair the <structname>pg_settings</> error, simply do:
 
2581
<programlisting>
 
2582
GRANT SELECT, UPDATE ON pg_settings TO PUBLIC;
 
2583
</programlisting>
 
2584
   </para>
 
2585
 
 
2586
   <para>
 
2587
    The above procedures must be carried out in <emphasis>each</> database
 
2588
    of an installation, including <literal>template1</>, and ideally
 
2589
    including <literal>template0</> as well.  If you do not fix the
 
2590
    template databases then any subsequently created databases will contain
 
2591
    the same errors.  <literal>template1</> can be fixed in the same way
 
2592
    as any other database, but fixing <literal>template0</> requires
 
2593
    additional steps.  First, from any database issue:
 
2594
<programlisting>
 
2595
UPDATE pg_database SET datallowconn = true WHERE datname = 'template0';
 
2596
</programlisting>
 
2597
     Next connect to <literal>template0</> and perform the above repair
 
2598
     procedures.  Finally, do:
 
2599
<programlisting>
 
2600
-- re-freeze template0:
 
2601
VACUUM FREEZE;
 
2602
-- and protect it against future alterations:
 
2603
UPDATE pg_database SET datallowconn = false WHERE datname = 'template0';
 
2604
</programlisting>
 
2605
   </para>
 
2606
  </sect2>
 
2607
 
 
2608
  <sect2>
 
2609
   <title>Changes</title>
 
2610
 
 
2611
<para>
 
2612
   Release 7.4.2 incorporates all the fixes included in release 7.3.6,
 
2613
   plus the following fixes:
 
2614
</para>
 
2615
 
 
2616
<itemizedlist>
 
2617
<listitem><para>Fix <structname>pg_statistics</> alignment bug that could crash optimizer</para>
 
2618
<para>See above for details about this problem.</para></listitem>
 
2619
<listitem><para>Allow non-super users to update <structname>pg_settings</></para></listitem>
 
2620
<listitem><para>Fix several optimizer bugs, most of which led to
 
2621
<quote>variable not found in subplan target lists</> errors</para></listitem>
 
2622
<listitem><para>Avoid out-of-memory failure during startup of large multiple
 
2623
index scan</para></listitem>
 
2624
<listitem><para>Fix multibyte problem that could lead to <quote>out of
 
2625
memory</> error during <command>COPY IN</></para></listitem>
 
2626
<listitem><para>Fix problems with <command>SELECT INTO</> / <command>CREATE
 
2627
TABLE AS</> from tables without OIDs</para></listitem>
 
2628
<listitem><para>Fix problems with <filename>alter_table</> regression test
 
2629
during parallel testing</para></listitem>
 
2630
<listitem><para>Fix problems with hitting open file limit, especially on OS X (Tom)</para></listitem>
 
2631
<listitem><para>Partial fix for Turkish-locale issues</para>
 
2632
<para>initdb will succeed now in Turkish locale, but there are still some
 
2633
inconveniences associated with the <literal>i/I</> problem.</para></listitem>
 
2634
<listitem><para>Make pg_dump set client encoding on restore</para></listitem>
 
2635
<listitem><para>Other minor pg_dump fixes</para></listitem>
 
2636
<listitem><para>Allow ecpg to again use C keywords as column names (Michael)</para></listitem>
 
2637
<listitem><para>Added ecpg <literal>WHENEVER NOT_FOUND</> to
 
2638
<literal>SELECT/INSERT/UPDATE/DELETE</> (Michael)</para></listitem>
 
2639
<listitem><para>Fix ecpg crash for queries calling set-returning functions (Michael)</para></listitem>
 
2640
<listitem><para>Various other ecpg fixes (Michael)</para></listitem>
 
2641
<listitem><para>Fixes for Borland compiler</para></listitem>
 
2642
<listitem><para>Thread build improvements (Bruce)</para></listitem>
 
2643
<listitem><para>Various other build fixes</para></listitem>
 
2644
<listitem><para>Various JDBC fixes</para></listitem>
 
2645
</itemizedlist>
 
2646
 
 
2647
  </sect2>
 
2648
 </sect1>
 
2649
 
 
2650
 <sect1 id="release-7-4-1">
 
2651
  <title>Release 7.4.1</title>
 
2652
 
 
2653
  <note>
 
2654
  <title>Release Date</title>
 
2655
  <simpara>2003-12-22</simpara>
 
2656
  </note>
 
2657
 
 
2658
  <para>
 
2659
   This release contains a variety of fixes from 7.4.
 
2660
   For information about new features in the 7.4 major release, see
 
2661
   <xref linkend="release-7-4">.
 
2662
  </para>
 
2663
 
 
2664
 
 
2665
  <sect2>
 
2666
   <title>Migration to Version 7.4.1</title>
 
2667
 
 
2668
   <para>
 
2669
    A dump/restore is <emphasis>not</emphasis> required for those
 
2670
    running 7.4.
 
2671
   </para>
 
2672
 
 
2673
   <para>
 
2674
    If you want to install the fixes in the information schema
 
2675
    you need to reload it into the database.
 
2676
    This is either accomplished by initializing a new cluster
 
2677
    by running <command>initdb</command>, or by running the following
 
2678
    sequence of SQL commands in each database (ideally including
 
2679
    <literal>template1</literal>) as a superuser in
 
2680
    <application>psql</application>, after installing the new release:
 
2681
<programlisting>
 
2682
DROP SCHEMA information_schema CASCADE;
 
2683
\i /usr/local/pgsql/share/information_schema.sql
 
2684
</programlisting>
 
2685
    Substitute your installation path in the second command.
 
2686
   </para>
 
2687
 
 
2688
  </sect2>
 
2689
 
 
2690
  <sect2>
 
2691
   <title>Changes</title>
 
2692
 
 
2693
<itemizedlist>
 
2694
<listitem><para>Fixed bug in <command>CREATE SCHEMA</command> parsing in ECPG (Michael)</para></listitem>
 
2695
<listitem><para>Fix compile error when <option>--enable-thread-safety</option> and <option>--with-perl</option> are used together (Peter)</para></listitem>
 
2696
<listitem><para>Fix for subqueries that used hash joins (Tom)</para>
 
2697
<para>
 
2698
   Certain subqueries that used hash joins would crash because of
 
2699
   improperly shared structures.
 
2700
</para></listitem>
 
2701
<listitem><para>Fix free space map compaction bug (Tom)</para>
 
2702
<para>
 
2703
   This fixes a bug where compaction of the free space map could lead
 
2704
   to a database server shutdown.
 
2705
</para>
 
2706
</listitem>
 
2707
<listitem><para>Fix for Borland compiler build of libpq (Bruce)</para></listitem>
 
2708
<listitem><para>Fix <function>netmask()</function> and <function>hostmask()</function> to return the maximum-length masklen (Tom)</para>
 
2709
<para>
 
2710
   Fix these functions to return values consistent with pre-7.4
 
2711
   releases.
 
2712
</para>
 
2713
</listitem>
 
2714
<listitem><para>Several <filename>contrib/pg_autovacuum</filename> fixes</para>
 
2715
<para>
 
2716
   Fixes include improper variable initialization, missing vacuum after
 
2717
   <command>TRUNCATE</command>, and duration computation overflow for long vacuums.
 
2718
</para>
 
2719
</listitem>
 
2720
<listitem><para>Allow compile of <filename>contrib/cube</filename> under Cygwin (Jason Tishler)</para></listitem>
 
2721
<listitem><para>Fix Solaris use of password file when no passwords are defined (Tom)</para>
 
2722
<para>
 
2723
   Fix crash on Solaris caused by use of any type of password
 
2724
   authentication when no passwords were defined.
 
2725
</para>
 
2726
</listitem>
 
2727
<listitem><para>JDBC fix for thread problems, other fixes</para></listitem>
 
2728
<listitem><para>Fix for <type>bytea</type> index lookups (Joe)</para></listitem>
 
2729
<listitem><para>Fix information schema for bit data types (Peter)</para></listitem>
 
2730
<listitem><para>Force zero_damaged_pages to be on during recovery from WAL</para></listitem>
 
2731
<listitem><para>Prevent some obscure cases of <quote>variable not in subplan target lists</quote></para></listitem>
 
2732
<listitem><para>Make <function>PQescapeBytea</function> and <function>byteaout</function> consistent with each other (Joe)</para></listitem>
 
2733
<listitem><para>Escape <type>bytea</type> output for bytes &gt; 0x7e(Joe)</para>
 
2734
<para>
 
2735
 If different client encodings are used for <type>bytea</type> output and input, it
 
2736
 is possible for <type>bytea</type> values to be corrupted by the differing
 
2737
 encodings.  This fix escapes all bytes that might be affected.
 
2738
</para>
 
2739
</listitem>
 
2740
<listitem><para>Added missing <function>SPI_finish()</function> calls to dblink's <function>get_tuple_of_interest()</function> (Joe)</para></listitem>
 
2741
<listitem><para>New Czech FAQ</para></listitem>
 
2742
<listitem><para>Fix information schema view <literal>constraint_column_usage</literal> for foreign keys (Peter)</para></listitem>
 
2743
<listitem><para>ECPG fixes (Michael)</para></listitem>
 
2744
<listitem><para>Fix bug with multiple <literal>IN</literal> subqueries and joins in the subqueries (Tom)</para></listitem>
 
2745
<listitem><para>Allow <literal>COUNT('x')</literal> to work (Tom)</para></listitem>
 
2746
<listitem><para>Install ECPG include files for Informix compatibility into separate directory (Peter)</para>
 
2747
<para>
 
2748
 Some names of ECPG include files for Informix compatibility conflicted with operating system include files.
 
2749
 By installing them in their own directory, name conflicts have been reduced.
 
2750
</para>
 
2751
</listitem>
 
2752
<listitem><para>Fix SSL memory leak (Neil)</para>
 
2753
<para>
 
2754
 This release fixes a bug in 7.4 where SSL didn't free all memory it allocated.
 
2755
</para>
 
2756
</listitem>
 
2757
<listitem><para>Prevent <filename>pg_service.conf</filename> from using service name as default dbname (Bruce)</para></listitem>
 
2758
<listitem><para>Fix local ident authentication on FreeBSD (Tom)</para></listitem>
 
2759
</itemizedlist>
 
2760
 
 
2761
 </sect2>
 
2762
</sect1>
 
2763
 
 
2764
<sect1 id="release-7-4">
 
2765
 <title>Release 7.4</title>
 
2766
 
 
2767
 <note>
 
2768
  <title>Release Date</title>
 
2769
  <simpara>2003-11-17</simpara>
 
2770
 </note>
 
2771
 
 
2772
 <sect2>
 
2773
  <title>Overview</title>
 
2774
 
 
2775
  <para>
 
2776
   Major changes in this release:
 
2777
  </para>
 
2778
 
 
2779
  <variablelist>
 
2780
   <varlistentry>
 
2781
    <term>
 
2782
     <literal>IN</literal> / <literal>NOT IN</literal> subqueries are
 
2783
     now much more efficient
 
2784
    </term>
 
2785
 
 
2786
    <listitem>
 
2787
     <para>
 
2788
      In previous releases, <literal>IN</literal>/<literal>NOT
 
2789
      IN</literal> subqueries were joined to the upper query by
 
2790
      sequentially scanning the subquery looking for a match.  The
 
2791
      7.4 code uses the same sophisticated techniques used by
 
2792
      ordinary joins and so is much faster.  An
 
2793
      <literal>IN</literal> will now usually be as fast as or faster
 
2794
      than an equivalent <literal>EXISTS</literal> subquery; this
 
2795
      reverses the conventional wisdom that applied to previous
 
2796
      releases.
 
2797
     </para>
 
2798
    </listitem>
 
2799
   </varlistentry>
 
2800
 
 
2801
   <varlistentry>
 
2802
    <term>
 
2803
     Improved <literal>GROUP BY</literal> processing by using hash buckets
 
2804
    </term>
 
2805
 
 
2806
    <listitem>
 
2807
     <para>
 
2808
      In previous releases, rows to be grouped had to be sorted
 
2809
      first.  The 7.4 code can do <literal>GROUP BY</literal>
 
2810
      without sorting, by accumulating results into a hash table
 
2811
      with one entry per group.  It will still use the sort
 
2812
      technique, however, if the hash table is estimated to be too
 
2813
      large to fit in <varname>sort_mem</>.
 
2814
     </para>
 
2815
    </listitem>
 
2816
   </varlistentry>
 
2817
 
 
2818
   <varlistentry>
 
2819
    <term>
 
2820
     New multikey hash join capability
 
2821
    </term>
 
2822
 
 
2823
    <listitem>
 
2824
     <para>
 
2825
      In previous releases, hash joins could only occur on single
 
2826
      keys.  This release allows multicolumn hash joins.
 
2827
     </para>
 
2828
    </listitem>
 
2829
   </varlistentry>
 
2830
 
 
2831
   <varlistentry>
 
2832
    <term>
 
2833
     Queries using the explicit <literal>JOIN</literal> syntax are
 
2834
     now better optimized
 
2835
    </term>
 
2836
 
 
2837
    <listitem>
 
2838
     <para>
 
2839
      Prior releases evaluated queries using the explicit
 
2840
      <literal>JOIN</literal> syntax only in the order implied by
 
2841
      the syntax. 7.4 allows full optimization of these queries,
 
2842
      meaning the optimizer considers all possible join orderings
 
2843
      and chooses the most efficient.  Outer joins, however, must
 
2844
      still follow the declared ordering.
 
2845
     </para>
 
2846
    </listitem>
 
2847
   </varlistentry>
 
2848
 
 
2849
   <varlistentry>
 
2850
    <term>
 
2851
     Faster and more powerful regular expression code
 
2852
    </term>
 
2853
 
 
2854
    <listitem>
 
2855
     <para>
 
2856
      The entire regular expression module has been replaced with a
 
2857
      new version by Henry Spencer, originally written for Tcl.  The
 
2858
      code greatly improves performance and supports several flavors
 
2859
      of regular expressions.
 
2860
     </para>
 
2861
    </listitem>
 
2862
   </varlistentry>
 
2863
 
 
2864
   <varlistentry>
 
2865
    <term>
 
2866
     Function-inlining for simple SQL functions
 
2867
    </term>
 
2868
 
 
2869
    <listitem>
 
2870
     <para>
 
2871
      Simple SQL functions can now be inlined by including their SQL
 
2872
      in the main query.  This improves performance by eliminating
 
2873
      per-call overhead.  That means simple SQL functions now
 
2874
      behave like macros.
 
2875
     </para>
 
2876
    </listitem>
 
2877
   </varlistentry>
 
2878
 
 
2879
   <varlistentry>
 
2880
    <term>
 
2881
     Full support for IPv6 connections and IPv6 address data types
 
2882
    </term>
 
2883
 
 
2884
    <listitem>
 
2885
     <para>
 
2886
      Previous releases allowed only IPv4 connections, and the IP
 
2887
      data types only supported IPv4 addresses. This release adds
 
2888
      full IPv6 support in both of these areas.
 
2889
     </para>
 
2890
    </listitem>
 
2891
   </varlistentry>
 
2892
 
 
2893
   <varlistentry>
 
2894
    <term>
 
2895
     Major improvements in SSL performance and reliability
 
2896
    </term>
 
2897
 
 
2898
    <listitem>
 
2899
     <para>
 
2900
      Several people very familiar with the SSL API have overhauled
 
2901
      our SSL code to improve SSL key negotiation and error
 
2902
      recovery.
 
2903
     </para>
 
2904
    </listitem>
 
2905
   </varlistentry>
 
2906
 
 
2907
   <varlistentry>
 
2908
    <term>
 
2909
     Make free space map efficiently reuse empty index pages,
 
2910
     and other free space management improvements
 
2911
    </term>
 
2912
 
 
2913
    <listitem>
 
2914
     <para>
 
2915
      In previous releases, B-tree index pages that were left empty
 
2916
      because of deleted rows could only be reused by rows with
 
2917
      index values similar to the rows originally indexed on that
 
2918
      page. In 7.4, <command>VACUUM</command> records empty index
 
2919
      pages and allows them to be reused for any future index rows.
 
2920
     </para>
 
2921
    </listitem>
 
2922
   </varlistentry>
 
2923
 
 
2924
   <varlistentry>
 
2925
    <term>
 
2926
     SQL-standard information schema
 
2927
    </term>
 
2928
 
 
2929
    <listitem>
 
2930
     <para>
 
2931
      The information schema provides a standardized and stable way
 
2932
      to access information about the schema objects defined in a
 
2933
      database.
 
2934
     </para>
 
2935
    </listitem>
 
2936
   </varlistentry>
 
2937
 
 
2938
   <varlistentry>
 
2939
    <term>
 
2940
     Cursors conform more closely to the SQL standard
 
2941
    </term>
 
2942
 
 
2943
    <listitem>
 
2944
     <para>
 
2945
      The commands <command>FETCH</command> and
 
2946
      <command>MOVE</command> have been overhauled to conform more
 
2947
      closely to the SQL standard.
 
2948
     </para>
 
2949
    </listitem>
 
2950
   </varlistentry>
 
2951
 
 
2952
   <varlistentry>
 
2953
    <term>
 
2954
     Cursors can exist outside transactions
 
2955
    </term>
 
2956
 
 
2957
    <listitem>
 
2958
     <para>
 
2959
      These cursors are also called holdable cursors.
 
2960
     </para>
 
2961
    </listitem>
 
2962
   </varlistentry>
 
2963
 
 
2964
   <varlistentry>
 
2965
    <term>
 
2966
     New client-to-server protocol
 
2967
    </term>
 
2968
 
 
2969
    <listitem>
 
2970
     <para>
 
2971
      The new protocol adds error codes, more status information,
 
2972
      faster startup, better support for binary data transmission,
 
2973
      parameter values separated from SQL commands, prepared
 
2974
      statements available at the protocol level, and cleaner
 
2975
      recovery from <command>COPY</command> failures.  The older
 
2976
      protocol is still supported by both server and clients.
 
2977
     </para>
 
2978
    </listitem>
 
2979
   </varlistentry>
 
2980
 
 
2981
   <varlistentry>
 
2982
    <term>
 
2983
     <application>libpq</application> and
 
2984
     <application>ECPG</application> applications are now fully
 
2985
     thread-safe
 
2986
    </term>
 
2987
 
 
2988
    <listitem>
 
2989
     <para>
 
2990
      While previous <application>libpq</application> releases
 
2991
      already supported threads, this release improves thread safety
 
2992
      by fixing some non-thread-safe code that was used during
 
2993
      database connection startup.  The <command>configure</command>
 
2994
      option <option>--enable-thread-safety</option> must be used to
 
2995
      enable this feature.
 
2996
     </para>
 
2997
    </listitem>
 
2998
   </varlistentry>
 
2999
 
 
3000
   <varlistentry>
 
3001
    <term>
 
3002
     New version of full-text indexing
 
3003
    </term>
 
3004
 
 
3005
    <listitem>
 
3006
     <para>
 
3007
      A new full-text indexing suite is available in
 
3008
      <filename>contrib/tsearch2</filename>.
 
3009
     </para>
 
3010
    </listitem>
 
3011
   </varlistentry>
 
3012
 
 
3013
   <varlistentry>
 
3014
    <term>
 
3015
     New autovacuum tool
 
3016
    </term>
 
3017
 
 
3018
    <listitem>
 
3019
     <para>
 
3020
      The new autovacuum tool in
 
3021
      <filename>contrib/autovacuum</filename> monitors the database
 
3022
      statistics tables for
 
3023
      <command>INSERT</command>/<command>UPDATE</command>/<command>DELETE</command>
 
3024
      activity and automatically vacuums tables when needed.
 
3025
     </para>
 
3026
    </listitem>
 
3027
   </varlistentry>
 
3028
 
 
3029
   <varlistentry>
 
3030
    <term>
 
3031
     Array handling has been improved and moved into the server core
 
3032
    </term>
 
3033
 
 
3034
    <listitem>
 
3035
     <para>
 
3036
      Many array limitations have been removed, and arrays behave
 
3037
      more like fully-supported data types.
 
3038
     </para>
 
3039
    </listitem>
 
3040
   </varlistentry>
 
3041
 
 
3042
  </variablelist>
 
3043
 </sect2>
 
3044
 
 
3045
 <sect2>
 
3046
  <title>Migration to Version 7.4</title>
 
3047
 
 
3048
  <para>
 
3049
   A dump/restore using <application>pg_dump</application> is
 
3050
   required for those wishing to migrate data from any previous
 
3051
   release.
 
3052
  </para>
 
3053
 
 
3054
  <para>
 
3055
   Observe the following incompatibilities:
 
3056
  </para>
 
3057
 
 
3058
  <itemizedlist>
 
3059
   <listitem>
 
3060
    <para>
 
3061
     The server-side autocommit setting was removed and
 
3062
     reimplemented in client applications and languages.
 
3063
     Server-side autocommit was causing too many problems with
 
3064
     languages and applications that wanted to control their own
 
3065
     autocommit behavior, so autocommit was removed from the server
 
3066
     and added to individual client APIs as appropriate.
 
3067
    </para>
 
3068
   </listitem>
 
3069
 
 
3070
   <listitem>
 
3071
    <para>
 
3072
     Error message wording has changed substantially in this
 
3073
     release.  Significant effort was invested to make the messages
 
3074
     more consistent and user-oriented.  If your applications try to
 
3075
     detect different error conditions by parsing the error message,
 
3076
     you are strongly encouraged to use the new error code facility instead.
 
3077
    </para>
 
3078
   </listitem>
 
3079
 
 
3080
   <listitem>
 
3081
    <para>
 
3082
     Inner joins using the explicit <literal>JOIN</literal> syntax
 
3083
     might behave differently because they are now better
 
3084
     optimized.
 
3085
    </para>
 
3086
   </listitem>
 
3087
 
 
3088
   <listitem>
 
3089
    <para>
 
3090
     A number of server configuration parameters have been renamed
 
3091
     for clarity, primarily those related to
 
3092
     logging.
 
3093
    </para>
 
3094
   </listitem>
 
3095
 
 
3096
   <listitem>
 
3097
    <para>
 
3098
     <literal>FETCH 0</literal> or <literal>MOVE 0</literal> now
 
3099
     does nothing.  In prior releases, <literal>FETCH 0</literal>
 
3100
     would fetch all remaining rows, and <literal>MOVE 0</literal>
 
3101
     would move to the end of the cursor.
 
3102
    </para>
 
3103
   </listitem>
 
3104
 
 
3105
   <listitem>
 
3106
    <para>
 
3107
     <command>FETCH</command> and <command>MOVE</command> now return
 
3108
     the actual number of rows fetched/moved, or zero if at the
 
3109
     beginning/end of the cursor.  Prior releases would return the
 
3110
     row count passed to the command, not the number of rows
 
3111
     actually fetched or moved.
 
3112
    </para>
 
3113
   </listitem>
 
3114
 
 
3115
   <listitem>
 
3116
    <para>
 
3117
     <command>COPY</command> now can process files that use
 
3118
     carriage-return or carriage-return/line-feed end-of-line
 
3119
     sequences. Literal carriage-returns and line-feeds are no
 
3120
     longer accepted in data values; use <literal>\r</literal> and
 
3121
     <literal>\n</literal> instead.
 
3122
    </para>
 
3123
   </listitem>
 
3124
 
 
3125
   <listitem>
 
3126
    <para>
 
3127
     Trailing spaces are now trimmed when converting from type
 
3128
     <type>char(<replaceable>n</>)</type> to
 
3129
     <type>varchar(<replaceable>n</>)</type> or <type>text</type>.
 
3130
     This is what most people always expected to happen anyway.
 
3131
    </para>
 
3132
   </listitem>
 
3133
 
 
3134
   <listitem>
 
3135
    <para>
 
3136
     The data type <type>float(<replaceable>p</>)</type> now
 
3137
     measures <replaceable>p</> in binary digits, not decimal
 
3138
     digits.  The new behavior follows the SQL standard.
 
3139
    </para>
 
3140
   </listitem>
 
3141
 
 
3142
   <listitem>
 
3143
    <para>
 
3144
     Ambiguous date values now must match the ordering specified by
 
3145
     the <varname>datestyle</varname> setting.  In prior releases, a
 
3146
     date specification of <literal>10/20/03</> was interpreted as a
 
3147
     date in October even if <varname>datestyle</> specified that
 
3148
     the day should be first.  7.4 will throw an error if a date
 
3149
     specification is invalid for the current setting of
 
3150
     <varname>datestyle</>.
 
3151
    </para>
 
3152
   </listitem>
 
3153
 
 
3154
   <listitem>
 
3155
    <para>
 
3156
     The functions <function>oidrand</function>,
 
3157
     <function>oidsrand</function>, and
 
3158
     <function>userfntest</function> have been removed.  These
 
3159
     functions were determined to be no longer useful.
 
3160
    </para>
 
3161
   </listitem>
 
3162
 
 
3163
   <listitem>
 
3164
    <para>
 
3165
     String literals specifying time-varying date/time values, such
 
3166
     as <literal>'now'</literal> or <literal>'today'</literal> will
 
3167
     no longer work as expected in column default expressions; they
 
3168
     now cause the time of the table creation to be the default, not
 
3169
     the time of the insertion.  Functions such as
 
3170
     <function>now()</>, <function>current_timestamp</>, or
 
3171
     <function>current_date</function> should be used instead.
 
3172
    </para>
 
3173
 
 
3174
    <para>
 
3175
     In previous releases, there was special code so that strings
 
3176
     such as <literal>'now'</literal> were interpreted at
 
3177
     <command>INSERT</> time and not at table creation time, but
 
3178
     this work around didn't cover all cases.  Release 7.4 now
 
3179
     requires that defaults be defined properly using functions such
 
3180
     as <function>now()</> or <function>current_timestamp</>. These
 
3181
     will work in all situations.
 
3182
    </para>
 
3183
   </listitem>
 
3184
 
 
3185
   <listitem>
 
3186
    <para>
 
3187
     The dollar sign (<literal>$</>) is no longer allowed in
 
3188
     operator names.  It can instead be a non-first character in
 
3189
     identifiers.  This was done to improve compatibility with other
 
3190
     database systems, and to avoid syntax problems when parameter
 
3191
     placeholders (<literal>$<replaceable>n</></>) are written
 
3192
     adjacent to operators.
 
3193
    </para>
 
3194
   </listitem>
 
3195
 
 
3196
  </itemizedlist>
 
3197
 </sect2>
 
3198
 
 
3199
 <sect2>
 
3200
  <title>Changes</title>
 
3201
 
 
3202
  <para>
 
3203
   Below you will find a detailed account of the changes between
 
3204
   release 7.4 and the previous major release.
 
3205
  </para>
 
3206
 
 
3207
 <sect3>
 
3208
  <title>Server Operation Changes</title>
 
3209
 
 
3210
  <itemizedlist>
 
3211
   <listitem>
 
3212
    <para>
 
3213
     Allow IPv6 server connections (Nigel Kukard, Johan Jordaan,
 
3214
     Bruce, Tom, Kurt Roeckx, Andrew Dunstan)
 
3215
    </para>
 
3216
   </listitem>
 
3217
 
 
3218
   <listitem>
 
3219
    <para>
 
3220
     Fix SSL to handle errors cleanly (Nathan Mueller)
 
3221
    </para>
 
3222
    <para>
 
3223
     In prior releases, certain SSL API error reports were not
 
3224
     handled correctly.  This release fixes those problems.
 
3225
    </para>
 
3226
   </listitem>
 
3227
 
 
3228
   <listitem>
 
3229
    <para>
 
3230
     SSL protocol security and performance improvements (Sean Chittenden)
 
3231
    </para>
 
3232
    <para>
 
3233
     SSL key renegotiation was happening too frequently, causing poor
 
3234
     SSL performance.  Also, initial key handling was improved.
 
3235
    </para>
 
3236
   </listitem>
 
3237
 
 
3238
   <listitem>
 
3239
    <para>
 
3240
     Print lock information when a deadlock is detected (Tom)
 
3241
    </para>
 
3242
    <para>
 
3243
     This allows easier debugging of deadlock situations.
 
3244
    </para>
 
3245
   </listitem>
 
3246
 
 
3247
   <listitem>
 
3248
    <para>
 
3249
     Update <filename>/tmp</filename> socket modification times
 
3250
     regularly to avoid their removal (Tom)
 
3251
    </para>
 
3252
    <para>
 
3253
     This should help prevent <filename>/tmp</filename> directory
 
3254
     cleaner administration scripts from removing server socket
 
3255
     files.
 
3256
    </para>
 
3257
   </listitem>
 
3258
 
 
3259
   <listitem><para>Enable PAM for Mac OS X (Aaron Hillegass)</para></listitem>
 
3260
 
 
3261
   <listitem>
 
3262
    <para>Make B-tree indexes fully WAL-safe (Tom)</para>
 
3263
    <para>
 
3264
     In prior releases, under certain rare cases, a server crash
 
3265
     could cause B-tree indexes to become corrupt. This release
 
3266
     removes those last few rare cases.
 
3267
    </para>
 
3268
   </listitem>
 
3269
 
 
3270
   <listitem><para>Allow B-tree index compaction and empty page reuse (Tom)</para></listitem>
 
3271
 
 
3272
   <listitem>
 
3273
    <para>
 
3274
     Fix inconsistent index lookups during split of first root page (Tom)
 
3275
    </para>
 
3276
    <para>
 
3277
     In prior releases, when a single-page index split into two
 
3278
     pages, there was a brief period when another database session
 
3279
     could miss seeing an index entry.  This release fixes that rare
 
3280
     failure case.
 
3281
    </para>
 
3282
   </listitem>
 
3283
 
 
3284
   <listitem><para>Improve free space map allocation logic (Tom)</para></listitem>
 
3285
 
 
3286
   <listitem>
 
3287
    <para>Preserve free space information between server restarts (Tom)</para>
 
3288
    <para>
 
3289
     In prior releases, the free space map was not saved when the
 
3290
     postmaster was stopped, so newly started servers had no free
 
3291
     space information. This release saves the free space map, and
 
3292
     reloads it when the server is restarted.
 
3293
    </para>
 
3294
   </listitem>
 
3295
 
 
3296
   <listitem><para>Add start time to <literal>pg_stat_activity</literal> (Neil)</para></listitem>
 
3297
   <listitem><para>New code to detect corrupt disk pages; erase with <varname>zero_damaged_pages</varname> (Tom)</para></listitem>
 
3298
   <listitem><para>New client/server protocol: faster, no username length limit, allow clean exit from <command>COPY</command> (Tom)</para></listitem>
 
3299
   <listitem><para>Add transaction status, table ID, column ID to client/server protocol (Tom)</para></listitem>
 
3300
   <listitem><para>Add binary I/O to client/server protocol (Tom)</para></listitem>
 
3301
   <listitem><para>Remove autocommit server setting; move to client applications (Tom)</para></listitem>
 
3302
   <listitem><para>New error message wording, error codes, and three levels of error detail (Tom, Joe, Peter)</para></listitem>
 
3303
  </itemizedlist>
 
3304
 </sect3>
 
3305
 
 
3306
 <sect3>
 
3307
  <title>Performance Improvements</title>
 
3308
 
 
3309
  <itemizedlist>
 
3310
   <listitem><para>Add hashing for <literal>GROUP BY</literal> aggregates (Tom)</para></listitem>
 
3311
   <listitem><para>Make nested-loop joins be smarter about multicolumn indexes (Tom)</para></listitem>
 
3312
   <listitem><para>Allow multikey hash joins (Tom)</para></listitem>
 
3313
   <listitem><para>Improve constant folding (Tom)</para></listitem>
 
3314
   <listitem><para>Add ability to inline simple SQL functions (Tom)</para></listitem>
 
3315
 
 
3316
   <listitem>
 
3317
    <para>Reduce memory usage for queries using complex functions (Tom)</para>
 
3318
    <para>
 
3319
     In prior releases, functions returning allocated memory would
 
3320
     not free it until the query completed. This release allows the
 
3321
     freeing of function-allocated memory when the function call
 
3322
     completes, reducing the total memory used by functions.
 
3323
    </para>
 
3324
   </listitem>
 
3325
 
 
3326
   <listitem>
 
3327
    <para>Improve GEQO optimizer performance (Tom)</para>
 
3328
    <para>
 
3329
     This release fixes several inefficiencies in the way the GEQO optimizer
 
3330
     manages potential query paths.
 
3331
    </para>
 
3332
   </listitem>
 
3333
 
 
3334
   <listitem>
 
3335
    <para>
 
3336
     Allow <literal>IN</>/<literal>NOT IN</> to be handled via hash
 
3337
     tables (Tom)
 
3338
    </para>
 
3339
   </listitem>
 
3340
 
 
3341
   <listitem>
 
3342
    <para>
 
3343
     Improve <literal>NOT IN (<replaceable>subquery</>)</literal>
 
3344
     performance (Tom)
 
3345
    </para>
 
3346
   </listitem>
 
3347
 
 
3348
   <listitem>
 
3349
    <para>
 
3350
     Allow most <literal>IN</literal> subqueries to be processed as
 
3351
     joins (Tom)
 
3352
    </para>
 
3353
   </listitem>
 
3354
 
 
3355
   <listitem>
 
3356
    <para>
 
3357
     Pattern matching operations can use indexes regardless of
 
3358
     locale (Peter)
 
3359
    </para>
 
3360
    <para>
 
3361
     There is no way for non-ASCII locales to use the standard
 
3362
     indexes for <literal>LIKE</literal> comparisons. This release
 
3363
     adds a way to create a special index for
 
3364
     <literal>LIKE</literal>.
 
3365
    </para>
 
3366
   </listitem>
 
3367
 
 
3368
   <listitem>
 
3369
    <para>Allow the postmaster to preload libraries using <varname>preload_libraries</varname> (Joe)</para>
 
3370
    <para>
 
3371
     For shared libraries that require a long time to load, this
 
3372
     option is available so the library can be preloaded in the
 
3373
     postmaster and inherited by all database sessions.
 
3374
    </para>
 
3375
   </listitem>
 
3376
 
 
3377
   <listitem>
 
3378
    <para>
 
3379
     Improve optimizer cost computations, particularly for subqueries (Tom)
 
3380
    </para>
 
3381
   </listitem>
 
3382
 
 
3383
   <listitem>
 
3384
    <para>
 
3385
     Avoid sort when subquery <literal>ORDER BY</literal> matches upper query (Tom)
 
3386
    </para>
 
3387
   </listitem>
 
3388
 
 
3389
   <listitem>
 
3390
    <para>
 
3391
     Deduce that <literal>WHERE a.x = b.y AND b.y = 42</literal> also
 
3392
     means <literal>a.x = 42</literal> (Tom)
 
3393
    </para>
 
3394
   </listitem>
 
3395
 
 
3396
   <listitem>
 
3397
    <para>
 
3398
     Allow hash/merge joins on complex joins (Tom)
 
3399
    </para>
 
3400
   </listitem>
 
3401
 
 
3402
   <listitem>
 
3403
    <para>
 
3404
     Allow hash joins for more data types (Tom)
 
3405
    </para>
 
3406
   </listitem>
 
3407
 
 
3408
   <listitem>
 
3409
    <para>
 
3410
     Allow join optimization of explicit inner joins, disable with
 
3411
     <varname>join_collapse_limit</varname> (Tom)
 
3412
    </para>
 
3413
   </listitem>
 
3414
 
 
3415
   <listitem>
 
3416
    <para>
 
3417
     Add parameter <varname>from_collapse_limit</varname> to control
 
3418
     conversion of subqueries to joins (Tom)
 
3419
    </para>
 
3420
   </listitem>
 
3421
 
 
3422
   <listitem>
 
3423
    <para>
 
3424
     Use faster and more powerful regular expression code from Tcl
 
3425
     (Henry Spencer, Tom)
 
3426
    </para>
 
3427
   </listitem>
 
3428
 
 
3429
   <listitem>
 
3430
    <para>
 
3431
     Use bit-mapped relation sets in the optimizer (Tom)
 
3432
    </para>
 
3433
   </listitem>
 
3434
 
 
3435
   <listitem>
 
3436
    <para>Improve connection startup time (Tom)</para>
 
3437
    <para>
 
3438
     The new client/server protocol requires fewer network packets to
 
3439
     start a database session.
 
3440
    </para>
 
3441
   </listitem>
 
3442
 
 
3443
   <listitem>
 
3444
    <para>
 
3445
     Improve trigger/constraint performance (Stephan)
 
3446
    </para>
 
3447
   </listitem>
 
3448
 
 
3449
   <listitem>
 
3450
    <para>
 
3451
     Improve speed of <literal>col IN (const, const, const, ...)</literal> (Tom)
 
3452
    </para>
 
3453
   </listitem>
 
3454
 
 
3455
   <listitem>
 
3456
    <para>
 
3457
     Fix hash indexes which were broken in rare cases (Tom)
 
3458
    </para>
 
3459
   </listitem>
 
3460
 
 
3461
   <listitem><para>Improve hash index concurrency and speed (Tom)</para>
 
3462
    <para>
 
3463
     Prior releases suffered from poor hash index performance,
 
3464
     particularly for high concurrency situations. This release fixes
 
3465
     that, and the development group is interested in reports
 
3466
     comparing B-tree and hash index performance.
 
3467
    </para>
 
3468
   </listitem>
 
3469
 
 
3470
   <listitem>
 
3471
    <para>Align shared buffers on 32-byte boundary for copy speed improvement (Manfred Spraul)</para>
 
3472
    <para>
 
3473
     Certain CPU's perform faster data copies when addresses are
 
3474
     32-byte aligned.
 
3475
    </para>
 
3476
   </listitem>
 
3477
 
 
3478
   <listitem>
 
3479
    <para>Data type <type>numeric</type> reimplemented for better performance (Tom)</para>
 
3480
    <para>
 
3481
     <type>numeric</type> used to be stored in base 100. The new code
 
3482
     uses base 10000, for significantly better performance.
 
3483
    </para>
 
3484
   </listitem>
 
3485
  </itemizedlist>
 
3486
 </sect3>
 
3487
 
 
3488
 <sect3>
 
3489
  <title>Server Configuration Changes</title>
 
3490
 
 
3491
  <itemizedlist>
 
3492
   <listitem>
 
3493
    <para>Rename server parameter <varname>server_min_messages</> to <varname>log_min_messages</> (Bruce)</para>
 
3494
    <para>
 
3495
     This was done so most parameters that control the server logs
 
3496
     begin with <literal>log_</>.
 
3497
    </para>
 
3498
   </listitem>
 
3499
 
 
3500
   <listitem><para>Rename <varname>show_*_stats</> to <varname>log_*_stats</> (Bruce)</para></listitem>
 
3501
   <listitem><para>Rename <varname>show_source_port</> to <varname>log_source_port</> (Bruce)</para></listitem>
 
3502
   <listitem><para>Rename <varname>hostname_lookup</> to <varname>log_hostname</> (Bruce)</para></listitem>
 
3503
 
 
3504
   <listitem>
 
3505
    <para>Add <varname>checkpoint_warning</> to warn of excessive checkpointing (Bruce)</para>
 
3506
    <para>
 
3507
     In prior releases, it was difficult to determine if checkpoint
 
3508
     was happening too frequently. This feature adds a warning to the
 
3509
     server logs when excessive checkpointing happens.
 
3510
    </para>
 
3511
   </listitem>
 
3512
 
 
3513
   <listitem><para>New read-only server parameters for localization (Tom)</para></listitem>
 
3514
 
 
3515
   <listitem>
 
3516
    <para>
 
3517
     Change debug server log messages to output as <literal>DEBUG</>
 
3518
     rather than <literal>LOG</> (Bruce)
 
3519
    </para>
 
3520
   </listitem>
 
3521
 
 
3522
   <listitem>
 
3523
    <para>Prevent server log variables from being turned off by non-superusers (Bruce)</para>
 
3524
    <para>
 
3525
     This is a security feature so non-superusers cannot disable
 
3526
     logging that was enabled by the administrator.
 
3527
    </para>
 
3528
   </listitem>
 
3529
 
 
3530
   <listitem>
 
3531
    <para>
 
3532
     <varname>log_min_messages</>/<varname>client_min_messages</> now
 
3533
     controls <varname>debug_*</> output (Bruce)
 
3534
    </para>
 
3535
    <para>
 
3536
     This centralizes client debug information so all debug output
 
3537
     can be sent to either the client or server logs.
 
3538
    </para>
 
3539
   </listitem>
 
3540
 
 
3541
   <listitem>
 
3542
    <para>Add Mac OS X Rendezvous server support (Chris Campbell)</para>
 
3543
    <para>
 
3544
     This allows Mac OS X hosts to query the network for available
 
3545
     <productname>PostgreSQL</productname> servers.
 
3546
    </para>
 
3547
   </listitem>
 
3548
 
 
3549
   <listitem>
 
3550
    <para>
 
3551
     Add ability to print only slow statements using
 
3552
     <varname>log_min_duration_statement</varname>
 
3553
     (Christopher)
 
3554
    </para>
 
3555
    <para>
 
3556
     This is an often requested debugging feature that allows
 
3557
     administrators to see only slow queries in their server logs.
 
3558
    </para>
 
3559
   </listitem>
 
3560
 
 
3561
   <listitem>
 
3562
    <para>Allow <filename>pg_hba.conf</filename> to accept netmasks in CIDR format (Andrew Dunstan)</para>
 
3563
    <para>
 
3564
     This allows administrators to merge the host IP address and
 
3565
     netmask fields into a single CIDR field in <filename>pg_hba.conf</filename>.
 
3566
    </para>
 
3567
   </listitem>
 
3568
 
 
3569
   <listitem><para>New read-only parameter <varname>is_superuser</varname> (Tom)</para></listitem>
 
3570
 
 
3571
   <listitem>
 
3572
    <para>New parameter <varname>log_error_verbosity</varname> to control error detail (Tom)</para>
 
3573
    <para>
 
3574
     This works with the new error reporting feature to supply
 
3575
     additional error information like hints, file names and line
 
3576
     numbers.
 
3577
    </para>
 
3578
   </listitem>
 
3579
 
 
3580
   <listitem>
 
3581
    <para><literal>postgres --describe-config</literal> now dumps server config variables (Aizaz Ahmed, Peter)</para>
 
3582
    <para>
 
3583
     This option is useful for administration tools that need to know
 
3584
     the configuration variable names and their minimums, maximums,
 
3585
     defaults, and descriptions.
 
3586
    </para>
 
3587
   </listitem>
 
3588
 
 
3589
   <listitem>
 
3590
    <para>
 
3591
     Add new columns in <literal>pg_settings</literal>:
 
3592
     <literal>context</>, <literal>type</>, <literal>source</>,
 
3593
     <literal>min_val</>, <literal>max_val</> (Joe)
 
3594
    </para>
 
3595
   </listitem>
 
3596
 
 
3597
   <listitem>
 
3598
    <para>
 
3599
     Make default <varname>shared_buffers</> 1000 and
 
3600
     <varname>max_connections</> 100, if possible (Tom)
 
3601
    </para>
 
3602
    <para>
 
3603
     Prior versions defaulted to 64 shared buffers so <productname>PostgreSQL</productname>
 
3604
     would start on even very old systems. This release tests the
 
3605
     amount of shared memory allowed by the platform and selects more
 
3606
     reasonable default values if possible.  Of course, users are
 
3607
     still encouraged to evaluate their resource load and size
 
3608
     <varname>shared_buffers</varname> accordingly.
 
3609
    </para>
 
3610
   </listitem>
 
3611
 
 
3612
   <listitem>
 
3613
    <para>
 
3614
     New <filename>pg_hba.conf</filename> record type
 
3615
     <literal>hostnossl</> to prevent SSL connections (Jon
 
3616
     Jensen)
 
3617
    </para>
 
3618
    <para>
 
3619
     In prior releases, there was no way to prevent SSL connections
 
3620
     if both the client and server supported SSL. This option allows
 
3621
     that capability.
 
3622
    </para>
 
3623
   </listitem>
 
3624
 
 
3625
   <listitem>
 
3626
    <para>
 
3627
     Remove parameter <varname>geqo_random_seed</varname>
 
3628
     (Tom)
 
3629
    </para>
 
3630
   </listitem>
 
3631
 
 
3632
   <listitem>
 
3633
    <para>
 
3634
     Add server parameter <varname>regex_flavor</varname> to control regular expression processing (Tom)
 
3635
    </para>
 
3636
   </listitem>
 
3637
 
 
3638
   <listitem>
 
3639
    <para>
 
3640
     Make <command>pg_ctl</command> better handle nonstandard ports (Greg)
 
3641
    </para>
 
3642
   </listitem>
 
3643
  </itemizedlist>
 
3644
 </sect3>
 
3645
 
 
3646
 <sect3>
 
3647
  <title>Query Changes</title>
 
3648
 
 
3649
  <itemizedlist>
 
3650
   <listitem><para>New SQL-standard information schema (Peter)</para></listitem>
 
3651
   <listitem><para>Add read-only transactions (Peter)</para></listitem>
 
3652
   <listitem><para>Print key name and value in foreign-key violation messages (Dmitry Tkach)</para></listitem>
 
3653
 
 
3654
   <listitem>
 
3655
    <para>Allow users to see their own queries in <literal>pg_stat_activity</literal> (Kevin Brown)</para>
 
3656
    <para>
 
3657
     In prior releases, only the superuser could see query strings
 
3658
     using <literal>pg_stat_activity</literal>. Now ordinary users
 
3659
     can see their own query strings.
 
3660
    </para>
 
3661
   </listitem>
 
3662
 
 
3663
   <listitem>
 
3664
    <para>Fix aggregates in subqueries to match SQL standard (Tom)</para>
 
3665
    <para>
 
3666
     The SQL standard says that an aggregate function appearing
 
3667
     within a nested subquery belongs to the outer query if its
 
3668
     argument contains only outer-query variables.  Prior
 
3669
     <productname>PostgreSQL</productname> releases did not handle
 
3670
     this fine point correctly.
 
3671
    </para>
 
3672
   </listitem>
 
3673
 
 
3674
   <listitem>
 
3675
    <para>Add option to prevent auto-addition of tables referenced in query (Nigel J. Andrews)</para>
 
3676
    <para>
 
3677
     By default, tables mentioned in the query are automatically
 
3678
     added to the <literal>FROM</> clause if they are not already
 
3679
     there.  This is compatible with historic
 
3680
     <productname>POSTGRES</productname> behavior but is contrary to
 
3681
     the SQL standard.  This option allows selecting
 
3682
     standard-compatible behavior.
 
3683
    </para>
 
3684
   </listitem>
 
3685
 
 
3686
   <listitem>
 
3687
    <para>Allow <literal>UPDATE ... SET col = DEFAULT</literal> (Rod)</para>
 
3688
    <para>
 
3689
     This allows <command>UPDATE</command> to set a column to its
 
3690
     declared default value.
 
3691
    </para>
 
3692
   </listitem>
 
3693
 
 
3694
   <listitem>
 
3695
    <para>Allow expressions to be used in <literal>LIMIT</>/<literal>OFFSET</> (Tom)</para>
 
3696
    <para>
 
3697
     In prior releases, <literal>LIMIT</>/<literal>OFFSET</> could
 
3698
     only use constants, not expressions.
 
3699
    </para>
 
3700
   </listitem>
 
3701
 
 
3702
   <listitem>
 
3703
    <para>Implement <literal>CREATE TABLE AS EXECUTE</literal> (Neil, Peter)</para>
 
3704
   </listitem>
 
3705
  </itemizedlist>
 
3706
 </sect3>
 
3707
 
 
3708
 <sect3>
 
3709
  <title>Object Manipulation Changes</title>
 
3710
 
 
3711
  <itemizedlist>
 
3712
   <listitem>
 
3713
    <para>Make <command>CREATE SEQUENCE</command> grammar more conforming to SQL:2003 (Neil)</para>
 
3714
   </listitem>
 
3715
 
 
3716
   <listitem>
 
3717
    <para>Add statement-level triggers (Neil)</para>
 
3718
    <para>
 
3719
     While this allows a trigger to fire at the end of a statement,
 
3720
     it does not allow the trigger to access all rows modified by the
 
3721
     statement.  This capability is planned for a future release.
 
3722
    </para>
 
3723
   </listitem>
 
3724
 
 
3725
   <listitem>
 
3726
    <para>Add check constraints for domains (Rod)</para>
 
3727
    <para>
 
3728
     This greatly increases the usefulness of domains by allowing
 
3729
     them to use check constraints.
 
3730
    </para>
 
3731
   </listitem>
 
3732
 
 
3733
   <listitem>
 
3734
    <para>Add <command>ALTER DOMAIN</command> (Rod)</para>
 
3735
    <para>
 
3736
     This allows manipulation of existing domains.
 
3737
    </para>
 
3738
   </listitem>
 
3739
 
 
3740
   <listitem>
 
3741
    <para>Fix several zero-column table bugs (Tom)</para>
 
3742
    <para>
 
3743
     <productname>PostgreSQL</productname> supports zero-column tables. This fixes various bugs
 
3744
     that occur when using such tables.
 
3745
    </para>
 
3746
   </listitem>
 
3747
 
 
3748
   <listitem>
 
3749
    <para>Have <literal>ALTER TABLE ... ADD PRIMARY KEY</literal> add not-null constraint (Rod)</para>
 
3750
    <para>
 
3751
     In prior releases, <literal>ALTER TABLE ... ADD
 
3752
     PRIMARY</literal> would add a unique index, but not a not-null
 
3753
     constraint.  That is fixed in this release.
 
3754
    </para>
 
3755
   </listitem>
 
3756
 
 
3757
   <listitem><para>Add <literal>ALTER TABLE ... WITHOUT OIDS</literal> (Rod)</para>
 
3758
    <para>
 
3759
     This allows control over whether new and updated rows will have
 
3760
     an OID column.  This is most useful for saving storage space.
 
3761
    </para>
 
3762
   </listitem>
 
3763
 
 
3764
   <listitem>
 
3765
    <para>
 
3766
     Add <literal>ALTER SEQUENCE</literal> to modify minimum, maximum,
 
3767
     increment, cache, cycle values (Rod)
 
3768
    </para>
 
3769
   </listitem>
 
3770
 
 
3771
   <listitem>
 
3772
    <para>Add <literal>ALTER TABLE ... CLUSTER ON</literal> (Alvaro Herrera)</para>
 
3773
    <para>
 
3774
     This command is used by <command>pg_dump</command> to record the
 
3775
     cluster column for each table previously clustered. This
 
3776
     information is used by database-wide cluster to cluster all
 
3777
     previously clustered tables.
 
3778
    </para>
 
3779
   </listitem>
 
3780
 
 
3781
   <listitem><para>Improve automatic type casting for domains (Rod, Tom)</para></listitem>
 
3782
   <listitem><para>Allow dollar signs in identifiers, except as first character (Tom)</para></listitem>
 
3783
   <listitem><para>Disallow dollar signs in operator names, so <literal>x=$1</> works (Tom)</para></listitem>
 
3784
 
 
3785
   <listitem>
 
3786
    <para>
 
3787
     Allow copying table schema using <literal>LIKE
 
3788
     <replaceable>subtable</replaceable></literal>, also SQL:2003
 
3789
     feature <literal>INCLUDING DEFAULTS</literal> (Rod)
 
3790
    </para>
 
3791
   </listitem>
 
3792
 
 
3793
   <listitem>
 
3794
    <para>
 
3795
     Add <literal>WITH GRANT OPTION</literal> clause to
 
3796
     <command>GRANT</command> (Peter)
 
3797
    </para>
 
3798
    <para>
 
3799
     This enabled <command>GRANT</command> to give other users the
 
3800
     ability to grant privileges on a object.
 
3801
    </para>
 
3802
   </listitem>
 
3803
  </itemizedlist>
 
3804
 </sect3>
 
3805
 
 
3806
 <sect3>
 
3807
  <title>Utility Command Changes</title>
 
3808
 
 
3809
  <itemizedlist>
 
3810
   <listitem>
 
3811
    <para>Add <literal>ON COMMIT</literal> clause to <command>CREATE TABLE</command> for temporary tables (Gavin)</para>
 
3812
    <para>
 
3813
     This adds the ability for a table to be dropped or all rows
 
3814
     deleted on transaction commit.
 
3815
    </para>
 
3816
   </listitem>
 
3817
 
 
3818
   <listitem>
 
3819
    <para>Allow cursors outside transactions using <literal>WITH HOLD</literal> (Neil)</para>
 
3820
    <para>
 
3821
     In previous releases, cursors were removed at the end of the
 
3822
     transaction that created them. Cursors can now be created with
 
3823
     the <literal>WITH HOLD</literal> option, which allows them to
 
3824
     continue to be accessed after the creating transaction has
 
3825
     committed.
 
3826
    </para>
 
3827
   </listitem>
 
3828
 
 
3829
   <listitem>
 
3830
    <para><literal>FETCH 0</literal> and <literal>MOVE 0 </literal> now do nothing (Bruce)</para>
 
3831
    <para>
 
3832
     In previous releases, <literal>FETCH 0</literal> fetched all
 
3833
     remaining rows, and <literal>MOVE 0</literal> moved to the end
 
3834
     of the cursor.
 
3835
    </para>
 
3836
   </listitem>
 
3837
 
 
3838
   <listitem>
 
3839
    <para>
 
3840
     Cause <command>FETCH</command> and <command>MOVE</command> to
 
3841
     return the number of rows fetched/moved, or zero if at the
 
3842
     beginning/end of cursor, per SQL standard (Bruce)
 
3843
    </para>
 
3844
    <para>
 
3845
     In prior releases, the row count returned by
 
3846
     <command>FETCH</command> and <command>MOVE</command> did not
 
3847
     accurately reflect the number of rows processed.
 
3848
    </para>
 
3849
   </listitem>
 
3850
 
 
3851
   <listitem>
 
3852
    <para>Properly handle <literal>SCROLL</literal> with cursors, or
 
3853
    report an error (Neil)</para>
 
3854
    <para>
 
3855
     Allowing random access (both forward and backward scrolling) to
 
3856
     some kinds of queries cannot be done without some additional
 
3857
     work. If <literal>SCROLL</literal> is specified when the cursor
 
3858
     is created, this additional work will be performed. Furthermore,
 
3859
     if the cursor has been created with <literal>NO SCROLL</literal>,
 
3860
     no random access is allowed.
 
3861
    </para>
 
3862
   </listitem>
 
3863
 
 
3864
   <listitem>
 
3865
    <para>
 
3866
     Implement SQL-compatible options <literal>FIRST</>,
 
3867
     <literal>LAST</>, <literal>ABSOLUTE <replaceable>n</></>,
 
3868
     <literal>RELATIVE <replaceable>n</></> for
 
3869
     <command>FETCH</command> and <command>MOVE</command> (Tom)
 
3870
    </para>
 
3871
   </listitem>
 
3872
 
 
3873
   <listitem>
 
3874
    <para>Allow <command>EXPLAIN</command> on <command>DECLARE CURSOR</command> (Tom)</para>
 
3875
   </listitem>
 
3876
 
 
3877
   <listitem>
 
3878
    <para>Allow <command>CLUSTER</command> to use index marked as pre-clustered by default (Alvaro Herrera)</para>
 
3879
   </listitem>
 
3880
 
 
3881
   <listitem>
 
3882
    <para>Allow <command>CLUSTER</command> to cluster all tables (Alvaro Herrera)</para>
 
3883
    <para>
 
3884
     This allows all previously clustered tables in a database to be
 
3885
     reclustered with a single command.
 
3886
    </para>
 
3887
   </listitem>
 
3888
 
 
3889
   <listitem><para>Prevent <command>CLUSTER</command> on partial indexes (Tom)</para></listitem>
 
3890
 
 
3891
   <listitem><para>Allow DOS and Mac line-endings in <command>COPY</> files (Bruce)</para></listitem>
 
3892
 
 
3893
   <listitem>
 
3894
    <para>
 
3895
     Disallow literal carriage return as a data value,
 
3896
     backslash-carriage-return and <literal>\r</> are still allowed
 
3897
     (Bruce)
 
3898
    </para>
 
3899
   </listitem>
 
3900
 
 
3901
   <listitem>
 
3902
    <para><command>COPY</> changes (binary, <literal>\.</>) (Tom)</para>
 
3903
   </listitem>
 
3904
 
 
3905
   <listitem>
 
3906
    <para>Recover from <command>COPY</command> failure cleanly (Tom)</para>
 
3907
   </listitem>
 
3908
 
 
3909
   <listitem>
 
3910
    <para>Prevent possible memory leaks in <command>COPY</command> (Tom)</para>
 
3911
   </listitem>
 
3912
 
 
3913
   <listitem>
 
3914
    <para>Make <command>TRUNCATE</command> transaction-safe (Rod)</para>
 
3915
    <para>
 
3916
     <command>TRUNCATE</command> can now be used inside a
 
3917
     transaction. If the transaction aborts, the changes made by the
 
3918
     <command>TRUNCATE</command> are automatically rolled back.
 
3919
    </para>
 
3920
   </listitem>
 
3921
 
 
3922
   <listitem>
 
3923
    <para>
 
3924
     Allow prepare/bind of utility commands like
 
3925
     <command>FETCH</command> and <command>EXPLAIN</command> (Tom)
 
3926
    </para>
 
3927
   </listitem>
 
3928
 
 
3929
   <listitem>
 
3930
    <para>Add <command>EXPLAIN EXECUTE</command> (Neil)</para>
 
3931
   </listitem>
 
3932
 
 
3933
   <listitem>
 
3934
    <para>Improve <command>VACUUM</command> performance on indexes by reducing WAL traffic (Tom)</para>
 
3935
   </listitem>
 
3936
 
 
3937
   <listitem>
 
3938
    <para>Functional indexes have been generalized into indexes on expressions (Tom)</para>
 
3939
    <para>
 
3940
     In prior releases, functional indexes only supported a simple
 
3941
     function applied to one or more column names.  This release
 
3942
     allows any type of scalar expression.
 
3943
    </para>
 
3944
   </listitem>
 
3945
 
 
3946
   <listitem>
 
3947
    <para>
 
3948
     Have <command>SHOW TRANSACTION ISOLATION</command> match input
 
3949
     to <command>SET TRANSACTION ISOLATION</command>
 
3950
     (Tom)
 
3951
    </para>
 
3952
   </listitem>
 
3953
 
 
3954
   <listitem>
 
3955
    <para>
 
3956
      Have <command>COMMENT ON DATABASE</command> on nonlocal
 
3957
      database generate a warning, rather than an error (Rod)
 
3958
     </para>
 
3959
 
 
3960
    <para>
 
3961
     Database comments are stored in database-local tables so
 
3962
     comments on a database have to be stored in each database.
 
3963
    </para>
 
3964
   </listitem>
 
3965
 
 
3966
   <listitem>
 
3967
    <para>
 
3968
     Improve reliability of <command>LISTEN</>/<command>NOTIFY</> (Tom)
 
3969
    </para>
 
3970
   </listitem>
 
3971
 
 
3972
   <listitem>
 
3973
    <para>Allow <command>REINDEX</command> to reliably reindex nonshared system catalog indexes (Tom)</para>
 
3974
    <para>
 
3975
     This allows system tables to be reindexed without the
 
3976
     requirement of a standalone session, which was necessary in
 
3977
     previous releases. The only tables that now require a standalone
 
3978
     session for reindexing are the global system tables
 
3979
     <literal>pg_database</>, <literal>pg_shadow</>, and
 
3980
     <literal>pg_group</>.
 
3981
    </para>
 
3982
   </listitem>
 
3983
  </itemizedlist>
 
3984
 </sect3>
 
3985
 
 
3986
 <sect3>
 
3987
  <title>Data Type and Function Changes</title>
 
3988
 
 
3989
  <itemizedlist>
 
3990
   <listitem>
 
3991
    <para>
 
3992
     New server parameter <varname>extra_float_digits</varname> to
 
3993
     control precision display of floating-point numbers (Pedro
 
3994
     Ferreira, Tom)
 
3995
    </para>
 
3996
    <para>
 
3997
     This controls output precision which was causing regression
 
3998
     testing problems.
 
3999
    </para>
 
4000
   </listitem>
 
4001
 
 
4002
   <listitem><para>Allow <literal>+1300</literal> as a numeric time-zone specifier, for FJST (Tom)</para></listitem>
 
4003
 
 
4004
   <listitem>
 
4005
    <para>
 
4006
     Remove rarely used functions <function>oidrand</>,
 
4007
     <function>oidsrand</>, and <function>userfntest</> functions
 
4008
     (Neil)
 
4009
    </para>
 
4010
   </listitem>
 
4011
 
 
4012
   <listitem>
 
4013
    <para>Add <function>md5()</> function to main server, already in <filename>contrib/pgcrypto</filename> (Joe)</para>
 
4014
    <para>
 
4015
     An MD5 function was frequently requested. For more complex
 
4016
     encryption capabilities, use
 
4017
     <filename>contrib/pgcrypto</filename>.
 
4018
    </para>
 
4019
   </listitem>
 
4020
 
 
4021
   <listitem><para>Increase date range of <type>timestamp</type> (John Cochran)</para></listitem>
 
4022
 
 
4023
   <listitem>
 
4024
    <para>
 
4025
     Change <literal>EXTRACT(EPOCH FROM timestamp)</literal> so
 
4026
     <type>timestamp without time zone</type> is assumed to be in
 
4027
     local time, not GMT (Tom)
 
4028
    </para>
 
4029
   </listitem>
 
4030
 
 
4031
   <listitem><para>Trap division by zero in case the operating system doesn't prevent it (Tom)</para></listitem>
 
4032
   <listitem><para>Change the <type>numeric</type> data type internally to base 10000 (Tom)</para></listitem>
 
4033
   <listitem><para>New <function>hostmask()</function> function (Greg Wickham)</para></listitem>
 
4034
   <listitem><para>Fixes for <function>to_char()</function> and <function>to_timestamp()</function> (Karel)</para></listitem>
 
4035
 
 
4036
   <listitem>
 
4037
    <para>
 
4038
     Allow functions that can take any argument data type and return
 
4039
     any data type, using <type>anyelement</type> and
 
4040
     <type>anyarray</type> (Joe)
 
4041
    </para>
 
4042
    <para>
 
4043
     This allows the creation of functions that can work with any
 
4044
     data type.
 
4045
    </para>
 
4046
   </listitem>
 
4047
 
 
4048
   <listitem>
 
4049
    <para>
 
4050
     Arrays can now be specified as <literal>ARRAY[1,2,3]</literal>,
 
4051
     <literal>ARRAY[['a','b'],['c','d']]</literal>, or
 
4052
     <literal>ARRAY[ARRAY[ARRAY[2]]]</literal> (Joe)
 
4053
    </para>
 
4054
   </listitem>
 
4055
 
 
4056
   <listitem>
 
4057
    <para>
 
4058
     Allow proper comparisons for arrays, including <literal>ORDER
 
4059
     BY</literal> and <literal>DISTINCT</literal> support
 
4060
     (Joe)
 
4061
    </para>
 
4062
   </listitem>
 
4063
 
 
4064
   <listitem><para>Allow indexes on array columns (Joe)</para></listitem>
 
4065
   <listitem><para>Allow array concatenation with <literal>||</literal> (Joe)</para></listitem>
 
4066
 
 
4067
   <listitem>
 
4068
    <para>
 
4069
     Allow <literal>WHERE</literal> qualification
 
4070
     <literal><replaceable>expr</> <replaceable>op</> ANY/SOME/ALL
 
4071
     (<replaceable>array_expr</>)</literal> (Joe)
 
4072
    </para>
 
4073
    <para>
 
4074
     This allows arrays to behave like a list of values, for purposes
 
4075
     like <literal>SELECT * FROM tab WHERE col IN
 
4076
     (array_val)</literal>.
 
4077
    </para>
 
4078
   </listitem>
 
4079
 
 
4080
   <listitem>
 
4081
    <para>
 
4082
     New array functions <function>array_append</>,
 
4083
     <function>array_cat</>, <function>array_lower</>,
 
4084
     <function>array_prepend</>, <function>array_to_string</>,
 
4085
     <function>array_upper</>, <function>string_to_array</> (Joe)
 
4086
    </para>
 
4087
   </listitem>
 
4088
 
 
4089
   <listitem><para>Allow user defined aggregates to use polymorphic functions (Joe)</para></listitem>
 
4090
   <listitem><para>Allow assignments to empty arrays (Joe)</para></listitem>
 
4091
 
 
4092
   <listitem>
 
4093
    <para>
 
4094
     Allow 60 in seconds fields of <type>time</type>,
 
4095
     <type>timestamp</type>, and <type>interval</type> input values
 
4096
     (Tom)
 
4097
    </para>
 
4098
    <para>
 
4099
     Sixty-second values are needed for leap seconds.
 
4100
    </para>
 
4101
   </listitem>
 
4102
 
 
4103
   <listitem><para>Allow <type>cidr</type> data type to be cast to <type>text</type> (Tom)</para></listitem>
 
4104
 
 
4105
   <listitem><para>Disallow invalid time zone names in SET TIMEZONE</para></listitem>
 
4106
 
 
4107
   <listitem>
 
4108
    <para>
 
4109
     Trim trailing spaces when <type>char</type> is cast to
 
4110
     <type>varchar</> or <type>text</> (Tom)
 
4111
    </para>
 
4112
   </listitem>
 
4113
 
 
4114
   <listitem>
 
4115
    <para>
 
4116
     Make <type>float(<replaceable>p</>)</> measure the precision
 
4117
     <replaceable>p</> in binary digits, not decimal digits
 
4118
     (Tom)
 
4119
    </para>
 
4120
   </listitem>
 
4121
 
 
4122
   <listitem>
 
4123
    <para>Add IPv6 support to the <type>inet</type> and <type>cidr</type> data types (Michael Graff)</para>
 
4124
   </listitem>
 
4125
 
 
4126
   <listitem>
 
4127
    <para>Add <function>family()</function> function to report whether address is IPv4 or IPv6 (Michael Graff)</para>
 
4128
   </listitem>
 
4129
 
 
4130
   <listitem>
 
4131
    <para>
 
4132
     Have <literal>SHOW datestyle</literal> generate output similar
 
4133
     to that used by <literal>SET datestyle</literal> (Tom)
 
4134
    </para>
 
4135
   </listitem>
 
4136
 
 
4137
   <listitem>
 
4138
    <para>
 
4139
     Make <literal>EXTRACT(TIMEZONE)</literal> and <literal>SET/SHOW
 
4140
     TIME ZONE</literal> follow the SQL convention for the sign of
 
4141
     time zone offsets, i.e., positive is east from UTC (Tom)
 
4142
    </para>
 
4143
   </listitem>
 
4144
 
 
4145
   <listitem>
 
4146
    <para>Fix <literal>date_trunc('quarter', ...)</literal> (B&ouml;jthe Zolt&aacute;n)</para>
 
4147
    <para>
 
4148
     Prior releases returned an incorrect value for this function call.
 
4149
    </para>
 
4150
   </listitem>
 
4151
 
 
4152
   <listitem>
 
4153
    <para>Make <function>initcap()</function> more compatible with Oracle (Mike Nolan)</para>
 
4154
    <para>
 
4155
     <function>initcap()</function> now uppercases a letter appearing
 
4156
     after any non-alphanumeric character, rather than only after
 
4157
     whitespace.
 
4158
    </para>
 
4159
   </listitem>
 
4160
 
 
4161
   <listitem>
 
4162
    <para>Allow only <varname>datestyle</varname> field order for date values not in ISO-8601 format (Greg)</para>
 
4163
   </listitem>
 
4164
 
 
4165
   <listitem>
 
4166
    <para>
 
4167
     Add new <varname>datestyle</varname> values <literal>MDY</>,
 
4168
     <literal>DMY</>, and <literal>YMD</> to set input field order;
 
4169
     honor <literal>US</> and <literal>European</> for backward
 
4170
     compatibility (Tom)
 
4171
    </para>
 
4172
   </listitem>
 
4173
 
 
4174
   <listitem>
 
4175
    <para>
 
4176
     String literals like <literal>'now'</literal> or
 
4177
     <literal>'today'</literal> will no longer work as a column
 
4178
     default. Use functions such as <function>now()</function>,
 
4179
     <function>current_timestamp</function> instead.  (change
 
4180
     required for prepared statements) (Tom)
 
4181
    </para>
 
4182
   </listitem>
 
4183
 
 
4184
   <listitem>
 
4185
    <para>Treat NaN as larger than any other value in <function>min()</>/<function>max()</> (Tom)</para>
 
4186
    <para>
 
4187
     NaN was already sorted after ordinary numeric values for most
 
4188
     purposes, but <function>min()</> and <function>max()</> didn't
 
4189
     get this right.
 
4190
    </para>
 
4191
   </listitem>
 
4192
 
 
4193
   <listitem>
 
4194
    <para>Prevent interval from suppressing <literal>:00</literal>
 
4195
    seconds display</para>
 
4196
   </listitem>
 
4197
 
 
4198
   <listitem>
 
4199
    <para>
 
4200
     New functions <function>pg_get_triggerdef(prettyprint)</function>
 
4201
     and <function>pg_conversion_is_visible()</function> (Christopher)
 
4202
    </para>
 
4203
   </listitem>
 
4204
 
 
4205
   <listitem>
 
4206
    <para>Allow time to be specified as <literal>040506</> or <literal>0405</> (Tom)</para>
 
4207
   </listitem>
 
4208
 
 
4209
   <listitem>
 
4210
    <para>
 
4211
     Input date order must now be <literal>YYYY-MM-DD</literal> (with 4-digit year) or
 
4212
     match <varname>datestyle</varname>
 
4213
    </para>
 
4214
   </listitem>
 
4215
 
 
4216
   <listitem>
 
4217
    <para>
 
4218
     Make <function>pg_get_constraintdef</function> support
 
4219
     unique, primary-key, and check constraints (Christopher)
 
4220
    </para>
 
4221
   </listitem>
 
4222
  </itemizedlist>
 
4223
 </sect3>
 
4224
 
 
4225
 <sect3>
 
4226
  <title>Server-Side Language Changes</title>
 
4227
 
 
4228
  <itemizedlist>
 
4229
   <listitem>
 
4230
    <para>
 
4231
     Prevent PL/pgSQL crash when <literal>RETURN NEXT</literal> is
 
4232
     used on a zero-row record variable (Tom)
 
4233
    </para>
 
4234
   </listitem>
 
4235
 
 
4236
   <listitem>
 
4237
    <para>
 
4238
     Make PL/Python's <function>spi_execute</function> interface
 
4239
     handle null values properly (Andrew Bosma)
 
4240
    </para>
 
4241
   </listitem>
 
4242
 
 
4243
   <listitem>
 
4244
    <para>Allow PL/pgSQL to declare variables of composite types without <literal>%ROWTYPE</literal> (Tom)</para>
 
4245
   </listitem>
 
4246
 
 
4247
   <listitem>
 
4248
    <para>Fix PL/Python's <function>_quote()</function> function to handle big integers</para>
 
4249
   </listitem>
 
4250
 
 
4251
   <listitem>
 
4252
    <para>Make PL/Python an untrusted language, now called <literal>plpythonu</literal> (Kevin Jacobs, Tom)</para>
 
4253
    <para>
 
4254
     The Python language no longer supports a restricted execution
 
4255
     environment, so the trusted version of PL/Python was removed. If
 
4256
     this situation changes, a version of PL/Python that can be used
 
4257
     by non-superusers will be readded.
 
4258
    </para>
 
4259
   </listitem>
 
4260
 
 
4261
   <listitem>
 
4262
    <para>Allow polymorphic PL/pgSQL functions (Joe, Tom)</para>
 
4263
   </listitem>
 
4264
 
 
4265
   <listitem>
 
4266
    <para>Allow polymorphic SQL functions (Joe)</para>
 
4267
   </listitem>
 
4268
 
 
4269
   <listitem>
 
4270
    <para>
 
4271
     Improved compiled function caching mechanism in PL/pgSQL with
 
4272
     full support for polymorphism (Joe)
 
4273
    </para>
 
4274
   </listitem>
 
4275
 
 
4276
   <listitem>
 
4277
    <para>
 
4278
     Add new parameter <literal>$0</> in PL/pgSQL representing the
 
4279
     function's actual return type (Joe)
 
4280
    </para>
 
4281
   </listitem>
 
4282
 
 
4283
   <listitem>
 
4284
    <para>
 
4285
     Allow PL/Tcl and PL/Python to use the same trigger on multiple tables (Tom)
 
4286
    </para>
 
4287
   </listitem>
 
4288
 
 
4289
   <listitem>
 
4290
    <para>
 
4291
     Fixed PL/Tcl's <function>spi_prepare</function> to accept fully
 
4292
     qualified type names in the parameter type list
 
4293
     (Jan)
 
4294
    </para>
 
4295
   </listitem>
 
4296
  </itemizedlist>
 
4297
 </sect3>
 
4298
 
 
4299
 <sect3>
 
4300
  <title>psql Changes</title>
 
4301
 
 
4302
  <itemizedlist>
 
4303
   <listitem>
 
4304
    <para>Add <literal>\pset pager always</literal> to always use pager (Greg)</para>
 
4305
    <para>
 
4306
     This forces the pager to be used even if the number of rows is
 
4307
     less than the screen height.  This is valuable for rows that
 
4308
     wrap across several screen rows.
 
4309
    </para>
 
4310
   </listitem>
 
4311
 
 
4312
   <listitem><para>Improve tab completion (Rod, Ross Reedstrom, Ian Barwick)</para></listitem>
 
4313
   <listitem><para>Reorder <literal>\?</> help into groupings (Harald Armin Massa, Bruce)</para></listitem>
 
4314
   <listitem><para>Add backslash commands for listing schemas, casts, and conversions (Christopher)</para></listitem>
 
4315
 
 
4316
   <listitem>
 
4317
    <para>
 
4318
     <command>\encoding</> now changes based on the server parameter
 
4319
     <varname>client_encoding</varname> (Tom)
 
4320
    </para>
 
4321
    <para>
 
4322
     In previous versions, <command>\encoding</command> was not aware
 
4323
     of encoding changes made using <literal>SET
 
4324
     client_encoding</literal>.
 
4325
    </para>
 
4326
   </listitem>
 
4327
 
 
4328
   <listitem>
 
4329
    <para>Save editor buffer into readline history (Ross)</para>
 
4330
    <para>
 
4331
     When <command>\e</> is used to edit a query, the result is saved
 
4332
     in the readline history for retrieval using the up arrow.
 
4333
    </para>
 
4334
   </listitem>
 
4335
 
 
4336
   <listitem><para>Improve <command>\d</command> display (Christopher)</para></listitem>
 
4337
   <listitem><para>Enhance HTML mode to be more standards-conforming (Greg)</para></listitem>
 
4338
 
 
4339
   <listitem>
 
4340
    <para>New <command>\set AUTOCOMMIT off</command> capability (Tom)</para>
 
4341
    <para>
 
4342
     This takes the place of the removed server parameter <varname>autocommit</varname>.
 
4343
    </para>
 
4344
   </listitem>
 
4345
 
 
4346
   <listitem>
 
4347
    <para>New <command>\set VERBOSITY</command> to control error detail (Tom)</para>
 
4348
    <para>
 
4349
     This controls the new error reporting details.
 
4350
    </para>
 
4351
   </listitem>
 
4352
 
 
4353
   <listitem><para>New prompt escape sequence <literal>%x</literal> to show transaction status (Tom)</para></listitem>
 
4354
   <listitem><para>Long options for <application>psql</application> are now available on all platforms</para></listitem>
 
4355
  </itemizedlist>
 
4356
 </sect3>
 
4357
 
 
4358
 <sect3>
 
4359
  <title>pg_dump Changes</title>
 
4360
 
 
4361
  <itemizedlist>
 
4362
   <listitem><para>Multiple pg_dump fixes, including tar format and large objects</para></listitem>
 
4363
   <listitem><para>Allow pg_dump to dump specific schemas (Neil)</para></listitem>
 
4364
 
 
4365
   <listitem>
 
4366
    <para>Make pg_dump preserve column storage characteristics (Christopher)</para>
 
4367
    <para>
 
4368
     This preserves <literal>ALTER TABLE ... SET STORAGE</literal> information.
 
4369
    </para>
 
4370
   </listitem>
 
4371
 
 
4372
   <listitem><para>Make pg_dump preserve <command>CLUSTER</command> characteristics (Christopher)</para></listitem>
 
4373
 
 
4374
   <listitem>
 
4375
    <para>
 
4376
     Have pg_dumpall use <command>GRANT</>/<command>REVOKE</> to dump database-level privileges (Tom)
 
4377
    </para>
 
4378
   </listitem>
 
4379
 
 
4380
   <listitem>
 
4381
    <para>
 
4382
     Allow pg_dumpall to support the options <option>-a</>,
 
4383
     <option>-s</>, <option>-x</> of pg_dump (Tom)
 
4384
    </para>
 
4385
   </listitem>
 
4386
 
 
4387
   <listitem><para>Prevent pg_dump from lowercasing identifiers specified on the command line (Tom)</para></listitem>
 
4388
 
 
4389
   <listitem>
 
4390
    <para>
 
4391
     pg_dump options <option>--use-set-session-authorization</option>
 
4392
     and <option>--no-reconnect</option> now do nothing, all dumps
 
4393
     use <command>SET SESSION AUTHORIZATION</command>
 
4394
    </para>
 
4395
    <para>
 
4396
     pg_dump no longer reconnects to switch users, but instead always
 
4397
     uses <command>SET SESSION AUTHORIZATION</command>. This will
 
4398
     reduce password prompting during restores.
 
4399
    </para>
 
4400
   </listitem>
 
4401
 
 
4402
   <listitem>
 
4403
    <para>Long options for <application>pg_dump</application> are now available on all platforms</para>
 
4404
    <para>
 
4405
     <productname>PostgreSQL</productname> now includes its own
 
4406
     long-option processing routines.
 
4407
    </para>
 
4408
   </listitem>
 
4409
  </itemizedlist>
 
4410
 </sect3>
 
4411
 
 
4412
 <sect3>
 
4413
  <title>libpq Changes</title>
 
4414
 
 
4415
  <itemizedlist>
 
4416
   <listitem>
 
4417
    <para>
 
4418
     Add function <function>PQfreemem</function> for freeing memory on
 
4419
     Windows, suggested for <command>NOTIFY</command> (Bruce)
 
4420
    </para>
 
4421
    <para>
 
4422
     Windows requires that memory allocated in a library be freed by
 
4423
     a function in the same library, hence
 
4424
     <function>free()</function> doesn't work for freeing memory
 
4425
     allocated by libpq. <function>PQfreemem</function> is the proper
 
4426
     way to free libpq memory, especially on Windows, and is
 
4427
     recommended for other platforms as well.
 
4428
    </para>
 
4429
   </listitem>
 
4430
 
 
4431
   <listitem>
 
4432
    <para>Document service capability, and add sample file (Bruce)</para>
 
4433
    <para>
 
4434
     This allows clients to look up connection information in a
 
4435
     central file on the client machine.
 
4436
    </para>
 
4437
   </listitem>
 
4438
 
 
4439
   <listitem>
 
4440
    <para>
 
4441
     Make <function>PQsetdbLogin</function> have the same defaults as
 
4442
     <function>PQconnectdb</function> (Tom)
 
4443
    </para>
 
4444
   </listitem>
 
4445
 
 
4446
   <listitem><para>Allow libpq to cleanly fail when result sets are too large (Tom)</para></listitem>
 
4447
 
 
4448
   <listitem>
 
4449
    <para>
 
4450
     Improve performance of function <function>PQunescapeBytea</function> (Ben Lamb)
 
4451
    </para>
 
4452
   </listitem>
 
4453
 
 
4454
   <listitem>
 
4455
    <para>
 
4456
     Allow thread-safe libpq with <filename>configure</filename>
 
4457
     option <option>--enable-thread-safety</option> (Lee Kindness,
 
4458
     Philip Yarra)
 
4459
    </para>
 
4460
   </listitem>
 
4461
 
 
4462
   <listitem>
 
4463
    <para>
 
4464
     Allow function <function>pqInternalNotice</function> to accept a
 
4465
     format string and arguments instead of just a preformatted
 
4466
     message (Tom, Sean Chittenden)
 
4467
    </para>
 
4468
   </listitem>
 
4469
 
 
4470
   <listitem>
 
4471
    <para>
 
4472
     Control SSL negotiation with <literal>sslmode</literal> values
 
4473
     <literal>disable</literal>, <literal>allow</literal>,
 
4474
     <literal>prefer</literal>, and <literal>require</literal> (Jon
 
4475
     Jensen)
 
4476
    </para>
 
4477
   </listitem>
 
4478
 
 
4479
   <listitem>
 
4480
    <para>Allow new error codes and levels of text (Tom)</para>
 
4481
   </listitem>
 
4482
 
 
4483
   <listitem>
 
4484
    <para>Allow access to the underlying table and column of a query result (Tom)</para>
 
4485
    <para>
 
4486
     This is helpful for query-builder applications that want to know
 
4487
     the underlying table and column names associated with a specific
 
4488
     result set.
 
4489
    </para>
 
4490
   </listitem>
 
4491
 
 
4492
   <listitem><para>Allow access to the current transaction status (Tom)</para></listitem>
 
4493
   <listitem><para>Add ability to pass binary data directly to the server (Tom)</para></listitem>
 
4494
 
 
4495
   <listitem>
 
4496
    <para>
 
4497
     Add function <function>PQexecPrepared</function> and
 
4498
     <function>PQsendQueryPrepared</function> functions which perform
 
4499
     bind/execute of previously prepared statements (Tom)
 
4500
     </para>
 
4501
    </listitem>
 
4502
  </itemizedlist>
 
4503
 </sect3>
 
4504
 
 
4505
 <sect3>
 
4506
  <title>JDBC Changes</title>
 
4507
 
 
4508
  <itemizedlist>
 
4509
   <listitem><para>Allow <function>setNull</function> on updateable result sets</para></listitem>
 
4510
   <listitem><para>Allow <function>executeBatch</function> on a prepared statement (Barry)</para></listitem>
 
4511
   <listitem><para>Support SSL connections (Barry)</para></listitem>
 
4512
   <listitem><para>Handle schema names in result sets (Paul Sorenson)</para></listitem>
 
4513
   <listitem><para>Add refcursor support (Nic Ferrier)</para></listitem>
 
4514
  </itemizedlist>
 
4515
 </sect3>
 
4516
 
 
4517
 <sect3>
 
4518
  <title>Miscellaneous Interface Changes</title>
 
4519
 
 
4520
  <itemizedlist>
 
4521
   <listitem>
 
4522
    <para>Prevent possible memory leak or core dump during libpgtcl shutdown (Tom)</para>
 
4523
   </listitem>
 
4524
   <listitem>
 
4525
    <para>Add Informix compatibility to ECPG (Michael)</para>
 
4526
    <para>
 
4527
     This allows ECPG to process embedded C programs that were
 
4528
     written using certain Informix extensions.
 
4529
    </para>
 
4530
   </listitem>
 
4531
 
 
4532
   <listitem>
 
4533
    <para>Add type <type>decimal</type> to ECPG that is fixed length, for Informix (Michael)</para>
 
4534
   </listitem>
 
4535
 
 
4536
   <listitem>
 
4537
    <para>
 
4538
     Allow thread-safe embedded SQL programs with
 
4539
     <filename>configure</filename> option
 
4540
     <option>--enable-thread-safety</option> (Lee Kindness, Bruce)
 
4541
    </para>
 
4542
    <para>
 
4543
     This allows multiple threads to access the database at the same
 
4544
     time.
 
4545
    </para>
 
4546
   </listitem>
 
4547
 
 
4548
   <listitem>
 
4549
    <para>Moved Python client PyGreSQL to <ulink url="http://www.pygresql.org"></ulink> (Marc)</para>
 
4550
   </listitem>
 
4551
  </itemizedlist>
 
4552
 </sect3>
 
4553
 
 
4554
 <sect3>
 
4555
  <title>Source Code Changes</title>
 
4556
 
 
4557
  <itemizedlist>
 
4558
   <listitem><para>Prevent need for separate platform geometry regression result files (Tom)</para></listitem>
 
4559
   <listitem><para>Improved PPC locking primitive (Reinhard Max)</para></listitem>
 
4560
   <listitem><para>New function <function>palloc0</function> to allocate and clear memory (Bruce)</para></listitem>
 
4561
   <listitem><para>Fix locking code for s390x CPU (64-bit) (Tom)</para></listitem>
 
4562
   <listitem><para>Allow OpenBSD to use local ident credentials (William Ahern)</para></listitem>
 
4563
   <listitem><para>Make query plan trees read-only to executor (Tom)</para></listitem>
 
4564
   <listitem><para>Add Darwin startup scripts (David Wheeler)</para></listitem>
 
4565
   <listitem><para>Allow libpq to compile with Borland C++ compiler (Lester Godwin, Karl Waclawek)</para></listitem>
 
4566
   <listitem><para>Use our own version of <function>getopt_long()</function> if needed (Peter)</para></listitem>
 
4567
   <listitem><para>Convert administration scripts to C (Peter)</para></listitem>
 
4568
   <listitem><para> Bison &gt;= 1.85 is now required to build the <productname>PostgreSQL</> grammar, if building from CVS</para></listitem>
 
4569
   <listitem><para>Merge documentation into one book (Peter)</para></listitem>
 
4570
   <listitem><para>Add Windows compatibility functions (Bruce)</para></listitem>
 
4571
   <listitem><para>Allow client interfaces to compile under MinGW (Bruce)</para></listitem>
 
4572
   <listitem><para>New <function>ereport()</function> function for error reporting (Tom)</para></listitem>
 
4573
   <listitem><para>Support Intel compiler on Linux (Peter)</para></listitem>
 
4574
   <listitem><para>Improve Linux startup scripts (Slawomir Sudnik, Darko Prenosil)</para></listitem>
 
4575
   <listitem><para>Add support for AMD Opteron and Itanium (Jeffrey W. Baker, Bruce)</para></listitem>
 
4576
   <listitem>
 
4577
    <para>Remove <option>--enable-recode</option> option from <command>configure</command></para>
 
4578
    <para>
 
4579
     This was no longer needed now that we have <command>CREATE CONVERSION</command>.
 
4580
    </para>
 
4581
   </listitem>
 
4582
   <listitem>
 
4583
    <para>Generate a compile error if spinlock code is not found (Bruce)</para>
 
4584
    <para>
 
4585
     Platforms without spinlock code will now fail to compile, rather
 
4586
     than silently using semaphores. This failure can be disabled
 
4587
     with a new <command>configure</command> option.
 
4588
    </para>
 
4589
   </listitem>
 
4590
  </itemizedlist>
 
4591
 </sect3>
 
4592
 
 
4593
 <sect3>
 
4594
  <title>Contrib Changes</title>
 
4595
 
 
4596
  <itemizedlist>
 
4597
   <listitem><para>Change dbmirror license to BSD</para></listitem>
 
4598
   <listitem><para>Improve earthdistance (Bruno Wolff III)</para></listitem>
 
4599
   <listitem><para>Portability improvements to pgcrypto (Marko Kreen)</para></listitem>
 
4600
   <listitem><para>Prevent crash in xml (John Gray, Michael Richards)</para></listitem>
 
4601
   <listitem><para>Update oracle</para></listitem>
 
4602
   <listitem><para>Update mysql</para></listitem>
 
4603
   <listitem><para>Update cube (Bruno Wolff III)</para></listitem>
 
4604
   <listitem><para>Update earthdistance to use cube (Bruno Wolff III)</para></listitem>
 
4605
   <listitem><para>Update btree_gist (Oleg)</para></listitem>
 
4606
   <listitem><para>New tsearch2 full-text search module (Oleg, Teodor)</para></listitem>
 
4607
   <listitem><para>Add hash-based crosstab function to tablefuncs (Joe)</para></listitem>
 
4608
   <listitem><para>Add serial column to order <function>connectby()</> siblings in tablefuncs (Nabil Sayegh,Joe)</para></listitem>
 
4609
   <listitem><para>Add named persistent connections to dblink (Shridhar Daithanka)</para></listitem>
 
4610
   <listitem><para>New pg_autovacuum allows automatic <command>VACUUM</command> (Matthew T. O'Connor)</para></listitem>
 
4611
   <listitem><para>Make pgbench honor environment variables <envar>PGHOST</>, <envar>PGPORT</>, <envar>PGUSER</> (Tatsuo)</para></listitem>
 
4612
   <listitem><para>Improve intarray (Teodor Sigaev)</para></listitem>
 
4613
   <listitem><para>Improve pgstattuple (Rod)</para></listitem>
 
4614
   <listitem><para>Fix bug in <function>metaphone()</function> in fuzzystrmatch</para></listitem>
 
4615
   <listitem><para>Improve adddepend (Rod)</para></listitem>
 
4616
   <listitem><para>Update spi/timetravel (B&ouml;jthe Zolt&aacute;n)</para></listitem>
 
4617
   <listitem><para>Fix dbase <option>-s</> option and improve non-ASCII handling (Thomas Behr, M&aacute;rcio Smiderle)</para></listitem>
 
4618
   <listitem><para>Remove array module because features now included by default (Joe)</para></listitem>
 
4619
  </itemizedlist>
 
4620
 </sect3>
 
4621
 </sect2>
 
4622
</sect1>