~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!-- doc/src/sgml/release-8.1.sgml -->
 
2
<!-- See header comment in release.sgml about typical markup -->
 
3
 
 
4
 <sect1 id="release-8-1-23">
 
5
  <title>Release 8.1.23</title>
 
6
 
 
7
  <note>
 
8
  <title>Release Date</title>
 
9
  <simpara>2010-12-16</simpara>
 
10
  </note>
 
11
 
 
12
  <para>
 
13
   This release contains a variety of fixes from 8.1.22.
 
14
   For information about new features in the 8.1 major release, see
 
15
   <xref linkend="release-8-1">.
 
16
  </para>
 
17
 
 
18
  <para>
 
19
   This is expected to be the last <productname>PostgreSQL</> release
 
20
   in the 8.1.X series.  Users are encouraged to update to a newer
 
21
   release branch soon.
 
22
  </para>
 
23
 
 
24
  <sect2>
 
25
   <title>Migration to Version 8.1.23</title>
 
26
 
 
27
   <para>
 
28
    A dump/restore is not required for those running 8.1.X.
 
29
    However, if you are upgrading from a version earlier than 8.1.18,
 
30
    see the release notes for 8.1.18.
 
31
   </para>
 
32
 
 
33
  </sect2>
 
34
 
 
35
  <sect2>
 
36
   <title>Changes</title>
 
37
 
 
38
   <itemizedlist>
 
39
 
 
40
    <listitem>
 
41
     <para>
 
42
      Force the default
 
43
      <link linkend="guc-wal-sync-method"><varname>wal_sync_method</></link>
 
44
      to be <literal>fdatasync</> on Linux (Tom Lane, Marti Raudsepp)
 
45
     </para>
 
46
 
 
47
     <para>
 
48
      The default on Linux has actually been <literal>fdatasync</> for many
 
49
      years, but recent kernel changes caused <productname>PostgreSQL</> to
 
50
      choose <literal>open_datasync</> instead.  This choice did not result
 
51
      in any performance improvement, and caused outright failures on
 
52
      certain filesystems, notably <literal>ext4</> with the
 
53
      <literal>data=journal</> mount option.
 
54
     </para>
 
55
    </listitem>
 
56
 
 
57
    <listitem>
 
58
     <para>
 
59
      Fix recovery from base backup when the starting checkpoint WAL record
 
60
      is not in the same WAL segment as its redo point (Jeff Davis)
 
61
     </para>
 
62
    </listitem>
 
63
 
 
64
    <listitem>
 
65
     <para>
 
66
      Add support for detecting register-stack overrun on <literal>IA64</>
 
67
      (Tom Lane)
 
68
     </para>
 
69
 
 
70
     <para>
 
71
      The <literal>IA64</> architecture has two hardware stacks.  Full
 
72
      prevention of stack-overrun failures requires checking both.
 
73
     </para>
 
74
    </listitem>
 
75
 
 
76
    <listitem>
 
77
     <para>
 
78
      Add a check for stack overflow in <function>copyObject()</> (Tom Lane)
 
79
     </para>
 
80
 
 
81
     <para>
 
82
      Certain code paths could crash due to stack overflow given a
 
83
      sufficiently complex query.
 
84
     </para>
 
85
    </listitem>
 
86
 
 
87
    <listitem>
 
88
     <para>
 
89
      Fix detection of page splits in temporary GiST indexes (Heikki
 
90
      Linnakangas)
 
91
     </para>
 
92
 
 
93
     <para>
 
94
      It is possible to have a <quote>concurrent</> page split in a
 
95
      temporary index, if for example there is an open cursor scanning the
 
96
      index when an insertion is done.  GiST failed to detect this case and
 
97
      hence could deliver wrong results when execution of the cursor
 
98
      continued.
 
99
     </para>
 
100
    </listitem>
 
101
 
 
102
    <listitem>
 
103
     <para>
 
104
      Avoid memory leakage while <command>ANALYZE</>'ing complex index
 
105
      expressions (Tom Lane)
 
106
     </para>
 
107
    </listitem>
 
108
 
 
109
    <listitem>
 
110
     <para>
 
111
      Ensure an index that uses a whole-row Var still depends on its table
 
112
      (Tom Lane)
 
113
     </para>
 
114
 
 
115
     <para>
 
116
      An index declared like <literal>create index i on t (foo(t.*))</>
 
117
      would not automatically get dropped when its table was dropped.
 
118
     </para>
 
119
    </listitem>
 
120
 
 
121
    <listitem>
 
122
     <para>
 
123
      Do not <quote>inline</> a SQL function with multiple <literal>OUT</>
 
124
      parameters (Tom Lane)
 
125
     </para>
 
126
 
 
127
     <para>
 
128
      This avoids a possible crash due to loss of information about the
 
129
      expected result rowtype.
 
130
     </para>
 
131
    </listitem>
 
132
 
 
133
    <listitem>
 
134
     <para>
 
135
      Fix constant-folding of <literal>COALESCE()</> expressions (Tom Lane)
 
136
     </para>
 
137
 
 
138
     <para>
 
139
      The planner would sometimes attempt to evaluate sub-expressions that
 
140
      in fact could never be reached, possibly leading to unexpected errors.
 
141
     </para>
 
142
    </listitem>
 
143
 
 
144
    <listitem>
 
145
     <para>
 
146
      Add print functionality for <structname>InhRelation</> nodes (Tom Lane)
 
147
     </para>
 
148
 
 
149
     <para>
 
150
      This avoids a failure when <varname>debug_print_parse</> is enabled
 
151
      and certain types of query are executed.
 
152
     </para>
 
153
    </listitem>
 
154
 
 
155
    <listitem>
 
156
     <para>
 
157
      Fix incorrect calculation of distance from a point to a horizontal
 
158
      line segment (Tom Lane)
 
159
     </para>
 
160
 
 
161
     <para>
 
162
      This bug affected several different geometric distance-measurement
 
163
      operators.
 
164
     </para>
 
165
    </listitem>
 
166
 
 
167
    <listitem>
 
168
     <para>
 
169
      Fix <application>PL/pgSQL</>'s handling of <quote>simple</>
 
170
      expressions to not fail in recursion or error-recovery cases (Tom Lane)
 
171
     </para>
 
172
    </listitem>
 
173
 
 
174
    <listitem>
 
175
     <para>
 
176
      Fix bug in <filename>contrib/cube</>'s GiST picksplit algorithm
 
177
      (Alexander Korotkov)
 
178
     </para>
 
179
 
 
180
     <para>
 
181
      This could result in considerable inefficiency, though not actually
 
182
      incorrect answers, in a GiST index on a <type>cube</> column.
 
183
      If you have such an index, consider <command>REINDEX</>ing it after
 
184
      installing this update.
 
185
     </para>
 
186
    </listitem>
 
187
 
 
188
    <listitem>
 
189
     <para>
 
190
      Don't emit <quote>identifier will be truncated</> notices in
 
191
      <filename>contrib/dblink</> except when creating new connections
 
192
      (Itagaki Takahiro)
 
193
     </para>
 
194
    </listitem>
 
195
 
 
196
    <listitem>
 
197
     <para>
 
198
      Fix potential coredump on missing public key in
 
199
      <filename>contrib/pgcrypto</> (Marti Raudsepp)
 
200
     </para>
 
201
    </listitem>
 
202
 
 
203
    <listitem>
 
204
     <para>
 
205
      Fix memory leak in <filename>contrib/xml2</>'s XPath query functions
 
206
      (Tom Lane)
 
207
     </para>
 
208
    </listitem>
 
209
 
 
210
    <listitem>
 
211
     <para>
 
212
      Update time zone data files to <application>tzdata</> release 2010o
 
213
      for DST law changes in Fiji and Samoa;
 
214
      also historical corrections for Hong Kong.
 
215
     </para>
 
216
    </listitem>
 
217
 
 
218
   </itemizedlist>
 
219
 
 
220
  </sect2>
 
221
 </sect1>
 
222
 
 
223
 <sect1 id="release-8-1-22">
 
224
  <title>Release 8.1.22</title>
 
225
 
 
226
  <note>
 
227
  <title>Release Date</title>
 
228
  <simpara>2010-10-04</simpara>
 
229
  </note>
 
230
 
 
231
  <para>
 
232
   This release contains a variety of fixes from 8.1.21.
 
233
   For information about new features in the 8.1 major release, see
 
234
   <xref linkend="release-8-1">.
 
235
  </para>
 
236
 
 
237
  <para>
 
238
   The <productname>PostgreSQL</> community will stop releasing updates
 
239
   for the 8.1.X release series in November 2010.
 
240
   Users are encouraged to update to a newer release branch soon.
 
241
  </para>
 
242
 
 
243
  <sect2>
 
244
   <title>Migration to Version 8.1.22</title>
 
245
 
 
246
   <para>
 
247
    A dump/restore is not required for those running 8.1.X.
 
248
    However, if you are upgrading from a version earlier than 8.1.18,
 
249
    see the release notes for 8.1.18.
 
250
   </para>
 
251
 
 
252
  </sect2>
 
253
 
 
254
  <sect2>
 
255
   <title>Changes</title>
 
256
 
 
257
   <itemizedlist>
 
258
 
 
259
    <listitem>
 
260
     <para>
 
261
      Use a separate interpreter for each calling SQL userid in PL/Perl and
 
262
      PL/Tcl (Tom Lane)
 
263
     </para>
 
264
 
 
265
     <para>
 
266
      This change prevents security problems that can be caused by subverting
 
267
      Perl or Tcl code that will be executed later in the same session under
 
268
      another SQL user identity (for example, within a <literal>SECURITY
 
269
      DEFINER</> function).  Most scripting languages offer numerous ways that
 
270
      that might be done, such as redefining standard functions or operators
 
271
      called by the target function.  Without this change, any SQL user with
 
272
      Perl or Tcl language usage rights can do essentially anything with the
 
273
      SQL privileges of the target function's owner.
 
274
     </para>
 
275
 
 
276
     <para>
 
277
      The cost of this change is that intentional communication among Perl
 
278
      and Tcl functions becomes more difficult.  To provide an escape hatch,
 
279
      PL/PerlU and PL/TclU functions continue to use only one interpreter
 
280
      per session.  This is not considered a security issue since all such
 
281
      functions execute at the trust level of a database superuser already.
 
282
     </para>
 
283
 
 
284
     <para>
 
285
      It is likely that third-party procedural languages that claim to offer
 
286
      trusted execution have similar security issues.  We advise contacting
 
287
      the authors of any PL you are depending on for security-critical
 
288
      purposes.
 
289
     </para>
 
290
 
 
291
     <para>
 
292
      Our thanks to Tim Bunce for pointing out this issue (CVE-2010-3433).
 
293
     </para>
 
294
    </listitem>
 
295
 
 
296
    <listitem>
 
297
     <para>
 
298
      Prevent possible crashes in <function>pg_get_expr()</> by disallowing
 
299
      it from being called with an argument that is not one of the system
 
300
      catalog columns it's intended to be used with
 
301
      (Heikki Linnakangas, Tom Lane)
 
302
     </para>
 
303
    </listitem>
 
304
 
 
305
    <listitem>
 
306
     <para>
 
307
      Fix <quote>cannot handle unplanned sub-select</quote> error (Tom Lane)
 
308
     </para>
 
309
 
 
310
     <para>
 
311
      This occurred when a sub-select contains a join alias reference that
 
312
      expands into an expression containing another sub-select.
 
313
     </para>
 
314
    </listitem>
 
315
 
 
316
    <listitem>
 
317
     <para>
 
318
      Prevent show_session_authorization() from crashing within autovacuum
 
319
      processes (Tom Lane)
 
320
     </para>
 
321
    </listitem>
 
322
 
 
323
    <listitem>
 
324
     <para>
 
325
      Defend against functions returning setof record where not all the
 
326
      returned rows are actually of the same rowtype (Tom Lane)
 
327
     </para>
 
328
    </listitem>
 
329
 
 
330
    <listitem>
 
331
     <para>
 
332
      Fix possible failure when hashing a pass-by-reference function result
 
333
      (Tao Ma, Tom Lane)
 
334
     </para>
 
335
    </listitem>
 
336
 
 
337
    <listitem>
 
338
     <para>
 
339
      Take care to fsync the contents of lockfiles (both
 
340
      <filename>postmaster.pid</> and the socket lockfile) while writing them
 
341
      (Tom Lane)
 
342
     </para>
 
343
 
 
344
     <para>
 
345
      This omission could result in corrupted lockfile contents if the
 
346
      machine crashes shortly after postmaster start.  That could in turn
 
347
      prevent subsequent attempts to start the postmaster from succeeding,
 
348
      until the lockfile is manually removed.
 
349
     </para>
 
350
    </listitem>
 
351
 
 
352
    <listitem>
 
353
     <para>
 
354
      Avoid recursion while assigning XIDs to heavily-nested
 
355
      subtransactions (Andres Freund, Robert Haas)
 
356
     </para>
 
357
 
 
358
     <para>
 
359
      The original coding could result in a crash if there was limited
 
360
      stack space.
 
361
     </para>
 
362
    </listitem>
 
363
 
 
364
    <listitem>
 
365
     <para>
 
366
      Fix <varname>log_line_prefix</>'s <literal>%i</> escape,
 
367
      which could produce junk early in backend startup (Tom Lane)
 
368
     </para>
 
369
    </listitem>
 
370
 
 
371
    <listitem>
 
372
     <para>
 
373
      Fix possible data corruption in <command>ALTER TABLE ... SET
 
374
      TABLESPACE</> when archiving is enabled (Jeff Davis)
 
375
     </para>
 
376
    </listitem>
 
377
 
 
378
    <listitem>
 
379
     <para>
 
380
      Allow <command>CREATE DATABASE</> and <command>ALTER DATABASE ... SET
 
381
      TABLESPACE</> to be interrupted by query-cancel (Guillaume Lelarge)
 
382
     </para>
 
383
    </listitem>
 
384
 
 
385
    <listitem>
 
386
     <para>
 
387
      In PL/Python, defend against null pointer results from
 
388
      <function>PyCObject_AsVoidPtr</> and <function>PyCObject_FromVoidPtr</>
 
389
      (Peter Eisentraut)
 
390
     </para>
 
391
    </listitem>
 
392
 
 
393
    <listitem>
 
394
     <para>
 
395
      Improve <filename>contrib/dblink</>'s handling of tables containing
 
396
      dropped columns (Tom Lane)
 
397
     </para>
 
398
    </listitem>
 
399
 
 
400
    <listitem>
 
401
     <para>
 
402
      Fix connection leak after <quote>duplicate connection name</quote>
 
403
      errors in <filename>contrib/dblink</> (Itagaki Takahiro)
 
404
     </para>
 
405
    </listitem>
 
406
 
 
407
    <listitem>
 
408
     <para>
 
409
      Fix <filename>contrib/dblink</> to handle connection names longer than
 
410
      62 bytes correctly (Itagaki Takahiro)
 
411
     </para>
 
412
    </listitem>
 
413
 
 
414
    <listitem>
 
415
     <para>
 
416
      Update build infrastructure and documentation to reflect the source code
 
417
      repository's move from CVS to Git (Magnus Hagander and others)
 
418
     </para>
 
419
    </listitem>
 
420
 
 
421
    <listitem>
 
422
     <para>
 
423
      Update time zone data files to <application>tzdata</> release 2010l
 
424
      for DST law changes in Egypt and Palestine; also historical corrections
 
425
      for Finland.
 
426
     </para>
 
427
 
 
428
     <para>
 
429
      This change also adds new names for two Micronesian timezones:
 
430
      Pacific/Chuuk is now preferred over Pacific/Truk (and the preferred
 
431
      abbreviation is CHUT not TRUT) and Pacific/Pohnpei is preferred over
 
432
      Pacific/Ponape.
 
433
     </para>
 
434
    </listitem>
 
435
 
 
436
   </itemizedlist>
 
437
 
 
438
  </sect2>
 
439
 </sect1>
 
440
 
 
441
 <sect1 id="release-8-1-21">
 
442
  <title>Release 8.1.21</title>
 
443
 
 
444
  <note>
 
445
  <title>Release Date</title>
 
446
  <simpara>2010-05-17</simpara>
 
447
  </note>
 
448
 
 
449
  <para>
 
450
   This release contains a variety of fixes from 8.1.20.
 
451
   For information about new features in the 8.1 major release, see
 
452
   <xref linkend="release-8-1">.
 
453
  </para>
 
454
 
 
455
  <sect2>
 
456
   <title>Migration to Version 8.1.21</title>
 
457
 
 
458
   <para>
 
459
    A dump/restore is not required for those running 8.1.X.
 
460
    However, if you are upgrading from a version earlier than 8.1.18,
 
461
    see the release notes for 8.1.18.
 
462
   </para>
 
463
 
 
464
  </sect2>
 
465
 
 
466
  <sect2>
 
467
   <title>Changes</title>
 
468
 
 
469
   <itemizedlist>
 
470
 
 
471
    <listitem>
 
472
     <para>
 
473
      Enforce restrictions in <literal>plperl</> using an opmask applied to
 
474
      the whole interpreter, instead of using <filename>Safe.pm</>
 
475
      (Tim Bunce, Andrew Dunstan)
 
476
     </para>
 
477
 
 
478
     <para>
 
479
      Recent developments have convinced us that <filename>Safe.pm</> is too
 
480
      insecure to rely on for making <literal>plperl</> trustable.  This
 
481
      change removes use of <filename>Safe.pm</> altogether, in favor of using
 
482
      a separate interpreter with an opcode mask that is always applied.
 
483
      Pleasant side effects of the change include that it is now possible to
 
484
      use Perl's <literal>strict</> pragma in a natural way in
 
485
      <literal>plperl</>, and that Perl's <literal>$a</> and <literal>$b</>
 
486
      variables work as expected in sort routines, and that function
 
487
      compilation is significantly faster.  (CVE-2010-1169)
 
488
     </para>
 
489
    </listitem>
 
490
 
 
491
    <listitem>
 
492
     <para>
 
493
      Prevent PL/Tcl from executing untrustworthy code from
 
494
      <structname>pltcl_modules</> (Tom)
 
495
     </para>
 
496
 
 
497
     <para>
 
498
      PL/Tcl's feature for autoloading Tcl code from a database table
 
499
      could be exploited for trojan-horse attacks, because there was no
 
500
      restriction on who could create or insert into that table.  This change
 
501
      disables the feature unless <structname>pltcl_modules</> is owned by a
 
502
      superuser.  (However, the permissions on the table are not checked, so
 
503
      installations that really need a less-than-secure modules table can
 
504
      still grant suitable privileges to trusted non-superusers.)  Also,
 
505
      prevent loading code into the unrestricted <quote>normal</> Tcl
 
506
      interpreter unless we are really going to execute a <literal>pltclu</>
 
507
      function.  (CVE-2010-1170)
 
508
     </para>
 
509
    </listitem>
 
510
 
 
511
    <listitem>
 
512
     <para>
 
513
      Do not allow an unprivileged user to reset superuser-only parameter
 
514
      settings (Alvaro)
 
515
     </para>
 
516
 
 
517
     <para>
 
518
      Previously, if an unprivileged user ran <literal>ALTER USER ... RESET
 
519
      ALL</> for himself, or <literal>ALTER DATABASE ... RESET ALL</> for
 
520
      a database he owns, this would remove all special parameter settings
 
521
      for the user or database, even ones that are only supposed to be
 
522
      changeable by a superuser.  Now, the <command>ALTER</> will only
 
523
      remove the parameters that the user has permission to change.
 
524
     </para>
 
525
    </listitem>
 
526
 
 
527
    <listitem>
 
528
     <para>
 
529
      Avoid possible crash during backend shutdown if shutdown occurs
 
530
      when a <literal>CONTEXT</> addition would be made to log entries (Tom)
 
531
     </para>
 
532
 
 
533
     <para>
 
534
      In some cases the context-printing function would fail because the
 
535
      current transaction had already been rolled back when it came time
 
536
      to print a log message.
 
537
     </para>
 
538
    </listitem>
 
539
 
 
540
    <listitem>
 
541
     <para>
 
542
      Update pl/perl's <filename>ppport.h</> for modern Perl versions
 
543
      (Andrew)
 
544
     </para>
 
545
    </listitem>
 
546
 
 
547
    <listitem>
 
548
     <para>
 
549
      Fix assorted memory leaks in pl/python (Andreas Freund, Tom)
 
550
     </para>
 
551
    </listitem>
 
552
 
 
553
    <listitem>
 
554
     <para>
 
555
      Prevent infinite recursion in <application>psql</> when expanding
 
556
      a variable that refers to itself (Tom)
 
557
     </para>
 
558
    </listitem>
 
559
 
 
560
    <listitem>
 
561
     <para>
 
562
      Ensure that <filename>contrib/pgstattuple</> functions respond to cancel
 
563
      interrupts promptly (Tatsuhito Kasahara)
 
564
     </para>
 
565
    </listitem>
 
566
 
 
567
    <listitem>
 
568
     <para>
 
569
      Make server startup deal properly with the case that
 
570
      <function>shmget()</> returns <literal>EINVAL</> for an existing
 
571
      shared memory segment (Tom)
 
572
     </para>
 
573
 
 
574
     <para>
 
575
      This behavior has been observed on BSD-derived kernels including OS X.
 
576
      It resulted in an entirely-misleading startup failure complaining that
 
577
      the shared memory request size was too large.
 
578
     </para>
 
579
    </listitem>
 
580
 
 
581
    <listitem>
 
582
     <para>
 
583
      Update time zone data files to <application>tzdata</> release 2010j
 
584
      for DST law changes in Argentina, Australian Antarctic, Bangladesh,
 
585
      Mexico, Morocco, Pakistan, Palestine, Russia, Syria, Tunisia;
 
586
      also historical corrections for Taiwan.
 
587
     </para>
 
588
    </listitem>
 
589
 
 
590
   </itemizedlist>
 
591
 
 
592
  </sect2>
 
593
 </sect1>
 
594
 
 
595
 <sect1 id="release-8-1-20">
 
596
  <title>Release 8.1.20</title>
 
597
 
 
598
  <note>
 
599
  <title>Release Date</title>
 
600
  <simpara>2010-03-15</simpara>
 
601
  </note>
 
602
 
 
603
  <para>
 
604
   This release contains a variety of fixes from 8.1.19.
 
605
   For information about new features in the 8.1 major release, see
 
606
   <xref linkend="release-8-1">.
 
607
  </para>
 
608
 
 
609
  <sect2>
 
610
   <title>Migration to Version 8.1.20</title>
 
611
 
 
612
   <para>
 
613
    A dump/restore is not required for those running 8.1.X.
 
614
    However, if you are upgrading from a version earlier than 8.1.18,
 
615
    see the release notes for 8.1.18.
 
616
   </para>
 
617
 
 
618
  </sect2>
 
619
 
 
620
  <sect2>
 
621
   <title>Changes</title>
 
622
 
 
623
   <itemizedlist>
 
624
 
 
625
    <listitem>
 
626
     <para>
 
627
      Add new configuration parameter <varname>ssl_renegotiation_limit</> to
 
628
      control how often we do session key renegotiation for an SSL connection
 
629
      (Magnus)
 
630
     </para>
 
631
 
 
632
     <para>
 
633
      This can be set to zero to disable renegotiation completely, which may
 
634
      be required if a broken SSL library is used.  In particular, some
 
635
      vendors are shipping stopgap patches for CVE-2009-3555 that cause
 
636
      renegotiation attempts to fail.
 
637
     </para>
 
638
    </listitem>
 
639
 
 
640
    <listitem>
 
641
     <para>
 
642
      Fix possible crashes when trying to recover from a failure in
 
643
      subtransaction start (Tom)
 
644
     </para>
 
645
    </listitem>
 
646
 
 
647
    <listitem>
 
648
     <para>
 
649
      Fix server memory leak associated with use of savepoints and a client
 
650
      encoding different from server's encoding (Tom)
 
651
     </para>
 
652
    </listitem>
 
653
 
 
654
    <listitem>
 
655
     <para>
 
656
      Make <function>substring()</> for <type>bit</> types treat any negative
 
657
      length as meaning <quote>all the rest of the string</> (Tom)
 
658
     </para>
 
659
 
 
660
     <para>
 
661
      The previous coding treated only -1 that way, and would produce an
 
662
      invalid result value for other negative values, possibly leading to
 
663
      a crash (CVE-2010-0442).
 
664
     </para>
 
665
    </listitem>
 
666
 
 
667
    <listitem>
 
668
     <para>
 
669
      Fix integer-to-bit-string conversions to handle the first fractional
 
670
      byte correctly when the output bit width is wider than the given
 
671
      integer by something other than a multiple of 8 bits (Tom)
 
672
     </para>
 
673
    </listitem>
 
674
 
 
675
    <listitem>
 
676
     <para>
 
677
      Fix some cases of pathologically slow regular expression matching (Tom)
 
678
     </para>
 
679
    </listitem>
 
680
 
 
681
    <listitem>
 
682
     <para>
 
683
      Fix the <literal>STOP WAL LOCATION</> entry in backup history files to
 
684
      report the next WAL segment's name when the end location is exactly at a
 
685
      segment boundary (Itagaki Takahiro)
 
686
     </para>
 
687
    </listitem>
 
688
 
 
689
    <listitem>
 
690
     <para>
 
691
      Fix some more cases of temporary-file leakage (Heikki)
 
692
     </para>
 
693
 
 
694
     <para>
 
695
      This corrects a problem introduced in the previous minor release.
 
696
      One case that failed is when a plpgsql function returning set is
 
697
      called within another function's exception handler.
 
698
     </para>
 
699
    </listitem>
 
700
 
 
701
    <listitem>
 
702
     <para>
 
703
      When reading <filename>pg_hba.conf</> and related files, do not treat
 
704
      <literal>@something</> as a file inclusion request if the <literal>@</>
 
705
      appears inside quote marks; also, never treat <literal>@</> by itself
 
706
      as a file inclusion request (Tom)
 
707
     </para>
 
708
 
 
709
     <para>
 
710
      This prevents erratic behavior if a role or database name starts with
 
711
      <literal>@</>.  If you need to include a file whose path name
 
712
      contains spaces, you can still do so, but you must write
 
713
      <literal>@"/path to/file"</> rather than putting the quotes around
 
714
      the whole construct.
 
715
     </para>
 
716
    </listitem>
 
717
 
 
718
    <listitem>
 
719
     <para>
 
720
      Prevent infinite loop on some platforms if a directory is named as
 
721
      an inclusion target in <filename>pg_hba.conf</> and related files
 
722
      (Tom)
 
723
     </para>
 
724
    </listitem>
 
725
 
 
726
    <listitem>
 
727
     <para>
 
728
      Fix <application>psql</>'s <literal>numericlocale</> option to not
 
729
      format strings it shouldn't in latex and troff output formats (Heikki)
 
730
     </para>
 
731
    </listitem>
 
732
 
 
733
    <listitem>
 
734
     <para>
 
735
      Fix plpgsql failure in one case where a composite column is set to NULL
 
736
      (Tom)
 
737
     </para>
 
738
    </listitem>
 
739
 
 
740
    <listitem>
 
741
     <para>
 
742
      Add <literal>volatile</> markings in PL/Python to avoid possible
 
743
      compiler-specific misbehavior (Zdenek Kotala)
 
744
     </para>
 
745
    </listitem>
 
746
 
 
747
    <listitem>
 
748
     <para>
 
749
      Ensure PL/Tcl initializes the Tcl interpreter fully (Tom)
 
750
     </para>
 
751
 
 
752
     <para>
 
753
      The only known symptom of this oversight is that the Tcl
 
754
      <literal>clock</> command misbehaves if using Tcl 8.5 or later.
 
755
     </para>
 
756
    </listitem>
 
757
 
 
758
    <listitem>
 
759
     <para>
 
760
      Prevent crash in <filename>contrib/dblink</> when too many key
 
761
      columns are specified to a <function>dblink_build_sql_*</> function
 
762
      (Rushabh Lathia, Joe Conway)
 
763
     </para>
 
764
    </listitem>
 
765
 
 
766
    <listitem>
 
767
     <para>
 
768
      Fix assorted crashes in <filename>contrib/xml2</> caused by sloppy
 
769
      memory management (Tom)
 
770
     </para>
 
771
    </listitem>
 
772
 
 
773
    <listitem>
 
774
     <para>
 
775
      Update time zone data files to <application>tzdata</> release 2010e
 
776
      for DST law changes in Bangladesh, Chile, Fiji, Mexico, Paraguay, Samoa.
 
777
     </para>
 
778
    </listitem>
 
779
 
 
780
   </itemizedlist>
 
781
 
 
782
  </sect2>
 
783
 </sect1>
 
784
 
 
785
 <sect1 id="release-8-1-19">
 
786
  <title>Release 8.1.19</title>
 
787
 
 
788
  <note>
 
789
  <title>Release Date</title>
 
790
  <simpara>2009-12-14</simpara>
 
791
  </note>
 
792
 
 
793
  <para>
 
794
   This release contains a variety of fixes from 8.1.18.
 
795
   For information about new features in the 8.1 major release, see
 
796
   <xref linkend="release-8-1">.
 
797
  </para>
 
798
 
 
799
  <sect2>
 
800
   <title>Migration to Version 8.1.19</title>
 
801
 
 
802
   <para>
 
803
    A dump/restore is not required for those running 8.1.X.
 
804
    However, if you are upgrading from a version earlier than 8.1.18,
 
805
    see the release notes for 8.1.18.
 
806
   </para>
 
807
 
 
808
  </sect2>
 
809
 
 
810
  <sect2>
 
811
   <title>Changes</title>
 
812
 
 
813
   <itemizedlist>
 
814
 
 
815
    <listitem>
 
816
     <para>
 
817
      Protect against indirect security threats caused by index functions
 
818
      changing session-local state (Gurjeet Singh, Tom)
 
819
     </para>
 
820
 
 
821
     <para>
 
822
      This change prevents allegedly-immutable index functions from possibly
 
823
      subverting a superuser's session (CVE-2009-4136).
 
824
     </para>
 
825
    </listitem>
 
826
 
 
827
    <listitem>
 
828
     <para>
 
829
      Reject SSL certificates containing an embedded null byte in the common
 
830
      name (CN) field (Magnus)
 
831
     </para>
 
832
 
 
833
     <para>
 
834
      This prevents unintended matching of a certificate to a server or client
 
835
      name during SSL validation (CVE-2009-4034).
 
836
     </para>
 
837
    </listitem>
 
838
 
 
839
    <listitem>
 
840
     <para>
 
841
      Fix possible crash during backend-startup-time cache initialization (Tom)
 
842
     </para>
 
843
    </listitem>
 
844
 
 
845
    <listitem>
 
846
     <para>
 
847
      Prevent signals from interrupting <literal>VACUUM</> at unsafe times
 
848
      (Alvaro)
 
849
     </para>
 
850
 
 
851
     <para>
 
852
      This fix prevents a PANIC if a <literal>VACUUM FULL</> is cancelled
 
853
      after it's already committed its tuple movements, as well as transient
 
854
      errors if a plain <literal>VACUUM</> is interrupted after having
 
855
      truncated the table.
 
856
     </para>
 
857
    </listitem>
 
858
 
 
859
    <listitem>
 
860
     <para>
 
861
      Fix possible crash due to integer overflow in hash table size
 
862
      calculation (Tom)
 
863
     </para>
 
864
 
 
865
     <para>
 
866
      This could occur with extremely large planner estimates for the size of
 
867
      a hashjoin's result.
 
868
     </para>
 
869
    </listitem>
 
870
 
 
871
    <listitem>
 
872
     <para>
 
873
      Fix very rare crash in <type>inet</>/<type>cidr</> comparisons (Chris
 
874
      Mikkelson)
 
875
     </para>
 
876
    </listitem>
 
877
 
 
878
    <listitem>
 
879
     <para>
 
880
      Ensure that shared tuple-level locks held by prepared transactions are
 
881
      not ignored (Heikki)
 
882
     </para>
 
883
    </listitem>
 
884
 
 
885
    <listitem>
 
886
     <para>
 
887
      Fix premature drop of temporary files used for a cursor that is accessed
 
888
      within a subtransaction (Heikki)
 
889
     </para>
 
890
    </listitem>
 
891
 
 
892
    <listitem>
 
893
     <para>
 
894
      Fix PAM password processing to be more robust (Tom)
 
895
     </para>
 
896
 
 
897
     <para>
 
898
      The previous code is known to fail with the combination of the Linux
 
899
      <literal>pam_krb5</> PAM module with Microsoft Active Directory as the
 
900
      domain controller.  It might have problems elsewhere too, since it was
 
901
      making unjustified assumptions about what arguments the PAM stack would
 
902
      pass to it.
 
903
     </para>
 
904
    </listitem>
 
905
 
 
906
    <listitem>
 
907
     <para>
 
908
      Fix processing of ownership dependencies during <literal>CREATE OR
 
909
      REPLACE FUNCTION</> (Tom)
 
910
     </para>
 
911
    </listitem>
 
912
 
 
913
    <listitem>
 
914
     <para>
 
915
      Ensure that Perl arrays are properly converted to
 
916
      <productname>PostgreSQL</> arrays when returned by a set-returning
 
917
      PL/Perl function (Andrew Dunstan, Abhijit Menon-Sen)
 
918
     </para>
 
919
 
 
920
     <para>
 
921
      This worked correctly already for non-set-returning functions.
 
922
     </para>
 
923
    </listitem>
 
924
 
 
925
    <listitem>
 
926
     <para>
 
927
      Fix rare crash in exception processing in PL/Python (Peter)
 
928
     </para>
 
929
    </listitem>
 
930
 
 
931
    <listitem>
 
932
     <para>
 
933
      Ensure <application>psql</>'s flex module is compiled with the correct
 
934
      system header definitions (Tom)
 
935
     </para>
 
936
 
 
937
     <para>
 
938
      This fixes build failures on platforms where
 
939
      <literal>--enable-largefile</> causes incompatible changes in the
 
940
      generated code.
 
941
     </para>
 
942
    </listitem>
 
943
 
 
944
    <listitem>
 
945
     <para>
 
946
      Make the postmaster ignore any <literal>application_name</> parameter in
 
947
      connection request packets, to improve compatibility with future libpq
 
948
      versions (Tom)
 
949
     </para>
 
950
    </listitem>
 
951
 
 
952
    <listitem>
 
953
     <para>
 
954
      Update time zone data files to <application>tzdata</> release 2009s
 
955
      for DST law changes in Antarctica, Argentina, Bangladesh, Fiji,
 
956
      Novokuznetsk, Pakistan, Palestine, Samoa, Syria; also historical
 
957
      corrections for Hong Kong.
 
958
     </para>
 
959
    </listitem>
 
960
 
 
961
   </itemizedlist>
 
962
 
 
963
  </sect2>
 
964
 </sect1>
 
965
 
 
966
 <sect1 id="release-8-1-18">
 
967
  <title>Release 8.1.18</title>
 
968
 
 
969
  <note>
 
970
  <title>Release Date</title>
 
971
  <simpara>2009-09-09</simpara>
 
972
  </note>
 
973
 
 
974
  <para>
 
975
   This release contains a variety of fixes from 8.1.17.
 
976
   For information about new features in the 8.1 major release, see
 
977
   <xref linkend="release-8-1">.
 
978
  </para>
 
979
 
 
980
  <sect2>
 
981
   <title>Migration to Version 8.1.18</title>
 
982
 
 
983
   <para>
 
984
    A dump/restore is not required for those running 8.1.X.
 
985
    However, if you have any hash indexes on <type>interval</> columns,
 
986
    you must <command>REINDEX</> them after updating to 8.1.18.
 
987
    Also, if you are upgrading from a version earlier than 8.1.15,
 
988
    see the release notes for 8.1.15.
 
989
   </para>
 
990
 
 
991
  </sect2>
 
992
 
 
993
  <sect2>
 
994
   <title>Changes</title>
 
995
 
 
996
   <itemizedlist>
 
997
 
 
998
    <listitem>
 
999
     <para>
 
1000
      Disallow <command>RESET ROLE</> and <command>RESET SESSION
 
1001
      AUTHORIZATION</> inside security-definer functions (Tom, Heikki)
 
1002
     </para>
 
1003
 
 
1004
     <para>
 
1005
      This covers a case that was missed in the previous patch that
 
1006
      disallowed <command>SET ROLE</> and <command>SET SESSION
 
1007
      AUTHORIZATION</> inside security-definer functions.
 
1008
      (See CVE-2007-6600)
 
1009
     </para>
 
1010
    </listitem>
 
1011
 
 
1012
    <listitem>
 
1013
     <para>
 
1014
      Fix handling of sub-SELECTs appearing in the arguments of
 
1015
      an outer-level aggregate function (Tom)
 
1016
     </para>
 
1017
    </listitem>
 
1018
 
 
1019
    <listitem>
 
1020
     <para>
 
1021
      Fix hash calculation for data type <type>interval</> (Tom)
 
1022
     </para>
 
1023
 
 
1024
     <para>
 
1025
      This corrects wrong results for hash joins on interval values.
 
1026
      It also changes the contents of hash indexes on interval columns.
 
1027
      If you have any such indexes, you must <command>REINDEX</> them
 
1028
      after updating.
 
1029
     </para>
 
1030
    </listitem>
 
1031
 
 
1032
    <listitem>
 
1033
     <para>
 
1034
      Treat <function>to_char(..., 'TH')</> as an uppercase ordinal
 
1035
      suffix with <literal>'HH'</>/<literal>'HH12'</> (Heikki)
 
1036
     </para>
 
1037
 
 
1038
     <para>
 
1039
      It was previously handled as <literal>'th'</> (lowercase).
 
1040
     </para>
 
1041
    </listitem>
 
1042
 
 
1043
    <listitem>
 
1044
     <para>
 
1045
      Fix overflow for <literal>INTERVAL '<replaceable>x</> ms'</literal>
 
1046
      when <replaceable>x</> is more than 2 million and integer
 
1047
      datetimes are in use (Alex Hunsaker)
 
1048
     </para>
 
1049
    </listitem>
 
1050
 
 
1051
    <listitem>
 
1052
     <para>
 
1053
      Fix calculation of distance between a point and a line segment (Tom)
 
1054
     </para>
 
1055
 
 
1056
     <para>
 
1057
      This led to incorrect results from a number of geometric operators.
 
1058
     </para>
 
1059
    </listitem>
 
1060
 
 
1061
    <listitem>
 
1062
     <para>
 
1063
      Fix <type>money</> data type to work in locales where currency
 
1064
      amounts have no fractional digits, e.g. Japan (Itagaki Takahiro)
 
1065
     </para>
 
1066
    </listitem>
 
1067
 
 
1068
    <listitem>
 
1069
     <para>
 
1070
      Properly round datetime input like
 
1071
      <literal>00:12:57.9999999999999999999999999999</> (Tom)
 
1072
     </para>
 
1073
    </listitem>
 
1074
 
 
1075
    <listitem>
 
1076
     <para>
 
1077
      Fix poor choice of page split point in GiST R-tree operator classes
 
1078
      (Teodor)
 
1079
     </para>
 
1080
    </listitem>
 
1081
 
 
1082
    <listitem>
 
1083
     <para>
 
1084
      Fix portability issues in plperl initialization (Andrew Dunstan)
 
1085
     </para>
 
1086
    </listitem>
 
1087
 
 
1088
    <listitem>
 
1089
     <para>
 
1090
      Fix <application>pg_ctl</> to not go into an infinite loop if
 
1091
      <filename>postgresql.conf</> is empty (Jeff Davis)
 
1092
     </para>
 
1093
    </listitem>
 
1094
 
 
1095
    <listitem>
 
1096
     <para>
 
1097
      Fix <filename>contrib/xml2</>'s <function>xslt_process()</> to
 
1098
      properly handle the maximum number of parameters (twenty) (Tom)
 
1099
     </para>
 
1100
    </listitem>
 
1101
 
 
1102
    <listitem>
 
1103
     <para>
 
1104
      Improve robustness of <application>libpq</>'s code to recover
 
1105
      from errors during <command>COPY FROM STDIN</> (Tom)
 
1106
     </para>
 
1107
    </listitem>
 
1108
 
 
1109
    <listitem>
 
1110
     <para>
 
1111
      Avoid including conflicting readline and editline header files
 
1112
      when both libraries are installed (Zdenek Kotala)
 
1113
     </para>
 
1114
    </listitem>
 
1115
 
 
1116
    <listitem>
 
1117
     <para>
 
1118
      Update time zone data files to <application>tzdata</> release 2009l
 
1119
      for DST law changes in Bangladesh, Egypt, Jordan, Pakistan,
 
1120
      Argentina/San_Luis, Cuba, Jordan (historical correction only),
 
1121
      Mauritius, Morocco, Palestine, Syria, Tunisia.
 
1122
     </para>
 
1123
    </listitem>
 
1124
 
 
1125
   </itemizedlist>
 
1126
 
 
1127
  </sect2>
 
1128
 </sect1>
 
1129
 
 
1130
 <sect1 id="release-8-1-17">
 
1131
  <title>Release 8.1.17</title>
 
1132
 
 
1133
  <note>
 
1134
  <title>Release Date</title>
 
1135
  <simpara>2009-03-16</simpara>
 
1136
  </note>
 
1137
 
 
1138
  <para>
 
1139
   This release contains a variety of fixes from 8.1.16.
 
1140
   For information about new features in the 8.1 major release, see
 
1141
   <xref linkend="release-8-1">.
 
1142
  </para>
 
1143
 
 
1144
  <sect2>
 
1145
   <title>Migration to Version 8.1.17</title>
 
1146
 
 
1147
   <para>
 
1148
    A dump/restore is not required for those running 8.1.X.
 
1149
    However, if you are upgrading from a version earlier than 8.1.15,
 
1150
    see the release notes for 8.1.15.
 
1151
   </para>
 
1152
 
 
1153
  </sect2>
 
1154
 
 
1155
  <sect2>
 
1156
   <title>Changes</title>
 
1157
 
 
1158
   <itemizedlist>
 
1159
 
 
1160
    <listitem>
 
1161
     <para>
 
1162
      Prevent error recursion crashes when encoding conversion fails (Tom)
 
1163
     </para>
 
1164
 
 
1165
     <para>
 
1166
      This change extends fixes made in the last two minor releases for
 
1167
      related failure scenarios.  The previous fixes were narrowly tailored
 
1168
      for the original problem reports, but we have now recognized that
 
1169
      <emphasis>any</> error thrown by an encoding conversion function could
 
1170
      potentially lead to infinite recursion while trying to report the
 
1171
      error.  The solution therefore is to disable translation and encoding
 
1172
      conversion and report the plain-ASCII form of any error message,
 
1173
      if we find we have gotten into a recursive error reporting situation.
 
1174
      (CVE-2009-0922)
 
1175
     </para>
 
1176
    </listitem>
 
1177
 
 
1178
    <listitem>
 
1179
     <para>
 
1180
      Disallow <command>CREATE CONVERSION</> with the wrong encodings
 
1181
      for the specified conversion function (Heikki)
 
1182
     </para>
 
1183
 
 
1184
     <para>
 
1185
      This prevents one possible scenario for encoding conversion failure.
 
1186
      The previous change is a backstop to guard against other kinds of
 
1187
      failures in the same area.
 
1188
     </para>
 
1189
    </listitem>
 
1190
 
 
1191
    <listitem>
 
1192
     <para>
 
1193
      Fix core dump when <function>to_char()</> is given format codes that
 
1194
      are inappropriate for the type of the data argument (Tom)
 
1195
     </para>
 
1196
    </listitem>
 
1197
 
 
1198
    <listitem>
 
1199
     <para>
 
1200
      Fix decompilation of <literal>CASE WHEN</> with an implicit coercion
 
1201
      (Tom)
 
1202
     </para>
 
1203
 
 
1204
     <para>
 
1205
      This mistake could lead to Assert failures in an Assert-enabled build,
 
1206
      or an <quote>unexpected CASE WHEN clause</> error message in other
 
1207
      cases, when trying to examine or dump a view.
 
1208
     </para>
 
1209
    </listitem>
 
1210
 
 
1211
    <listitem>
 
1212
     <para>
 
1213
      Fix possible misassignment of the owner of a TOAST table's rowtype (Tom)
 
1214
     </para>
 
1215
 
 
1216
     <para>
 
1217
      If <command>CLUSTER</> or a rewriting variant of <command>ALTER TABLE</>
 
1218
      were executed by someone other than the table owner, the
 
1219
      <structname>pg_type</> entry for the table's TOAST table would end up
 
1220
      marked as owned by that someone.  This caused no immediate problems,
 
1221
      since the permissions on the TOAST rowtype aren't examined by any
 
1222
      ordinary database operation.  However, it could lead to unexpected
 
1223
      failures if one later tried to drop the role that issued the command
 
1224
      (in 8.1 or 8.2), or <quote>owner of data type appears to be invalid</>
 
1225
      warnings from <application>pg_dump</> after having done so (in 8.3).
 
1226
     </para>
 
1227
    </listitem>
 
1228
 
 
1229
    <listitem>
 
1230
     <para>
 
1231
      Clean up PL/pgSQL error status variables fully at block exit
 
1232
      (Ashesh Vashi and Dave Page)
 
1233
     </para>
 
1234
 
 
1235
     <para>
 
1236
      This is not a problem for PL/pgSQL itself, but the omission could cause
 
1237
      the PL/pgSQL Debugger to crash while examining the state of a function.
 
1238
     </para>
 
1239
    </listitem>
 
1240
 
 
1241
    <listitem>
 
1242
     <para>
 
1243
      Add <literal>MUST</> (Mauritius Island Summer Time) to the default list
 
1244
      of known timezone abbreviations (Xavier Bugaud)
 
1245
     </para>
 
1246
    </listitem>
 
1247
 
 
1248
   </itemizedlist>
 
1249
 
 
1250
  </sect2>
 
1251
 </sect1>
 
1252
 
 
1253
 <sect1 id="release-8-1-16">
 
1254
  <title>Release 8.1.16</title>
 
1255
 
 
1256
  <note>
 
1257
  <title>Release Date</title>
 
1258
  <simpara>2009-02-02</simpara>
 
1259
  </note>
 
1260
 
 
1261
  <para>
 
1262
   This release contains a variety of fixes from 8.1.15.
 
1263
   For information about new features in the 8.1 major release, see
 
1264
   <xref linkend="release-8-1">.
 
1265
  </para>
 
1266
 
 
1267
  <sect2>
 
1268
   <title>Migration to Version 8.1.16</title>
 
1269
 
 
1270
   <para>
 
1271
    A dump/restore is not required for those running 8.1.X.
 
1272
    However, if you are upgrading from a version earlier than 8.1.15,
 
1273
    see the release notes for 8.1.15.
 
1274
   </para>
 
1275
 
 
1276
  </sect2>
 
1277
 
 
1278
  <sect2>
 
1279
   <title>Changes</title>
 
1280
 
 
1281
   <itemizedlist>
 
1282
 
 
1283
    <listitem>
 
1284
     <para>
 
1285
      Fix crash in autovacuum (Alvaro)
 
1286
     </para>
 
1287
 
 
1288
     <para>
 
1289
      The crash occurs only after vacuuming a whole database for
 
1290
      anti-transaction-wraparound purposes, which means that it occurs
 
1291
      infrequently and is hard to track down.
 
1292
     </para>
 
1293
    </listitem>
 
1294
 
 
1295
    <listitem>
 
1296
     <para>
 
1297
      Improve handling of URLs in <function>headline()</> function (Teodor)
 
1298
     </para>
 
1299
    </listitem>
 
1300
 
 
1301
    <listitem>
 
1302
     <para>
 
1303
      Improve handling of overlength headlines in <function>headline()</>
 
1304
      function (Teodor)
 
1305
     </para>
 
1306
    </listitem>
 
1307
 
 
1308
    <listitem>
 
1309
     <para>
 
1310
      Prevent possible Assert failure or misconversion if an encoding
 
1311
      conversion is created with the wrong conversion function for the
 
1312
      specified pair of encodings (Tom, Heikki)
 
1313
     </para>
 
1314
    </listitem>
 
1315
 
 
1316
    <listitem>
 
1317
     <para>
 
1318
      Avoid unnecessary locking of small tables in <command>VACUUM</>
 
1319
      (Heikki)
 
1320
     </para>
 
1321
    </listitem>
 
1322
 
 
1323
    <listitem>
 
1324
     <para>
 
1325
      Ensure that the contents of a holdable cursor don't depend on the
 
1326
      contents of TOAST tables (Tom)
 
1327
     </para>
 
1328
 
 
1329
     <para>
 
1330
      Previously, large field values in a cursor result might be represented
 
1331
      as TOAST pointers, which would fail if the referenced table got dropped
 
1332
      before the cursor is read, or if the large value is deleted and then
 
1333
      vacuumed away.  This cannot happen with an ordinary cursor,
 
1334
      but it could with a cursor that is held past its creating transaction.
 
1335
     </para>
 
1336
    </listitem>
 
1337
 
 
1338
    <listitem>
 
1339
     <para>
 
1340
      Fix uninitialized variables in <filename>contrib/tsearch2</>'s
 
1341
      <function>get_covers()</> function (Teodor)
 
1342
     </para>
 
1343
    </listitem>
 
1344
 
 
1345
    <listitem>
 
1346
     <para>
 
1347
      Fix <application>configure</> script to properly report failure when
 
1348
      unable to obtain linkage information for PL/Perl (Andrew)
 
1349
     </para>
 
1350
    </listitem>
 
1351
 
 
1352
    <listitem>
 
1353
     <para>
 
1354
      Make all documentation reference <literal>pgsql-bugs</> and/or
 
1355
      <literal>pgsql-hackers</> as appropriate, instead of the
 
1356
      now-decommissioned <literal>pgsql-ports</> and <literal>pgsql-patches</>
 
1357
      mailing lists (Tom)
 
1358
     </para>
 
1359
    </listitem>
 
1360
 
 
1361
    <listitem>
 
1362
     <para>
 
1363
      Update time zone data files to <application>tzdata</> release 2009a (for
 
1364
      Kathmandu and historical DST corrections in Switzerland, Cuba)
 
1365
     </para>
 
1366
    </listitem>
 
1367
 
 
1368
   </itemizedlist>
 
1369
 
 
1370
  </sect2>
 
1371
 </sect1>
 
1372
 
 
1373
 <sect1 id="release-8-1-15">
 
1374
  <title>Release 8.1.15</title>
 
1375
 
 
1376
  <note>
 
1377
  <title>Release Date</title>
 
1378
  <simpara>2008-11-03</simpara>
 
1379
  </note>
 
1380
 
 
1381
  <para>
 
1382
   This release contains a variety of fixes from 8.1.14.
 
1383
   For information about new features in the 8.1 major release, see
 
1384
   <xref linkend="release-8-1">.
 
1385
  </para>
 
1386
 
 
1387
  <sect2>
 
1388
   <title>Migration to Version 8.1.15</title>
 
1389
 
 
1390
   <para>
 
1391
    A dump/restore is not required for those running 8.1.X.
 
1392
    However, if you are upgrading from a version earlier than 8.1.2,
 
1393
    see the release notes for 8.1.2.  Also, if you were running a previous
 
1394
    8.1.X release, it is recommended to <command>REINDEX</> all GiST
 
1395
    indexes after the upgrade.
 
1396
   </para>
 
1397
 
 
1398
  </sect2>
 
1399
 
 
1400
  <sect2>
 
1401
   <title>Changes</title>
 
1402
 
 
1403
   <itemizedlist>
 
1404
 
 
1405
    <listitem>
 
1406
     <para>
 
1407
      Fix GiST index corruption due to marking the wrong index entry
 
1408
      <quote>dead</> after a deletion (Teodor)
 
1409
     </para>
 
1410
 
 
1411
     <para>
 
1412
      This would result in index searches failing to find rows they
 
1413
      should have found.  Corrupted indexes can be fixed with
 
1414
      <command>REINDEX</>.
 
1415
     </para>
 
1416
    </listitem>
 
1417
 
 
1418
    <listitem>
 
1419
     <para>
 
1420
      Fix backend crash when the client encoding cannot represent a localized
 
1421
      error message (Tom)
 
1422
     </para>
 
1423
 
 
1424
     <para>
 
1425
      We have addressed similar issues before, but it would still fail if
 
1426
      the <quote>character has no equivalent</> message itself couldn't
 
1427
      be converted.  The fix is to disable localization and send the plain
 
1428
      ASCII error message when we detect such a situation.
 
1429
     </para>
 
1430
    </listitem>
 
1431
 
 
1432
    <listitem>
 
1433
     <para>
 
1434
      Fix possible crash when deeply nested functions are invoked from
 
1435
      a trigger (Tom)
 
1436
     </para>
 
1437
    </listitem>
 
1438
 
 
1439
    <listitem>
 
1440
     <para>
 
1441
      Fix mis-expansion of rule queries when a sub-<literal>SELECT</> appears
 
1442
      in a function call in <literal>FROM</>,  a multi-row <literal>VALUES</>
 
1443
      list, or a <literal>RETURNING</> list (Tom)
 
1444
     </para>
 
1445
 
 
1446
     <para>
 
1447
      The usual symptom of this problem is an <quote>unrecognized node type</>
 
1448
      error.
 
1449
     </para>
 
1450
    </listitem>
 
1451
 
 
1452
    <listitem>
 
1453
     <para>
 
1454
      Ensure an error is reported when a newly-defined PL/pgSQL trigger
 
1455
      function is invoked as a normal function (Tom)
 
1456
     </para>
 
1457
    </listitem>
 
1458
 
 
1459
    <listitem>
 
1460
     <para>
 
1461
      Prevent possible collision of <structfield>relfilenode</> numbers
 
1462
      when moving a table to another tablespace with <command>ALTER SET
 
1463
      TABLESPACE</> (Heikki)
 
1464
     </para>
 
1465
 
 
1466
     <para>
 
1467
      The command tried to re-use the existing filename, instead of
 
1468
      picking one that is known unused in the destination directory.
 
1469
     </para>
 
1470
    </listitem>
 
1471
 
 
1472
    <listitem>
 
1473
     <para>
 
1474
      Fix incorrect tsearch2 headline generation when single query
 
1475
      item matches first word of text (Sushant Sinha)
 
1476
     </para>
 
1477
    </listitem>
 
1478
 
 
1479
    <listitem>
 
1480
     <para>
 
1481
      Fix improper display of fractional seconds in interval values when
 
1482
      using a non-ISO datestyle in an <option>--enable-integer-datetimes</>
 
1483
      build (Ron Mayer)
 
1484
     </para>
 
1485
    </listitem>
 
1486
 
 
1487
    <listitem>
 
1488
     <para>
 
1489
      Ensure <function>SPI_getvalue</> and <function>SPI_getbinval</>
 
1490
      behave correctly when the passed tuple and tuple descriptor have
 
1491
      different numbers of columns (Tom)
 
1492
     </para>
 
1493
 
 
1494
     <para>
 
1495
      This situation is normal when a table has had columns added or removed,
 
1496
      but these two functions didn't handle it properly.
 
1497
      The only likely consequence is an incorrect error indication.
 
1498
     </para>
 
1499
    </listitem>
 
1500
 
 
1501
    <listitem>
 
1502
     <para>
 
1503
      Fix <application>ecpg</>'s parsing of <command>CREATE ROLE</> (Michael)
 
1504
     </para>
 
1505
    </listitem>
 
1506
 
 
1507
    <listitem>
 
1508
     <para>
 
1509
      Fix recent breakage of <literal>pg_ctl restart</> (Tom)
 
1510
     </para>
 
1511
    </listitem>
 
1512
 
 
1513
    <listitem>
 
1514
     <para>
 
1515
      Update time zone data files to <application>tzdata</> release 2008i (for
 
1516
      DST law changes in Argentina, Brazil, Mauritius, Syria)
 
1517
     </para>
 
1518
    </listitem>
 
1519
 
 
1520
   </itemizedlist>
 
1521
 
 
1522
  </sect2>
 
1523
 </sect1>
 
1524
 
 
1525
 <sect1 id="release-8-1-14">
 
1526
  <title>Release 8.1.14</title>
 
1527
 
 
1528
  <note>
 
1529
  <title>Release Date</title>
 
1530
  <simpara>2008-09-22</simpara>
 
1531
  </note>
 
1532
 
 
1533
  <para>
 
1534
   This release contains a variety of fixes from 8.1.13.
 
1535
   For information about new features in the 8.1 major release, see
 
1536
   <xref linkend="release-8-1">.
 
1537
  </para>
 
1538
 
 
1539
  <sect2>
 
1540
   <title>Migration to Version 8.1.14</title>
 
1541
 
 
1542
   <para>
 
1543
    A dump/restore is not required for those running 8.1.X.
 
1544
    However, if you are upgrading from a version earlier than 8.1.2,
 
1545
    see the release notes for 8.1.2.
 
1546
   </para>
 
1547
 
 
1548
  </sect2>
 
1549
 
 
1550
  <sect2>
 
1551
   <title>Changes</title>
 
1552
 
 
1553
   <itemizedlist>
 
1554
 
 
1555
    <listitem>
 
1556
     <para>
 
1557
      Widen local lock counters from 32 to 64 bits (Tom)
 
1558
     </para>
 
1559
 
 
1560
     <para>
 
1561
      This responds to reports that the counters could overflow in
 
1562
      sufficiently long transactions, leading to unexpected <quote>lock is
 
1563
      already held</> errors.
 
1564
     </para>
 
1565
    </listitem>
 
1566
 
 
1567
    <listitem>
 
1568
     <para>
 
1569
      Fix possible duplicate output of tuples during a GiST index scan (Teodor)
 
1570
     </para>
 
1571
    </listitem>
 
1572
 
 
1573
    <listitem>
 
1574
     <para>
 
1575
      Add checks in executor startup to ensure that the tuples produced by an
 
1576
      <command>INSERT</> or <command>UPDATE</> will match the target table's
 
1577
      current rowtype (Tom)
 
1578
     </para>
 
1579
 
 
1580
     <para>
 
1581
      <command>ALTER COLUMN TYPE</>, followed by re-use of a previously
 
1582
      cached plan, could produce this type of situation.  The check protects
 
1583
      against data corruption and/or crashes that could ensue.
 
1584
     </para>
 
1585
    </listitem>
 
1586
 
 
1587
    <listitem>
 
1588
     <para>
 
1589
      Fix <literal>AT TIME ZONE</> to first try to interpret its timezone
 
1590
      argument as a timezone abbreviation, and only try it as a full timezone
 
1591
      name if that fails, rather than the other way around as formerly (Tom)
 
1592
     </para>
 
1593
 
 
1594
     <para>
 
1595
      The timestamp input functions have always resolved ambiguous zone names
 
1596
      in this order.  Making <literal>AT TIME ZONE</> do so as well improves
 
1597
      consistency, and fixes a compatibility bug introduced in 8.1:
 
1598
      in ambiguous cases we now behave the same as 8.0 and before did,
 
1599
      since in the older versions <literal>AT TIME ZONE</> accepted
 
1600
      <emphasis>only</> abbreviations.
 
1601
     </para>
 
1602
    </listitem>
 
1603
 
 
1604
    <listitem>
 
1605
     <para>
 
1606
      Fix datetime input functions to correctly detect integer overflow when
 
1607
      running on a 64-bit platform (Tom)
 
1608
     </para>
 
1609
    </listitem>
 
1610
 
 
1611
    <listitem>
 
1612
     <para>
 
1613
      Improve performance of writing very long log messages to syslog (Tom)
 
1614
     </para>
 
1615
    </listitem>
 
1616
 
 
1617
    <listitem>
 
1618
     <para>
 
1619
      Fix bug in backwards scanning of a cursor on a <literal>SELECT DISTINCT
 
1620
      ON</> query (Tom)
 
1621
     </para>
 
1622
    </listitem>
 
1623
 
 
1624
    <listitem>
 
1625
     <para>
 
1626
      Fix planner bug with nested sub-select expressions (Tom)
 
1627
     </para>
 
1628
 
 
1629
     <para>
 
1630
      If the outer sub-select has no direct dependency on the parent query,
 
1631
      but the inner one does, the outer value might not get recalculated
 
1632
      for new parent query rows.
 
1633
     </para>
 
1634
    </listitem>
 
1635
 
 
1636
    <listitem>
 
1637
     <para>
 
1638
      Fix planner to estimate that <literal>GROUP BY</> expressions yielding
 
1639
      boolean results always result in two groups, regardless of the
 
1640
      expressions' contents (Tom)
 
1641
     </para>
 
1642
 
 
1643
     <para>
 
1644
      This is very substantially more accurate than the regular <literal>GROUP
 
1645
      BY</> estimate for certain boolean tests like <replaceable>col</>
 
1646
      <literal>IS NULL</>.
 
1647
     </para>
 
1648
    </listitem>
 
1649
 
 
1650
    <listitem>
 
1651
     <para>
 
1652
      Fix PL/pgSQL to not fail when a <literal>FOR</> loop's target variable
 
1653
      is a record containing composite-type fields (Tom)
 
1654
     </para>
 
1655
    </listitem>
 
1656
 
 
1657
    <listitem>
 
1658
     <para>
 
1659
      Fix PL/Tcl to behave correctly with Tcl 8.5, and to be more careful
 
1660
      about the encoding of data sent to or from Tcl (Tom)
 
1661
     </para>
 
1662
    </listitem>
 
1663
 
 
1664
    <listitem>
 
1665
     <para>
 
1666
      Fix PL/Python to work with Python 2.5
 
1667
     </para>
 
1668
 
 
1669
     <para>
 
1670
      This is a back-port of fixes made during the 8.2 development cycle.
 
1671
     </para>
 
1672
    </listitem>
 
1673
 
 
1674
    <listitem>
 
1675
     <para>
 
1676
      Improve <application>pg_dump</> and <application>pg_restore</>'s
 
1677
      error reporting after failure to send a SQL command (Tom)
 
1678
     </para>
 
1679
    </listitem>
 
1680
 
 
1681
    <listitem>
 
1682
     <para>
 
1683
      Fix <application>pg_ctl</> to properly preserve postmaster
 
1684
      command-line arguments across a <literal>restart</> (Bruce)
 
1685
     </para>
 
1686
    </listitem>
 
1687
 
 
1688
    <listitem>
 
1689
     <para>
 
1690
      Update time zone data files to <application>tzdata</> release 2008f (for
 
1691
      DST law changes in Argentina, Bahamas, Brazil, Mauritius, Morocco,
 
1692
      Pakistan, Palestine, and Paraguay)
 
1693
     </para>
 
1694
    </listitem>
 
1695
 
 
1696
   </itemizedlist>
 
1697
 
 
1698
  </sect2>
 
1699
 </sect1>
 
1700
 
 
1701
 <sect1 id="release-8-1-13">
 
1702
  <title>Release 8.1.13</title>
 
1703
 
 
1704
  <note>
 
1705
  <title>Release Date</title>
 
1706
  <simpara>2008-06-12</simpara>
 
1707
  </note>
 
1708
 
 
1709
  <para>
 
1710
   This release contains one serious and one minor bug fix over 8.1.12.
 
1711
   For information about new features in the 8.1 major release, see
 
1712
   <xref linkend="release-8-1">.
 
1713
  </para>
 
1714
 
 
1715
  <sect2>
 
1716
   <title>Migration to Version 8.1.13</title>
 
1717
 
 
1718
   <para>
 
1719
    A dump/restore is not required for those running 8.1.X.
 
1720
    However, if you are upgrading from a version earlier than 8.1.2,
 
1721
    see the release notes for 8.1.2.
 
1722
   </para>
 
1723
 
 
1724
  </sect2>
 
1725
 
 
1726
  <sect2>
 
1727
   <title>Changes</title>
 
1728
 
 
1729
   <itemizedlist>
 
1730
 
 
1731
    <listitem>
 
1732
     <para>
 
1733
      Make <function>pg_get_ruledef()</> parenthesize negative constants (Tom)
 
1734
     </para>
 
1735
 
 
1736
     <para>
 
1737
      Before this fix, a negative constant in a view or rule might be dumped
 
1738
      as, say, <literal>-42::integer</>, which is subtly incorrect: it should
 
1739
      be <literal>(-42)::integer</> due to operator precedence rules.
 
1740
      Usually this would make little difference, but it could interact with
 
1741
      another recent patch to cause
 
1742
      <productname>PostgreSQL</> to reject what had been a valid
 
1743
      <command>SELECT DISTINCT</> view query.  Since this could result in
 
1744
      <application>pg_dump</> output failing to reload, it is being treated
 
1745
      as a high-priority fix.  The only released versions in which dump
 
1746
      output is actually incorrect are 8.3.1 and 8.2.7.
 
1747
     </para>
 
1748
    </listitem>
 
1749
 
 
1750
    <listitem>
 
1751
     <para>
 
1752
      Make <command>ALTER AGGREGATE ... OWNER TO</> update
 
1753
      <structname>pg_shdepend</> (Tom)
 
1754
     </para>
 
1755
 
 
1756
     <para>
 
1757
      This oversight could lead to problems if the aggregate was later
 
1758
      involved in a <command>DROP OWNED</> or <command>REASSIGN OWNED</>
 
1759
      operation.
 
1760
     </para>
 
1761
    </listitem>
 
1762
 
 
1763
   </itemizedlist>
 
1764
 
 
1765
  </sect2>
 
1766
 </sect1>
 
1767
 
 
1768
 <sect1 id="release-8-1-12">
 
1769
  <title>Release 8.1.12</title>
 
1770
 
 
1771
  <note>
 
1772
  <title>Release Date</title>
 
1773
  <simpara>never released</simpara>
 
1774
  </note>
 
1775
 
 
1776
  <para>
 
1777
   This release contains a variety of fixes from 8.1.11.
 
1778
   For information about new features in the 8.1 major release, see
 
1779
   <xref linkend="release-8-1">.
 
1780
  </para>
 
1781
 
 
1782
  <sect2>
 
1783
   <title>Migration to Version 8.1.12</title>
 
1784
 
 
1785
   <para>
 
1786
    A dump/restore is not required for those running 8.1.X.
 
1787
    However, if you are upgrading from a version earlier than 8.1.2,
 
1788
    see the release notes for 8.1.2.
 
1789
   </para>
 
1790
 
 
1791
  </sect2>
 
1792
 
 
1793
  <sect2>
 
1794
   <title>Changes</title>
 
1795
 
 
1796
   <itemizedlist>
 
1797
 
 
1798
    <listitem>
 
1799
     <para>
 
1800
      Fix <command>ALTER TABLE ADD COLUMN ... PRIMARY KEY</> so that the new
 
1801
      column is correctly checked to see if it's been initialized to all
 
1802
      non-nulls (Brendan Jurd)
 
1803
     </para>
 
1804
 
 
1805
     <para>
 
1806
      Previous versions neglected to check this requirement at all.
 
1807
     </para>
 
1808
    </listitem>
 
1809
 
 
1810
    <listitem>
 
1811
     <para>
 
1812
      Fix possible <command>CREATE TABLE</> failure when inheriting the
 
1813
      <quote>same</> constraint from multiple parent relations that
 
1814
      inherited that constraint from a common ancestor (Tom)
 
1815
     </para>
 
1816
    </listitem>
 
1817
 
 
1818
    <listitem>
 
1819
     <para>
 
1820
      Fix conversions between ISO-8859-5 and other encodings to handle
 
1821
      Cyrillic <quote>Yo</> characters (<literal>e</> and <literal>E</> with
 
1822
      two dots) (Sergey Burladyan)
 
1823
     </para>
 
1824
    </listitem>
 
1825
 
 
1826
    <listitem>
 
1827
     <para>
 
1828
      Fix a few datatype input functions
 
1829
      that were allowing unused bytes in their results to contain
 
1830
      uninitialized, unpredictable values (Tom)
 
1831
     </para>
 
1832
 
 
1833
     <para>
 
1834
      This could lead to failures in which two apparently identical literal
 
1835
      values were not seen as equal, resulting in the parser complaining
 
1836
      about unmatched <literal>ORDER BY</> and <literal>DISTINCT</>
 
1837
      expressions.
 
1838
     </para>
 
1839
    </listitem>
 
1840
 
 
1841
    <listitem>
 
1842
     <para>
 
1843
      Fix a corner case in regular-expression substring matching
 
1844
      (<literal>substring(<replaceable>string</> from
 
1845
      <replaceable>pattern</>)</literal>) (Tom)
 
1846
     </para>
 
1847
 
 
1848
     <para>
 
1849
      The problem occurs when there is a match to the pattern overall but
 
1850
      the user has specified a parenthesized subexpression and that
 
1851
      subexpression hasn't got a match.  An example is
 
1852
      <literal>substring('foo' from 'foo(bar)?')</>.
 
1853
      This should return NULL, since <literal>(bar)</> isn't matched, but
 
1854
      it was mistakenly returning the whole-pattern match instead (ie,
 
1855
      <literal>foo</>).
 
1856
     </para>
 
1857
    </listitem>
 
1858
 
 
1859
    <listitem>
 
1860
     <para>
 
1861
      Update time zone data files to <application>tzdata</> release 2008c (for
 
1862
      DST law changes in Morocco, Iraq, Choibalsan, Pakistan, Syria, Cuba,
 
1863
      Argentina/San_Luis, and Chile)
 
1864
     </para>
 
1865
    </listitem>
 
1866
 
 
1867
    <listitem>
 
1868
     <para>
 
1869
      Fix incorrect result from <application>ecpg</>'s
 
1870
      <function>PGTYPEStimestamp_sub()</> function (Michael)
 
1871
     </para>
 
1872
    </listitem>
 
1873
 
 
1874
    <listitem>
 
1875
     <para>
 
1876
      Fix core dump in <filename>contrib/xml2</>'s
 
1877
      <function>xpath_table()</> function when the input query returns a
 
1878
      NULL value (Tom)
 
1879
     </para>
 
1880
    </listitem>
 
1881
 
 
1882
    <listitem>
 
1883
     <para>
 
1884
      Fix <filename>contrib/xml2</>'s makefile to not override
 
1885
      <literal>CFLAGS</> (Tom)
 
1886
     </para>
 
1887
    </listitem>
 
1888
 
 
1889
    <listitem>
 
1890
     <para>
 
1891
      Fix <literal>DatumGetBool</> macro to not fail with <application>gcc</>
 
1892
      4.3 (Tom)
 
1893
     </para>
 
1894
 
 
1895
     <para>
 
1896
      This problem affects <quote>old style</> (V0) C functions that
 
1897
      return boolean.  The fix is already in 8.3, but the need to
 
1898
      back-patch it was not realized at the time.
 
1899
     </para>
 
1900
    </listitem>
 
1901
 
 
1902
    <listitem>
 
1903
     <para>
 
1904
      Fix longstanding <command>LISTEN</>/<command>NOTIFY</>
 
1905
      race condition (Tom)
 
1906
     </para>
 
1907
 
 
1908
     <para>
 
1909
      In rare cases a session that had just executed a
 
1910
      <command>LISTEN</> might not get a notification, even though
 
1911
      one would be expected because the concurrent transaction executing
 
1912
      <command>NOTIFY</> was observed to commit later.
 
1913
     </para>
 
1914
 
 
1915
     <para>
 
1916
      A side effect of the fix is that a transaction that has executed
 
1917
      a not-yet-committed <command>LISTEN</> command will not see any
 
1918
      row in <structname>pg_listener</> for the <command>LISTEN</>,
 
1919
      should it choose to look; formerly it would have.  This behavior
 
1920
      was never documented one way or the other, but it is possible that
 
1921
      some applications depend on the old behavior.
 
1922
     </para>
 
1923
    </listitem>
 
1924
 
 
1925
    <listitem>
 
1926
     <para>
 
1927
      Disallow <command>LISTEN</> and <command>UNLISTEN</> within a
 
1928
      prepared transaction (Tom)
 
1929
     </para>
 
1930
 
 
1931
     <para>
 
1932
      This was formerly allowed but trying to do it had various unpleasant
 
1933
      consequences, notably that the originating backend could not exit
 
1934
      as long as an <command>UNLISTEN</> remained uncommitted.
 
1935
     </para>
 
1936
    </listitem>
 
1937
 
 
1938
    <listitem>
 
1939
     <para>
 
1940
      Fix rare crash when an error occurs during a query using a hash index
 
1941
      (Heikki)
 
1942
     </para>
 
1943
    </listitem>
 
1944
 
 
1945
    <listitem>
 
1946
     <para>
 
1947
      Fix input of datetime values for February 29 in years BC (Tom)
 
1948
     </para>
 
1949
 
 
1950
     <para>
 
1951
      The former coding was mistaken about which years were leap years.
 
1952
     </para>
 
1953
    </listitem>
 
1954
 
 
1955
    <listitem>
 
1956
     <para>
 
1957
      Fix <quote>unrecognized node type</> error in some variants of
 
1958
      <command>ALTER OWNER</> (Tom)
 
1959
     </para>
 
1960
    </listitem>
 
1961
 
 
1962
    <listitem>
 
1963
     <para>
 
1964
      Fix <application>pg_ctl</> to correctly extract the postmaster's port
 
1965
      number from command-line options (Itagaki Takahiro, Tom)
 
1966
     </para>
 
1967
 
 
1968
     <para>
 
1969
      Previously, <literal>pg_ctl start -w</> could try to contact the
 
1970
      postmaster on the wrong port, leading to bogus reports of startup
 
1971
      failure.
 
1972
     </para>
 
1973
    </listitem>
 
1974
 
 
1975
    <listitem>
 
1976
     <para>
 
1977
      Use <option>-fwrapv</> to defend against possible misoptimization
 
1978
      in recent <application>gcc</> versions (Tom)
 
1979
     </para>
 
1980
 
 
1981
     <para>
 
1982
      This is known to be necessary when building <productname>PostgreSQL</>
 
1983
      with <application>gcc</> 4.3 or later.
 
1984
     </para>
 
1985
    </listitem>
 
1986
 
 
1987
    <listitem>
 
1988
     <para>
 
1989
      Fix display of constant expressions in <literal>ORDER BY</>
 
1990
      and <literal>GROUP BY</> (Tom)
 
1991
     </para>
 
1992
 
 
1993
     <para>
 
1994
      An explictly casted constant would be shown incorrectly.  This could
 
1995
      for example lead to corruption of a view definition during
 
1996
      dump and reload.
 
1997
     </para>
 
1998
    </listitem>
 
1999
 
 
2000
    <listitem>
 
2001
     <para>
 
2002
      Fix <application>libpq</> to handle NOTICE messages correctly
 
2003
      during COPY OUT (Tom)
 
2004
     </para>
 
2005
 
 
2006
     <para>
 
2007
      This failure has only been observed to occur when a user-defined
 
2008
      datatype's output routine issues a NOTICE, but there is no
 
2009
      guarantee it couldn't happen due to other causes.
 
2010
     </para>
 
2011
    </listitem>
 
2012
 
 
2013
   </itemizedlist>
 
2014
 
 
2015
  </sect2>
 
2016
 </sect1>
 
2017
 
 
2018
 <sect1 id="release-8-1-11">
 
2019
  <title>Release 8.1.11</title>
 
2020
 
 
2021
  <note>
 
2022
  <title>Release Date</title>
 
2023
  <simpara>2008-01-07</simpara>
 
2024
  </note>
 
2025
 
 
2026
  <para>
 
2027
   This release contains a variety of fixes from 8.1.10,
 
2028
   including fixes for significant security issues.
 
2029
   For information about new features in the 8.1 major release, see
 
2030
   <xref linkend="release-8-1">.
 
2031
  </para>
 
2032
 
 
2033
  <para>
 
2034
   This is the last 8.1.X release for which the <productname>PostgreSQL</>
 
2035
   community will produce binary packages for <productname>Windows</>.
 
2036
   Windows users are encouraged to move to 8.2.X or later,
 
2037
   since there are Windows-specific fixes in 8.2.X that
 
2038
   are impractical to back-port.  8.1.X will continue to
 
2039
   be supported on other platforms.
 
2040
  </para>
 
2041
 
 
2042
  <sect2>
 
2043
   <title>Migration to Version 8.1.11</title>
 
2044
 
 
2045
   <para>
 
2046
    A dump/restore is not required for those running 8.1.X.
 
2047
    However, if you are upgrading from a version earlier than 8.1.2,
 
2048
    see the release notes for 8.1.2.
 
2049
   </para>
 
2050
 
 
2051
  </sect2>
 
2052
 
 
2053
  <sect2>
 
2054
   <title>Changes</title>
 
2055
 
 
2056
   <itemizedlist>
 
2057
 
 
2058
    <listitem>
 
2059
     <para>
 
2060
      Prevent functions in indexes from executing with the privileges of
 
2061
      the user running <command>VACUUM</>, <command>ANALYZE</>, etc (Tom)
 
2062
     </para>
 
2063
 
 
2064
     <para>
 
2065
      Functions used in index expressions and partial-index
 
2066
      predicates are evaluated whenever a new table entry is made.  It has
 
2067
      long been understood that this poses a risk of trojan-horse code
 
2068
      execution if one modifies a table owned by an untrustworthy user.
 
2069
      (Note that triggers, defaults, check constraints, etc. pose the
 
2070
      same type of risk.)  But functions in indexes pose extra danger
 
2071
      because they will be executed by routine maintenance operations
 
2072
      such as <command>VACUUM FULL</>, which are commonly performed
 
2073
      automatically under a superuser account.  For example, a nefarious user
 
2074
      can execute code with superuser privileges by setting up a
 
2075
      trojan-horse index definition and waiting for the next routine vacuum.
 
2076
      The fix arranges for standard maintenance operations
 
2077
      (including <command>VACUUM</>, <command>ANALYZE</>, <command>REINDEX</>,
 
2078
      and <command>CLUSTER</>) to execute as the table owner rather than
 
2079
      the calling user, using the same privilege-switching mechanism already
 
2080
      used for <literal>SECURITY DEFINER</> functions.  To prevent bypassing
 
2081
      this security measure, execution of <command>SET SESSION
 
2082
      AUTHORIZATION</> and <command>SET ROLE</> is now forbidden within a
 
2083
      <literal>SECURITY DEFINER</> context.  (CVE-2007-6600)
 
2084
     </para>
 
2085
    </listitem>
 
2086
 
 
2087
    <listitem>
 
2088
     <para>
 
2089
      Repair assorted bugs in the regular-expression package (Tom, Will Drewry)
 
2090
     </para>
 
2091
 
 
2092
     <para>
 
2093
      Suitably crafted regular-expression patterns could cause crashes,
 
2094
      infinite or near-infinite looping, and/or massive memory consumption,
 
2095
      all of which pose denial-of-service hazards for applications that
 
2096
      accept regex search patterns from untrustworthy sources.
 
2097
      (CVE-2007-4769, CVE-2007-4772, CVE-2007-6067)
 
2098
     </para>
 
2099
    </listitem>
 
2100
 
 
2101
    <listitem>
 
2102
     <para>
 
2103
      Require non-superusers who use <filename>/contrib/dblink</> to use only
 
2104
      password authentication, as a security measure (Joe)
 
2105
     </para>
 
2106
 
 
2107
     <para>
 
2108
      The fix that appeared for this in 8.1.10 was incomplete, as it plugged
 
2109
      the hole for only some <filename>dblink</> functions.  (CVE-2007-6601,
 
2110
      CVE-2007-3278)
 
2111
     </para>
 
2112
    </listitem>
 
2113
 
 
2114
    <listitem>
 
2115
     <para>
 
2116
      Update time zone data files to <application>tzdata</> release 2007k
 
2117
      (in particular, recent Argentina changes) (Tom)
 
2118
     </para>
 
2119
    </listitem>
 
2120
 
 
2121
    <listitem>
 
2122
     <para>
 
2123
      Improve planner's handling of LIKE/regex estimation in non-C locales
 
2124
      (Tom)
 
2125
     </para>
 
2126
    </listitem>
 
2127
 
 
2128
    <listitem>
 
2129
     <para>
 
2130
      Fix planner failure in some cases of <literal>WHERE false AND var IN
 
2131
      (SELECT ...)</> (Tom)
 
2132
     </para>
 
2133
    </listitem>
 
2134
 
 
2135
    <listitem>
 
2136
     <para>
 
2137
      Preserve the tablespace of indexes that are
 
2138
      rebuilt by <command>ALTER TABLE ... ALTER COLUMN TYPE</> (Tom)
 
2139
     </para>
 
2140
    </listitem>
 
2141
 
 
2142
    <listitem>
 
2143
     <para>
 
2144
      Make archive recovery always start a new WAL timeline, rather than only
 
2145
      when a recovery stop time was used (Simon)
 
2146
     </para>
 
2147
 
 
2148
     <para>
 
2149
      This avoids a corner-case risk of trying to overwrite an existing
 
2150
      archived copy of the last WAL segment, and seems simpler and cleaner
 
2151
      than the original definition.
 
2152
     </para>
 
2153
    </listitem>
 
2154
 
 
2155
    <listitem>
 
2156
     <para>
 
2157
      Make <command>VACUUM</> not use all of <varname>maintenance_work_mem</>
 
2158
      when the table is too small for it to be useful (Alvaro)
 
2159
     </para>
 
2160
    </listitem>
 
2161
 
 
2162
    <listitem>
 
2163
     <para>
 
2164
      Fix potential crash in <function>translate()</> when using a multibyte
 
2165
      database encoding (Tom)
 
2166
     </para>
 
2167
    </listitem>
 
2168
 
 
2169
    <listitem>
 
2170
     <para>
 
2171
      Fix overflow in <literal>extract(epoch from interval)</> for intervals
 
2172
      exceeding 68 years (Tom)
 
2173
     </para>
 
2174
    </listitem>
 
2175
 
 
2176
    <listitem>
 
2177
     <para>
 
2178
      Fix PL/Perl to not fail when a UTF-8 regular expression is used
 
2179
      in a trusted function (Andrew)
 
2180
     </para>
 
2181
    </listitem>
 
2182
 
 
2183
    <listitem>
 
2184
     <para>
 
2185
      Fix PL/Perl to cope when platform's Perl defines type <literal>bool</>
 
2186
      as <literal>int</> rather than <literal>char</> (Tom)
 
2187
     </para>
 
2188
 
 
2189
     <para>
 
2190
      While this could theoretically happen anywhere, no standard build of
 
2191
      Perl did things this way ... until <productname>Mac OS X</> 10.5.
 
2192
     </para>
 
2193
    </listitem>
 
2194
 
 
2195
    <listitem>
 
2196
     <para>
 
2197
      Fix PL/Python to not crash on long exception messages (Alvaro)
 
2198
     </para>
 
2199
    </listitem>
 
2200
 
 
2201
    <listitem>
 
2202
     <para>
 
2203
      Fix <application>pg_dump</> to correctly handle inheritance child tables
 
2204
      that have default expressions different from their parent's (Tom)
 
2205
     </para>
 
2206
    </listitem>
 
2207
 
 
2208
    <listitem>
 
2209
     <para>
 
2210
      Fix <application>libpq</> crash when <varname>PGPASSFILE</> refers
 
2211
      to a file that is not a plain file (Martin Pitt)
 
2212
     </para>
 
2213
    </listitem>
 
2214
 
 
2215
    <listitem>
 
2216
     <para>
 
2217
      <application>ecpg</> parser fixes (Michael)
 
2218
     </para>
 
2219
    </listitem>
 
2220
 
 
2221
    <listitem>
 
2222
     <para>
 
2223
      Make <filename>contrib/pgcrypto</> defend against
 
2224
      <application>OpenSSL</> libraries that fail on keys longer than 128
 
2225
      bits; which is the case at least on some Solaris versions (Marko Kreen)
 
2226
     </para>
 
2227
    </listitem>
 
2228
 
 
2229
    <listitem>
 
2230
     <para>
 
2231
      Make <filename>contrib/tablefunc</>'s <function>crosstab()</> handle
 
2232
      NULL rowid as a category in its own right, rather than crashing (Joe)
 
2233
     </para>
 
2234
    </listitem>
 
2235
 
 
2236
    <listitem>
 
2237
     <para>
 
2238
      Fix <type>tsvector</> and <type>tsquery</> output routines to
 
2239
      escape backslashes correctly (Teodor, Bruce)
 
2240
     </para>
 
2241
    </listitem>
 
2242
 
 
2243
    <listitem>
 
2244
     <para>
 
2245
      Fix crash of <function>to_tsvector()</> on huge input strings (Teodor)
 
2246
     </para>
 
2247
    </listitem>
 
2248
 
 
2249
    <listitem>
 
2250
     <para>
 
2251
      Require a specific version of <productname>Autoconf</> to be used
 
2252
      when re-generating the <command>configure</> script (Peter)
 
2253
     </para>
 
2254
 
 
2255
     <para>
 
2256
      This affects developers and packagers only.  The change was made
 
2257
      to prevent accidental use of untested combinations of
 
2258
      <productname>Autoconf</> and <productname>PostgreSQL</> versions.
 
2259
      You can remove the version check if you really want to use a
 
2260
      different <productname>Autoconf</> version, but it's
 
2261
      your responsibility whether the result works or not.
 
2262
     </para>
 
2263
    </listitem>
 
2264
 
 
2265
   </itemizedlist>
 
2266
 
 
2267
  </sect2>
 
2268
 </sect1>
 
2269
 
 
2270
 <sect1 id="release-8-1-10">
 
2271
  <title>Release 8.1.10</title>
 
2272
 
 
2273
  <note>
 
2274
  <title>Release Date</title>
 
2275
  <simpara>2007-09-17</simpara>
 
2276
  </note>
 
2277
 
 
2278
  <para>
 
2279
   This release contains a variety of fixes from 8.1.9.
 
2280
   For information about new features in the 8.1 major release, see
 
2281
   <xref linkend="release-8-1">.
 
2282
  </para>
 
2283
 
 
2284
  <sect2>
 
2285
   <title>Migration to Version 8.1.10</title>
 
2286
 
 
2287
   <para>
 
2288
    A dump/restore is not required for those running 8.1.X.
 
2289
    However, if you are upgrading from a version earlier than 8.1.2,
 
2290
    see the release notes for 8.1.2.
 
2291
   </para>
 
2292
 
 
2293
  </sect2>
 
2294
 
 
2295
  <sect2>
 
2296
   <title>Changes</title>
 
2297
 
 
2298
   <itemizedlist>
 
2299
 
 
2300
    <listitem>
 
2301
     <para>
 
2302
      Prevent index corruption when a transaction inserts rows and
 
2303
      then aborts close to the end of a concurrent <command>VACUUM</>
 
2304
      on the same table (Tom)
 
2305
     </para>
 
2306
    </listitem>
 
2307
 
 
2308
    <listitem>
 
2309
     <para>
 
2310
      Make <command>CREATE DOMAIN ... DEFAULT NULL</> work properly (Tom)
 
2311
     </para>
 
2312
    </listitem>
 
2313
 
 
2314
    <listitem>
 
2315
     <para>
 
2316
      Allow the <type>interval</> data type to accept input consisting only of
 
2317
      milliseconds or microseconds (Neil)
 
2318
     </para>
 
2319
    </listitem>
 
2320
 
 
2321
    <listitem>
 
2322
     <para>
 
2323
      Speed up rtree index insertion (Teodor)
 
2324
     </para>
 
2325
    </listitem>
 
2326
 
 
2327
    <listitem>
 
2328
     <para>
 
2329
      Fix excessive logging of <acronym>SSL</> error messages (Tom)
 
2330
     </para>
 
2331
    </listitem>
 
2332
 
 
2333
    <listitem>
 
2334
     <para>
 
2335
      Fix logging so that log messages are never interleaved when using
 
2336
      the syslogger process (Andrew)
 
2337
     </para>
 
2338
    </listitem>
 
2339
 
 
2340
    <listitem>
 
2341
     <para>
 
2342
      Fix crash when <varname>log_min_error_statement</> logging runs out
 
2343
      of memory (Tom)
 
2344
     </para>
 
2345
    </listitem>
 
2346
 
 
2347
    <listitem>
 
2348
     <para>
 
2349
      Fix incorrect handling of some foreign-key corner cases (Tom)
 
2350
     </para>
 
2351
    </listitem>
 
2352
 
 
2353
    <listitem>
 
2354
     <para>
 
2355
      Prevent <command>REINDEX</> and <command>CLUSTER</> from failing
 
2356
      due to attempting to process temporary tables of other sessions (Alvaro)
 
2357
     </para>
 
2358
    </listitem>
 
2359
 
 
2360
    <listitem>
 
2361
     <para>
 
2362
      Update the time zone database rules, particularly New Zealand's upcoming changes (Tom)
 
2363
     </para>
 
2364
    </listitem>
 
2365
 
 
2366
    <listitem>
 
2367
     <para>
 
2368
      Windows socket improvements (Magnus)
 
2369
     </para>
 
2370
    </listitem>
 
2371
 
 
2372
    <listitem>
 
2373
     <para>
 
2374
      Suppress timezone name (<literal>%Z</>) in log timestamps on Windows
 
2375
      because of possible encoding mismatches (Tom)
 
2376
     </para>
 
2377
    </listitem>
 
2378
 
 
2379
    <listitem>
 
2380
     <para>
 
2381
      Require non-superusers who use <filename>/contrib/dblink</> to use only
 
2382
      password authentication, as a security measure (Joe)
 
2383
     </para>
 
2384
    </listitem>
 
2385
 
 
2386
   </itemizedlist>
 
2387
 
 
2388
  </sect2>
 
2389
 </sect1>
 
2390
 
 
2391
 <sect1 id="release-8-1-9">
 
2392
  <title>Release 8.1.9</title>
 
2393
 
 
2394
  <note>
 
2395
  <title>Release Date</title>
 
2396
  <simpara>2007-04-23</simpara>
 
2397
  </note>
 
2398
 
 
2399
  <para>
 
2400
   This release contains a variety of fixes from 8.1.8,
 
2401
   including a security fix.
 
2402
   For information about new features in the 8.1 major release, see
 
2403
   <xref linkend="release-8-1">.
 
2404
  </para>
 
2405
 
 
2406
  <sect2>
 
2407
   <title>Migration to Version 8.1.9</title>
 
2408
 
 
2409
   <para>
 
2410
    A dump/restore is not required for those running 8.1.X.
 
2411
    However, if you are upgrading from a version earlier than 8.1.2,
 
2412
    see the release notes for 8.1.2.
 
2413
   </para>
 
2414
 
 
2415
  </sect2>
 
2416
 
 
2417
  <sect2>
 
2418
   <title>Changes</title>
 
2419
 
 
2420
   <itemizedlist>
 
2421
 
 
2422
    <listitem>
 
2423
    <para>
 
2424
     Support explicit placement of the temporary-table schema within
 
2425
     <varname>search_path</>, and disable searching it for functions
 
2426
     and operators (Tom)
 
2427
    </para>
 
2428
    <para>
 
2429
     This is needed to allow a security-definer function to set a
 
2430
     truly secure value of <varname>search_path</>.  Without it,
 
2431
     an unprivileged SQL user can use temporary objects to execute code
 
2432
     with the privileges of the security-definer function (CVE-2007-2138).
 
2433
     See <command>CREATE FUNCTION</> for more information.
 
2434
    </para>
 
2435
    </listitem>
 
2436
 
 
2437
    <listitem>
 
2438
    <para>
 
2439
     <filename>/contrib/tsearch2</> crash fixes (Teodor)
 
2440
    </para>
 
2441
    </listitem>
 
2442
 
 
2443
    <listitem>
 
2444
    <para>
 
2445
     Require <command>COMMIT PREPARED</> to be executed in the same
 
2446
     database as the transaction was prepared in (Heikki)
 
2447
    </para>
 
2448
    </listitem>
 
2449
 
 
2450
    <listitem>
 
2451
    <para>
 
2452
     Fix potential-data-corruption bug in how <command>VACUUM FULL</> handles
 
2453
     <command>UPDATE</> chains (Tom, Pavan Deolasee)
 
2454
    </para>
 
2455
    </listitem>
 
2456
 
 
2457
    <listitem>
 
2458
    <para>
 
2459
     Planner fixes, including improving outer join and bitmap scan
 
2460
     selection logic (Tom)
 
2461
    </para>
 
2462
    </listitem>
 
2463
 
 
2464
    <listitem>
 
2465
    <para>
 
2466
     Fix PANIC during enlargement of a hash index (bug introduced in 8.1.6)
 
2467
     (Tom)
 
2468
    </para>
 
2469
    </listitem>
 
2470
 
 
2471
    <listitem>
 
2472
    <para>
 
2473
     Fix POSIX-style timezone specs to follow new USA DST rules (Tom)
 
2474
    </para>
 
2475
    </listitem>
 
2476
 
 
2477
   </itemizedlist>
 
2478
 
 
2479
  </sect2>
 
2480
 </sect1>
 
2481
 
 
2482
 <sect1 id="release-8-1-8">
 
2483
  <title>Release 8.1.8</title>
 
2484
 
 
2485
  <note>
 
2486
  <title>Release Date</title>
 
2487
  <simpara>2007-02-07</simpara>
 
2488
  </note>
 
2489
 
 
2490
  <para>
 
2491
   This release contains one fix from 8.1.7.
 
2492
   For information about new features in the 8.1 major release, see
 
2493
   <xref linkend="release-8-1">.
 
2494
  </para>
 
2495
 
 
2496
  <sect2>
 
2497
   <title>Migration to Version 8.1.8</title>
 
2498
 
 
2499
   <para>
 
2500
    A dump/restore is not required for those running 8.1.X.
 
2501
    However, if you are upgrading from a version earlier than 8.1.2,
 
2502
    see the release notes for 8.1.2.
 
2503
   </para>
 
2504
 
 
2505
  </sect2>
 
2506
 
 
2507
  <sect2>
 
2508
   <title>Changes</title>
 
2509
 
 
2510
   <itemizedlist>
 
2511
 
 
2512
    <listitem>
 
2513
    <para>
 
2514
     Remove overly-restrictive check for type length in constraints and
 
2515
     functional indexes(Tom)
 
2516
    </para>
 
2517
    </listitem>
 
2518
 
 
2519
   </itemizedlist>
 
2520
 
 
2521
  </sect2>
 
2522
 </sect1>
 
2523
 
 
2524
 <sect1 id="release-8-1-7">
 
2525
  <title>Release 8.1.7</title>
 
2526
 
 
2527
  <note>
 
2528
  <title>Release Date</title>
 
2529
  <simpara>2007-02-05</simpara>
 
2530
  </note>
 
2531
 
 
2532
  <para>
 
2533
   This release contains a variety of fixes from 8.1.6, including
 
2534
   a security fix.
 
2535
   For information about new features in the 8.1 major release, see
 
2536
   <xref linkend="release-8-1">.
 
2537
  </para>
 
2538
 
 
2539
  <sect2>
 
2540
   <title>Migration to Version 8.1.7</title>
 
2541
 
 
2542
   <para>
 
2543
    A dump/restore is not required for those running 8.1.X.
 
2544
    However, if you are upgrading from a version earlier than 8.1.2,
 
2545
    see the release notes for 8.1.2.
 
2546
   </para>
 
2547
 
 
2548
  </sect2>
 
2549
 
 
2550
  <sect2>
 
2551
   <title>Changes</title>
 
2552
 
 
2553
   <itemizedlist>
 
2554
 
 
2555
    <listitem>
 
2556
    <para>
 
2557
     Remove security vulnerabilities that allowed connected users
 
2558
     to read backend memory (Tom)
 
2559
    </para>
 
2560
    <para>
 
2561
     The vulnerabilities involve suppressing the normal check that a SQL
 
2562
     function returns the data type it's declared to, and changing the
 
2563
     data type of a table column (CVE-2007-0555, CVE-2007-0556).  These
 
2564
     errors can easily be exploited to cause a backend crash, and in
 
2565
     principle might be used to read database content that the user
 
2566
     should not be able to access.
 
2567
    </para>
 
2568
    </listitem>
 
2569
 
 
2570
    <listitem>
 
2571
    <para>
 
2572
     Fix rare bug wherein btree index page splits could fail
 
2573
     due to choosing an infeasible split point (Heikki Linnakangas)
 
2574
    </para>
 
2575
    </listitem>
 
2576
 
 
2577
    <listitem>
 
2578
    <para>
 
2579
     Improve <command>VACUUM</> performance for databases with many tables (Tom)
 
2580
    </para>
 
2581
    </listitem>
 
2582
 
 
2583
    <listitem>
 
2584
    <para>
 
2585
     Fix autovacuum to avoid leaving non-permanent transaction IDs in
 
2586
     non-connectable databases (Alvaro)
 
2587
    </para>
 
2588
 
 
2589
    <para>
 
2590
     This bug affects the 8.1 branch only.
 
2591
    </para>
 
2592
    </listitem>
 
2593
 
 
2594
    <listitem>
 
2595
    <para>
 
2596
     Fix for rare Assert() crash triggered by <literal>UNION</> (Tom)
 
2597
    </para>
 
2598
    </listitem>
 
2599
 
 
2600
    <listitem>
 
2601
    <para>
 
2602
     Tighten security of multi-byte character processing for UTF8 sequences
 
2603
     over three bytes long (Tom)
 
2604
    </para>
 
2605
    </listitem>
 
2606
 
 
2607
    <listitem>
 
2608
    <para>
 
2609
     Fix bogus <quote>permission denied</> failures occurring on Windows
 
2610
     due to attempts to fsync already-deleted files (Magnus, Tom)
 
2611
    </para>
 
2612
    </listitem>
 
2613
 
 
2614
    <listitem>
 
2615
    <para>
 
2616
     Fix possible crashes when an already-in-use PL/pgSQL function is
 
2617
     updated (Tom)
 
2618
    </para>
 
2619
    </listitem>
 
2620
 
 
2621
   </itemizedlist>
 
2622
 
 
2623
  </sect2>
 
2624
 </sect1>
 
2625
 
 
2626
 <sect1 id="release-8-1-6">
 
2627
  <title>Release 8.1.6</title>
 
2628
 
 
2629
  <note>
 
2630
  <title>Release Date</title>
 
2631
  <simpara>2007-01-08</simpara>
 
2632
  </note>
 
2633
 
 
2634
  <para>
 
2635
   This release contains a variety of fixes from 8.1.5.
 
2636
   For information about new features in the 8.1 major release, see
 
2637
   <xref linkend="release-8-1">.
 
2638
  </para>
 
2639
 
 
2640
  <sect2>
 
2641
   <title>Migration to Version 8.1.6</title>
 
2642
 
 
2643
   <para>
 
2644
    A dump/restore is not required for those running 8.1.X.
 
2645
    However, if you are upgrading from a version earlier than 8.1.2,
 
2646
    see the release notes for 8.1.2.
 
2647
   </para>
 
2648
 
 
2649
  </sect2>
 
2650
 
 
2651
  <sect2>
 
2652
   <title>Changes</title>
 
2653
 
 
2654
   <itemizedlist>
 
2655
 
 
2656
    <listitem>
 
2657
     <para>
 
2658
      Improve handling of <function>getaddrinfo()</> on AIX (Tom)
 
2659
     </para>
 
2660
 
 
2661
     <para>
 
2662
      This fixes a problem with starting the statistics collector,
 
2663
      among other things.
 
2664
     </para>
 
2665
    </listitem>
 
2666
 
 
2667
    <listitem>
 
2668
     <para>
 
2669
      Fix <application>pg_restore</> to handle a tar-format backup
 
2670
      that contains large objects (blobs) with comments (Tom)
 
2671
     </para>
 
2672
    </listitem>
 
2673
 
 
2674
     <listitem>
 
2675
      <para>
 
2676
       Fix <quote>failed to re-find parent key</> errors in
 
2677
       <command>VACUUM</> (Tom)
 
2678
      </para>
 
2679
     </listitem>
 
2680
 
 
2681
     <listitem>
 
2682
      <para>
 
2683
       Clean out <filename>pg_internal.init</> cache files during server
 
2684
       restart (Simon)
 
2685
      </para>
 
2686
 
 
2687
      <para>
 
2688
       This avoids a hazard that the cache files might contain stale
 
2689
       data after PITR recovery.
 
2690
      </para>
 
2691
     </listitem>
 
2692
 
 
2693
     <listitem>
 
2694
      <para>
 
2695
       Fix race condition for truncation of a large relation across a
 
2696
       gigabyte boundary by <command>VACUUM</> (Tom)
 
2697
      </para>
 
2698
     </listitem>
 
2699
 
 
2700
     <listitem>
 
2701
      <para>
 
2702
       Fix bug causing needless deadlock errors on row-level locks (Tom)
 
2703
      </para>
 
2704
     </listitem>
 
2705
 
 
2706
     <listitem>
 
2707
      <para>
 
2708
       Fix bugs affecting multi-gigabyte hash indexes (Tom)
 
2709
      </para>
 
2710
     </listitem>
 
2711
 
 
2712
    <listitem>
 
2713
     <para>
 
2714
      Fix possible deadlock in Windows signal handling (Teodor)
 
2715
     </para>
 
2716
    </listitem>
 
2717
 
 
2718
    <listitem>
 
2719
     <para>
 
2720
      Fix error when constructing an <literal>ARRAY[]</> made up of multiple
 
2721
      empty elements (Tom)
 
2722
     </para>
 
2723
    </listitem>
 
2724
 
 
2725
    <listitem>
 
2726
     <para>
 
2727
      Fix ecpg memory leak during connection (Michael)
 
2728
     </para>
 
2729
    </listitem>
 
2730
 
 
2731
    <listitem>
 
2732
     <para>
 
2733
      Fix for Darwin (OS X) compilation (Tom)
 
2734
     </para>
 
2735
    </listitem>
 
2736
 
 
2737
    <listitem>
 
2738
     <para>
 
2739
      <function>to_number()</> and <function>to_char(numeric)</>
 
2740
      are now <literal>STABLE</>, not <literal>IMMUTABLE</>, for
 
2741
      new <application>initdb</> installs (Tom)
 
2742
     </para>
 
2743
 
 
2744
     <para>
 
2745
      This is because <varname>lc_numeric</> can potentially
 
2746
      change the output of these functions.
 
2747
     </para>
 
2748
    </listitem>
 
2749
 
 
2750
    <listitem>
 
2751
     <para>
 
2752
      Improve index usage of regular expressions that use parentheses (Tom)
 
2753
     </para>
 
2754
 
 
2755
     <para>
 
2756
      This improves <application>psql</> <literal>\d</> performance also.
 
2757
     </para>
 
2758
    </listitem>
 
2759
 
 
2760
    <listitem>
 
2761
     <para>
 
2762
      Update timezone database
 
2763
     </para>
 
2764
 
 
2765
     <para>
 
2766
      This affects Australian and Canadian daylight-savings rules in
 
2767
      particular.
 
2768
     </para>
 
2769
    </listitem>
 
2770
 
 
2771
   </itemizedlist>
 
2772
 
 
2773
  </sect2>
 
2774
 </sect1>
 
2775
 
 
2776
 <sect1 id="release-8-1-5">
 
2777
  <title>Release 8.1.5</title>
 
2778
 
 
2779
  <note>
 
2780
  <title>Release Date</title>
 
2781
  <simpara>2006-10-16</simpara>
 
2782
  </note>
 
2783
 
 
2784
  <para>
 
2785
   This release contains a variety of fixes from 8.1.4.
 
2786
   For information about new features in the 8.1 major release, see
 
2787
   <xref linkend="release-8-1">.
 
2788
  </para>
 
2789
 
 
2790
  <sect2>
 
2791
   <title>Migration to Version 8.1.5</title>
 
2792
 
 
2793
   <para>
 
2794
    A dump/restore is not required for those running 8.1.X.
 
2795
    However, if you are upgrading from a version earlier than 8.1.2,
 
2796
    see the release notes for 8.1.2.
 
2797
   </para>
 
2798
 
 
2799
  </sect2>
 
2800
 
 
2801
  <sect2>
 
2802
   <title>Changes</title>
 
2803
 
 
2804
<itemizedlist>
 
2805
<listitem><para>Disallow aggregate functions in <command>UPDATE</>
 
2806
commands, except within sub-SELECTs (Tom)</para>
 
2807
<para>The behavior of such an aggregate was unpredictable, and in 8.1.X
 
2808
could cause a crash, so it has been disabled.  The SQL standard does not allow
 
2809
this either.</para></listitem>
 
2810
<listitem><para>Fix core dump when an untyped literal is taken as
 
2811
ANYARRAY</para></listitem>
 
2812
<listitem><para>Fix core dump in duration logging for extended query protocol
 
2813
when a <command>COMMIT</> or <command>ROLLBACK</> is
 
2814
executed</para></listitem>
 
2815
<listitem><para>Fix mishandling of AFTER triggers when query contains a SQL
 
2816
function returning multiple rows (Tom)</para></listitem>
 
2817
<listitem><para>Fix <command>ALTER TABLE ... TYPE</> to recheck
 
2818
<literal>NOT NULL</> for <literal>USING</> clause (Tom)</para></listitem>
 
2819
<listitem><para>Fix <function>string_to_array()</> to handle overlapping
 
2820
 matches for the separator string</para>
 
2821
<para>For example, <literal>string_to_array('123xx456xxx789', 'xx')</>.
 
2822
</para></listitem>
 
2823
<listitem><para>Fix <function>to_timestamp()</> for
 
2824
<literal>AM</>/<literal>PM</> formats (Bruce)</para></listitem>
 
2825
<listitem><para>Fix autovacuum's calculation that decides whether
 
2826
 <command>ANALYZE</> is needed (Alvaro)</para></listitem>
 
2827
<listitem><para>Fix corner cases in pattern matching for
 
2828
 <application>psql</>'s <literal>\d</> commands</para></listitem>
 
2829
<listitem><para>Fix index-corrupting bugs in /contrib/ltree
 
2830
 (Teodor)</para></listitem>
 
2831
<listitem><para>Numerous robustness fixes in <application>ecpg</> (Joachim
 
2832
Wieland)</para></listitem>
 
2833
<listitem><para>Fix backslash escaping in /contrib/dbmirror</para></listitem>
 
2834
<listitem><para>Minor fixes in /contrib/dblink and /contrib/tsearch2</para>
 
2835
</listitem>
 
2836
<listitem><para>Efficiency improvements in hash tables and bitmap index scans
 
2837
(Tom)</para></listitem>
 
2838
<listitem><para>Fix instability of statistics collection on Windows (Tom, Andrew)</para></listitem>
 
2839
<listitem><para>Fix <varname>statement_timeout</> to use the proper
 
2840
units on Win32 (Bruce)</para>
 
2841
<para>In previous Win32 8.1.X versions, the delay was off by a factor of
 
2842
100.</para></listitem>
 
2843
<listitem><para>Fixes for <acronym>MSVC</> and <productname>Borland C++</>
 
2844
compilers (Hiroshi Saito)</para></listitem>
 
2845
<listitem><para>Fixes for <systemitem class="osname">AIX</> and
 
2846
<productname>Intel</> compilers (Tom)</para></listitem>
 
2847
<listitem><para>Fix rare bug in continuous archiving (Tom)</para></listitem>
 
2848
</itemizedlist>
 
2849
 
 
2850
  </sect2>
 
2851
 </sect1>
 
2852
 
 
2853
 <sect1 id="release-8-1-4">
 
2854
  <title>Release 8.1.4</title>
 
2855
 
 
2856
  <note>
 
2857
  <title>Release Date</title>
 
2858
  <simpara>2006-05-23</simpara>
 
2859
  </note>
 
2860
 
 
2861
  <para>
 
2862
   This release contains a variety of fixes from 8.1.3,
 
2863
   including patches for extremely serious security issues.
 
2864
   For information about new features in the 8.1 major release, see
 
2865
   <xref linkend="release-8-1">.
 
2866
  </para>
 
2867
 
 
2868
  <sect2>
 
2869
   <title>Migration to Version 8.1.4</title>
 
2870
 
 
2871
   <para>
 
2872
    A dump/restore is not required for those running 8.1.X.
 
2873
    However, if you are upgrading from a version earlier than 8.1.2,
 
2874
    see the release notes for 8.1.2.
 
2875
   </para>
 
2876
 
 
2877
   <para>
 
2878
    Full security against the SQL-injection attacks described in
 
2879
    CVE-2006-2313 and CVE-2006-2314 might require changes in application
 
2880
    code.  If you have applications that embed untrustworthy strings
 
2881
    into SQL commands, you should examine them as soon as possible to
 
2882
    ensure that they are using recommended escaping techniques.  In
 
2883
    most cases, applications should be using subroutines provided by
 
2884
    libraries or drivers (such as <application>libpq</>'s
 
2885
    <function>PQescapeStringConn()</>) to perform string escaping,
 
2886
    rather than relying on <foreignphrase>ad hoc</> code to do it.
 
2887
   </para>
 
2888
  </sect2>
 
2889
 
 
2890
  <sect2>
 
2891
   <title>Changes</title>
 
2892
 
 
2893
<itemizedlist>
 
2894
<listitem><para>Change the server to reject invalidly-encoded multibyte
 
2895
characters in all cases (Tatsuo, Tom)</para>
 
2896
<para>While <productname>PostgreSQL</> has been moving in this direction for
 
2897
some time, the checks are now applied uniformly to all encodings and all
 
2898
textual input, and are now always errors not merely warnings.  This change
 
2899
defends against SQL-injection attacks of the type described in CVE-2006-2313.
 
2900
</para></listitem>
 
2901
 
 
2902
<listitem><para>Reject unsafe uses of <literal>\'</> in string literals</para>
 
2903
<para>As a server-side defense against SQL-injection attacks of the type
 
2904
described in CVE-2006-2314, the server now only accepts <literal>''</> and not
 
2905
<literal>\'</> as a representation of ASCII single quote in SQL string
 
2906
literals.  By default, <literal>\'</> is rejected only when
 
2907
<varname>client_encoding</> is set to a client-only encoding (SJIS, BIG5, GBK,
 
2908
GB18030, or UHC), which is the scenario in which SQL injection is possible.
 
2909
A new configuration parameter <varname>backslash_quote</> is available to
 
2910
adjust this behavior when needed.  Note that full security against
 
2911
CVE-2006-2314 might require client-side changes; the purpose of
 
2912
<varname>backslash_quote</> is in part to make it obvious that insecure
 
2913
clients are insecure.
 
2914
</para></listitem>
 
2915
 
 
2916
<listitem><para>Modify <application>libpq</>'s string-escaping routines to be
 
2917
aware of encoding considerations and
 
2918
<varname>standard_conforming_strings</></para>
 
2919
<para>This fixes <application>libpq</>-using applications for the security
 
2920
issues described in CVE-2006-2313 and CVE-2006-2314, and also future-proofs
 
2921
them against the planned changeover to SQL-standard string literal syntax.
 
2922
Applications that use multiple <productname>PostgreSQL</> connections
 
2923
concurrently should migrate to <function>PQescapeStringConn()</> and
 
2924
<function>PQescapeByteaConn()</> to ensure that escaping is done correctly
 
2925
for the settings in use in each database connection.  Applications that
 
2926
do string escaping <quote>by hand</> should be modified to rely on library
 
2927
routines instead.
 
2928
</para></listitem>
 
2929
 
 
2930
<listitem><para>Fix weak key selection in pgcrypto (Marko Kreen)</para>
 
2931
<para>Errors in fortuna PRNG reseeding logic could cause a predictable
 
2932
session key to be selected by <function>pgp_sym_encrypt()</> in some cases.
 
2933
This only affects non-OpenSSL-using builds.
 
2934
</para></listitem>
 
2935
 
 
2936
<listitem><para>Fix some incorrect encoding conversion functions</para>
 
2937
<para><function>win1251_to_iso</>, <function>win866_to_iso</>,
 
2938
<function>euc_tw_to_big5</>, <function>euc_tw_to_mic</>,
 
2939
<function>mic_to_euc_tw</> were all broken to varying
 
2940
extents.
 
2941
</para></listitem>
 
2942
 
 
2943
<listitem><para>Clean up stray remaining uses of <literal>\'</> in strings
 
2944
(Bruce, Jan)</para></listitem>
 
2945
 
 
2946
<listitem><para>Make autovacuum visible in <structname>pg_stat_activity</>
 
2947
(Alvaro)</para></listitem>
 
2948
 
 
2949
<listitem><para>Disable <literal>full_page_writes</> (Tom)</para>
 
2950
<para>In certain cases, having <literal>full_page_writes</> off would cause
 
2951
crash recovery to fail.  A proper fix will appear in 8.2; for now it's just
 
2952
disabled.
 
2953
</para></listitem>
 
2954
 
 
2955
<listitem><para>Various planner fixes, particularly for bitmap index scans and
 
2956
MIN/MAX optimization (Tom)</para></listitem>
 
2957
 
 
2958
<listitem><para>Fix incorrect optimization in merge join (Tom)</para>
 
2959
<para>Outer joins could sometimes emit multiple copies of unmatched rows.
 
2960
</para></listitem>
 
2961
 
 
2962
<listitem><para>Fix crash from using and modifying a plpgsql function in the
 
2963
same transaction</para></listitem>
 
2964
 
 
2965
<listitem><para>Fix WAL replay for case where a B-Tree index has been
 
2966
truncated</para></listitem>
 
2967
 
 
2968
<listitem><para>Fix <literal>SIMILAR TO</> for patterns involving
 
2969
<literal>|</> (Tom)</para></listitem>
 
2970
 
 
2971
<listitem><para>Fix <command>SELECT INTO</> and <command>CREATE TABLE AS</> to
 
2972
create tables in the default tablespace, not the base directory (Kris
 
2973
Jurka)</para></listitem>
 
2974
 
 
2975
<listitem><para>Fix server to use custom DH SSL parameters correctly (Michael
 
2976
Fuhr)</para></listitem>
 
2977
 
 
2978
<listitem><para>Improve qsort performance (Dann Corbit)</para>
 
2979
<para>Currently this code is only used on Solaris.
 
2980
</para></listitem>
 
2981
 
 
2982
<listitem><para>Fix for OS/X Bonjour on x86 systems (Ashley Clark)</para></listitem>
 
2983
 
 
2984
<listitem><para>Fix various minor memory leaks</para></listitem>
 
2985
 
 
2986
<listitem><para>Fix problem with password prompting on some Win32 systems
 
2987
(Robert Kinberg)</para></listitem>
 
2988
 
 
2989
<listitem><para>Improve <application>pg_dump</>'s handling of default values
 
2990
for domains</para></listitem>
 
2991
 
 
2992
<listitem><para>Fix <application>pg_dumpall</> to handle identically-named
 
2993
users and groups reasonably (only possible when dumping from a pre-8.1 server)
 
2994
(Tom)</para>
 
2995
<para>The user and group will be merged into a single role with
 
2996
<literal>LOGIN</> permission.  Formerly the merged role wouldn't have
 
2997
<literal>LOGIN</> permission, making it unusable as a user.
 
2998
</para></listitem>
 
2999
 
 
3000
<listitem><para>Fix <application>pg_restore</> <literal>-n</> to work as
 
3001
documented (Tom)</para></listitem>
 
3002
</itemizedlist>
 
3003
 
 
3004
  </sect2>
 
3005
 </sect1>
 
3006
 
 
3007
 <sect1 id="release-8-1-3">
 
3008
  <title>Release 8.1.3</title>
 
3009
 
 
3010
  <note>
 
3011
  <title>Release Date</title>
 
3012
  <simpara>2006-02-14</simpara>
 
3013
  </note>
 
3014
 
 
3015
  <para>
 
3016
   This release contains a variety of fixes from 8.1.2,
 
3017
   including one very serious security issue.
 
3018
   For information about new features in the 8.1 major release, see
 
3019
   <xref linkend="release-8-1">.
 
3020
  </para>
 
3021
 
 
3022
  <sect2>
 
3023
   <title>Migration to Version 8.1.3</title>
 
3024
 
 
3025
   <para>
 
3026
    A dump/restore is not required for those running 8.1.X.
 
3027
    However, if you are upgrading from a version earlier than 8.1.2,
 
3028
    see the release notes for 8.1.2.
 
3029
   </para>
 
3030
  </sect2>
 
3031
 
 
3032
  <sect2>
 
3033
   <title>Changes</title>
 
3034
 
 
3035
<itemizedlist>
 
3036
 
 
3037
<listitem><para>Fix bug that allowed any logged-in user to <command>SET
 
3038
ROLE</> to any other database user id (CVE-2006-0553)</para>
 
3039
<para>Due to inadequate validity checking, a user could exploit the special
 
3040
case that <command>SET ROLE</> normally uses to restore the previous role
 
3041
setting after an error.  This allowed ordinary users to acquire superuser
 
3042
status, for example.
 
3043
The escalation-of-privilege risk exists only in 8.1.0-8.1.2.
 
3044
However, in all releases back to 7.3 there is a related bug in <command>SET
 
3045
SESSION AUTHORIZATION</> that allows unprivileged users to crash the server,
 
3046
if it has been compiled with Asserts enabled (which is not the default).
 
3047
Thanks to Akio Ishida for reporting this problem.
 
3048
</para></listitem>
 
3049
 
 
3050
<listitem><para>Fix bug with row visibility logic in self-inserted
 
3051
rows (Tom)</para>
 
3052
<para>Under rare circumstances a row inserted by the current command
 
3053
could be seen as already valid, when it should not be.  Repairs bug
 
3054
created in 8.0.4, 7.4.9, and 7.3.11 releases.
 
3055
</para></listitem>
 
3056
 
 
3057
<listitem><para>Fix race condition that could lead to <quote>file already
 
3058
exists</> errors during pg_clog and pg_subtrans file creation
 
3059
(Tom)</para></listitem>
 
3060
 
 
3061
<listitem><para>Fix cases that could lead to crashes if a cache-invalidation
 
3062
message arrives at just the wrong time (Tom)</para></listitem>
 
3063
 
 
3064
<listitem><para>Properly check <literal>DOMAIN</> constraints for
 
3065
<literal>UNKNOWN</> parameters in prepared statements
 
3066
(Neil)</para></listitem>
 
3067
 
 
3068
<listitem><para>Ensure <command>ALTER COLUMN TYPE</> will process
 
3069
<literal>FOREIGN KEY</>, <literal>UNIQUE</>, and <literal>PRIMARY KEY</>
 
3070
constraints in the proper order (Nakano Yoshihisa)</para></listitem>
 
3071
 
 
3072
<listitem><para>Fixes to allow restoring dumps that have cross-schema
 
3073
references to custom operators or operator classes (Tom)</para></listitem>
 
3074
 
 
3075
<listitem><para>Allow <application>pg_restore</> to continue properly after a
 
3076
<command>COPY</> failure; formerly it tried to treat the remaining
 
3077
<command>COPY</> data as SQL commands (Stephen Frost)</para></listitem>
 
3078
 
 
3079
<listitem><para>Fix <application>pg_ctl</> <literal>unregister</> crash
 
3080
when the  data directory is not specified (Magnus)</para></listitem>
 
3081
 
 
3082
<listitem><para>Fix <application>libpq</> <function>PQprint</> HTML tags
 
3083
(Christoph Zwerschke)</para></listitem>
 
3084
 
 
3085
<listitem><para>Fix <application>ecpg</> crash on AMD64 and PPC
 
3086
(Neil)</para></listitem>
 
3087
 
 
3088
<listitem><para>Allow <literal>SETOF</> and <literal>%TYPE</> to be used
 
3089
together in function result type declarations</para></listitem>
 
3090
 
 
3091
<listitem><para>Recover properly if error occurs during argument passing
 
3092
in <application>PL/python</> (Neil)</para></listitem>
 
3093
 
 
3094
<listitem><para>Fix memory leak in <function>plperl_return_next</>
 
3095
(Neil)</para></listitem>
 
3096
 
 
3097
<listitem><para>Fix <application>PL/perl</>'s handling of locales on
 
3098
Win32 to match the backend (Andrew)</para></listitem>
 
3099
 
 
3100
<listitem><para>Various optimizer fixes (Tom)</para></listitem>
 
3101
 
 
3102
<listitem><para>Fix crash when <literal>log_min_messages</> is set to
 
3103
<literal>DEBUG3</> or above in <filename>postgresql.conf</> on Win32
 
3104
(Bruce)</para></listitem>
 
3105
 
 
3106
<listitem><para>Fix <application>pgxs</> <literal>-L</> library path
 
3107
specification for Win32, Cygwin, OS X, AIX (Bruce)</para></listitem>
 
3108
 
 
3109
<listitem><para>Check that SID is enabled while checking for Win32 admin
 
3110
privileges (Magnus)</para></listitem>
 
3111
 
 
3112
<listitem><para>Properly reject out-of-range date inputs (Kris
 
3113
Jurka)</para></listitem>
 
3114
 
 
3115
<listitem><para>Portability fix for testing presence of <function>finite</>
 
3116
and <function>isinf</> during configure (Tom)</para></listitem>
 
3117
 
 
3118
<listitem><para>Improve speed of <command>COPY IN</> via libpq, by
 
3119
avoiding a kernel call per data line (Alon Goldshuv)</para></listitem>
 
3120
 
 
3121
<listitem><para>Improve speed of <filename>/contrib/tsearch2</> index
 
3122
creation (Tom)</para></listitem>
 
3123
 
 
3124
</itemizedlist>
 
3125
 
 
3126
  </sect2>
 
3127
 </sect1>
 
3128
 
 
3129
 <sect1 id="release-8-1-2">
 
3130
  <title>Release 8.1.2</title>
 
3131
 
 
3132
  <note>
 
3133
  <title>Release Date</title>
 
3134
  <simpara>2006-01-09</simpara>
 
3135
  </note>
 
3136
 
 
3137
  <para>
 
3138
   This release contains a variety of fixes from 8.1.1.
 
3139
   For information about new features in the 8.1 major release, see
 
3140
   <xref linkend="release-8-1">.
 
3141
  </para>
 
3142
 
 
3143
  <sect2>
 
3144
   <title>Migration to Version 8.1.2</title>
 
3145
 
 
3146
   <para>
 
3147
    A dump/restore is not required for those running 8.1.X.
 
3148
    However, you might need to <command>REINDEX</> indexes on textual
 
3149
    columns after updating, if you are affected by the locale or
 
3150
    <application>plperl</> issues described below.
 
3151
   </para>
 
3152
  </sect2>
 
3153
 
 
3154
  <sect2>
 
3155
   <title>Changes</title>
 
3156
 
 
3157
<itemizedlist>
 
3158
 
 
3159
<listitem><para>Fix Windows code so that postmaster will continue rather
 
3160
than exit if there is no more room in ShmemBackendArray (Magnus)</para>
 
3161
<para>The previous behavior could lead to a denial-of-service situation if too
 
3162
many connection requests arrive close together.  This applies
 
3163
<emphasis>only</> to the Windows port.</para></listitem>
 
3164
 
 
3165
<listitem><para>Fix bug introduced in 8.0 that could allow ReadBuffer
 
3166
to return an already-used page as new, potentially causing loss of
 
3167
recently-committed data (Tom)</para></listitem>
 
3168
 
 
3169
<listitem><para>Fix for protocol-level Describe messages issued
 
3170
outside a transaction or in a failed transaction (Tom)</para></listitem>
 
3171
 
 
3172
<listitem><para>Fix character string comparison for locales that consider
 
3173
different character combinations as equal, such as Hungarian (Tom)</para>
 
3174
<para>This might require <command>REINDEX</> to fix existing indexes on
 
3175
textual columns.</para></listitem>
 
3176
 
 
3177
<listitem><para>Set locale environment variables during postmaster startup
 
3178
to ensure that <application>plperl</> won't change the locale later</para>
 
3179
<para>This fixes a problem that occurred if the <application>postmaster</> was
 
3180
started with environment variables specifying a different locale than what
 
3181
<application>initdb</> had been told.  Under these conditions, any use of
 
3182
<application>plperl</> was likely to lead to corrupt indexes.  You might need
 
3183
<command>REINDEX</> to fix existing indexes on
 
3184
textual columns if this has happened to you.</para></listitem>
 
3185
 
 
3186
<listitem><para>Allow more flexible relocation of installation
 
3187
directories (Tom)</para>
 
3188
<para>Previous releases supported relocation only if all installation
 
3189
directory paths were the same except for the last component.</para></listitem>
 
3190
 
 
3191
<listitem><para>Prevent crashes caused by the use of
 
3192
<literal>ISO-8859-5</> and <literal>ISO-8859-9</> encodings
 
3193
(Tatsuo)</para></listitem>
 
3194
 
 
3195
<listitem><para>Fix longstanding bug in strpos() and regular expression
 
3196
handling in certain rarely used Asian multi-byte character sets (Tatsuo)
 
3197
</para></listitem>
 
3198
 
 
3199
<listitem><para>Fix bug where COPY CSV mode considered any
 
3200
<literal>\.</> to terminate the copy data</para> <para>The new code
 
3201
requires <literal>\.</> to appear alone on a line, as per
 
3202
documentation.</para></listitem>
 
3203
 
 
3204
<listitem><para>Make COPY CSV mode quote a literal data value of
 
3205
<literal>\.</> to ensure it cannot be interpreted as the
 
3206
end-of-data marker (Bruce)</para></listitem>
 
3207
 
 
3208
<listitem><para>Various fixes for functions returning <literal>RECORD</>s
 
3209
(Tom) </para></listitem>
 
3210
 
 
3211
<listitem><para>Fix processing of <filename>postgresql.conf</> so a
 
3212
final line with no newline is processed properly (Tom)
 
3213
</para></listitem>
 
3214
 
 
3215
<listitem><para>Fix bug in <filename>/contrib/pgcrypto</> gen_salt,
 
3216
which caused it not to use all available salt space for MD5 and
 
3217
XDES algorithms (Marko Kreen, Solar Designer)</para>
 
3218
<para>Salts for Blowfish and standard DES are unaffected.</para></listitem>
 
3219
 
 
3220
<listitem><para>Fix autovacuum crash when processing expression indexes
 
3221
</para></listitem>
 
3222
 
 
3223
<listitem><para>Fix <filename>/contrib/dblink</> to throw an error,
 
3224
rather than crashing, when the number of columns specified is different from
 
3225
what's actually returned by the query (Joe)</para></listitem>
 
3226
 
 
3227
</itemizedlist>
 
3228
 
 
3229
  </sect2>
 
3230
 </sect1>
 
3231
 
 
3232
 <sect1 id="release-8-1-1">
 
3233
  <title>Release 8.1.1</title>
 
3234
 
 
3235
  <note>
 
3236
  <title>Release Date</title>
 
3237
  <simpara>2005-12-12</simpara>
 
3238
  </note>
 
3239
 
 
3240
  <para>
 
3241
   This release contains a variety of fixes from 8.1.0.
 
3242
   For information about new features in the 8.1 major release, see
 
3243
   <xref linkend="release-8-1">.
 
3244
  </para>
 
3245
 
 
3246
  <sect2>
 
3247
   <title>Migration to Version 8.1.1</title>
 
3248
 
 
3249
   <para>
 
3250
    A dump/restore is not required for those running 8.1.X.
 
3251
   </para>
 
3252
  </sect2>
 
3253
 
 
3254
  <sect2>
 
3255
   <title>Changes</title>
 
3256
 
 
3257
<itemizedlist>
 
3258
<listitem><para>Fix incorrect optimizations of outer-join conditions
 
3259
(Tom)</para></listitem>
 
3260
 
 
3261
<listitem><para>Fix problems with wrong reported column names in cases
 
3262
involving sub-selects flattened by the optimizer (Tom)</para></listitem>
 
3263
 
 
3264
<listitem><para>Fix update failures in scenarios involving CHECK constraints,
 
3265
toasted columns, <emphasis>and</> indexes (Tom)</para></listitem>
 
3266
 
 
3267
<listitem><para>Fix bgwriter problems after recovering from errors
 
3268
(Tom)</para>
 
3269
<para>
 
3270
The background writer was found to leak buffer pins after write errors.
 
3271
While not fatal in itself, this might lead to mysterious blockages of
 
3272
later VACUUM commands.
 
3273
</para>
 
3274
</listitem>
 
3275
 
 
3276
<listitem><para>Prevent failure if client sends Bind protocol message
 
3277
when current transaction is already aborted</para></listitem>
 
3278
 
 
3279
<listitem><para><filename>/contrib/tsearch2</> and <filename>/contrib/ltree</>
 
3280
fixes (Teodor)</para></listitem>
 
3281
 
 
3282
<listitem><para>Fix problems with translated error messages in
 
3283
languages that require word reordering, such as Turkish; also problems with
 
3284
unexpected truncation of output strings and wrong display of the smallest
 
3285
possible bigint value (Andrew, Tom)</para>
 
3286
<para>
 
3287
These problems only appeared on platforms that were using our
 
3288
<filename>port/snprintf.c</> code, which includes BSD variants if
 
3289
<literal>--enable-nls</> was given, and perhaps others.  In addition,
 
3290
a different form of the translated-error-message problem could appear
 
3291
on Windows depending on which version of <filename>libintl</> was used.
 
3292
</para></listitem>
 
3293
 
 
3294
<listitem><para>Re-allow <literal>AM</>/<literal>PM</>, <literal>HH</>,
 
3295
<literal>HH12</>, and <literal>D</> format specifiers for
 
3296
<function>to_char(time)</> and <function>to_char(interval)</>.
 
3297
(<function>to_char(interval)</> should probably use
 
3298
<literal>HH24</>.) (Bruce)</para></listitem>
 
3299
 
 
3300
<listitem><para>AIX, HPUX, and MSVC compile fixes (Tom, Hiroshi
 
3301
Saito)</para></listitem>
 
3302
 
 
3303
<listitem><para>Optimizer improvements (Tom)</para></listitem>
 
3304
 
 
3305
<listitem><para>Retry file reads and writes after Windows
 
3306
NO_SYSTEM_RESOURCES error (Qingqing Zhou)</para></listitem>
 
3307
 
 
3308
<listitem><para>Prevent <application>autovacuum</> from crashing during
 
3309
ANALYZE of expression index (Alvaro)</para></listitem>
 
3310
 
 
3311
<listitem><para>Fix problems with ON COMMIT DELETE ROWS temp
 
3312
tables</para></listitem>
 
3313
 
 
3314
<listitem><para>Fix problems when a trigger alters the output of a SELECT
 
3315
DISTINCT query</para></listitem>
 
3316
 
 
3317
<listitem><para>Add 8.1.0 release note item on how to migrate invalid
 
3318
<literal>UTF-8</> byte sequences (Paul Lindner)</para></listitem>
 
3319
</itemizedlist>
 
3320
 
 
3321
  </sect2>
 
3322
 </sect1>
 
3323
 
 
3324
 <sect1 id="release-8-1">
 
3325
  <title>Release 8.1</title>
 
3326
 
 
3327
  <note>
 
3328
   <title>Release Date</title>
 
3329
   <simpara>2005-11-08</simpara>
 
3330
  </note>
 
3331
 
 
3332
  <sect2>
 
3333
   <title>Overview</title>
 
3334
 
 
3335
   <para>
 
3336
    Major changes in this release:
 
3337
   </para>
 
3338
 
 
3339
   <variablelist>
 
3340
 
 
3341
    <varlistentry>
 
3342
     <term>
 
3343
      Improve concurrent access to the shared buffer cache (Tom)
 
3344
     </term>
 
3345
 
 
3346
     <listitem>
 
3347
      <para>
 
3348
       Access to the shared buffer cache was identified as a
 
3349
       significant scalability problem, particularly on multi-CPU
 
3350
       systems. In this release, the way that locking is done in the
 
3351
       buffer manager has been overhauled to reduce lock contention
 
3352
       and improve scalability. The buffer manager has also been
 
3353
       changed to use a <quote>clock sweep</quote> replacement
 
3354
       policy.
 
3355
      </para>
 
3356
     </listitem>
 
3357
    </varlistentry>
 
3358
 
 
3359
    <varlistentry>
 
3360
     <term>
 
3361
      Allow index scans to use an intermediate in-memory bitmap (Tom)
 
3362
     </term>
 
3363
 
 
3364
     <listitem>
 
3365
      <para>
 
3366
       In previous releases, only a single index could be used to do
 
3367
       lookups on a table. With this feature, if a query has
 
3368
       <command>WHERE tab.col1 = 4 and tab.col2 = 9</>, and there is
 
3369
       no multicolumn index on <literal>col1</> and <literal>col2</>,
 
3370
       but there is an index on <literal>col1</> and another on
 
3371
       <literal>col2</>, it is possible to search both indexes and
 
3372
       combine the results in memory, then do heap fetches for only
 
3373
       the rows matching both the <literal>col1</> and
 
3374
       <literal>col2</> restrictions. This is very useful in
 
3375
       environments that have a lot of unstructured queries where it
 
3376
       is impossible to create indexes that match all possible access
 
3377
       conditions.  Bitmap scans are useful even with a single index,
 
3378
       as they reduce the amount of random access needed; a bitmap
 
3379
       index scan is efficient for retrieving fairly large fractions
 
3380
       of the complete table, whereas plain index scans are not.
 
3381
      </para>
 
3382
     </listitem>
 
3383
    </varlistentry>
 
3384
 
 
3385
    <varlistentry>
 
3386
     <term>
 
3387
      Add two-phase commit (Heikki Linnakangas, Alvaro, Tom)
 
3388
     </term>
 
3389
 
 
3390
     <listitem>
 
3391
      <para>
 
3392
       Two-phase commit allows transactions to be "prepared" on several
 
3393
       computers, and once all computers have successfully prepared
 
3394
       their transactions (none failed), all transactions can be
 
3395
       committed. Even if a machine crashes after a prepare, the
 
3396
       prepared transaction can be committed after the machine is
 
3397
       restarted. New syntax includes <command>PREPARE TRANSACTION</> and
 
3398
       <command>COMMIT/ROLLBACK PREPARED</>. A new system view
 
3399
       <literal>pg_prepared_xacts</> has also been added.
 
3400
      </para>
 
3401
     </listitem>
 
3402
    </varlistentry>
 
3403
 
 
3404
    <varlistentry>
 
3405
     <term>
 
3406
      Create a new role system that replaces users and groups
 
3407
      (Stephen Frost)
 
3408
     </term>
 
3409
 
 
3410
     <listitem>
 
3411
      <para>
 
3412
       Roles are a combination of users and groups. Like users, they
 
3413
       can have login capability, and like groups, a role can have
 
3414
       other roles as members. Roles basically remove the distinction
 
3415
       between users and groups. For example, a role can:
 
3416
      </para>
 
3417
 
 
3418
      <itemizedlist>
 
3419
 
 
3420
       <listitem>
 
3421
        <para>
 
3422
          Have login capability (optionally)
 
3423
        </para>
 
3424
       </listitem>
 
3425
 
 
3426
       <listitem>
 
3427
        <para>
 
3428
         Own objects
 
3429
        </para>
 
3430
       </listitem>
 
3431
 
 
3432
       <listitem>
 
3433
        <para>
 
3434
         Hold access permissions for database objects
 
3435
        </para>
 
3436
       </listitem>
 
3437
 
 
3438
       <listitem>
 
3439
        <para>
 
3440
         Inherit permissions from other roles it is a member of
 
3441
        </para>
 
3442
       </listitem>
 
3443
 
 
3444
      </itemizedlist>
 
3445
      <para>
 
3446
       Once a user logs into a role, she obtains capabilities of
 
3447
       the login role plus any inherited roles, and can use
 
3448
       <command>SET ROLE</> to switch to other roles she is a member of.
 
3449
       This feature is a generalization of the SQL standard's concept of
 
3450
       roles.
 
3451
       This change also replaces <structname>pg_shadow</> and
 
3452
       <structname>pg_group</> by new role-capable catalogs
 
3453
       <structname>pg_authid</> and <structname>pg_auth_members</>. The old
 
3454
       tables are redefined as read-only views on the new role tables.
 
3455
      </para>
 
3456
     </listitem>
 
3457
    </varlistentry>
 
3458
 
 
3459
    <varlistentry>
 
3460
     <term>
 
3461
      Automatically use indexes for <function>MIN()</> and
 
3462
      <function>MAX()</> (Tom)
 
3463
     </term>
 
3464
 
 
3465
     <listitem>
 
3466
      <para>
 
3467
       In previous releases, the only way to use an index for
 
3468
       <function>MIN()</> or <function>MAX()</> was to rewrite the
 
3469
       query as <command>SELECT col FROM tab ORDER BY col LIMIT 1</>.
 
3470
       Index usage now happens automatically.
 
3471
      </para>
 
3472
     </listitem>
 
3473
    </varlistentry>
 
3474
 
 
3475
    <varlistentry>
 
3476
     <term>
 
3477
      Move <filename>/contrib/pg_autovacuum</> into the main server
 
3478
      (Alvaro)
 
3479
     </term>
 
3480
 
 
3481
     <listitem>
 
3482
      <para>
 
3483
       Integrating autovacuum into the server allows it to be
 
3484
       automatically started and stopped in sync with the database
 
3485
       server, and allows autovacuum to be configured from
 
3486
       <filename>postgresql.conf</>.
 
3487
      </para>
 
3488
     </listitem>
 
3489
    </varlistentry>
 
3490
 
 
3491
    <varlistentry>
 
3492
     <term>
 
3493
      Add shared row level locks using <command>SELECT ... FOR SHARE</>
 
3494
      (Alvaro)
 
3495
     </term>
 
3496
 
 
3497
     <listitem>
 
3498
      <para>
 
3499
       While <productname>PostgreSQL</productname>'s MVCC locking
 
3500
       allows <command>SELECT</> to never be blocked by writers and
 
3501
       therefore does not need shared row locks for typical operations,
 
3502
       shared locks are useful for applications that require shared row
 
3503
       locking.  In particular this reduces the locking requirements
 
3504
       imposed by referential integrity checks.
 
3505
      </para>
 
3506
     </listitem>
 
3507
    </varlistentry>
 
3508
 
 
3509
    <varlistentry>
 
3510
     <term>
 
3511
      Add dependencies on shared objects, specifically roles
 
3512
      (Alvaro)
 
3513
     </term>
 
3514
 
 
3515
     <listitem>
 
3516
      <para>
 
3517
       This extension of the dependency mechanism prevents roles from
 
3518
       being dropped while there are still database objects they own.
 
3519
       Formerly it was possible to accidentally <quote>orphan</> objects by
 
3520
       deleting their owner.  While this could be recovered from, it
 
3521
       was messy and unpleasant.
 
3522
      </para>
 
3523
     </listitem>
 
3524
    </varlistentry>
 
3525
 
 
3526
    <varlistentry>
 
3527
     <term>
 
3528
      Improve performance for partitioned tables (Simon)
 
3529
     </term>
 
3530
 
 
3531
     <listitem>
 
3532
      <para>
 
3533
       The new <varname>constraint_exclusion</varname> configuration
 
3534
       parameter avoids lookups on child tables where constraints indicate
 
3535
       that no matching rows exist in the child table.
 
3536
      </para>
 
3537
      <para>
 
3538
       This allows for a basic type of table partitioning. If child tables
 
3539
       store separate key ranges and this is enforced using appropriate
 
3540
       <command>CHECK</> constraints, the optimizer will skip child
 
3541
       table accesses when the constraint guarantees no matching rows
 
3542
       exist in the child table.
 
3543
      </para>
 
3544
     </listitem>
 
3545
    </varlistentry>
 
3546
 
 
3547
   </variablelist>
 
3548
  </sect2>
 
3549
 
 
3550
  <sect2>
 
3551
   <title>Migration to Version 8.1</title>
 
3552
 
 
3553
   <para>
 
3554
    A dump/restore using <application>pg_dump</application> is required
 
3555
    for those wishing to migrate data from any previous release.
 
3556
   </para>
 
3557
 
 
3558
   <para>
 
3559
    The 8.0 release announced that the <function>to_char()</> function
 
3560
    for intervals would be removed in 8.1. However, since no better API
 
3561
    has been suggested, <function>to_char(interval)</> has been enhanced in
 
3562
    8.1 and will remain in the server.
 
3563
   </para>
 
3564
 
 
3565
   <para>
 
3566
    Observe the following incompatibilities:
 
3567
   </para>
 
3568
 
 
3569
   <itemizedlist>
 
3570
 
 
3571
    <listitem>
 
3572
     <para>
 
3573
      <varname>add_missing_from</> is now false by default (Neil)
 
3574
     </para>
 
3575
     <para>
 
3576
      By default, we now generate an error if a table is used in a query
 
3577
      without a <literal>FROM</> reference.  The old behavior is still
 
3578
      available, but the parameter must be set to 'true' to obtain it.
 
3579
     </para>
 
3580
 
 
3581
     <para>
 
3582
      It might be necessary to set <varname>add_missing_from</> to true
 
3583
      in order to load an existing dump file, if the dump contains any
 
3584
      views or rules created using the implicit-<literal>FROM</> syntax.
 
3585
      This should be a one-time annoyance, because
 
3586
      <productname>PostgreSQL</productname> 8.1 will convert
 
3587
      such views and rules to standard explicit-<literal>FROM</> syntax.
 
3588
      Subsequent dumps will therefore not have the problem.
 
3589
     </para>
 
3590
    </listitem>
 
3591
 
 
3592
    <listitem>
 
3593
     <para>
 
3594
      Cause input of a zero-length string (<literal>''</literal>) for
 
3595
      <type>float4</type>/<type>float8</type>/<type>oid</type>
 
3596
      to throw an error, rather than treating it as a zero (Neil)
 
3597
     </para>
 
3598
     <para>
 
3599
      This change is consistent with the current handling of
 
3600
      zero-length strings for integers. The schedule for this change
 
3601
      was announced in 8.0.
 
3602
     </para>
 
3603
    </listitem>
 
3604
 
 
3605
    <listitem>
 
3606
     <para>
 
3607
      <varname>default_with_oids</> is now false by default (Neil)
 
3608
     </para>
 
3609
     <para>
 
3610
      With this option set to false, user-created tables no longer
 
3611
      have an OID column unless <command>WITH OIDS</> is specified in
 
3612
      <command>CREATE TABLE</>. Though OIDs have existed in all
 
3613
      releases of <productname>PostgreSQL</>, their use is limited
 
3614
      because they are only four bytes long and the counter is shared
 
3615
      across all installed databases. The preferred way of uniquely
 
3616
      identifying rows is via sequences and the <type>SERIAL</> type,
 
3617
      which have been supported since <productname>PostgreSQL</> 6.4.
 
3618
     </para>
 
3619
    </listitem>
 
3620
 
 
3621
    <listitem>
 
3622
     <para>
 
3623
      Add <literal>E''</> syntax so eventually ordinary strings can
 
3624
      treat backslashes literally (Bruce)
 
3625
     </para>
 
3626
     <para>
 
3627
      Currently <productname>PostgreSQL</productname> processes a
 
3628
      backslash in a string literal as introducing a special escape sequence,
 
3629
      e.g. <literal>\n</> or <literal>\010</>.
 
3630
      While this allows easy entry of special values, it is
 
3631
      nonstandard and makes porting of applications from other
 
3632
      databases more difficult. For this reason, the
 
3633
      <productname>PostgreSQL</productname> project is planning to
 
3634
      remove the special meaning of backslashes in strings. For
 
3635
      backward compatibility and for users who want special backslash
 
3636
      processing, a new string syntax has been created. This new string
 
3637
      syntax is formed by writing an <literal>E</> immediately preceding the
 
3638
      single quote that starts the string, e.g. <literal>E'hi\n'</>. While
 
3639
      this release does not change the handling of backslashes in strings, it
 
3640
      does add new configuration parameters to help users migrate applications
 
3641
      for future releases:
 
3642
     </para>
 
3643
     <itemizedlist>
 
3644
 
 
3645
      <listitem>
 
3646
       <para>
 
3647
        <varname>standard_conforming_strings</> &mdash; does this release
 
3648
        treat backslashes literally in ordinary strings?
 
3649
       </para>
 
3650
      </listitem>
 
3651
 
 
3652
      <listitem>
 
3653
      <para>
 
3654
       <varname>escape_string_warning</> &mdash; warn about backslashes in
 
3655
       ordinary (non-E) strings
 
3656
      </para>
 
3657
     </listitem>
 
3658
 
 
3659
     </itemizedlist>
 
3660
 
 
3661
     <para>
 
3662
      The <varname>standard_conforming_strings</> value is read-only.
 
3663
      Applications can retrieve the value to know how backslashes are
 
3664
      processed.  (Presence of the parameter can also be taken as an
 
3665
      indication that <literal>E''</> string syntax is supported.)
 
3666
      In a future release, <varname>standard_conforming_strings</>
 
3667
      will be true, meaning backslashes will be treated literally in
 
3668
      non-E strings. To prepare for this change, use <literal>E''</>
 
3669
      strings in places that need special backslash processing, and
 
3670
      turn on <varname>escape_string_warning</> to find additional
 
3671
      strings that need to be converted to use <literal>E''</>.
 
3672
      Also, use two single-quotes (<literal>''</>) to embed a literal
 
3673
      single-quote in a string, rather than the
 
3674
      <productname>PostgreSQL</productname>-supported syntax of
 
3675
      backslash single-quote (<literal>\'</>).  The former is
 
3676
      standards-conforming and does not require the use of the
 
3677
      <literal>E''</> string syntax.  You can also use the
 
3678
      <literal>$$</> string syntax, which does not treat backslashes
 
3679
      specially.
 
3680
     </para>
 
3681
    </listitem>
 
3682
 
 
3683
    <listitem>
 
3684
     <para>
 
3685
      Make <command>REINDEX DATABASE</> reindex all indexes in the
 
3686
      database (Tom)
 
3687
     </para>
 
3688
     <para>
 
3689
      Formerly, <command>REINDEX DATABASE</> reindexed only
 
3690
      system tables. This new behavior seems more intuitive. A new
 
3691
      command <command>REINDEX SYSTEM</> provides the old functionality
 
3692
      of reindexing just the system tables.
 
3693
     </para>
 
3694
    </listitem>
 
3695
 
 
3696
    <listitem>
 
3697
     <para>
 
3698
      Read-only large object descriptors now obey MVCC snapshot semantics
 
3699
     </para>
 
3700
     <para>
 
3701
      When a large object is opened with <literal>INV_READ</> (and not
 
3702
      <literal>INV_WRITE</>), the data read from the descriptor will now
 
3703
      reflect a <quote>snapshot</> of the large object's state at the
 
3704
      time of the transaction snapshot in use by the query that called
 
3705
      <function>lo_open()</>.  To obtain the old behavior of always
 
3706
      returning the latest committed data, include <literal>INV_WRITE</>
 
3707
      in the mode flags for <function>lo_open()</>.
 
3708
     </para>
 
3709
    </listitem>
 
3710
 
 
3711
    <listitem>
 
3712
     <para>
 
3713
      Add proper dependencies for arguments of sequence functions (Tom)
 
3714
     </para>
 
3715
     <para>
 
3716
      In previous releases, sequence names passed to <function>nextval()</>,
 
3717
      <function>currval()</>, and <function>setval()</> were stored as
 
3718
      simple text strings, meaning that renaming or dropping a
 
3719
      sequence used in a <literal>DEFAULT</> clause made the clause
 
3720
      invalid. This release stores all newly-created sequence function
 
3721
      arguments as internal OIDs, allowing them to track sequence
 
3722
      renaming, and adding dependency information that prevents
 
3723
      improper sequence removal. It also makes such <literal>DEFAULT</>
 
3724
      clauses immune to schema renaming and search path changes.
 
3725
     </para>
 
3726
     <para>
 
3727
      Some applications might rely on the old behavior of
 
3728
      run-time lookup for sequence names. This can still be done by
 
3729
      explicitly casting the argument to <type>text</>, for example
 
3730
      <literal>nextval('myseq'::text)</>.
 
3731
     </para>
 
3732
     <para>
 
3733
      Pre-8.1 database dumps loaded into 8.1 will use the old text-based
 
3734
      representation and therefore will not have the features of
 
3735
      OID-stored arguments. However, it is possible to update a
 
3736
      database containing text-based <literal>DEFAULT</> clauses.
 
3737
      First, save this query into a file, such as <filename>fixseq.sql</>:
 
3738
<programlisting>
 
3739
SELECT  'ALTER TABLE ' ||
 
3740
   pg_catalog.quote_ident(n.nspname) || '.' ||
 
3741
   pg_catalog.quote_ident(c.relname) ||
 
3742
   ' ALTER COLUMN ' || pg_catalog.quote_ident(a.attname) ||
 
3743
   ' SET DEFAULT ' ||
 
3744
   regexp_replace(d.adsrc,
 
3745
                  $$val\(\(('[^']*')::text\)::regclass$$,
 
3746
                  $$val(\1$$,
 
3747
                  'g') ||
 
3748
   ';'
 
3749
FROM    pg_namespace n, pg_class c, pg_attribute a, pg_attrdef d
 
3750
WHERE   n.oid = c.relnamespace AND
 
3751
   c.oid = a.attrelid AND
 
3752
   a.attrelid = d.adrelid AND
 
3753
   a.attnum = d.adnum AND
 
3754
   d.adsrc ~ $$val\(\('[^']*'::text\)::regclass$$;
 
3755
</programlisting>
 
3756
      Next, run the query against a database to find what
 
3757
      adjustments are required, like this for database <literal>db1</>:
 
3758
<programlisting>
 
3759
psql -t -f fixseq.sql db1
 
3760
</programlisting>
 
3761
      This will show the <command>ALTER TABLE</> commands needed to
 
3762
      convert the database to the newer OID-based representation.
 
3763
      If the commands look reasonable, run this to update the database:
 
3764
<programlisting>
 
3765
psql -t -f fixseq.sql db1 | psql -e db1
 
3766
</programlisting>
 
3767
      This process must be repeated in each database to be updated.
 
3768
     </para>
 
3769
    </listitem>
 
3770
 
 
3771
    <listitem>
 
3772
     <para>
 
3773
      In <application>psql</application>, treat unquoted
 
3774
      <literal>\{digit}+</> sequences as octal (Bruce)
 
3775
     </para>
 
3776
     <para>
 
3777
      In previous releases, <literal>\{digit}+</> sequences were
 
3778
      treated as decimal, and only <literal>\0{digit}+</> were treated
 
3779
      as octal. This change was made for consistency.
 
3780
     </para>
 
3781
    </listitem>
 
3782
 
 
3783
    <listitem>
 
3784
     <para>
 
3785
      Remove grammar productions for prefix and postfix <literal>%</>
 
3786
      and <literal>^</> operators
 
3787
      (Tom)
 
3788
     </para>
 
3789
     <para>
 
3790
      These have never been documented and complicated the use of the
 
3791
      modulus operator (<literal>%</>) with negative numbers.
 
3792
     </para>
 
3793
    </listitem>
 
3794
 
 
3795
    <listitem>
 
3796
     <para>
 
3797
      Make <literal>&amp;&lt;</> and <literal>&amp;&gt;</> for polygons
 
3798
      consistent with the box "over" operators (Tom)
 
3799
     </para>
 
3800
    </listitem>
 
3801
 
 
3802
    <listitem>
 
3803
     <para>
 
3804
      <command>CREATE LANGUAGE</> can ignore the provided arguments
 
3805
      in favor of information from <structname>pg_pltemplate</>
 
3806
      (Tom)
 
3807
     </para>
 
3808
     <para>
 
3809
      A new system catalog <structname>pg_pltemplate</> has been defined
 
3810
      to carry information about the preferred definitions of procedural
 
3811
      languages (such as whether they have validator functions).  When
 
3812
      an entry exists in this catalog for the language being created,
 
3813
      <command>CREATE LANGUAGE</> will ignore all its parameters except the
 
3814
      language name and instead use the catalog information.  This measure
 
3815
      was taken because of increasing problems with obsolete language
 
3816
      definitions being loaded by old dump files.  As of 8.1,
 
3817
      <application>pg_dump</> will dump procedural language definitions as
 
3818
      just <command>CREATE LANGUAGE <replaceable>name</></command>, relying
 
3819
      on a template entry to exist at load time.  We expect this will be a
 
3820
      more future-proof representation.
 
3821
     </para>
 
3822
    </listitem>
 
3823
 
 
3824
    <listitem>
 
3825
     <para>
 
3826
      Make <function>pg_cancel_backend(int)</function> return a
 
3827
      <type>boolean</type> rather than an <type>integer</type> (Neil)
 
3828
     </para>
 
3829
    </listitem>
 
3830
 
 
3831
    <listitem>
 
3832
     <para>
 
3833
      Some users are having problems loading UTF-8 data into 8.1.X.
 
3834
      This is because previous versions allowed invalid UTF-8 byte
 
3835
      sequences to be entered into the database, and this release
 
3836
      properly accepts only valid UTF-8 sequences. One way to correct a
 
3837
      dumpfile is to run the command <command>iconv -c -f UTF-8 -t
 
3838
      UTF-8 -o cleanfile.sql dumpfile.sql</>. The <literal>-c</> option
 
3839
      removes invalid character sequences. A diff of the two files will
 
3840
      show the sequences that are invalid. <command>iconv</> reads the
 
3841
      entire input file into memory so it might be necessary to use
 
3842
      <application>split</> to break up the dump into multiple smaller
 
3843
      files for processing.
 
3844
     </para>
 
3845
    </listitem>
 
3846
 
 
3847
   </itemizedlist>
 
3848
  </sect2>
 
3849
 
 
3850
  <sect2>
 
3851
   <title>Additional Changes</title>
 
3852
 
 
3853
   <para>
 
3854
    Below you will find a detailed account of the additional changes
 
3855
    between <productname>PostgreSQL</productname> 8.1 and the
 
3856
    previous major release.
 
3857
   </para>
 
3858
 
 
3859
   <sect3>
 
3860
    <title>Performance Improvements</title>
 
3861
    <itemizedlist>
 
3862
 
 
3863
     <listitem>
 
3864
      <para>
 
3865
       Improve GiST and R-tree index performance (Neil)
 
3866
      </para>
 
3867
     </listitem>
 
3868
 
 
3869
     <listitem>
 
3870
      <para>
 
3871
       Improve the optimizer, including auto-resizing of hash joins
 
3872
       (Tom)
 
3873
      </para>
 
3874
     </listitem>
 
3875
 
 
3876
     <listitem>
 
3877
      <para>
 
3878
       Overhaul internal API in several areas
 
3879
      </para>
 
3880
     </listitem>
 
3881
 
 
3882
     <listitem>
 
3883
      <para>
 
3884
       Change WAL record CRCs from 64-bit to 32-bit (Tom)
 
3885
      </para>
 
3886
      <para>
 
3887
       We determined that the extra cost of computing 64-bit CRCs was
 
3888
       significant, and the gain in reliability too marginal to justify it.
 
3889
      </para>
 
3890
     </listitem>
 
3891
 
 
3892
     <listitem>
 
3893
      <para>
 
3894
       Prevent writing large empty gaps in WAL pages (Tom)
 
3895
      </para>
 
3896
     </listitem>
 
3897
 
 
3898
     <listitem>
 
3899
      <para>
 
3900
       Improve spinlock behavior on SMP machines, particularly Opterons (Tom)
 
3901
      </para>
 
3902
     </listitem>
 
3903
 
 
3904
     <listitem>
 
3905
      <para>
 
3906
       Allow nonconsecutive index columns to be used in a multicolumn
 
3907
       index (Tom)
 
3908
      </para>
 
3909
      <para>
 
3910
       For example, this allows an index on columns a,b,c to be used in
 
3911
       a query with <command>WHERE a = 4 and c = 10</>.
 
3912
      </para>
 
3913
     </listitem>
 
3914
 
 
3915
     <listitem>
 
3916
      <para>
 
3917
       Skip WAL logging for <command>CREATE TABLE AS</> /
 
3918
       <command>SELECT INTO</> (Simon)
 
3919
      </para>
 
3920
      <para>
 
3921
       Since a crash during <command>CREATE TABLE AS</> would cause the
 
3922
       table to be dropped during recovery, there is no reason to WAL
 
3923
       log as the table is loaded.  (Logging still happens if WAL
 
3924
       archiving is enabled, however.)
 
3925
      </para>
 
3926
     </listitem>
 
3927
 
 
3928
     <listitem>
 
3929
      <para>
 
3930
       Allow concurrent GiST index access (Teodor, Oleg)
 
3931
      </para>
 
3932
     </listitem>
 
3933
 
 
3934
     <listitem>
 
3935
      <para>
 
3936
       Add configuration parameter <varname>full_page_writes</> to
 
3937
       control writing full pages to WAL (Bruce)
 
3938
      </para>
 
3939
      <para>
 
3940
       To prevent partial disk writes from corrupting the database,
 
3941
       <productname>PostgreSQL</productname> writes a complete copy of
 
3942
       each database disk page to WAL the first time it is modified
 
3943
       after a checkpoint. This option turns off that functionality for more
 
3944
       speed.  This is safe to use with battery-backed disk caches where
 
3945
       partial page writes cannot happen.
 
3946
      </para>
 
3947
     </listitem>
 
3948
 
 
3949
     <listitem>
 
3950
      <para>
 
3951
       Use <literal>O_DIRECT</> if available when using
 
3952
       <literal>O_SYNC</> for <varname>wal_sync_method</varname>
 
3953
       (Itagaki Takahiro)
 
3954
      </para>
 
3955
      <para>
 
3956
       <literal>O_DIRECT</> causes disk writes to bypass the kernel
 
3957
       cache, and for WAL writes, this improves performance.
 
3958
      </para>
 
3959
     </listitem>
 
3960
 
 
3961
     <listitem>
 
3962
      <para>
 
3963
       Improve <command>COPY FROM</> performance (Alon Goldshuv)
 
3964
      </para>
 
3965
      <para>
 
3966
       This was accomplished by reading <command>COPY</> input in
 
3967
       larger chunks, rather than character by character.
 
3968
      </para>
 
3969
     </listitem>
 
3970
 
 
3971
     <listitem>
 
3972
      <para>
 
3973
       Improve the performance of <function>COUNT()</function>,
 
3974
       <function>SUM</function>, <function>AVG()</function>,
 
3975
       <function>STDDEV()</function>, and
 
3976
       <function>VARIANCE()</function> (Neil, Tom)
 
3977
      </para>
 
3978
     </listitem>
 
3979
    </itemizedlist>
 
3980
   </sect3>
 
3981
 
 
3982
   <sect3>
 
3983
    <title>Server Changes</title>
 
3984
    <itemizedlist>
 
3985
 
 
3986
     <listitem>
 
3987
      <para>
 
3988
       Prevent problems due to transaction ID (XID) wraparound (Tom)
 
3989
      </para>
 
3990
      <para>
 
3991
       The server will now warn when the transaction counter approaches
 
3992
       the wraparound point.  If the counter becomes too close to wraparound,
 
3993
       the server will stop accepting queries.  This ensures that data is
 
3994
       not lost before needed vacuuming is performed.
 
3995
      </para>
 
3996
     </listitem>
 
3997
 
 
3998
     <listitem>
 
3999
      <para>
 
4000
       Fix problems with object IDs (OIDs) conflicting with existing system
 
4001
       objects after the OID counter has wrapped around (Tom)
 
4002
      </para>
 
4003
     </listitem>
 
4004
 
 
4005
     <listitem>
 
4006
      <para>
 
4007
       Add warning about the need to increase
 
4008
       <varname>max_fsm_relations</> and <varname>max_fsm_pages</>
 
4009
       during <command>VACUUM</> (Ron Mayer)
 
4010
      </para>
 
4011
     </listitem>
 
4012
 
 
4013
     <listitem>
 
4014
      <para>
 
4015
       Add <varname>temp_buffers</> configuration parameter to allow
 
4016
       users to determine the size of the local buffer area for
 
4017
       temporary table access (Tom)
 
4018
      </para>
 
4019
     </listitem>
 
4020
 
 
4021
     <listitem>
 
4022
      <para>
 
4023
       Add session start time and client IP address to
 
4024
       <literal>pg_stat_activity</> (Magnus)
 
4025
      </para>
 
4026
     </listitem>
 
4027
 
 
4028
     <listitem>
 
4029
      <para>
 
4030
       Adjust <literal>pg_stat</> views for bitmap scans (Tom)
 
4031
      </para>
 
4032
      <para>
 
4033
       The meanings of some of the fields have changed slightly.
 
4034
      </para>
 
4035
     </listitem>
 
4036
 
 
4037
     <listitem>
 
4038
      <para>
 
4039
       Enhance <literal>pg_locks</> view (Tom)
 
4040
      </para>
 
4041
     </listitem>
 
4042
 
 
4043
     <listitem>
 
4044
      <para>
 
4045
       Log queries for client-side <command>PREPARE</> and
 
4046
       <command>EXECUTE</> (Simon)
 
4047
      </para>
 
4048
     </listitem>
 
4049
 
 
4050
     <listitem>
 
4051
      <para>
 
4052
       Allow Kerberos name and user name case sensitivity to be
 
4053
       specified in <filename>postgresql.conf</> (Magnus)
 
4054
      </para>
 
4055
     </listitem>
 
4056
 
 
4057
     <listitem>
 
4058
      <para>
 
4059
       Add configuration parameter <varname>krb_server_hostname</> so
 
4060
       that the server host name can be specified as part of service
 
4061
       principal (Todd Kover)
 
4062
      </para>
 
4063
      <para>
 
4064
       If not set, any service principal matching an entry in the
 
4065
       keytab can be used. This is new Kerberos matching behavior in
 
4066
       this release.
 
4067
      </para>
 
4068
     </listitem>
 
4069
 
 
4070
     <listitem>
 
4071
      <para>
 
4072
       Add <varname>log_line_prefix</> options for millisecond
 
4073
       timestamps (<literal>%m</>) and remote host (<literal>%h</>) (Ed
 
4074
       L.)
 
4075
      </para>
 
4076
     </listitem>
 
4077
 
 
4078
     <listitem>
 
4079
      <para>
 
4080
       Add WAL logging for GiST indexes (Teodor, Oleg)
 
4081
      </para>
 
4082
      <para>
 
4083
       GiST indexes are now safe for crash and point-in-time recovery.
 
4084
      </para>
 
4085
     </listitem>
 
4086
 
 
4087
     <listitem>
 
4088
      <para>
 
4089
       Remove old <filename>*.backup</> files when we do
 
4090
       <function>pg_stop_backup()</> (Bruce)
 
4091
      </para>
 
4092
      <para>
 
4093
       This prevents a large number of <filename>*.backup</> files from
 
4094
       existing in <filename>pg_xlog/</>.
 
4095
      </para>
 
4096
     </listitem>
 
4097
 
 
4098
     <listitem>
 
4099
      <para>
 
4100
       Add configuration parameters to control TCP/IP keep-alive
 
4101
       times for idle, interval, and count (Oliver Jowett)
 
4102
      </para>
 
4103
 
 
4104
      <para>
 
4105
       These values can be changed to allow more rapid detection of
 
4106
       lost client connections.
 
4107
      </para>
 
4108
     </listitem>
 
4109
 
 
4110
     <listitem>
 
4111
      <para>
 
4112
       Add per-user and per-database connection limits (Petr Jelinek)
 
4113
      </para>
 
4114
      <para>
 
4115
       Using <command>ALTER USER</> and <command>ALTER DATABASE</>,
 
4116
       limits can now be enforced on the maximum number of sessions that
 
4117
       can concurrently connect as a specific user or to a specific database.
 
4118
       Setting the limit to zero disables user or database connections.
 
4119
      </para>
 
4120
     </listitem>
 
4121
 
 
4122
     <listitem>
 
4123
      <para>
 
4124
       Allow more than two gigabytes of shared memory and per-backend
 
4125
       work memory on 64-bit machines (Koichi Suzuki)
 
4126
      </para>
 
4127
     </listitem>
 
4128
 
 
4129
     <listitem>
 
4130
      <para>
 
4131
       New system catalog <structname>pg_pltemplate</> allows overriding
 
4132
       obsolete procedural-language definitions in dump files (Tom)
 
4133
      </para>
 
4134
     </listitem>
 
4135
 
 
4136
    </itemizedlist>
 
4137
   </sect3>
 
4138
 
 
4139
 
 
4140
   <sect3>
 
4141
    <title>Query Changes</title>
 
4142
    <itemizedlist>
 
4143
 
 
4144
     <listitem>
 
4145
      <para>
 
4146
       Add temporary views (Koju Iijima, Neil)
 
4147
      </para>
 
4148
     </listitem>
 
4149
 
 
4150
     <listitem>
 
4151
      <para>
 
4152
       Fix <command>HAVING</> without any aggregate functions or
 
4153
       <command>GROUP BY</> so that the query returns a single group (Tom)
 
4154
      </para>
 
4155
      <para>
 
4156
       Previously, such a case would treat the <command>HAVING</>
 
4157
       clause the same as a <command>WHERE</> clause.  This was not per spec.
 
4158
      </para>
 
4159
     </listitem>
 
4160
 
 
4161
     <listitem>
 
4162
      <para>
 
4163
       Add <command>USING</> clause to allow additional tables to be
 
4164
       specified to <command>DELETE</> (Euler Taveira de Oliveira, Neil)
 
4165
      </para>
 
4166
      <para>
 
4167
       In prior releases, there was no clear method for specifying
 
4168
       additional tables to be used for joins in a <command>DELETE</>
 
4169
       statement. <command>UPDATE</> already has a <literal>FROM</>
 
4170
       clause for this purpose.
 
4171
      </para>
 
4172
     </listitem>
 
4173
 
 
4174
     <listitem>
 
4175
      <para>
 
4176
       Add support for <literal>\x</> hex escapes in backend and ecpg
 
4177
       strings (Bruce)
 
4178
      </para>
 
4179
      <para>
 
4180
       This is just like the standard C <literal>\x</> escape syntax.
 
4181
       Octal escapes were already supported.
 
4182
      </para>
 
4183
     </listitem>
 
4184
 
 
4185
     <listitem>
 
4186
      <para>
 
4187
       Add <command>BETWEEN SYMMETRIC</> query syntax (Pavel Stehule)
 
4188
      </para>
 
4189
      <para>
 
4190
       This feature allows <command>BETWEEN</> comparisons without
 
4191
       requiring the first value to be less than the second. For
 
4192
       example, <command>2 BETWEEN [ASYMMETRIC] 3 AND 1</> returns
 
4193
       false, while <command>2 BETWEEN SYMMETRIC 3 AND 1</> returns
 
4194
       true. <command>BETWEEN ASYMMETRIC</> was already supported.
 
4195
      </para>
 
4196
     </listitem>
 
4197
 
 
4198
     <listitem>
 
4199
      <para>
 
4200
       Add <command>NOWAIT</> option to <command>SELECT ... FOR
 
4201
       UPDATE/SHARE</> (Hans-Juergen Schoenig)
 
4202
      </para>
 
4203
      <para>
 
4204
       While the <varname>statement_timeout</> configuration
 
4205
       parameter allows a query taking more than a certain amount of
 
4206
       time to be cancelled, the <command>NOWAIT</> option allows a
 
4207
       query to be canceled as soon as a <command>SELECT ... FOR
 
4208
       UPDATE/SHARE</> command cannot immediately acquire a row lock.
 
4209
      </para>
 
4210
     </listitem>
 
4211
    </itemizedlist>
 
4212
   </sect3>
 
4213
 
 
4214
 
 
4215
   <sect3>
 
4216
    <title>Object Manipulation Changes</title>
 
4217
    <itemizedlist>
 
4218
 
 
4219
     <listitem>
 
4220
      <para>
 
4221
       Track dependencies of shared objects (Alvaro)
 
4222
      </para>
 
4223
      <para>
 
4224
       <productname>PostgreSQL</productname> allows global tables
 
4225
       (users, databases, tablespaces) to reference information in
 
4226
       multiple databases. This addition adds dependency information
 
4227
       for global tables, so, for example, user ownership can be
 
4228
       tracked across databases, so a user who owns something in any
 
4229
       database can no longer be removed. Dependency tracking already
 
4230
       existed for database-local objects.
 
4231
      </para>
 
4232
     </listitem>
 
4233
 
 
4234
     <listitem>
 
4235
      <para>
 
4236
       Allow limited <command>ALTER OWNER</> commands to be performed
 
4237
       by the object owner (Stephen Frost)
 
4238
      </para>
 
4239
      <para>
 
4240
       Prior releases allowed only superusers to change object owners.
 
4241
       Now, ownership can be transferred if the user executing the command
 
4242
       owns the object and would be able to create it as the new owner
 
4243
       (that is, the user is a member of the new owning role and that role
 
4244
       has the CREATE permission that would be needed to create the object
 
4245
       afresh).
 
4246
      </para>
 
4247
     </listitem>
 
4248
 
 
4249
     <listitem>
 
4250
      <para>
 
4251
       Add <command>ALTER</> object <command>SET SCHEMA</> capability
 
4252
       for some object types (tables, functions, types) (Bernd Helmle)
 
4253
      </para>
 
4254
      <para>
 
4255
       This allows objects to be moved to different schemas.
 
4256
      </para>
 
4257
     </listitem>
 
4258
 
 
4259
     <listitem>
 
4260
      <para>
 
4261
       Add <command>ALTER TABLE ENABLE/DISABLE TRIGGER</command> to
 
4262
       disable triggers (Satoshi Nagayasu)
 
4263
      </para>
 
4264
     </listitem>
 
4265
 
 
4266
    </itemizedlist>
 
4267
   </sect3>
 
4268
 
 
4269
 
 
4270
   <sect3>
 
4271
    <title>Utility Command Changes</title>
 
4272
    <itemizedlist>
 
4273
 
 
4274
     <listitem>
 
4275
      <para>
 
4276
       Allow <command>TRUNCATE</> to truncate multiple tables in a
 
4277
       single command (Alvaro)
 
4278
      </para>
 
4279
      <para>
 
4280
       Because of referential integrity checks, it is not allowed to
 
4281
       truncate a table that is part of a referential integrity
 
4282
       constraint. Using this new functionality, <command>TRUNCATE</>
 
4283
       can be used to truncate such tables, if both tables involved in
 
4284
       a referential integrity constraint are truncated in a single
 
4285
       <command>TRUNCATE</> command.
 
4286
      </para>
 
4287
     </listitem>
 
4288
 
 
4289
     <listitem>
 
4290
      <para>
 
4291
       Properly process carriage returns and line feeds in
 
4292
       <command>COPY CSV</> mode (Andrew)
 
4293
      </para>
 
4294
      <para>
 
4295
       In release 8.0, carriage returns and line feeds in <command>CSV
 
4296
       COPY TO</> were processed in an inconsistent manner. (This was
 
4297
       documented on the TODO list.)
 
4298
      </para>
 
4299
     </listitem>
 
4300
 
 
4301
     <listitem>
 
4302
      <para>
 
4303
       Add <command>COPY WITH CSV HEADER</> to allow a header line as
 
4304
       the first line in <command>COPY</> (Andrew)
 
4305
      </para>
 
4306
      <para>
 
4307
       This allows handling of the common <command>CSV</> usage of
 
4308
       placing the column names on the first line of the data file. For
 
4309
       <command>COPY TO</>, the first line contains the column names,
 
4310
       and for <command>COPY FROM</>, the first line is ignored.
 
4311
      </para>
 
4312
     </listitem>
 
4313
 
 
4314
     <listitem>
 
4315
      <para>
 
4316
       On Windows, display better sub-second precision in
 
4317
       <command>EXPLAIN ANALYZE</> (Magnus)
 
4318
      </para>
 
4319
     </listitem>
 
4320
 
 
4321
     <listitem>
 
4322
      <para>
 
4323
       Add trigger duration display to <command>EXPLAIN ANALYZE</>
 
4324
       (Tom)
 
4325
      </para>
 
4326
      <para>
 
4327
       Prior releases included trigger execution time as part of the
 
4328
       total execution time, but did not show it separately.  It is now
 
4329
       possible to see how much time is spent in each trigger.
 
4330
      </para>
 
4331
     </listitem>
 
4332
 
 
4333
     <listitem>
 
4334
      <para>
 
4335
       Add support for <literal>\x</> hex escapes in <command>COPY</>
 
4336
       (Sergey Ten)
 
4337
      </para>
 
4338
      <para>
 
4339
       Previous releases only supported octal escapes.
 
4340
      </para>
 
4341
     </listitem>
 
4342
 
 
4343
     <listitem>
 
4344
      <para>
 
4345
       Make <command>SHOW ALL</> include variable descriptions
 
4346
       (Matthias Schmidt)
 
4347
      </para>
 
4348
      <para>
 
4349
       <command>SHOW</> varname still only displays the variable's
 
4350
       value and does not include the description.
 
4351
      </para>
 
4352
     </listitem>
 
4353
 
 
4354
     <listitem>
 
4355
      <para>
 
4356
       Make <application>initdb</application> create a new standard
 
4357
       database called <literal>postgres</>, and convert utilities to
 
4358
       use <literal>postgres</> rather than <literal>template1</> for
 
4359
       standard lookups (Dave)
 
4360
      </para>
 
4361
      <para>
 
4362
       In prior releases, <literal>template1</> was used both as a
 
4363
       default connection for utilities like
 
4364
       <application>createuser</application>, and as a template for
 
4365
       new databases. This caused <command>CREATE DATABASE</> to
 
4366
       sometimes fail, because a new database cannot be created if
 
4367
       anyone else is in the template database. With this change, the
 
4368
       default connection database is now <literal>postgres</>,
 
4369
       meaning it is much less likely someone will be using
 
4370
       <literal>template1</> during <command>CREATE DATABASE</>.
 
4371
      </para>
 
4372
     </listitem>
 
4373
 
 
4374
     <listitem>
 
4375
      <para>
 
4376
       Create new <application>reindexdb</application> command-line
 
4377
       utility by moving <filename>/contrib/reindexdb</> into the
 
4378
       server (Euler Taveira de Oliveira)
 
4379
      </para>
 
4380
     </listitem>
 
4381
 
 
4382
    </itemizedlist>
 
4383
   </sect3>
 
4384
 
 
4385
 
 
4386
   <sect3>
 
4387
    <title>Data Type and Function Changes</title>
 
4388
    <itemizedlist>
 
4389
 
 
4390
     <listitem>
 
4391
      <para>
 
4392
       Add <function>MAX()</> and <function>MIN()</> aggregates for
 
4393
       array types (Koju Iijima)
 
4394
      </para>
 
4395
     </listitem>
 
4396
 
 
4397
     <listitem>
 
4398
      <para>
 
4399
       Fix <function>to_date()</> and <function>to_timestamp()</> to
 
4400
       behave reasonably when <literal>CC</> and <literal>YY</> fields
 
4401
       are both used (Karel Zak)
 
4402
      </para>
 
4403
      <para>
 
4404
       If the format specification contains <literal>CC</> and a year
 
4405
       specification is <literal>YYY</> or longer, ignore the
 
4406
       <literal>CC</>. If the year specification is <literal>YY</> or
 
4407
       shorter, interpret <literal>CC</> as the previous century.
 
4408
      </para>
 
4409
     </listitem>
 
4410
 
 
4411
     <listitem>
 
4412
      <para>
 
4413
       Add <function>md5(bytea)</> (Abhijit Menon-Sen)
 
4414
      </para>
 
4415
      <para>
 
4416
       <function>md5(text)</> already existed.
 
4417
      </para>
 
4418
     </listitem>
 
4419
 
 
4420
     <listitem>
 
4421
      <para>
 
4422
       Add support for <command>numeric ^ numeric</> based on
 
4423
       <function>power(numeric, numeric)</>
 
4424
      </para>
 
4425
      <para>
 
4426
       The function already existed, but there was no operator assigned
 
4427
       to it.
 
4428
      </para>
 
4429
     </listitem>
 
4430
 
 
4431
     <listitem>
 
4432
      <para>
 
4433
       Fix <type>NUMERIC</> modulus by properly truncating the quotient
 
4434
       during computation (Bruce)
 
4435
      </para>
 
4436
      <para>
 
4437
       In previous releases, modulus for large values sometimes
 
4438
       returned negative results due to rounding of the quotient.
 
4439
      </para>
 
4440
     </listitem>
 
4441
 
 
4442
     <listitem>
 
4443
      <para>
 
4444
       Add a function <function>lastval()</> (Dennis Bj&ouml;rklund)
 
4445
      </para>
 
4446
      <para>
 
4447
       <function>lastval()</> is a simplified version of
 
4448
       <function>currval()</>. It automatically determines the proper
 
4449
       sequence name based on the most recent <function>nextval()</> or
 
4450
       <function>setval()</> call performed by the current session.
 
4451
      </para>
 
4452
     </listitem>
 
4453
 
 
4454
     <listitem>
 
4455
      <para>
 
4456
       Add <function>to_timestamp(DOUBLE PRECISION) (Michael Glaesemann)</>
 
4457
      </para>
 
4458
      <para>
 
4459
       Converts Unix seconds since 1970 to a <type>TIMESTAMP WITH
 
4460
       TIMEZONE</>.
 
4461
      </para>
 
4462
     </listitem>
 
4463
 
 
4464
     <listitem>
 
4465
      <para>
 
4466
       Add <function>pg_postmaster_start_time()</> function (Euler
 
4467
       Taveira de Oliveira, Matthias Schmidt)
 
4468
      </para>
 
4469
     </listitem>
 
4470
 
 
4471
     <listitem>
 
4472
      <para>
 
4473
       Allow the full use of time zone names in <command>AT TIME
 
4474
       ZONE</>, not just the short list previously available (Magnus)
 
4475
      </para>
 
4476
      <para>
 
4477
       Previously, only a predefined list of time zone names were
 
4478
       supported by <command>AT TIME ZONE</>. Now any supported time
 
4479
       zone name can be used, e.g.:
 
4480
<programlisting>
 
4481
SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London';
 
4482
</programlisting>
 
4483
       In the above query, the time zone used is adjusted based on the
 
4484
       daylight saving time rules that were in effect on the supplied
 
4485
       date.
 
4486
      </para>
 
4487
     </listitem>
 
4488
 
 
4489
     <listitem>
 
4490
      <para>
 
4491
       Add <function>GREATEST()</> and <function>LEAST()</> variadic
 
4492
       functions (Pavel Stehule)
 
4493
      </para>
 
4494
      <para>
 
4495
       These functions take a variable number of arguments and return
 
4496
       the greatest or least value among the arguments.
 
4497
      </para>
 
4498
     </listitem>
 
4499
 
 
4500
     <listitem>
 
4501
      <para>
 
4502
       Add <function>pg_column_size()</> (Mark Kirkwood)
 
4503
      </para>
 
4504
      <para>
 
4505
       This returns storage size of a column, which might be compressed.
 
4506
      </para>
 
4507
     </listitem>
 
4508
 
 
4509
     <listitem>
 
4510
      <para>
 
4511
       Add <function>regexp_replace()</> (Atsushi Ogawa)
 
4512
      </para>
 
4513
      <para>
 
4514
       This allows regular expression replacement, like sed. An optional
 
4515
       flag argument allows selection of global (replace all) and
 
4516
       case-insensitive modes.
 
4517
      </para>
 
4518
     </listitem>
 
4519
 
 
4520
     <listitem>
 
4521
      <para>
 
4522
       Fix interval division and multiplication (Bruce)
 
4523
      </para>
 
4524
      <para>
 
4525
       Previous versions sometimes returned unjustified results, like
 
4526
       <command>'4 months'::interval / 5</> returning <command>'1 mon
 
4527
       -6 days'</>.
 
4528
      </para>
 
4529
     </listitem>
 
4530
 
 
4531
     <listitem>
 
4532
      <para>
 
4533
       Fix roundoff behavior in timestamp, time, and interval output (Tom)
 
4534
      </para>
 
4535
      <para>
 
4536
       This fixes some cases in which the seconds field would be shown as
 
4537
       <literal>60</> instead of incrementing the higher-order fields.
 
4538
      </para>
 
4539
     </listitem>
 
4540
 
 
4541
     <listitem>
 
4542
      <para>
 
4543
       Add a separate day field to type <type>interval</> so a one day
 
4544
       interval can be distinguished from a 24 hour interval (Michael
 
4545
       Glaesemann)
 
4546
      </para>
 
4547
      <para>
 
4548
       Days that contain a daylight saving time adjustment are not 24
 
4549
       hours long, but typically 23 or 25 hours.  This change creates a
 
4550
       conceptual distinction between intervals of <quote>so many days</>
 
4551
       and intervals of <quote>so many hours</>.  Adding
 
4552
       <literal>1 day</> to a timestamp now gives the same local time on
 
4553
       the next day even if a daylight saving time adjustment occurs
 
4554
       between, whereas adding <literal>24 hours</> will give a different
 
4555
       local time when this happens.  For example, under US DST rules:
 
4556
<programlisting>
 
4557
'2005-04-03 00:00:00-05' + '1 day' = '2005-04-04 00:00:00-04'
 
4558
'2005-04-03 00:00:00-05' + '24 hours' = '2005-04-04 01:00:00-04'
 
4559
</programlisting>
 
4560
      </para>
 
4561
     </listitem>
 
4562
 
 
4563
     <listitem>
 
4564
      <para>
 
4565
       Add <function>justify_days()</> and <function>justify_hours()</>
 
4566
       (Michael Glaesemann)
 
4567
      </para>
 
4568
      <para>
 
4569
       These functions, respectively, adjust days to an appropriate
 
4570
       number of full months and days, and adjust hours to an
 
4571
       appropriate number of full days and hours.
 
4572
      </para>
 
4573
     </listitem>
 
4574
 
 
4575
     <listitem>
 
4576
      <para>
 
4577
       Move <filename>/contrib/dbsize</> into the backend, and rename
 
4578
       some of the functions (Dave Page, Andreas Pflug)
 
4579
      </para>
 
4580
      <para>
 
4581
       <itemizedlist>
 
4582
 
 
4583
        <listitem>
 
4584
         <para>
 
4585
           <function>pg_tablespace_size()</>
 
4586
         </para>
 
4587
        </listitem>
 
4588
 
 
4589
        <listitem>
 
4590
         <para>
 
4591
          <function>pg_database_size()</>
 
4592
         </para>
 
4593
        </listitem>
 
4594
 
 
4595
        <listitem>
 
4596
         <para>
 
4597
          <function>pg_relation_size()</>
 
4598
         </para>
 
4599
        </listitem>
 
4600
 
 
4601
        <listitem>
 
4602
         <para>
 
4603
          <function>pg_total_relation_size()</>
 
4604
         </para>
 
4605
        </listitem>
 
4606
 
 
4607
        <listitem>
 
4608
         <para>
 
4609
          <function>pg_size_pretty()</>
 
4610
         </para>
 
4611
        </listitem>
 
4612
 
 
4613
       </itemizedlist>
 
4614
      </para>
 
4615
      <para>
 
4616
       <function>pg_total_relation_size()</> includes indexes and TOAST
 
4617
       tables.
 
4618
      </para>
 
4619
     </listitem>
 
4620
 
 
4621
     <listitem>
 
4622
      <para>
 
4623
       Add functions for read-only file access to the cluster directory
 
4624
       (Dave Page, Andreas Pflug)
 
4625
      </para>
 
4626
      <para>
 
4627
       <itemizedlist>
 
4628
 
 
4629
        <listitem>
 
4630
         <para>
 
4631
          <function>pg_stat_file()</>
 
4632
         </para>
 
4633
        </listitem>
 
4634
 
 
4635
        <listitem>
 
4636
         <para>
 
4637
          <function>pg_read_file()</>
 
4638
         </para>
 
4639
        </listitem>
 
4640
 
 
4641
        <listitem>
 
4642
         <para>
 
4643
          <function>pg_ls_dir()</>
 
4644
         </para>
 
4645
        </listitem>
 
4646
 
 
4647
       </itemizedlist>
 
4648
      </para>
 
4649
     </listitem>
 
4650
 
 
4651
     <listitem>
 
4652
      <para>
 
4653
       Add <function>pg_reload_conf()</> to force reloading of the
 
4654
       configuration files (Dave Page, Andreas Pflug)
 
4655
      </para>
 
4656
     </listitem>
 
4657
 
 
4658
     <listitem>
 
4659
      <para>
 
4660
       Add <function>pg_rotate_logfile()</> to force rotation of the
 
4661
       server log file (Dave Page, Andreas Pflug)
 
4662
      </para>
 
4663
     </listitem>
 
4664
 
 
4665
     <listitem>
 
4666
      <para>
 
4667
       Change <literal>pg_stat_*</> views to include TOAST tables (Tom)
 
4668
      </para>
 
4669
     </listitem>
 
4670
 
 
4671
    </itemizedlist>
 
4672
   </sect3>
 
4673
 
 
4674
 
 
4675
   <sect3>
 
4676
    <title>Encoding and Locale Changes</title>
 
4677
    <itemizedlist>
 
4678
 
 
4679
     <listitem>
 
4680
      <para>
 
4681
       Rename some encodings to be more consistent and to follow
 
4682
       international standards (Bruce)
 
4683
      </para>
 
4684
      <para>
 
4685
       <itemizedlist>
 
4686
 
 
4687
        <listitem>
 
4688
         <para>
 
4689
          <literal>UNICODE</> is now <literal>UTF8</>
 
4690
         </para>
 
4691
        </listitem>
 
4692
 
 
4693
        <listitem>
 
4694
         <para>
 
4695
          <literal>ALT</> is now <literal>WIN866</>
 
4696
         </para>
 
4697
        </listitem>
 
4698
 
 
4699
        <listitem>
 
4700
         <para>
 
4701
          <literal>WIN</> is now <literal>WIN1251</>
 
4702
         </para>
 
4703
        </listitem>
 
4704
 
 
4705
        <listitem>
 
4706
         <para>
 
4707
         <literal>TCVN</> is now <literal>WIN1258</>
 
4708
         </para>
 
4709
        </listitem>
 
4710
 
 
4711
       </itemizedlist>
 
4712
      </para>
 
4713
 
 
4714
      <para>
 
4715
       The original names still work.
 
4716
      </para>
 
4717
     </listitem>
 
4718
 
 
4719
     <listitem>
 
4720
      <para>
 
4721
       Add support for <literal>WIN1252</> encoding (Roland Volkmann)
 
4722
      </para>
 
4723
     </listitem>
 
4724
 
 
4725
     <listitem>
 
4726
      <para>
 
4727
       Add support for four-byte <literal>UTF8</> characters (John
 
4728
       Hansen)
 
4729
      </para>
 
4730
      <para>
 
4731
       Previously only one, two, and three-byte <literal>UTF8</> characters
 
4732
       were supported. This is particularly important for support for
 
4733
       some Chinese character sets.
 
4734
      </para>
 
4735
     </listitem>
 
4736
 
 
4737
     <listitem>
 
4738
      <para>
 
4739
       Allow direct conversion between <literal>EUC_JP</> and
 
4740
       <literal>SJIS</> to improve performance (Atsushi Ogawa)
 
4741
      </para>
 
4742
     </listitem>
 
4743
 
 
4744
     <listitem>
 
4745
      <para>
 
4746
       Allow the UTF8 encoding to work on Windows (Magnus)
 
4747
      </para>
 
4748
      <para>
 
4749
       This is done by mapping UTF8 to the Windows-native UTF16
 
4750
       implementation.
 
4751
      </para>
 
4752
     </listitem>
 
4753
 
 
4754
    </itemizedlist>
 
4755
   </sect3>
 
4756
 
 
4757
 
 
4758
   <sect3>
 
4759
    <title>General Server-Side Language Changes</title>
 
4760
    <itemizedlist>
 
4761
 
 
4762
     <listitem>
 
4763
      <para>
 
4764
       Fix <command>ALTER LANGUAGE RENAME</> (Sergey Yatskevich)
 
4765
      </para>
 
4766
     </listitem>
 
4767
 
 
4768
     <listitem>
 
4769
      <para>
 
4770
       Allow function characteristics, like strictness and volatility,
 
4771
       to be modified via <command>ALTER FUNCTION</> (Neil)
 
4772
      </para>
 
4773
     </listitem>
 
4774
 
 
4775
     <listitem>
 
4776
      <para>
 
4777
       Increase the maximum number of function arguments to 100 (Tom)
 
4778
      </para>
 
4779
     </listitem>
 
4780
 
 
4781
     <listitem>
 
4782
      <para>
 
4783
       Allow SQL and PL/pgSQL functions to use <command>OUT</> and
 
4784
       <command>INOUT</> parameters (Tom)
 
4785
      </para>
 
4786
      <para>
 
4787
       <command>OUT</> is an alternate way for a function to return
 
4788
       values. Instead of using <command>RETURN</>, values can be
 
4789
       returned by assigning to parameters declared as <command>OUT</> or
 
4790
       <command>INOUT</>.  This is notationally simpler in some cases,
 
4791
       particularly so when multiple values need to be returned.
 
4792
       While returning multiple values from a function
 
4793
       was possible in previous releases, this greatly simplifies the
 
4794
       process.  (The feature will be extended to other server-side
 
4795
       languages in future releases.)
 
4796
      </para>
 
4797
     </listitem>
 
4798
 
 
4799
     <listitem>
 
4800
      <para>
 
4801
       Move language handler functions into the <literal>pg_catalog</> schema
 
4802
      </para>
 
4803
      <para>
 
4804
       This makes it easier to drop the public schema if desired.
 
4805
      </para>
 
4806
     </listitem>
 
4807
 
 
4808
     <listitem>
 
4809
      <para>
 
4810
       Add <function>SPI_getnspname()</function> to SPI (Neil)
 
4811
      </para>
 
4812
     </listitem>
 
4813
 
 
4814
    </itemizedlist>
 
4815
   </sect3>
 
4816
 
 
4817
   <sect3>
 
4818
    <title>PL/pgSQL Server-Side Language Changes</title>
 
4819
    <itemizedlist>
 
4820
 
 
4821
     <listitem>
 
4822
      <para>
 
4823
       Overhaul the memory management of PL/pgSQL functions (Neil)
 
4824
      </para>
 
4825
      <para>
 
4826
       The parsetree of each function is now stored in a separate
 
4827
       memory context. This allows this memory to be easily reclaimed
 
4828
       when it is no longer needed.
 
4829
      </para>
 
4830
     </listitem>
 
4831
 
 
4832
     <listitem>
 
4833
      <para>
 
4834
       Check function syntax at <command>CREATE FUNCTION</> time,
 
4835
       rather than at runtime (Neil)
 
4836
      </para>
 
4837
      <para>
 
4838
       Previously, most syntax errors were reported only when the
 
4839
       function was executed.
 
4840
      </para>
 
4841
     </listitem>
 
4842
 
 
4843
     <listitem>
 
4844
      <para>
 
4845
       Allow <command>OPEN</> to open non-<command>SELECT</> queries
 
4846
       like <command>EXPLAIN</> and <command>SHOW</> (Tom)
 
4847
      </para>
 
4848
     </listitem>
 
4849
 
 
4850
     <listitem>
 
4851
      <para>
 
4852
       No longer require functions to issue a <command>RETURN</>
 
4853
       statement (Tom)
 
4854
      </para>
 
4855
      <para>
 
4856
       This is a byproduct of the newly added <command>OUT</> and
 
4857
       <command>INOUT</> functionality.  <command>RETURN</> can
 
4858
       be omitted when it is not needed to provide the function's
 
4859
       return value.
 
4860
      </para>
 
4861
     </listitem>
 
4862
 
 
4863
     <listitem>
 
4864
      <para>
 
4865
       Add support for an optional <command>INTO</> clause to
 
4866
       PL/pgSQL's <command>EXECUTE</> statement (Pavel Stehule, Neil)
 
4867
      </para>
 
4868
     </listitem>
 
4869
 
 
4870
     <listitem>
 
4871
      <para>
 
4872
       Make <command>CREATE TABLE AS</> set <command>ROW_COUNT</> (Tom)
 
4873
      </para>
 
4874
     </listitem>
 
4875
 
 
4876
     <listitem>
 
4877
      <para>
 
4878
       Define <literal>SQLSTATE</> and <literal>SQLERRM</> to return
 
4879
       the <literal>SQLSTATE</> and error message of the current
 
4880
       exception (Pavel Stehule, Neil)
 
4881
      </para>
 
4882
      <para>
 
4883
       These variables are only defined inside exception blocks.
 
4884
      </para>
 
4885
     </listitem>
 
4886
 
 
4887
     <listitem>
 
4888
      <para>
 
4889
       Allow the parameters to the <command>RAISE</> statement to be
 
4890
       expressions (Pavel Stehule, Neil)
 
4891
      </para>
 
4892
     </listitem>
 
4893
 
 
4894
     <listitem>
 
4895
      <para>
 
4896
       Add a loop <command>CONTINUE</> statement (Pavel Stehule, Neil)
 
4897
      </para>
 
4898
     </listitem>
 
4899
 
 
4900
     <listitem>
 
4901
      <para>
 
4902
       Allow block and loop labels (Pavel Stehule)
 
4903
      </para>
 
4904
     </listitem>
 
4905
 
 
4906
    </itemizedlist>
 
4907
   </sect3>
 
4908
 
 
4909
 
 
4910
   <sect3>
 
4911
    <title>PL/Perl Server-Side Language Changes</title>
 
4912
    <itemizedlist>
 
4913
 
 
4914
     <listitem>
 
4915
      <para>
 
4916
       Allow large result sets to be returned efficiently (Abhijit
 
4917
       Menon-Sen)
 
4918
      </para>
 
4919
      <para>
 
4920
       This allows functions to use <function>return_next()</> to avoid
 
4921
       building the entire result set in memory.
 
4922
      </para>
 
4923
     </listitem>
 
4924
 
 
4925
     <listitem>
 
4926
      <para>
 
4927
       Allow one-row-at-a-time retrieval of query results (Abhijit Menon-Sen)
 
4928
      </para>
 
4929
      <para>
 
4930
       This allows functions to use <function>spi_query()</> and
 
4931
       <function>spi_fetchrow()</> to avoid accumulating the entire
 
4932
       result set in memory.
 
4933
      </para>
 
4934
     </listitem>
 
4935
 
 
4936
     <listitem>
 
4937
      <para>
 
4938
       Force PL/Perl to handle strings as <literal>UTF8</> if the
 
4939
       server encoding is <literal>UTF8</> (David Kamholz)
 
4940
      </para>
 
4941
     </listitem>
 
4942
 
 
4943
     <listitem>
 
4944
      <para>
 
4945
       Add a validator function for PL/Perl (Andrew)
 
4946
      </para>
 
4947
      <para>
 
4948
       This allows syntax errors to be reported at definition time,
 
4949
       rather than execution time.
 
4950
      </para>
 
4951
     </listitem>
 
4952
 
 
4953
     <listitem>
 
4954
      <para>
 
4955
       Allow PL/Perl to return a Perl array when the function returns
 
4956
       an array type (Andrew)
 
4957
      </para>
 
4958
      <para>
 
4959
       This basically maps <productname>PostgreSQL</productname> arrays
 
4960
       to Perl arrays.
 
4961
      </para>
 
4962
     </listitem>
 
4963
 
 
4964
     <listitem>
 
4965
      <para>
 
4966
       Allow Perl nonfatal warnings to generate <command>NOTICE</>
 
4967
       messages (Andrew)
 
4968
      </para>
 
4969
     </listitem>
 
4970
 
 
4971
     <listitem>
 
4972
      <para>
 
4973
       Allow Perl's <literal>strict</> mode to be enabled (Andrew)
 
4974
      </para>
 
4975
     </listitem>
 
4976
 
 
4977
    </itemizedlist>
 
4978
   </sect3>
 
4979
 
 
4980
 
 
4981
   <sect3>
 
4982
    <title><application>psql</> Changes</title>
 
4983
    <itemizedlist>
 
4984
 
 
4985
     <listitem>
 
4986
      <para>
 
4987
       Add <command>\set ON_ERROR_ROLLBACK</> to allow statements in
 
4988
       a transaction to error without affecting the rest of the
 
4989
       transaction (Greg Sabino Mullane)
 
4990
      </para>
 
4991
      <para>
 
4992
       This is basically implemented by wrapping every statement in a
 
4993
       sub-transaction.
 
4994
      </para>
 
4995
     </listitem>
 
4996
 
 
4997
     <listitem>
 
4998
      <para>
 
4999
       Add support for <literal>\x</> hex strings in
 
5000
       <application>psql</> variables (Bruce)
 
5001
      </para>
 
5002
      <para>
 
5003
       Octal escapes were already supported.
 
5004
      </para>
 
5005
     </listitem>
 
5006
 
 
5007
     <listitem>
 
5008
      <para>
 
5009
       Add support for <command>troff -ms</> output format (Roger
 
5010
       Leigh)
 
5011
      </para>
 
5012
     </listitem>
 
5013
 
 
5014
     <listitem>
 
5015
      <para>
 
5016
       Allow the history file location to be controlled by
 
5017
       <envar>HISTFILE</> (Andreas Seltenreich)
 
5018
      </para>
 
5019
      <para>
 
5020
       This allows configuration of per-database history storage.
 
5021
      </para>
 
5022
     </listitem>
 
5023
 
 
5024
     <listitem>
 
5025
      <para>
 
5026
       Prevent <command>\x</> (expanded mode) from affecting
 
5027
       the output of <command>\d tablename</> (Neil)
 
5028
      </para>
 
5029
     </listitem>
 
5030
 
 
5031
     <listitem>
 
5032
      <para>
 
5033
       Add <option>-L</> option to <application>psql</application> to
 
5034
       log sessions (Lorne Sunley)
 
5035
      </para>
 
5036
      <para>
 
5037
       This option was added because some operating systems do not have
 
5038
       simple command-line activity logging functionality.
 
5039
      </para>
 
5040
     </listitem>
 
5041
 
 
5042
     <listitem>
 
5043
      <para>
 
5044
       Make <command>\d</> show the tablespaces of indexes (Qingqing
 
5045
       Zhou)
 
5046
      </para>
 
5047
     </listitem>
 
5048
 
 
5049
     <listitem>
 
5050
      <para>
 
5051
       Allow <application>psql</application> help (<command>\h</>) to
 
5052
       make a best guess on the proper help information (Greg Sabino
 
5053
       Mullane)
 
5054
      </para>
 
5055
      <para>
 
5056
       This allows the user to just add <command>\h</> to the front of
 
5057
       the syntax error query and get help on the supported syntax.
 
5058
       Previously any additional query text beyond the command name
 
5059
       had to be removed to use <command>\h</>.
 
5060
      </para>
 
5061
     </listitem>
 
5062
 
 
5063
     <listitem>
 
5064
      <para>
 
5065
       Add <command>\pset numericlocale</> to allow numbers to be
 
5066
       output in a locale-aware format (Eugen Nedelcu)
 
5067
      </para>
 
5068
      <para>
 
5069
       For example, using <literal>C</> locale <literal>100000</> would
 
5070
       be output as <literal>100,000.0</> while a European locale might
 
5071
       output this value as <literal>100.000,0</>.
 
5072
      </para>
 
5073
     </listitem>
 
5074
 
 
5075
     <listitem>
 
5076
      <para>
 
5077
       Make startup banner show both server version number and
 
5078
       <application>psql</>'s version number, when they are different (Bruce)
 
5079
      </para>
 
5080
      <para>
 
5081
       Also, a warning will be shown if the server and <application>psql</>
 
5082
       are from different major releases.
 
5083
      </para>
 
5084
     </listitem>
 
5085
 
 
5086
    </itemizedlist>
 
5087
   </sect3>
 
5088
 
 
5089
 
 
5090
   <sect3>
 
5091
    <title><application>pg_dump</> Changes</title>
 
5092
    <itemizedlist>
 
5093
 
 
5094
     <listitem>
 
5095
      <para>
 
5096
       Add <option>-n</> / <option>--schema</> switch to
 
5097
       <application>pg_restore</> (Richard van den Berg)
 
5098
      </para>
 
5099
      <para>
 
5100
       This allows just the objects in a specified schema to be restored.
 
5101
      </para>
 
5102
     </listitem>
 
5103
 
 
5104
     <listitem>
 
5105
      <para>
 
5106
       Allow <application>pg_dump</> to dump large objects even in
 
5107
       text mode (Tom)
 
5108
      </para>
 
5109
      <para>
 
5110
       With this change, large objects are now always dumped; the former
 
5111
       <option>-b</> switch is a no-op.
 
5112
      </para>
 
5113
     </listitem>
 
5114
 
 
5115
     <listitem>
 
5116
      <para>
 
5117
       Allow <application>pg_dump</> to dump a consistent snapshot of
 
5118
       large objects (Tom)
 
5119
      </para>
 
5120
     </listitem>
 
5121
 
 
5122
     <listitem>
 
5123
      <para>
 
5124
       Dump comments for large objects (Tom)
 
5125
      </para>
 
5126
     </listitem>
 
5127
 
 
5128
     <listitem>
 
5129
      <para>
 
5130
       Add <option>--encoding</> to <application>pg_dump</>
 
5131
       (Magnus Hagander)
 
5132
      </para>
 
5133
      <para>
 
5134
       This allows a database to be dumped in an encoding that is
 
5135
       different from the server's encoding. This is valuable when
 
5136
       transferring the dump to a machine with a different encoding.
 
5137
      </para>
 
5138
     </listitem>
 
5139
 
 
5140
     <listitem>
 
5141
      <para>
 
5142
       Rely on <structname>pg_pltemplate</> for procedural languages (Tom)
 
5143
      </para>
 
5144
      <para>
 
5145
       If the call handler for a procedural language is in the
 
5146
       <literal>pg_catalog</> schema, <application>pg_dump</> does not
 
5147
       dump the handler.  Instead, it dumps the language using just
 
5148
       <command>CREATE LANGUAGE <replaceable>name</></command>,
 
5149
       relying on the <structname>pg_pltemplate</> catalog to provide
 
5150
       the language's creation parameters at load time.
 
5151
      </para>
 
5152
     </listitem>
 
5153
 
 
5154
    </itemizedlist>
 
5155
   </sect3>
 
5156
 
 
5157
 
 
5158
   <sect3>
 
5159
    <title><application>libpq</application> Changes</title>
 
5160
    <itemizedlist>
 
5161
 
 
5162
     <listitem>
 
5163
      <para>
 
5164
       Add a <envar>PGPASSFILE</> environment variable to specify the
 
5165
       password file's filename (Andrew)
 
5166
      </para>
 
5167
     </listitem>
 
5168
 
 
5169
     <listitem>
 
5170
      <para>
 
5171
       Add <function>lo_create()</>, that is similar to
 
5172
       <function>lo_creat()</> but allows the OID of the large object
 
5173
       to be specified (Tom)
 
5174
      </para>
 
5175
     </listitem>
 
5176
 
 
5177
     <listitem>
 
5178
      <para>
 
5179
       Make <application>libpq</application> consistently return an error
 
5180
       to the client application on <function>malloc()</function>
 
5181
       failure (Neil)
 
5182
      </para>
 
5183
     </listitem>
 
5184
    </itemizedlist>
 
5185
   </sect3>
 
5186
 
 
5187
 
 
5188
   <sect3>
 
5189
    <title>Source Code Changes</title>
 
5190
    <itemizedlist>
 
5191
 
 
5192
     <listitem>
 
5193
      <para>
 
5194
       Fix <application>pgxs</> to support building against a relocated
 
5195
       installation
 
5196
      </para>
 
5197
     </listitem>
 
5198
 
 
5199
     <listitem>
 
5200
      <para>
 
5201
       Add spinlock support for the Itanium processor using Intel
 
5202
       compiler (Vikram Kalsi)
 
5203
      </para>
 
5204
     </listitem>
 
5205
 
 
5206
     <listitem>
 
5207
      <para>
 
5208
       Add Kerberos 5 support for Windows (Magnus)
 
5209
      </para>
 
5210
     </listitem>
 
5211
 
 
5212
     <listitem>
 
5213
      <para>
 
5214
       Add Chinese FAQ (laser@pgsqldb.com)
 
5215
      </para>
 
5216
     </listitem>
 
5217
 
 
5218
     <listitem>
 
5219
      <para>
 
5220
       Rename Rendezvous to Bonjour to match OS/X feature renaming
 
5221
       (Bruce)
 
5222
      </para>
 
5223
     </listitem>
 
5224
 
 
5225
     <listitem>
 
5226
      <para>
 
5227
       Add support for <literal>fsync_writethrough</literal> on
 
5228
       Darwin (Chris Campbell)
 
5229
      </para>
 
5230
     </listitem>
 
5231
 
 
5232
     <listitem>
 
5233
      <para>
 
5234
       Streamline the passing of information within the server, the
 
5235
       optimizer, and the lock system (Tom)
 
5236
      </para>
 
5237
     </listitem>
 
5238
 
 
5239
     <listitem>
 
5240
      <para>
 
5241
       Allow <application>pg_config</> to be compiled using MSVC (Andrew)
 
5242
      </para>
 
5243
      <para>
 
5244
       This is required to build DBD::Pg using <application>MSVC</>.
 
5245
      </para>
 
5246
     </listitem>
 
5247
 
 
5248
     <listitem>
 
5249
      <para>
 
5250
       Remove support for Kerberos V4 (Magnus)
 
5251
      </para>
 
5252
      <para>
 
5253
       Kerberos 4 had security vulnerabilities and is no longer
 
5254
       maintained.
 
5255
      </para>
 
5256
     </listitem>
 
5257
 
 
5258
     <listitem>
 
5259
      <para>
 
5260
       Code cleanups (Coverity static analysis performed by
 
5261
       EnterpriseDB)
 
5262
      </para>
 
5263
     </listitem>
 
5264
 
 
5265
     <listitem>
 
5266
      <para>
 
5267
       Modify <filename>postgresql.conf</> to use documentation defaults
 
5268
       <literal>on</>/<literal>off</> rather than
 
5269
       <literal>true</>/<literal>false</> (Bruce)
 
5270
      </para>
 
5271
     </listitem>
 
5272
 
 
5273
     <listitem>
 
5274
      <para>
 
5275
       Enhance <application>pg_config</> to be able to report more
 
5276
       build-time values (Tom)
 
5277
      </para>
 
5278
     </listitem>
 
5279
 
 
5280
     <listitem>
 
5281
      <para>
 
5282
       Allow <application>libpq</application> to be built thread-safe
 
5283
       on Windows (Dave Page)
 
5284
      </para>
 
5285
     </listitem>
 
5286
 
 
5287
     <listitem>
 
5288
      <para>
 
5289
       Allow IPv6 connections to be used on Windows (Andrew)
 
5290
      </para>
 
5291
     </listitem>
 
5292
 
 
5293
     <listitem>
 
5294
      <para>
 
5295
       Add Server Administration documentation about I/O subsystem
 
5296
       reliability (Bruce)
 
5297
      </para>
 
5298
     </listitem>
 
5299
 
 
5300
     <listitem>
 
5301
      <para>
 
5302
       Move private declarations from <filename>gist.h</filename> to
 
5303
       <filename>gist_private.h</filename> (Neil)
 
5304
      </para>
 
5305
 
 
5306
      <para>
 
5307
       In previous releases, <filename>gist.h</> contained both the
 
5308
       public GiST API (intended for use by authors of GiST index
 
5309
       implementations) as well as some private declarations used by
 
5310
       the implementation of GiST itself. The latter have been moved
 
5311
       to a separate file, <filename>gist_private.h</>. Most GiST
 
5312
       index implementations should be unaffected.
 
5313
      </para>
 
5314
     </listitem>
 
5315
 
 
5316
     <listitem>
 
5317
      <para>
 
5318
       Overhaul GiST memory management (Neil)
 
5319
      </para>
 
5320
 
 
5321
      <para>
 
5322
       GiST methods are now always invoked in a short-lived memory
 
5323
       context. Therefore, memory allocated via <function>palloc()</>
 
5324
       will be reclaimed automatically, so GiST index implementations
 
5325
       do not need to manually release allocated memory via
 
5326
       <function>pfree()</>.
 
5327
      </para>
 
5328
     </listitem>
 
5329
    </itemizedlist>
 
5330
   </sect3>
 
5331
 
 
5332
 
 
5333
   <sect3>
 
5334
    <title>Contrib Changes</title>
 
5335
    <itemizedlist>
 
5336
 
 
5337
     <listitem>
 
5338
      <para>
 
5339
       Add <filename>/contrib/pg_buffercache</> contrib module (Mark
 
5340
       Kirkwood)
 
5341
      </para>
 
5342
      <para>
 
5343
       This displays the contents of the buffer cache, for debugging and
 
5344
       performance tuning purposes.
 
5345
      </para>
 
5346
     </listitem>
 
5347
 
 
5348
     <listitem>
 
5349
      <para>
 
5350
       Remove <filename>/contrib/array</> because it is obsolete (Tom)
 
5351
      </para>
 
5352
     </listitem>
 
5353
 
 
5354
     <listitem>
 
5355
      <para>
 
5356
       Clean up the <filename>/contrib/lo</> module (Tom)
 
5357
      </para>
 
5358
     </listitem>
 
5359
 
 
5360
     <listitem>
 
5361
      <para>
 
5362
       Move <filename>/contrib/findoidjoins</> to
 
5363
       <filename>/src/tools</> (Tom)
 
5364
      </para>
 
5365
     </listitem>
 
5366
 
 
5367
     <listitem>
 
5368
      <para>
 
5369
       Remove the <literal>&lt;&lt;</>, <literal>&gt;&gt;</>,
 
5370
       <literal>&amp;&lt;</>, and <literal>&amp;&gt;</> operators from
 
5371
       <filename>/contrib/cube</>
 
5372
      </para>
 
5373
      <para>
 
5374
       These operators were not useful.
 
5375
      </para>
 
5376
     </listitem>
 
5377
 
 
5378
     <listitem>
 
5379
      <para>
 
5380
       Improve <filename>/contrib/btree_gist</> (Janko Richter)
 
5381
      </para>
 
5382
     </listitem>
 
5383
 
 
5384
     <listitem>
 
5385
      <para>
 
5386
       Improve <filename>/contrib/pgbench</> (Tomoaki Sato, Tatsuo)
 
5387
      </para>
 
5388
      <para>
 
5389
       There is now a facility for testing with SQL command scripts given
 
5390
       by the user, instead of only a hard-wired command sequence.
 
5391
      </para>
 
5392
     </listitem>
 
5393
 
 
5394
     <listitem>
 
5395
      <para>
 
5396
       Improve <filename>/contrib/pgcrypto</> (Marko Kreen)
 
5397
      </para>
 
5398
 
 
5399
      <itemizedlist>
 
5400
 
 
5401
       <listitem>
 
5402
        <para>
 
5403
         Implementation of OpenPGP symmetric-key and public-key encryption
 
5404
        </para>
 
5405
        <para>
 
5406
         Both RSA and Elgamal public-key algorithms are supported.
 
5407
        </para>
 
5408
       </listitem>
 
5409
 
 
5410
       <listitem>
 
5411
        <para>
 
5412
         Stand alone build: include SHA256/384/512 hashes, Fortuna PRNG
 
5413
        </para>
 
5414
       </listitem>
 
5415
 
 
5416
       <listitem>
 
5417
        <para>
 
5418
         OpenSSL build: support 3DES, use internal AES with OpenSSL &lt; 0.9.7
 
5419
        </para>
 
5420
       </listitem>
 
5421
 
 
5422
       <listitem>
 
5423
        <para>
 
5424
         Take build parameters (OpenSSL, zlib) from <filename>configure</> result
 
5425
        </para>
 
5426
        <para>
 
5427
         There is no need to edit the <filename>Makefile</> anymore.
 
5428
        </para>
 
5429
       </listitem>
 
5430
 
 
5431
       <listitem>
 
5432
        <para>
 
5433
         Remove support for <filename>libmhash</> and <filename>libmcrypt</>
 
5434
        </para>
 
5435
       </listitem>
 
5436
 
 
5437
      </itemizedlist>
 
5438
     </listitem>
 
5439
 
 
5440
    </itemizedlist>
 
5441
   </sect3>
 
5442
 
 
5443
  </sect2>
 
5444
 </sect1>