1
<!-- doc/src/sgml/release-7.4.sgml -->
2
<!-- See header comment in release.sgml about typical markup -->
4
<sect1 id="release-7-4-30">
5
<title>Release 7.4.30</title>
8
<title>Release Date</title>
9
<simpara>2010-10-04</simpara>
13
This release contains a variety of fixes from 7.4.29.
14
For information about new features in the 7.4 major release, see
15
<xref linkend="release-7-4">.
19
This is expected to be the last <productname>PostgreSQL</> release
20
in the 7.4.X series. Users are encouraged to update to a newer
25
<title>Migration to Version 7.4.30</title>
28
A dump/restore is not required for those running 7.4.X.
29
However, if you are upgrading from a version earlier than 7.4.26,
30
see the release notes for 7.4.26.
36
<title>Changes</title>
42
Use a separate interpreter for each calling SQL userid in PL/Perl and
47
This change prevents security problems that can be caused by subverting
48
Perl or Tcl code that will be executed later in the same session under
49
another SQL user identity (for example, within a <literal>SECURITY
50
DEFINER</> function). Most scripting languages offer numerous ways that
51
that might be done, such as redefining standard functions or operators
52
called by the target function. Without this change, any SQL user with
53
Perl or Tcl language usage rights can do essentially anything with the
54
SQL privileges of the target function's owner.
58
The cost of this change is that intentional communication among Perl
59
and Tcl functions becomes more difficult. To provide an escape hatch,
60
PL/PerlU and PL/TclU functions continue to use only one interpreter
61
per session. This is not considered a security issue since all such
62
functions execute at the trust level of a database superuser already.
66
It is likely that third-party procedural languages that claim to offer
67
trusted execution have similar security issues. We advise contacting
68
the authors of any PL you are depending on for security-critical
73
Our thanks to Tim Bunce for pointing out this issue (CVE-2010-3433).
79
Prevent possible crashes in <function>pg_get_expr()</> by disallowing
80
it from being called with an argument that is not one of the system
81
catalog columns it's intended to be used with
82
(Heikki Linnakangas, Tom Lane)
88
Fix <quote>cannot handle unplanned sub-select</quote> error (Tom Lane)
92
This occurred when a sub-select contains a join alias reference that
93
expands into an expression containing another sub-select.
99
Take care to fsync the contents of lockfiles (both
100
<filename>postmaster.pid</> and the socket lockfile) while writing them
105
This omission could result in corrupted lockfile contents if the
106
machine crashes shortly after postmaster start. That could in turn
107
prevent subsequent attempts to start the postmaster from succeeding,
108
until the lockfile is manually removed.
114
Improve <filename>contrib/dblink</>'s handling of tables containing
115
dropped columns (Tom Lane)
121
Fix connection leak after <quote>duplicate connection name</quote>
122
errors in <filename>contrib/dblink</> (Itagaki Takahiro)
128
Update build infrastructure and documentation to reflect the source code
129
repository's move from CVS to Git (Magnus Hagander and others)
138
<sect1 id="release-7-4-29">
139
<title>Release 7.4.29</title>
142
<title>Release Date</title>
143
<simpara>2010-05-17</simpara>
147
This release contains a variety of fixes from 7.4.28.
148
For information about new features in the 7.4 major release, see
149
<xref linkend="release-7-4">.
153
The <productname>PostgreSQL</> community will stop releasing updates
154
for the 7.4.X release series in July 2010.
155
Users are encouraged to update to a newer release branch soon.
159
<title>Migration to Version 7.4.29</title>
162
A dump/restore is not required for those running 7.4.X.
163
However, if you are upgrading from a version earlier than 7.4.26,
164
see the release notes for 7.4.26.
170
<title>Changes</title>
176
Enforce restrictions in <literal>plperl</> using an opmask applied to
177
the whole interpreter, instead of using <filename>Safe.pm</>
178
(Tim Bunce, Andrew Dunstan)
182
Recent developments have convinced us that <filename>Safe.pm</> is too
183
insecure to rely on for making <literal>plperl</> trustable. This
184
change removes use of <filename>Safe.pm</> altogether, in favor of using
185
a separate interpreter with an opcode mask that is always applied.
186
Pleasant side effects of the change include that it is now possible to
187
use Perl's <literal>strict</> pragma in a natural way in
188
<literal>plperl</>, and that Perl's <literal>$a</> and <literal>$b</>
189
variables work as expected in sort routines, and that function
190
compilation is significantly faster. (CVE-2010-1169)
196
Prevent PL/Tcl from executing untrustworthy code from
197
<structname>pltcl_modules</> (Tom)
201
PL/Tcl's feature for autoloading Tcl code from a database table
202
could be exploited for trojan-horse attacks, because there was no
203
restriction on who could create or insert into that table. This change
204
disables the feature unless <structname>pltcl_modules</> is owned by a
205
superuser. (However, the permissions on the table are not checked, so
206
installations that really need a less-than-secure modules table can
207
still grant suitable privileges to trusted non-superusers.) Also,
208
prevent loading code into the unrestricted <quote>normal</> Tcl
209
interpreter unless we are really going to execute a <literal>pltclu</>
210
function. (CVE-2010-1170)
216
Do not allow an unprivileged user to reset superuser-only parameter
221
Previously, if an unprivileged user ran <literal>ALTER USER ... RESET
222
ALL</> for himself, or <literal>ALTER DATABASE ... RESET ALL</> for
223
a database he owns, this would remove all special parameter settings
224
for the user or database, even ones that are only supposed to be
225
changeable by a superuser. Now, the <command>ALTER</> will only
226
remove the parameters that the user has permission to change.
232
Avoid possible crash during backend shutdown if shutdown occurs
233
when a <literal>CONTEXT</> addition would be made to log entries (Tom)
237
In some cases the context-printing function would fail because the
238
current transaction had already been rolled back when it came time
239
to print a log message.
245
Update pl/perl's <filename>ppport.h</> for modern Perl versions
252
Fix assorted memory leaks in pl/python (Andreas Freund, Tom)
258
Ensure that <filename>contrib/pgstattuple</> functions respond to cancel
259
interrupts promptly (Tatsuhito Kasahara)
265
Make server startup deal properly with the case that
266
<function>shmget()</> returns <literal>EINVAL</> for an existing
267
shared memory segment (Tom)
271
This behavior has been observed on BSD-derived kernels including OS X.
272
It resulted in an entirely-misleading startup failure complaining that
273
the shared memory request size was too large.
282
<sect1 id="release-7-4-28">
283
<title>Release 7.4.28</title>
286
<title>Release Date</title>
287
<simpara>2010-03-15</simpara>
291
This release contains a variety of fixes from 7.4.27.
292
For information about new features in the 7.4 major release, see
293
<xref linkend="release-7-4">.
297
The <productname>PostgreSQL</> community will stop releasing updates
298
for the 7.4.X release series in July 2010.
299
Users are encouraged to update to a newer release branch soon.
303
<title>Migration to Version 7.4.28</title>
306
A dump/restore is not required for those running 7.4.X.
307
However, if you are upgrading from a version earlier than 7.4.26,
308
see the release notes for 7.4.26.
314
<title>Changes</title>
320
Add new configuration parameter <varname>ssl_renegotiation_limit</> to
321
control how often we do session key renegotiation for an SSL connection
326
This can be set to zero to disable renegotiation completely, which may
327
be required if a broken SSL library is used. In particular, some
328
vendors are shipping stopgap patches for CVE-2009-3555 that cause
329
renegotiation attempts to fail.
335
Make <function>substring()</> for <type>bit</> types treat any negative
336
length as meaning <quote>all the rest of the string</> (Tom)
340
The previous coding treated only -1 that way, and would produce an
341
invalid result value for other negative values, possibly leading to
342
a crash (CVE-2010-0442).
348
Fix some cases of pathologically slow regular expression matching (Tom)
354
When reading <filename>pg_hba.conf</> and related files, do not treat
355
<literal>@something</> as a file inclusion request if the <literal>@</>
356
appears inside quote marks; also, never treat <literal>@</> by itself
357
as a file inclusion request (Tom)
361
This prevents erratic behavior if a role or database name starts with
362
<literal>@</>. If you need to include a file whose path name
363
contains spaces, you can still do so, but you must write
364
<literal>@"/path to/file"</> rather than putting the quotes around
371
Prevent infinite loop on some platforms if a directory is named as
372
an inclusion target in <filename>pg_hba.conf</> and related files
379
Ensure PL/Tcl initializes the Tcl interpreter fully (Tom)
383
The only known symptom of this oversight is that the Tcl
384
<literal>clock</> command misbehaves if using Tcl 8.5 or later.
390
Prevent crash in <filename>contrib/dblink</> when too many key
391
columns are specified to a <function>dblink_build_sql_*</> function
392
(Rushabh Lathia, Joe Conway)
401
<sect1 id="release-7-4-27">
402
<title>Release 7.4.27</title>
405
<title>Release Date</title>
406
<simpara>2009-12-14</simpara>
410
This release contains a variety of fixes from 7.4.26.
411
For information about new features in the 7.4 major release, see
412
<xref linkend="release-7-4">.
416
<title>Migration to Version 7.4.27</title>
419
A dump/restore is not required for those running 7.4.X.
420
However, if you are upgrading from a version earlier than 7.4.26,
421
see the release notes for 7.4.26.
427
<title>Changes</title>
433
Protect against indirect security threats caused by index functions
434
changing session-local state (Gurjeet Singh, Tom)
438
This change prevents allegedly-immutable index functions from possibly
439
subverting a superuser's session (CVE-2009-4136).
445
Reject SSL certificates containing an embedded null byte in the common
446
name (CN) field (Magnus)
450
This prevents unintended matching of a certificate to a server or client
451
name during SSL validation (CVE-2009-4034).
457
Fix possible crash during backend-startup-time cache initialization (Tom)
463
Prevent signals from interrupting <literal>VACUUM</> at unsafe times
468
This fix prevents a PANIC if a <literal>VACUUM FULL</> is canceled
469
after it's already committed its tuple movements, as well as transient
470
errors if a plain <literal>VACUUM</> is interrupted after having
477
Fix possible crash due to integer overflow in hash table size
482
This could occur with extremely large planner estimates for the size of
489
Fix very rare crash in <type>inet</>/<type>cidr</> comparisons (Chris
496
Fix PAM password processing to be more robust (Tom)
500
The previous code is known to fail with the combination of the Linux
501
<literal>pam_krb5</> PAM module with Microsoft Active Directory as the
502
domain controller. It might have problems elsewhere too, since it was
503
making unjustified assumptions about what arguments the PAM stack would
510
Make the postmaster ignore any <literal>application_name</> parameter in
511
connection request packets, to improve compatibility with future libpq
521
<sect1 id="release-7-4-26">
522
<title>Release 7.4.26</title>
525
<title>Release Date</title>
526
<simpara>2009-09-09</simpara>
530
This release contains a variety of fixes from 7.4.25.
531
For information about new features in the 7.4 major release, see
532
<xref linkend="release-7-4">.
536
<title>Migration to Version 7.4.26</title>
539
A dump/restore is not required for those running 7.4.X.
540
However, if you have any hash indexes on <type>interval</> columns,
541
you must <command>REINDEX</> them after updating to 7.4.26.
542
Also, if you are upgrading from a version earlier than 7.4.11,
543
see the release notes for 7.4.11.
549
<title>Changes</title>
555
Disallow <command>RESET ROLE</> and <command>RESET SESSION
556
AUTHORIZATION</> inside security-definer functions (Tom, Heikki)
560
This covers a case that was missed in the previous patch that
561
disallowed <command>SET ROLE</> and <command>SET SESSION
562
AUTHORIZATION</> inside security-definer functions.
569
Fix handling of sub-SELECTs appearing in the arguments of
570
an outer-level aggregate function (Tom)
576
Fix hash calculation for data type <type>interval</> (Tom)
580
This corrects wrong results for hash joins on interval values.
581
It also changes the contents of hash indexes on interval columns.
582
If you have any such indexes, you must <command>REINDEX</> them
589
Fix overflow for <literal>INTERVAL '<replaceable>x</> ms'</literal>
590
when <replaceable>x</> is more than 2 million and integer
591
datetimes are in use (Alex Hunsaker)
597
Fix calculation of distance between a point and a line segment (Tom)
601
This led to incorrect results from a number of geometric operators.
607
Fix <type>money</> data type to work in locales where currency
608
amounts have no fractional digits, e.g. Japan (Itagaki Takahiro)
614
Properly round datetime input like
615
<literal>00:12:57.9999999999999999999999999999</> (Tom)
621
Fix poor choice of page split point in GiST R-tree operator classes
628
Fix portability issues in plperl initialization (Andrew Dunstan)
634
Improve robustness of <application>libpq</>'s code to recover
635
from errors during <command>COPY FROM STDIN</> (Tom)
641
Avoid including conflicting readline and editline header files
642
when both libraries are installed (Zdenek Kotala)
651
<sect1 id="release-7-4-25">
652
<title>Release 7.4.25</title>
655
<title>Release Date</title>
656
<simpara>2009-03-16</simpara>
660
This release contains a variety of fixes from 7.4.24.
661
For information about new features in the 7.4 major release, see
662
<xref linkend="release-7-4">.
666
<title>Migration to Version 7.4.25</title>
669
A dump/restore is not required for those running 7.4.X.
670
However, if you are upgrading from a version earlier than 7.4.11,
671
see the release notes for 7.4.11.
677
<title>Changes</title>
683
Prevent error recursion crashes when encoding conversion fails (Tom)
687
This change extends fixes made in the last two minor releases for
688
related failure scenarios. The previous fixes were narrowly tailored
689
for the original problem reports, but we have now recognized that
690
<emphasis>any</> error thrown by an encoding conversion function could
691
potentially lead to infinite recursion while trying to report the
692
error. The solution therefore is to disable translation and encoding
693
conversion and report the plain-ASCII form of any error message,
694
if we find we have gotten into a recursive error reporting situation.
701
Disallow <command>CREATE CONVERSION</> with the wrong encodings
702
for the specified conversion function (Heikki)
706
This prevents one possible scenario for encoding conversion failure.
707
The previous change is a backstop to guard against other kinds of
708
failures in the same area.
714
Fix core dump when <function>to_char()</> is given format codes that
715
are inappropriate for the type of the data argument (Tom)
721
Add <literal>MUST</> (Mauritius Island Summer Time) to the default list
722
of known timezone abbreviations (Xavier Bugaud)
731
<sect1 id="release-7-4-24">
732
<title>Release 7.4.24</title>
735
<title>Release Date</title>
736
<simpara>2009-02-02</simpara>
740
This release contains a variety of fixes from 7.4.23.
741
For information about new features in the 7.4 major release, see
742
<xref linkend="release-7-4">.
746
<title>Migration to Version 7.4.24</title>
749
A dump/restore is not required for those running 7.4.X.
750
However, if you are upgrading from a version earlier than 7.4.11,
751
see the release notes for 7.4.11.
757
<title>Changes</title>
763
Improve handling of URLs in <function>headline()</> function (Teodor)
769
Improve handling of overlength headlines in <function>headline()</>
776
Prevent possible Assert failure or misconversion if an encoding
777
conversion is created with the wrong conversion function for the
778
specified pair of encodings (Tom, Heikki)
784
Avoid unnecessary locking of small tables in <command>VACUUM</>
791
Fix uninitialized variables in <filename>contrib/tsearch2</>'s
792
<function>get_covers()</> function (Teodor)
798
Fix bug in <function>to_char()</>'s handling of <literal>TH</>
799
format codes (Andreas Scherbaum)
805
Make all documentation reference <literal>pgsql-bugs</> and/or
806
<literal>pgsql-hackers</> as appropriate, instead of the
807
now-decommissioned <literal>pgsql-ports</> and <literal>pgsql-patches</>
817
<sect1 id="release-7-4-23">
818
<title>Release 7.4.23</title>
821
<title>Release Date</title>
822
<simpara>2008-11-03</simpara>
826
This release contains a variety of fixes from 7.4.22.
827
For information about new features in the 7.4 major release, see
828
<xref linkend="release-7-4">.
832
<title>Migration to Version 7.4.23</title>
835
A dump/restore is not required for those running 7.4.X.
836
However, if you are upgrading from a version earlier than 7.4.11,
837
see the release notes for 7.4.11.
843
<title>Changes</title>
849
Fix backend crash when the client encoding cannot represent a localized
854
We have addressed similar issues before, but it would still fail if
855
the <quote>character has no equivalent</> message itself couldn't
856
be converted. The fix is to disable localization and send the plain
857
ASCII error message when we detect such a situation.
863
Fix incorrect tsearch2 headline generation when single query
864
item matches first word of text (Sushant Sinha)
870
Fix improper display of fractional seconds in interval values when
871
using a non-ISO datestyle in an <option>--enable-integer-datetimes</>
878
Ensure <function>SPI_getvalue</> and <function>SPI_getbinval</>
879
behave correctly when the passed tuple and tuple descriptor have
880
different numbers of columns (Tom)
884
This situation is normal when a table has had columns added or removed,
885
but these two functions didn't handle it properly.
886
The only likely consequence is an incorrect error indication.
892
Fix <application>ecpg</>'s parsing of <command>CREATE USER</> (Michael)
901
<sect1 id="release-7-4-22">
902
<title>Release 7.4.22</title>
905
<title>Release Date</title>
906
<simpara>2008-09-22</simpara>
910
This release contains a variety of fixes from 7.4.21.
911
For information about new features in the 7.4 major release, see
912
<xref linkend="release-7-4">.
916
<title>Migration to Version 7.4.22</title>
919
A dump/restore is not required for those running 7.4.X.
920
However, if you are upgrading from a version earlier than 7.4.11,
921
see the release notes for 7.4.11.
927
<title>Changes</title>
933
Fix datetime input functions to correctly detect integer overflow when
934
running on a 64-bit platform (Tom)
940
Improve performance of writing very long log messages to syslog (Tom)
946
Fix bug in backwards scanning of a cursor on a <literal>SELECT DISTINCT
953
Fix planner to estimate that <literal>GROUP BY</> expressions yielding
954
boolean results always result in two groups, regardless of the
955
expressions' contents (Tom)
959
This is very substantially more accurate than the regular <literal>GROUP
960
BY</> estimate for certain boolean tests like <replaceable>col</>
967
Improve <application>pg_dump</> and <application>pg_restore</>'s
968
error reporting after failure to send a SQL command (Tom)
977
<sect1 id="release-7-4-21">
978
<title>Release 7.4.21</title>
981
<title>Release Date</title>
982
<simpara>2008-06-12</simpara>
986
This release contains one serious bug fix over 7.4.20.
987
For information about new features in the 7.4 major release, see
988
<xref linkend="release-7-4">.
992
<title>Migration to Version 7.4.21</title>
995
A dump/restore is not required for those running 7.4.X.
996
However, if you are upgrading from a version earlier than 7.4.11,
997
see the release notes for 7.4.11.
1003
<title>Changes</title>
1009
Make <function>pg_get_ruledef()</> parenthesize negative constants (Tom)
1013
Before this fix, a negative constant in a view or rule might be dumped
1014
as, say, <literal>-42::integer</>, which is subtly incorrect: it should
1015
be <literal>(-42)::integer</> due to operator precedence rules.
1016
Usually this would make little difference, but it could interact with
1017
another recent patch to cause
1018
<productname>PostgreSQL</> to reject what had been a valid
1019
<command>SELECT DISTINCT</> view query. Since this could result in
1020
<application>pg_dump</> output failing to reload, it is being treated
1021
as a high-priority fix. The only released versions in which dump
1022
output is actually incorrect are 8.3.1 and 8.2.7.
1031
<sect1 id="release-7-4-20">
1032
<title>Release 7.4.20</title>
1035
<title>Release Date</title>
1036
<simpara>never released</simpara>
1040
This release contains a variety of fixes from 7.4.19.
1041
For information about new features in the 7.4 major release, see
1042
<xref linkend="release-7-4">.
1046
<title>Migration to Version 7.4.20</title>
1049
A dump/restore is not required for those running 7.4.X.
1050
However, if you are upgrading from a version earlier than 7.4.11,
1051
see the release notes for 7.4.11.
1057
<title>Changes</title>
1063
Fix conversions between ISO-8859-5 and other encodings to handle
1064
Cyrillic <quote>Yo</> characters (<literal>e</> and <literal>E</> with
1065
two dots) (Sergey Burladyan)
1071
Fix a few datatype input functions
1072
that were allowing unused bytes in their results to contain
1073
uninitialized, unpredictable values (Tom)
1077
This could lead to failures in which two apparently identical literal
1078
values were not seen as equal, resulting in the parser complaining
1079
about unmatched <literal>ORDER BY</> and <literal>DISTINCT</>
1086
Fix a corner case in regular-expression substring matching
1087
(<literal>substring(<replaceable>string</> from
1088
<replaceable>pattern</>)</literal>) (Tom)
1092
The problem occurs when there is a match to the pattern overall but
1093
the user has specified a parenthesized subexpression and that
1094
subexpression hasn't got a match. An example is
1095
<literal>substring('foo' from 'foo(bar)?')</>.
1096
This should return NULL, since <literal>(bar)</> isn't matched, but
1097
it was mistakenly returning the whole-pattern match instead (ie,
1104
Fix incorrect result from <application>ecpg</>'s
1105
<function>PGTYPEStimestamp_sub()</> function (Michael)
1111
Fix <literal>DatumGetBool</> macro to not fail with <application>gcc</>
1116
This problem affects <quote>old style</> (V0) C functions that
1117
return boolean. The fix is already in 8.3, but the need to
1118
back-patch it was not realized at the time.
1124
Fix longstanding <command>LISTEN</>/<command>NOTIFY</>
1125
race condition (Tom)
1129
In rare cases a session that had just executed a
1130
<command>LISTEN</> might not get a notification, even though
1131
one would be expected because the concurrent transaction executing
1132
<command>NOTIFY</> was observed to commit later.
1136
A side effect of the fix is that a transaction that has executed
1137
a not-yet-committed <command>LISTEN</> command will not see any
1138
row in <structname>pg_listener</> for the <command>LISTEN</>,
1139
should it choose to look; formerly it would have. This behavior
1140
was never documented one way or the other, but it is possible that
1141
some applications depend on the old behavior.
1147
Fix display of constant expressions in <literal>ORDER BY</>
1148
and <literal>GROUP BY</> (Tom)
1152
An explicitly casted constant would be shown incorrectly. This could
1153
for example lead to corruption of a view definition during
1160
Fix <application>libpq</> to handle NOTICE messages correctly
1161
during COPY OUT (Tom)
1165
This failure has only been observed to occur when a user-defined
1166
datatype's output routine issues a NOTICE, but there is no
1167
guarantee it couldn't happen due to other causes.
1176
<sect1 id="release-7-4-19">
1177
<title>Release 7.4.19</title>
1180
<title>Release Date</title>
1181
<simpara>2008-01-07</simpara>
1185
This release contains a variety of fixes from 7.4.18,
1186
including fixes for significant security issues.
1187
For information about new features in the 7.4 major release, see
1188
<xref linkend="release-7-4">.
1192
<title>Migration to Version 7.4.19</title>
1195
A dump/restore is not required for those running 7.4.X. However,
1196
if you are upgrading from a version earlier than 7.4.11, see the release
1203
<title>Changes</title>
1209
Prevent functions in indexes from executing with the privileges of
1210
the user running <command>VACUUM</>, <command>ANALYZE</>, etc (Tom)
1214
Functions used in index expressions and partial-index
1215
predicates are evaluated whenever a new table entry is made. It has
1216
long been understood that this poses a risk of trojan-horse code
1217
execution if one modifies a table owned by an untrustworthy user.
1218
(Note that triggers, defaults, check constraints, etc. pose the
1219
same type of risk.) But functions in indexes pose extra danger
1220
because they will be executed by routine maintenance operations
1221
such as <command>VACUUM FULL</>, which are commonly performed
1222
automatically under a superuser account. For example, a nefarious user
1223
can execute code with superuser privileges by setting up a
1224
trojan-horse index definition and waiting for the next routine vacuum.
1225
The fix arranges for standard maintenance operations
1226
(including <command>VACUUM</>, <command>ANALYZE</>, <command>REINDEX</>,
1227
and <command>CLUSTER</>) to execute as the table owner rather than
1228
the calling user, using the same privilege-switching mechanism already
1229
used for <literal>SECURITY DEFINER</> functions. To prevent bypassing
1230
this security measure, execution of <command>SET SESSION
1231
AUTHORIZATION</> and <command>SET ROLE</> is now forbidden within a
1232
<literal>SECURITY DEFINER</> context. (CVE-2007-6600)
1238
Repair assorted bugs in the regular-expression package (Tom, Will Drewry)
1242
Suitably crafted regular-expression patterns could cause crashes,
1243
infinite or near-infinite looping, and/or massive memory consumption,
1244
all of which pose denial-of-service hazards for applications that
1245
accept regex search patterns from untrustworthy sources.
1246
(CVE-2007-4769, CVE-2007-4772, CVE-2007-6067)
1252
Require non-superusers who use <filename>/contrib/dblink</> to use only
1253
password authentication, as a security measure (Joe)
1257
The fix that appeared for this in 7.4.18 was incomplete, as it plugged
1258
the hole for only some <filename>dblink</> functions. (CVE-2007-6601,
1265
Fix planner failure in some cases of <literal>WHERE false AND var IN
1266
(SELECT ...)</> (Tom)
1272
Fix potential crash in <function>translate()</> when using a multibyte
1273
database encoding (Tom)
1279
Fix PL/Python to not crash on long exception messages (Alvaro)
1285
<application>ecpg</> parser fixes (Michael)
1291
Make <filename>contrib/tablefunc</>'s <function>crosstab()</> handle
1292
NULL rowid as a category in its own right, rather than crashing (Joe)
1298
Fix <type>tsvector</> and <type>tsquery</> output routines to
1299
escape backslashes correctly (Teodor, Bruce)
1305
Fix crash of <function>to_tsvector()</> on huge input strings (Teodor)
1311
Require a specific version of <productname>Autoconf</> to be used
1312
when re-generating the <command>configure</> script (Peter)
1316
This affects developers and packagers only. The change was made
1317
to prevent accidental use of untested combinations of
1318
<productname>Autoconf</> and <productname>PostgreSQL</> versions.
1319
You can remove the version check if you really want to use a
1320
different <productname>Autoconf</> version, but it's
1321
your responsibility whether the result works or not.
1330
<sect1 id="release-7-4-18">
1331
<title>Release 7.4.18</title>
1334
<title>Release Date</title>
1335
<simpara>2007-09-17</simpara>
1339
This release contains fixes from 7.4.17.
1340
For information about new features in the 7.4 major release, see
1341
<xref linkend="release-7-4">.
1345
<title>Migration to Version 7.4.18</title>
1348
A dump/restore is not required for those running 7.4.X. However,
1349
if you are upgrading from a version earlier than 7.4.11, see the release
1356
<title>Changes</title>
1362
Prevent index corruption when a transaction inserts rows and
1363
then aborts close to the end of a concurrent <command>VACUUM</>
1364
on the same table (Tom)
1370
Make <command>CREATE DOMAIN ... DEFAULT NULL</> work properly (Tom)
1376
Fix excessive logging of <acronym>SSL</> error messages (Tom)
1382
Fix crash when <varname>log_min_error_statement</> logging runs out
1389
Prevent <command>CLUSTER</> from failing
1390
due to attempting to process temporary tables of other sessions (Alvaro)
1396
Require non-superusers who use <filename>/contrib/dblink</> to use only
1397
password authentication, as a security measure (Joe)
1406
<sect1 id="release-7-4-17">
1407
<title>Release 7.4.17</title>
1410
<title>Release Date</title>
1411
<simpara>2007-04-23</simpara>
1415
This release contains fixes from 7.4.16,
1416
including a security fix.
1417
For information about new features in the 7.4 major release, see
1418
<xref linkend="release-7-4">.
1422
<title>Migration to Version 7.4.17</title>
1425
A dump/restore is not required for those running 7.4.X. However,
1426
if you are upgrading from a version earlier than 7.4.11, see the release
1433
<title>Changes</title>
1439
Support explicit placement of the temporary-table schema within
1440
<varname>search_path</>, and disable searching it for functions
1444
This is needed to allow a security-definer function to set a
1445
truly secure value of <varname>search_path</>. Without it,
1446
an unprivileged SQL user can use temporary objects to execute code
1447
with the privileges of the security-definer function (CVE-2007-2138).
1448
See <command>CREATE FUNCTION</> for more information.
1454
<filename>/contrib/tsearch2</> crash fixes (Teodor)
1460
Fix potential-data-corruption bug in how <command>VACUUM FULL</> handles
1461
<command>UPDATE</> chains (Tom, Pavan Deolasee)
1467
Fix PANIC during enlargement of a hash index (bug introduced in 7.4.15)
1477
<sect1 id="release-7-4-16">
1478
<title>Release 7.4.16</title>
1481
<title>Release Date</title>
1482
<simpara>2007-02-05</simpara>
1486
This release contains a variety of fixes from 7.4.15, including
1488
For information about new features in the 7.4 major release, see
1489
<xref linkend="release-7-4">.
1493
<title>Migration to Version 7.4.16</title>
1496
A dump/restore is not required for those running 7.4.X. However,
1497
if you are upgrading from a version earlier than 7.4.11, see the release
1504
<title>Changes</title>
1510
Remove security vulnerability that allowed connected users
1511
to read backend memory (Tom)
1514
The vulnerability involves suppressing the normal check that a SQL
1515
function returns the data type it's declared to, or changing the
1516
data type of a table column used in a SQL function (CVE-2007-0555).
1517
This error can easily be exploited to cause a backend crash, and in
1518
principle might be used to read database content that the user
1519
should not be able to access.
1525
Fix rare bug wherein btree index page splits could fail
1526
due to choosing an infeasible split point (Heikki Linnakangas)
1532
Fix for rare Assert() crash triggered by <literal>UNION</> (Tom)
1538
Tighten security of multi-byte character processing for UTF8 sequences
1539
over three bytes long (Tom)
1548
<sect1 id="release-7-4-15">
1549
<title>Release 7.4.15</title>
1552
<title>Release Date</title>
1553
<simpara>2007-01-08</simpara>
1557
This release contains a variety of fixes from 7.4.14.
1558
For information about new features in the 7.4 major release, see
1559
<xref linkend="release-7-4">.
1563
<title>Migration to Version 7.4.15</title>
1566
A dump/restore is not required for those running 7.4.X. However,
1567
if you are upgrading from a version earlier than 7.4.11, see the release
1574
<title>Changes</title>
1580
Improve handling of <function>getaddrinfo()</> on AIX (Tom)
1584
This fixes a problem with starting the statistics collector,
1591
Fix <quote>failed to re-find parent key</> errors in
1592
<command>VACUUM</> (Tom)
1598
Fix bugs affecting multi-gigabyte hash indexes (Tom)
1604
Fix error when constructing an <literal>ARRAY[]</> made up of multiple
1605
empty elements (Tom)
1611
<function>to_number()</> and <function>to_char(numeric)</>
1612
are now <literal>STABLE</>, not <literal>IMMUTABLE</>, for
1613
new <application>initdb</> installs (Tom)
1617
This is because <varname>lc_numeric</> can potentially
1618
change the output of these functions.
1624
Improve index usage of regular expressions that use parentheses (Tom)
1628
This improves <application>psql</> <literal>\d</> performance also.
1637
<sect1 id="release-7-4-14">
1638
<title>Release 7.4.14</title>
1641
<title>Release Date</title>
1642
<simpara>2006-10-16</simpara>
1646
This release contains a variety of fixes from 7.4.13.
1647
For information about new features in the 7.4 major release, see
1648
<xref linkend="release-7-4">.
1652
<title>Migration to Version 7.4.14</title>
1655
A dump/restore is not required for those running 7.4.X. However,
1656
if you are upgrading from a version earlier than 7.4.11, see the release
1663
<title>Changes</title>
1666
<listitem><para>Fix core dump when an untyped literal is taken as
1667
ANYARRAY</para></listitem>
1668
<listitem><para>Fix <function>string_to_array()</> to handle overlapping
1669
matches for the separator string</para>
1670
<para>For example, <literal>string_to_array('123xx456xxx789', 'xx')</>.
1672
<listitem><para>Fix corner cases in pattern matching for
1673
<application>psql</>'s <literal>\d</> commands</para></listitem>
1674
<listitem><para>Fix index-corrupting bugs in /contrib/ltree
1675
(Teodor)</para></listitem>
1676
<listitem><para>Fix backslash escaping in /contrib/dbmirror</para></listitem>
1677
<listitem><para>Adjust regression tests for recent changes in US DST laws
1684
<sect1 id="release-7-4-13">
1685
<title>Release 7.4.13</title>
1688
<title>Release Date</title>
1689
<simpara>2006-05-23</simpara>
1693
This release contains a variety of fixes from 7.4.12,
1694
including patches for extremely serious security issues.
1695
For information about new features in the 7.4 major release, see
1696
<xref linkend="release-7-4">.
1700
<title>Migration to Version 7.4.13</title>
1703
A dump/restore is not required for those running 7.4.X. However,
1704
if you are upgrading from a version earlier than 7.4.11, see the release
1709
Full security against the SQL-injection attacks described in
1710
CVE-2006-2313 and CVE-2006-2314 might require changes in application
1711
code. If you have applications that embed untrustworthy strings
1712
into SQL commands, you should examine them as soon as possible to
1713
ensure that they are using recommended escaping techniques. In
1714
most cases, applications should be using subroutines provided by
1715
libraries or drivers (such as <application>libpq</>'s
1716
<function>PQescapeStringConn()</>) to perform string escaping,
1717
rather than relying on <foreignphrase>ad hoc</> code to do it.
1722
<title>Changes</title>
1725
<listitem><para>Change the server to reject invalidly-encoded multibyte
1726
characters in all cases (Tatsuo, Tom)</para>
1727
<para>While <productname>PostgreSQL</> has been moving in this direction for
1728
some time, the checks are now applied uniformly to all encodings and all
1729
textual input, and are now always errors not merely warnings. This change
1730
defends against SQL-injection attacks of the type described in CVE-2006-2313.
1733
<listitem><para>Reject unsafe uses of <literal>\'</> in string literals</para>
1734
<para>As a server-side defense against SQL-injection attacks of the type
1735
described in CVE-2006-2314, the server now only accepts <literal>''</> and not
1736
<literal>\'</> as a representation of ASCII single quote in SQL string
1737
literals. By default, <literal>\'</> is rejected only when
1738
<varname>client_encoding</> is set to a client-only encoding (SJIS, BIG5, GBK,
1739
GB18030, or UHC), which is the scenario in which SQL injection is possible.
1740
A new configuration parameter <varname>backslash_quote</> is available to
1741
adjust this behavior when needed. Note that full security against
1742
CVE-2006-2314 might require client-side changes; the purpose of
1743
<varname>backslash_quote</> is in part to make it obvious that insecure
1744
clients are insecure.
1747
<listitem><para>Modify <application>libpq</>'s string-escaping routines to be
1748
aware of encoding considerations and
1749
<varname>standard_conforming_strings</></para>
1750
<para>This fixes <application>libpq</>-using applications for the security
1751
issues described in CVE-2006-2313 and CVE-2006-2314, and also future-proofs
1752
them against the planned changeover to SQL-standard string literal syntax.
1753
Applications that use multiple <productname>PostgreSQL</> connections
1754
concurrently should migrate to <function>PQescapeStringConn()</> and
1755
<function>PQescapeByteaConn()</> to ensure that escaping is done correctly
1756
for the settings in use in each database connection. Applications that
1757
do string escaping <quote>by hand</> should be modified to rely on library
1761
<listitem><para>Fix some incorrect encoding conversion functions</para>
1762
<para><function>win1251_to_iso</>, <function>alt_to_iso</>,
1763
<function>euc_tw_to_big5</>, <function>euc_tw_to_mic</>,
1764
<function>mic_to_euc_tw</> were all broken to varying
1768
<listitem><para>Clean up stray remaining uses of <literal>\'</> in strings
1769
(Bruce, Jan)</para></listitem>
1771
<listitem><para>Fix bug that sometimes caused OR'd index scans to
1772
miss rows they should have returned</para></listitem>
1774
<listitem><para>Fix WAL replay for case where a btree index has been
1775
truncated</para></listitem>
1777
<listitem><para>Fix <literal>SIMILAR TO</> for patterns involving
1778
<literal>|</> (Tom)</para></listitem>
1780
<listitem><para>Fix server to use custom DH SSL parameters correctly (Michael
1781
Fuhr)</para></listitem>
1783
<listitem><para>Fix for Bonjour on Intel Macs (Ashley Clark)</para></listitem>
1785
<listitem><para>Fix various minor memory leaks</para></listitem>
1791
<sect1 id="release-7-4-12">
1792
<title>Release 7.4.12</title>
1795
<title>Release Date</title>
1796
<simpara>2006-02-14</simpara>
1800
This release contains a variety of fixes from 7.4.11.
1801
For information about new features in the 7.4 major release, see
1802
<xref linkend="release-7-4">.
1806
<title>Migration to Version 7.4.12</title>
1809
A dump/restore is not required for those running 7.4.X. However,
1810
if you are upgrading from a version earlier than 7.4.11, see the release
1816
<title>Changes</title>
1820
<listitem><para>Fix potential crash in <command>SET
1821
SESSION AUTHORIZATION</> (CVE-2006-0553)</para>
1822
<para>An unprivileged user could crash the server process, resulting in
1823
momentary denial of service to other users, if the server has been compiled
1824
with Asserts enabled (which is not the default).
1825
Thanks to Akio Ishida for reporting this problem.
1828
<listitem><para>Fix bug with row visibility logic in self-inserted
1830
<para>Under rare circumstances a row inserted by the current command
1831
could be seen as already valid, when it should not be. Repairs bug
1832
created in 7.4.9 and 7.3.11 releases.
1835
<listitem><para>Fix race condition that could lead to <quote>file already
1836
exists</> errors during pg_clog file creation
1837
(Tom)</para></listitem>
1839
<listitem><para>Properly check <literal>DOMAIN</> constraints for
1840
<literal>UNKNOWN</> parameters in prepared statements
1841
(Neil)</para></listitem>
1843
<listitem><para>Fix to allow restoring dumps that have cross-schema
1844
references to custom operators (Tom)</para></listitem>
1846
<listitem><para>Portability fix for testing presence of <function>finite</>
1847
and <function>isinf</> during configure (Tom)</para></listitem>
1854
<sect1 id="release-7-4-11">
1855
<title>Release 7.4.11</title>
1858
<title>Release Date</title>
1859
<simpara>2006-01-09</simpara>
1863
This release contains a variety of fixes from 7.4.10.
1864
For information about new features in the 7.4 major release, see
1865
<xref linkend="release-7-4">.
1869
<title>Migration to Version 7.4.11</title>
1872
A dump/restore is not required for those running 7.4.X. However,
1873
if you are upgrading from a version earlier than 7.4.8, see the release
1875
Also, you might need to <command>REINDEX</> indexes on textual
1876
columns after updating, if you are affected by the locale or
1877
<application>plperl</> issues described below.
1882
<title>Changes</title>
1886
<listitem><para>Fix for protocol-level Describe messages issued
1887
outside a transaction or in a failed transaction (Tom)</para></listitem>
1889
<listitem><para>Fix character string comparison for locales that consider
1890
different character combinations as equal, such as Hungarian (Tom)</para>
1891
<para>This might require <command>REINDEX</> to fix existing indexes on
1892
textual columns.</para></listitem>
1894
<listitem><para>Set locale environment variables during postmaster startup
1895
to ensure that <application>plperl</> won't change the locale later</para>
1896
<para>This fixes a problem that occurred if the <application>postmaster</> was
1897
started with environment variables specifying a different locale than what
1898
<application>initdb</> had been told. Under these conditions, any use of
1899
<application>plperl</> was likely to lead to corrupt indexes. You might need
1900
<command>REINDEX</> to fix existing indexes on
1901
textual columns if this has happened to you.</para></listitem>
1903
<listitem><para>Fix longstanding bug in strpos() and regular expression
1904
handling in certain rarely used Asian multi-byte character sets (Tatsuo)
1907
<listitem><para>Fix bug in <filename>/contrib/pgcrypto</> gen_salt,
1908
which caused it not to use all available salt space for MD5 and
1909
XDES algorithms (Marko Kreen, Solar Designer)</para>
1910
<para>Salts for Blowfish and standard DES are unaffected.</para></listitem>
1912
<listitem><para>Fix <filename>/contrib/dblink</> to throw an error,
1913
rather than crashing, when the number of columns specified is different from
1914
what's actually returned by the query (Joe)</para></listitem>
1921
<sect1 id="release-7-4-10">
1922
<title>Release 7.4.10</title>
1925
<title>Release Date</title>
1926
<simpara>2005-12-12</simpara>
1930
This release contains a variety of fixes from 7.4.9.
1931
For information about new features in the 7.4 major release, see
1932
<xref linkend="release-7-4">.
1936
<title>Migration to Version 7.4.10</title>
1939
A dump/restore is not required for those running 7.4.X. However,
1940
if you are upgrading from a version earlier than 7.4.8, see the release
1946
<title>Changes</title>
1950
<listitem><para>Fix race condition in transaction log management</para>
1951
<para>There was a narrow window in which an I/O operation could be initiated
1952
for the wrong page, leading to an Assert failure or data
1956
<listitem><para>Prevent failure if client sends Bind protocol message
1957
when current transaction is already aborted</para></listitem>
1959
<listitem><para><filename>/contrib/ltree</> fixes (Teodor)</para></listitem>
1961
<listitem><para>AIX and HPUX compile fixes (Tom)</para></listitem>
1963
<listitem><para>Fix longstanding planning error for outer joins</para>
1964
<para>This bug sometimes caused a bogus error <quote>RIGHT JOIN is
1965
only supported with merge-joinable join conditions</>.</para></listitem>
1967
<listitem><para>Prevent core dump in <application>pg_autovacuum</> when a
1968
table has been dropped</para></listitem>
1974
<sect1 id="release-7-4-9">
1975
<title>Release 7.4.9</title>
1978
<title>Release Date</title>
1979
<simpara>2005-10-04</simpara>
1983
This release contains a variety of fixes from 7.4.8.
1984
For information about new features in the 7.4 major release, see
1985
<xref linkend="release-7-4">.
1989
<title>Migration to Version 7.4.9</title>
1992
A dump/restore is not required for those running 7.4.X. However,
1993
if you are upgrading from a version earlier than 7.4.8, see the release
1999
<title>Changes</title>
2002
<listitem><para>Fix error that allowed <command>VACUUM</> to remove
2003
<literal>ctid</> chains too soon, and add more checking in code that follows
2004
<literal>ctid</> links</para>
2005
<para>This fixes a long-standing problem that could cause crashes in very rare
2006
circumstances.</para></listitem>
2007
<listitem><para>Fix <type>CHAR()</> to properly pad spaces to the specified
2008
length when using a multiple-byte character set (Yoshiyuki Asaba)</para>
2009
<para>In prior releases, the padding of <type>CHAR()</> was incorrect
2010
because it only padded to the specified number of bytes without
2011
considering how many characters were stored.</para></listitem>
2012
<listitem><para>Fix the sense of the test for read-only transaction
2013
in <command>COPY</></para>
2014
<para>The code formerly prohibited <command>COPY TO</>, where it should
2015
prohibit <command>COPY FROM</>.
2017
<listitem><para>Fix planning problem with outer-join ON clauses that reference
2018
only the inner-side relation</para></listitem>
2019
<listitem><para>Further fixes for <literal>x FULL JOIN y ON true</> corner
2020
cases</para></listitem>
2021
<listitem><para>Make <function>array_in</> and <function>array_recv</> more
2022
paranoid about validating their OID parameter</para></listitem>
2023
<listitem><para>Fix missing rows in queries like <literal>UPDATE a=... WHERE
2024
a...</> with GiST index on column <literal>a</></para></listitem>
2025
<listitem><para>Improve robustness of datetime parsing</para></listitem>
2026
<listitem><para>Improve checking for partially-written WAL
2027
pages</para></listitem>
2028
<listitem><para>Improve robustness of signal handling when SSL is
2029
enabled</para></listitem>
2030
<listitem><para>Don't try to open more than <literal>max_files_per_process</>
2031
files during postmaster startup</para></listitem>
2032
<listitem><para>Various memory leakage fixes</para></listitem>
2033
<listitem><para>Various portability improvements</para></listitem>
2034
<listitem><para>Fix PL/pgSQL to handle <literal>var := var</> correctly when
2035
the variable is of pass-by-reference type</para></listitem>
2036
<listitem><para>Update <filename>contrib/tsearch2</> to use current Snowball
2037
code</para></listitem>
2043
<sect1 id="release-7-4-8">
2044
<title>Release 7.4.8</title>
2047
<title>Release Date</title>
2048
<simpara>2005-05-09</simpara>
2052
This release contains a variety of fixes from 7.4.7, including several
2053
security-related issues.
2054
For information about new features in the 7.4 major release, see
2055
<xref linkend="release-7-4">.
2059
<title>Migration to Version 7.4.8</title>
2062
A dump/restore is not required for those running 7.4.X. However,
2063
it is one possible way of handling two significant security problems
2064
that have been found in the initial contents of 7.4.X system
2065
catalogs. A dump/initdb/reload sequence using 7.4.8's initdb will
2066
automatically correct these problems.
2070
The larger security problem is that the built-in character set encoding
2071
conversion functions can be invoked from SQL commands by unprivileged
2072
users, but the functions were not designed for such use and are not
2073
secure against malicious choices of arguments. The fix involves changing
2074
the declared parameter list of these functions so that they can no longer
2075
be invoked from SQL commands. (This does not affect their normal use
2076
by the encoding conversion machinery.)
2080
The lesser problem is that the <filename>contrib/tsearch2</> module
2081
creates several functions that are misdeclared to return
2082
<type>internal</> when they do not accept <type>internal</> arguments.
2083
This breaks type safety for all functions using <type>internal</>
2088
It is strongly recommended that all installations repair these errors,
2089
either by initdb or by following the manual repair procedures given
2090
below. The errors at least allow unprivileged database users to crash
2091
their server process, and might allow unprivileged users to gain the
2092
privileges of a database superuser.
2096
If you wish not to do an initdb, perform the following procedures instead.
2097
As the database superuser, do:
2101
UPDATE pg_proc SET proargtypes[3] = 'internal'::regtype
2102
WHERE pronamespace = 11 AND pronargs = 5
2103
AND proargtypes[2] = 'cstring'::regtype;
2104
-- The command should report having updated 90 rows;
2105
-- if not, rollback and investigate instead of committing!
2109
Next, if you have installed <filename>contrib/tsearch2</>, do:
2113
UPDATE pg_proc SET proargtypes[0] = 'internal'::regtype
2115
'dex_init(text)'::regprocedure,
2116
'snb_en_init(text)'::regprocedure,
2117
'snb_ru_init(text)'::regprocedure,
2118
'spell_init(text)'::regprocedure,
2119
'syn_init(text)'::regprocedure
2121
-- The command should report having updated 5 rows;
2122
-- if not, rollback and investigate instead of committing!
2126
If this command fails with a message like <quote>function
2127
"dex_init(text)" does not exist</>, then either <filename>tsearch2</>
2128
is not installed in this database, or you already did the update.
2132
The above procedures must be carried out in <emphasis>each</> database
2133
of an installation, including <literal>template1</>, and ideally
2134
including <literal>template0</> as well. If you do not fix the
2135
template databases then any subsequently created databases will contain
2136
the same errors. <literal>template1</> can be fixed in the same way
2137
as any other database, but fixing <literal>template0</> requires
2138
additional steps. First, from any database issue:
2140
UPDATE pg_database SET datallowconn = true WHERE datname = 'template0';
2142
Next connect to <literal>template0</> and perform the above repair
2143
procedures. Finally, do:
2145
-- re-freeze template0:
2147
-- and protect it against future alterations:
2148
UPDATE pg_database SET datallowconn = false WHERE datname = 'template0';
2154
<title>Changes</title>
2157
<listitem><para>Change encoding function signature to prevent
2158
misuse</para></listitem>
2159
<listitem><para>Change <filename>contrib/tsearch2</> to avoid unsafe use of
2160
<type>INTERNAL</> function results</para></listitem>
2161
<listitem><para>Repair ancient race condition that allowed a transaction to be
2162
seen as committed for some purposes (eg SELECT FOR UPDATE) slightly sooner
2163
than for other purposes</para>
2164
<para>This is an extremely serious bug since it could lead to apparent
2165
data inconsistencies being briefly visible to applications.</para></listitem>
2166
<listitem><para>Repair race condition between relation extension and
2168
<para>This could theoretically have caused loss of a page's worth of
2169
freshly-inserted data, although the scenario seems of very low probability.
2170
There are no known cases of it having caused more than an Assert failure.
2172
<listitem><para>Fix comparisons of <type>TIME WITH TIME ZONE</> values</para>
2174
The comparison code was wrong in the case where the
2175
<literal>--enable-integer-datetimes</> configuration switch had been used.
2176
NOTE: if you have an index on a <type>TIME WITH TIME ZONE</> column,
2177
it will need to be <command>REINDEX</>ed after installing this update, because
2178
the fix corrects the sort order of column values.
2180
<listitem><para>Fix <function>EXTRACT(EPOCH)</> for
2181
<type>TIME WITH TIME ZONE</> values</para></listitem>
2182
<listitem><para>Fix mis-display of negative fractional seconds in
2183
<type>INTERVAL</> values</para>
2185
This error only occurred when the
2186
<literal>--enable-integer-datetimes</> configuration switch had been used.
2188
<listitem><para>Ensure operations done during backend shutdown are counted by
2189
statistics collector</para>
2191
This is expected to resolve reports of <application>pg_autovacuum</>
2192
not vacuuming the system catalogs often enough — it was not being
2193
told about catalog deletions caused by temporary table removal during
2196
<listitem><para>Additional buffer overrun checks in plpgsql
2197
(Neil)</para></listitem>
2198
<listitem><para>Fix pg_dump to dump trigger names containing <literal>%</>
2199
correctly (Neil)</para></listitem>
2200
<listitem><para>Fix <filename>contrib/pgcrypto</> for newer OpenSSL builds
2201
(Marko Kreen)</para></listitem>
2202
<listitem><para>Still more 64-bit fixes for
2203
<filename>contrib/intagg</></para></listitem>
2204
<listitem><para>Prevent incorrect optimization of functions returning
2205
<type>RECORD</></para></listitem>
2206
<listitem><para>Prevent <function>to_char(interval)</> from dumping core for
2207
month-related formats</para></listitem>
2208
<listitem><para>Prevent crash on <literal>COALESCE(NULL,NULL)</></para></listitem>
2209
<listitem><para>Fix <function>array_map</> to call PL functions correctly</para></listitem>
2210
<listitem><para>Fix permission checking in <command>ALTER DATABASE RENAME</></para></listitem>
2211
<listitem><para>Fix <command>ALTER LANGUAGE RENAME</></para></listitem>
2212
<listitem><para>Make <function>RemoveFromWaitQueue</> clean up after itself</para>
2214
This fixes a lock management error that would only be visible if a transaction
2215
was kicked out of a wait for a lock (typically by query cancel) and then the
2216
holder of the lock released it within a very narrow window.
2218
<listitem><para>Fix problem with untyped parameter appearing in
2219
<command>INSERT ... SELECT</></para></listitem>
2220
<listitem><para>Fix <command>CLUSTER</> failure after
2221
<command>ALTER TABLE SET WITHOUT OIDS</></para></listitem>
2227
<sect1 id="release-7-4-7">
2228
<title>Release 7.4.7</title>
2231
<title>Release Date</title>
2232
<simpara>2005-01-31</simpara>
2236
This release contains a variety of fixes from 7.4.6, including several
2237
security-related issues.
2238
For information about new features in the 7.4 major release, see
2239
<xref linkend="release-7-4">.
2243
<title>Migration to Version 7.4.7</title>
2246
A dump/restore is not required for those running 7.4.X.
2251
<title>Changes</title>
2254
<listitem><para>Disallow <command>LOAD</> to non-superusers</para>
2256
On platforms that will automatically execute initialization functions of a
2257
shared library (this includes at least Windows and ELF-based Unixen),
2258
<command>LOAD</> can be used to make the server execute arbitrary code.
2259
Thanks to NGS Software for reporting this.</para></listitem>
2260
<listitem><para>Check that creator of an aggregate function has the right to
2261
execute the specified transition functions</para>
2263
This oversight made it possible to bypass denial of EXECUTE
2264
permission on a function.</para></listitem>
2265
<listitem><para>Fix security and 64-bit issues in
2266
contrib/intagg</para></listitem>
2267
<listitem><para>Add needed STRICT marking to some contrib functions (Kris
2268
Jurka)</para></listitem>
2269
<listitem><para>Avoid buffer overrun when plpgsql cursor declaration has too
2270
many parameters (Neil)</para></listitem>
2271
<listitem><para>Fix planning error for FULL and RIGHT outer joins</para>
2273
The result of the join was mistakenly supposed to be sorted the same as the
2274
left input. This could not only deliver mis-sorted output to the user, but
2275
in case of nested merge joins could give outright wrong answers.
2277
<listitem><para>Fix plperl for quote marks in tuple fields</para></listitem>
2278
<listitem><para>Fix display of negative intervals in SQL and GERMAN
2279
datestyles</para></listitem>
2280
<listitem><para>Make age(timestamptz) do calculation in local timezone not
2281
GMT</para></listitem>
2287
<sect1 id="release-7-4-6">
2288
<title>Release 7.4.6</title>
2291
<title>Release Date</title>
2292
<simpara>2004-10-22</simpara>
2296
This release contains a variety of fixes from 7.4.5.
2297
For information about new features in the 7.4 major release, see
2298
<xref linkend="release-7-4">.
2303
<title>Migration to Version 7.4.6</title>
2306
A dump/restore is not required for those running 7.4.X.
2311
<title>Changes</title>
2314
<listitem><para>Repair possible failure to update hint bits on disk</para>
2316
Under rare circumstances this oversight could lead to
2317
<quote>could not access transaction status</> failures, which qualifies
2318
it as a potential-data-loss bug.
2320
<listitem><para>Ensure that hashed outer join does not miss tuples</para>
2322
Very large left joins using a hash join plan could fail to output unmatched
2323
left-side rows given just the right data distribution.
2325
<listitem><para>Disallow running <application>pg_ctl</> as root</para>
2327
This is to guard against any possible security issues.
2329
<listitem><para>Avoid using temp files in <filename>/tmp</> in <command>make_oidjoins_check</command></para>
2331
This has been reported as a security issue, though it's hardly worthy of
2332
concern since there is no reason for non-developers to use this script anyway.
2334
<listitem><para>Prevent forced backend shutdown from re-emitting prior command
2337
In rare cases, a client might think that its last command had succeeded when
2338
it really had been aborted by forced database shutdown.
2340
<listitem><para>Repair bug in <function>pg_stat_get_backend_idset</function></para>
2342
This could lead to misbehavior in some of the system-statistics views.
2344
<listitem><para>Fix small memory leak in postmaster</para></listitem>
2345
<listitem><para>Fix <quote>expected both swapped tables to have TOAST
2346
tables</> bug</para>
2348
This could arise in cases such as CLUSTER after ALTER TABLE DROP COLUMN.
2350
<listitem><para>Prevent <literal>pg_ctl restart</> from adding <literal>-D</> multiple times</para></listitem>
2351
<listitem><para>Fix problem with NULL values in GiST indexes</para></listitem>
2352
<listitem><para><literal>::</> is no longer interpreted as a variable in an
2353
ECPG prepare statement</para></listitem>
2359
<sect1 id="release-7-4-5">
2360
<title>Release 7.4.5</title>
2363
<title>Release Date</title>
2364
<simpara>2004-08-18</simpara>
2368
This release contains one serious bug fix over 7.4.4.
2369
For information about new features in the 7.4 major release, see
2370
<xref linkend="release-7-4">.
2375
<title>Migration to Version 7.4.5</title>
2378
A dump/restore is not required for those running 7.4.X.
2383
<title>Changes</title>
2386
<listitem><para>Repair possible crash during concurrent B-tree index insertions</para>
2388
This patch fixes a rare case in which concurrent insertions into a B-tree index
2389
could result in a server panic. No permanent damage would result, but it's
2390
still worth a re-release. The bug does not exist in pre-7.4 releases.
2397
<sect1 id="release-7-4-4">
2398
<title>Release 7.4.4</title>
2401
<title>Release Date</title>
2402
<simpara>2004-08-16</simpara>
2406
This release contains a variety of fixes from 7.4.3.
2407
For information about new features in the 7.4 major release, see
2408
<xref linkend="release-7-4">.
2413
<title>Migration to Version 7.4.4</title>
2416
A dump/restore is not required for those running 7.4.X.
2421
<title>Changes</title>
2424
<listitem><para>Prevent possible loss of committed transactions during crash</para>
2426
Due to insufficient interlocking between transaction commit and checkpointing,
2427
it was possible for transactions committed just before the most recent
2428
checkpoint to be lost, in whole or in part, following a database crash and
2429
restart. This is a serious bug that has existed
2430
since <productname>PostgreSQL</productname> 7.1.
2432
<listitem><para>Check HAVING restriction before evaluating result list of an
2433
aggregate plan</para></listitem>
2434
<listitem><para>Avoid crash when session's current user ID is deleted</para></listitem>
2435
<listitem><para>Fix hashed crosstab for zero-rows case (Joe)</para></listitem>
2436
<listitem><para>Force cache update after renaming a column in a foreign key</para></listitem>
2437
<listitem><para>Pretty-print UNION queries correctly</para></listitem>
2438
<listitem><para>Make psql handle <literal>\r\n</> newlines properly in COPY IN</para></listitem>
2439
<listitem><para><application>pg_dump</> handled ACLs with grant options incorrectly</para></listitem>
2440
<listitem><para>Fix thread support for OS X and Solaris</para></listitem>
2441
<listitem><para>Updated JDBC driver (build 215) with various fixes</para></listitem>
2442
<listitem><para>ECPG fixes</para></listitem>
2443
<listitem><para>Translation updates (various contributors)</para></listitem>
2449
<sect1 id="release-7-4-3">
2450
<title>Release 7.4.3</title>
2453
<title>Release Date</title>
2454
<simpara>2004-06-14</simpara>
2458
This release contains a variety of fixes from 7.4.2.
2459
For information about new features in the 7.4 major release, see
2460
<xref linkend="release-7-4">.
2465
<title>Migration to Version 7.4.3</title>
2468
A dump/restore is not required for those running 7.4.X.
2473
<title>Changes</title>
2476
<listitem><para>Fix temporary memory leak when using non-hashed aggregates (Tom)</para></listitem>
2477
<listitem><para>ECPG fixes, including some for Informix compatibility (Michael)</para></listitem>
2478
<listitem><para>Fixes for compiling with thread-safety, particularly Solaris (Bruce)</para></listitem>
2479
<listitem><para>Fix error in COPY IN termination when using the old network protocol (ljb)</para></listitem>
2480
<listitem><para>Several important fixes in pg_autovacuum, including fixes for
2481
large tables, unsigned oids, stability, temp tables, and debug mode
2482
(Matthew T. O'Connor)</para></listitem>
2483
<listitem><para>Fix problem with reading tar-format dumps on NetBSD and BSD/OS (Bruce)</para></listitem>
2484
<listitem><para>Several JDBC fixes</para></listitem>
2485
<listitem><para>Fix ALTER SEQUENCE RESTART where last_value equals the restart value (Tom)</para></listitem>
2486
<listitem><para>Repair failure to recalculate nested sub-selects (Tom)</para></listitem>
2487
<listitem><para>Fix problems with non-constant expressions in LIMIT/OFFSET</para></listitem>
2488
<listitem><para>Support FULL JOIN with no join clause, such as X FULL JOIN Y ON TRUE (Tom)</para></listitem>
2489
<listitem><para>Fix another zero-column table bug (Tom)</para></listitem>
2490
<listitem><para>Improve handling of non-qualified identifiers in GROUP BY clauses in sub-selects (Tom)</para>
2492
Select-list aliases within the sub-select will now take precedence over
2493
names from outer query levels.
2495
<listitem><para>Do not generate <quote>NATURAL CROSS JOIN</> when decompiling rules (Tom)</para></listitem>
2496
<listitem><para>Add checks for invalid field length in binary COPY (Tom)</para>
2498
This fixes a difficult-to-exploit security hole.
2500
<listitem><para>Avoid locking conflict between <command>ANALYZE</command> and <command>LISTEN</command>/<command>NOTIFY</command></para></listitem>
2501
<listitem><para>Numerous translation updates (various contributors)</para></listitem>
2507
<sect1 id="release-7-4-2">
2508
<title>Release 7.4.2</title>
2511
<title>Release Date</title>
2512
<simpara>2004-03-08</simpara>
2516
This release contains a variety of fixes from 7.4.1.
2517
For information about new features in the 7.4 major release, see
2518
<xref linkend="release-7-4">.
2523
<title>Migration to Version 7.4.2</title>
2526
A dump/restore is not required for those running 7.4.X. However,
2527
it might be advisable as the easiest method of incorporating fixes for
2528
two errors that have been found in the initial contents of 7.4.X system
2529
catalogs. A dump/initdb/reload sequence using 7.4.2's initdb will
2530
automatically correct these problems.
2534
The more severe of the two errors is that data type <type>anyarray</>
2535
has the wrong alignment label; this is a problem because the
2536
<structname>pg_statistic</> system catalog uses <type>anyarray</>
2537
columns. The mislabeling can cause planner misestimations and even
2538
crashes when planning queries that involve <literal>WHERE</> clauses on
2539
double-aligned columns (such as <type>float8</> and <type>timestamp</>).
2540
It is strongly recommended that all installations repair this error,
2541
either by initdb or by following the manual repair procedure given
2546
The lesser error is that the system view <structname>pg_settings</>
2547
ought to be marked as having public update access, to allow
2548
<literal>UPDATE pg_settings</> to be used as a substitute for
2549
<command>SET</>. This can also be fixed either by initdb or manually,
2550
but it is not necessary to fix unless you want to use <literal>UPDATE
2555
If you wish not to do an initdb, the following procedure will work
2556
for fixing <structname>pg_statistic</>. As the database superuser,
2560
-- clear out old data in pg_statistic:
2561
DELETE FROM pg_statistic;
2562
VACUUM pg_statistic;
2563
-- this should update 1 row:
2564
UPDATE pg_type SET typalign = 'd' WHERE oid = 2277;
2565
-- this should update 6 rows:
2566
UPDATE pg_attribute SET attalign = 'd' WHERE atttypid = 2277;
2568
-- At this point you MUST start a fresh backend to avoid a crash!
2570
-- repopulate pg_statistic:
2574
This can be done in a live database, but beware that all backends
2575
running in the altered database must be restarted before it is safe to
2576
repopulate <structname>pg_statistic</>.
2580
To repair the <structname>pg_settings</> error, simply do:
2582
GRANT SELECT, UPDATE ON pg_settings TO PUBLIC;
2587
The above procedures must be carried out in <emphasis>each</> database
2588
of an installation, including <literal>template1</>, and ideally
2589
including <literal>template0</> as well. If you do not fix the
2590
template databases then any subsequently created databases will contain
2591
the same errors. <literal>template1</> can be fixed in the same way
2592
as any other database, but fixing <literal>template0</> requires
2593
additional steps. First, from any database issue:
2595
UPDATE pg_database SET datallowconn = true WHERE datname = 'template0';
2597
Next connect to <literal>template0</> and perform the above repair
2598
procedures. Finally, do:
2600
-- re-freeze template0:
2602
-- and protect it against future alterations:
2603
UPDATE pg_database SET datallowconn = false WHERE datname = 'template0';
2609
<title>Changes</title>
2612
Release 7.4.2 incorporates all the fixes included in release 7.3.6,
2613
plus the following fixes:
2617
<listitem><para>Fix <structname>pg_statistics</> alignment bug that could crash optimizer</para>
2618
<para>See above for details about this problem.</para></listitem>
2619
<listitem><para>Allow non-super users to update <structname>pg_settings</></para></listitem>
2620
<listitem><para>Fix several optimizer bugs, most of which led to
2621
<quote>variable not found in subplan target lists</> errors</para></listitem>
2622
<listitem><para>Avoid out-of-memory failure during startup of large multiple
2623
index scan</para></listitem>
2624
<listitem><para>Fix multibyte problem that could lead to <quote>out of
2625
memory</> error during <command>COPY IN</></para></listitem>
2626
<listitem><para>Fix problems with <command>SELECT INTO</> / <command>CREATE
2627
TABLE AS</> from tables without OIDs</para></listitem>
2628
<listitem><para>Fix problems with <filename>alter_table</> regression test
2629
during parallel testing</para></listitem>
2630
<listitem><para>Fix problems with hitting open file limit, especially on OS X (Tom)</para></listitem>
2631
<listitem><para>Partial fix for Turkish-locale issues</para>
2632
<para>initdb will succeed now in Turkish locale, but there are still some
2633
inconveniences associated with the <literal>i/I</> problem.</para></listitem>
2634
<listitem><para>Make pg_dump set client encoding on restore</para></listitem>
2635
<listitem><para>Other minor pg_dump fixes</para></listitem>
2636
<listitem><para>Allow ecpg to again use C keywords as column names (Michael)</para></listitem>
2637
<listitem><para>Added ecpg <literal>WHENEVER NOT_FOUND</> to
2638
<literal>SELECT/INSERT/UPDATE/DELETE</> (Michael)</para></listitem>
2639
<listitem><para>Fix ecpg crash for queries calling set-returning functions (Michael)</para></listitem>
2640
<listitem><para>Various other ecpg fixes (Michael)</para></listitem>
2641
<listitem><para>Fixes for Borland compiler</para></listitem>
2642
<listitem><para>Thread build improvements (Bruce)</para></listitem>
2643
<listitem><para>Various other build fixes</para></listitem>
2644
<listitem><para>Various JDBC fixes</para></listitem>
2650
<sect1 id="release-7-4-1">
2651
<title>Release 7.4.1</title>
2654
<title>Release Date</title>
2655
<simpara>2003-12-22</simpara>
2659
This release contains a variety of fixes from 7.4.
2660
For information about new features in the 7.4 major release, see
2661
<xref linkend="release-7-4">.
2666
<title>Migration to Version 7.4.1</title>
2669
A dump/restore is <emphasis>not</emphasis> required for those
2674
If you want to install the fixes in the information schema
2675
you need to reload it into the database.
2676
This is either accomplished by initializing a new cluster
2677
by running <command>initdb</command>, or by running the following
2678
sequence of SQL commands in each database (ideally including
2679
<literal>template1</literal>) as a superuser in
2680
<application>psql</application>, after installing the new release:
2682
DROP SCHEMA information_schema CASCADE;
2683
\i /usr/local/pgsql/share/information_schema.sql
2685
Substitute your installation path in the second command.
2691
<title>Changes</title>
2694
<listitem><para>Fixed bug in <command>CREATE SCHEMA</command> parsing in ECPG (Michael)</para></listitem>
2695
<listitem><para>Fix compile error when <option>--enable-thread-safety</option> and <option>--with-perl</option> are used together (Peter)</para></listitem>
2696
<listitem><para>Fix for subqueries that used hash joins (Tom)</para>
2698
Certain subqueries that used hash joins would crash because of
2699
improperly shared structures.
2701
<listitem><para>Fix free space map compaction bug (Tom)</para>
2703
This fixes a bug where compaction of the free space map could lead
2704
to a database server shutdown.
2707
<listitem><para>Fix for Borland compiler build of libpq (Bruce)</para></listitem>
2708
<listitem><para>Fix <function>netmask()</function> and <function>hostmask()</function> to return the maximum-length masklen (Tom)</para>
2710
Fix these functions to return values consistent with pre-7.4
2714
<listitem><para>Several <filename>contrib/pg_autovacuum</filename> fixes</para>
2716
Fixes include improper variable initialization, missing vacuum after
2717
<command>TRUNCATE</command>, and duration computation overflow for long vacuums.
2720
<listitem><para>Allow compile of <filename>contrib/cube</filename> under Cygwin (Jason Tishler)</para></listitem>
2721
<listitem><para>Fix Solaris use of password file when no passwords are defined (Tom)</para>
2723
Fix crash on Solaris caused by use of any type of password
2724
authentication when no passwords were defined.
2727
<listitem><para>JDBC fix for thread problems, other fixes</para></listitem>
2728
<listitem><para>Fix for <type>bytea</type> index lookups (Joe)</para></listitem>
2729
<listitem><para>Fix information schema for bit data types (Peter)</para></listitem>
2730
<listitem><para>Force zero_damaged_pages to be on during recovery from WAL</para></listitem>
2731
<listitem><para>Prevent some obscure cases of <quote>variable not in subplan target lists</quote></para></listitem>
2732
<listitem><para>Make <function>PQescapeBytea</function> and <function>byteaout</function> consistent with each other (Joe)</para></listitem>
2733
<listitem><para>Escape <type>bytea</type> output for bytes > 0x7e(Joe)</para>
2735
If different client encodings are used for <type>bytea</type> output and input, it
2736
is possible for <type>bytea</type> values to be corrupted by the differing
2737
encodings. This fix escapes all bytes that might be affected.
2740
<listitem><para>Added missing <function>SPI_finish()</function> calls to dblink's <function>get_tuple_of_interest()</function> (Joe)</para></listitem>
2741
<listitem><para>New Czech FAQ</para></listitem>
2742
<listitem><para>Fix information schema view <literal>constraint_column_usage</literal> for foreign keys (Peter)</para></listitem>
2743
<listitem><para>ECPG fixes (Michael)</para></listitem>
2744
<listitem><para>Fix bug with multiple <literal>IN</literal> subqueries and joins in the subqueries (Tom)</para></listitem>
2745
<listitem><para>Allow <literal>COUNT('x')</literal> to work (Tom)</para></listitem>
2746
<listitem><para>Install ECPG include files for Informix compatibility into separate directory (Peter)</para>
2748
Some names of ECPG include files for Informix compatibility conflicted with operating system include files.
2749
By installing them in their own directory, name conflicts have been reduced.
2752
<listitem><para>Fix SSL memory leak (Neil)</para>
2754
This release fixes a bug in 7.4 where SSL didn't free all memory it allocated.
2757
<listitem><para>Prevent <filename>pg_service.conf</filename> from using service name as default dbname (Bruce)</para></listitem>
2758
<listitem><para>Fix local ident authentication on FreeBSD (Tom)</para></listitem>
2764
<sect1 id="release-7-4">
2765
<title>Release 7.4</title>
2768
<title>Release Date</title>
2769
<simpara>2003-11-17</simpara>
2773
<title>Overview</title>
2776
Major changes in this release:
2782
<literal>IN</literal> / <literal>NOT IN</literal> subqueries are
2783
now much more efficient
2788
In previous releases, <literal>IN</literal>/<literal>NOT
2789
IN</literal> subqueries were joined to the upper query by
2790
sequentially scanning the subquery looking for a match. The
2791
7.4 code uses the same sophisticated techniques used by
2792
ordinary joins and so is much faster. An
2793
<literal>IN</literal> will now usually be as fast as or faster
2794
than an equivalent <literal>EXISTS</literal> subquery; this
2795
reverses the conventional wisdom that applied to previous
2803
Improved <literal>GROUP BY</literal> processing by using hash buckets
2808
In previous releases, rows to be grouped had to be sorted
2809
first. The 7.4 code can do <literal>GROUP BY</literal>
2810
without sorting, by accumulating results into a hash table
2811
with one entry per group. It will still use the sort
2812
technique, however, if the hash table is estimated to be too
2813
large to fit in <varname>sort_mem</>.
2820
New multikey hash join capability
2825
In previous releases, hash joins could only occur on single
2826
keys. This release allows multicolumn hash joins.
2833
Queries using the explicit <literal>JOIN</literal> syntax are
2834
now better optimized
2839
Prior releases evaluated queries using the explicit
2840
<literal>JOIN</literal> syntax only in the order implied by
2841
the syntax. 7.4 allows full optimization of these queries,
2842
meaning the optimizer considers all possible join orderings
2843
and chooses the most efficient. Outer joins, however, must
2844
still follow the declared ordering.
2851
Faster and more powerful regular expression code
2856
The entire regular expression module has been replaced with a
2857
new version by Henry Spencer, originally written for Tcl. The
2858
code greatly improves performance and supports several flavors
2859
of regular expressions.
2866
Function-inlining for simple SQL functions
2871
Simple SQL functions can now be inlined by including their SQL
2872
in the main query. This improves performance by eliminating
2873
per-call overhead. That means simple SQL functions now
2881
Full support for IPv6 connections and IPv6 address data types
2886
Previous releases allowed only IPv4 connections, and the IP
2887
data types only supported IPv4 addresses. This release adds
2888
full IPv6 support in both of these areas.
2895
Major improvements in SSL performance and reliability
2900
Several people very familiar with the SSL API have overhauled
2901
our SSL code to improve SSL key negotiation and error
2909
Make free space map efficiently reuse empty index pages,
2910
and other free space management improvements
2915
In previous releases, B-tree index pages that were left empty
2916
because of deleted rows could only be reused by rows with
2917
index values similar to the rows originally indexed on that
2918
page. In 7.4, <command>VACUUM</command> records empty index
2919
pages and allows them to be reused for any future index rows.
2926
SQL-standard information schema
2931
The information schema provides a standardized and stable way
2932
to access information about the schema objects defined in a
2940
Cursors conform more closely to the SQL standard
2945
The commands <command>FETCH</command> and
2946
<command>MOVE</command> have been overhauled to conform more
2947
closely to the SQL standard.
2954
Cursors can exist outside transactions
2959
These cursors are also called holdable cursors.
2966
New client-to-server protocol
2971
The new protocol adds error codes, more status information,
2972
faster startup, better support for binary data transmission,
2973
parameter values separated from SQL commands, prepared
2974
statements available at the protocol level, and cleaner
2975
recovery from <command>COPY</command> failures. The older
2976
protocol is still supported by both server and clients.
2983
<application>libpq</application> and
2984
<application>ECPG</application> applications are now fully
2990
While previous <application>libpq</application> releases
2991
already supported threads, this release improves thread safety
2992
by fixing some non-thread-safe code that was used during
2993
database connection startup. The <command>configure</command>
2994
option <option>--enable-thread-safety</option> must be used to
2995
enable this feature.
3002
New version of full-text indexing
3007
A new full-text indexing suite is available in
3008
<filename>contrib/tsearch2</filename>.
3020
The new autovacuum tool in
3021
<filename>contrib/autovacuum</filename> monitors the database
3022
statistics tables for
3023
<command>INSERT</command>/<command>UPDATE</command>/<command>DELETE</command>
3024
activity and automatically vacuums tables when needed.
3031
Array handling has been improved and moved into the server core
3036
Many array limitations have been removed, and arrays behave
3037
more like fully-supported data types.
3046
<title>Migration to Version 7.4</title>
3049
A dump/restore using <application>pg_dump</application> is
3050
required for those wishing to migrate data from any previous
3055
Observe the following incompatibilities:
3061
The server-side autocommit setting was removed and
3062
reimplemented in client applications and languages.
3063
Server-side autocommit was causing too many problems with
3064
languages and applications that wanted to control their own
3065
autocommit behavior, so autocommit was removed from the server
3066
and added to individual client APIs as appropriate.
3072
Error message wording has changed substantially in this
3073
release. Significant effort was invested to make the messages
3074
more consistent and user-oriented. If your applications try to
3075
detect different error conditions by parsing the error message,
3076
you are strongly encouraged to use the new error code facility instead.
3082
Inner joins using the explicit <literal>JOIN</literal> syntax
3083
might behave differently because they are now better
3090
A number of server configuration parameters have been renamed
3091
for clarity, primarily those related to
3098
<literal>FETCH 0</literal> or <literal>MOVE 0</literal> now
3099
does nothing. In prior releases, <literal>FETCH 0</literal>
3100
would fetch all remaining rows, and <literal>MOVE 0</literal>
3101
would move to the end of the cursor.
3107
<command>FETCH</command> and <command>MOVE</command> now return
3108
the actual number of rows fetched/moved, or zero if at the
3109
beginning/end of the cursor. Prior releases would return the
3110
row count passed to the command, not the number of rows
3111
actually fetched or moved.
3117
<command>COPY</command> now can process files that use
3118
carriage-return or carriage-return/line-feed end-of-line
3119
sequences. Literal carriage-returns and line-feeds are no
3120
longer accepted in data values; use <literal>\r</literal> and
3121
<literal>\n</literal> instead.
3127
Trailing spaces are now trimmed when converting from type
3128
<type>char(<replaceable>n</>)</type> to
3129
<type>varchar(<replaceable>n</>)</type> or <type>text</type>.
3130
This is what most people always expected to happen anyway.
3136
The data type <type>float(<replaceable>p</>)</type> now
3137
measures <replaceable>p</> in binary digits, not decimal
3138
digits. The new behavior follows the SQL standard.
3144
Ambiguous date values now must match the ordering specified by
3145
the <varname>datestyle</varname> setting. In prior releases, a
3146
date specification of <literal>10/20/03</> was interpreted as a
3147
date in October even if <varname>datestyle</> specified that
3148
the day should be first. 7.4 will throw an error if a date
3149
specification is invalid for the current setting of
3150
<varname>datestyle</>.
3156
The functions <function>oidrand</function>,
3157
<function>oidsrand</function>, and
3158
<function>userfntest</function> have been removed. These
3159
functions were determined to be no longer useful.
3165
String literals specifying time-varying date/time values, such
3166
as <literal>'now'</literal> or <literal>'today'</literal> will
3167
no longer work as expected in column default expressions; they
3168
now cause the time of the table creation to be the default, not
3169
the time of the insertion. Functions such as
3170
<function>now()</>, <function>current_timestamp</>, or
3171
<function>current_date</function> should be used instead.
3175
In previous releases, there was special code so that strings
3176
such as <literal>'now'</literal> were interpreted at
3177
<command>INSERT</> time and not at table creation time, but
3178
this work around didn't cover all cases. Release 7.4 now
3179
requires that defaults be defined properly using functions such
3180
as <function>now()</> or <function>current_timestamp</>. These
3181
will work in all situations.
3187
The dollar sign (<literal>$</>) is no longer allowed in
3188
operator names. It can instead be a non-first character in
3189
identifiers. This was done to improve compatibility with other
3190
database systems, and to avoid syntax problems when parameter
3191
placeholders (<literal>$<replaceable>n</></>) are written
3192
adjacent to operators.
3200
<title>Changes</title>
3203
Below you will find a detailed account of the changes between
3204
release 7.4 and the previous major release.
3208
<title>Server Operation Changes</title>
3213
Allow IPv6 server connections (Nigel Kukard, Johan Jordaan,
3214
Bruce, Tom, Kurt Roeckx, Andrew Dunstan)
3220
Fix SSL to handle errors cleanly (Nathan Mueller)
3223
In prior releases, certain SSL API error reports were not
3224
handled correctly. This release fixes those problems.
3230
SSL protocol security and performance improvements (Sean Chittenden)
3233
SSL key renegotiation was happening too frequently, causing poor
3234
SSL performance. Also, initial key handling was improved.
3240
Print lock information when a deadlock is detected (Tom)
3243
This allows easier debugging of deadlock situations.
3249
Update <filename>/tmp</filename> socket modification times
3250
regularly to avoid their removal (Tom)
3253
This should help prevent <filename>/tmp</filename> directory
3254
cleaner administration scripts from removing server socket
3259
<listitem><para>Enable PAM for Mac OS X (Aaron Hillegass)</para></listitem>
3262
<para>Make B-tree indexes fully WAL-safe (Tom)</para>
3264
In prior releases, under certain rare cases, a server crash
3265
could cause B-tree indexes to become corrupt. This release
3266
removes those last few rare cases.
3270
<listitem><para>Allow B-tree index compaction and empty page reuse (Tom)</para></listitem>
3274
Fix inconsistent index lookups during split of first root page (Tom)
3277
In prior releases, when a single-page index split into two
3278
pages, there was a brief period when another database session
3279
could miss seeing an index entry. This release fixes that rare
3284
<listitem><para>Improve free space map allocation logic (Tom)</para></listitem>
3287
<para>Preserve free space information between server restarts (Tom)</para>
3289
In prior releases, the free space map was not saved when the
3290
postmaster was stopped, so newly started servers had no free
3291
space information. This release saves the free space map, and
3292
reloads it when the server is restarted.
3296
<listitem><para>Add start time to <literal>pg_stat_activity</literal> (Neil)</para></listitem>
3297
<listitem><para>New code to detect corrupt disk pages; erase with <varname>zero_damaged_pages</varname> (Tom)</para></listitem>
3298
<listitem><para>New client/server protocol: faster, no username length limit, allow clean exit from <command>COPY</command> (Tom)</para></listitem>
3299
<listitem><para>Add transaction status, table ID, column ID to client/server protocol (Tom)</para></listitem>
3300
<listitem><para>Add binary I/O to client/server protocol (Tom)</para></listitem>
3301
<listitem><para>Remove autocommit server setting; move to client applications (Tom)</para></listitem>
3302
<listitem><para>New error message wording, error codes, and three levels of error detail (Tom, Joe, Peter)</para></listitem>
3307
<title>Performance Improvements</title>
3310
<listitem><para>Add hashing for <literal>GROUP BY</literal> aggregates (Tom)</para></listitem>
3311
<listitem><para>Make nested-loop joins be smarter about multicolumn indexes (Tom)</para></listitem>
3312
<listitem><para>Allow multikey hash joins (Tom)</para></listitem>
3313
<listitem><para>Improve constant folding (Tom)</para></listitem>
3314
<listitem><para>Add ability to inline simple SQL functions (Tom)</para></listitem>
3317
<para>Reduce memory usage for queries using complex functions (Tom)</para>
3319
In prior releases, functions returning allocated memory would
3320
not free it until the query completed. This release allows the
3321
freeing of function-allocated memory when the function call
3322
completes, reducing the total memory used by functions.
3327
<para>Improve GEQO optimizer performance (Tom)</para>
3329
This release fixes several inefficiencies in the way the GEQO optimizer
3330
manages potential query paths.
3336
Allow <literal>IN</>/<literal>NOT IN</> to be handled via hash
3343
Improve <literal>NOT IN (<replaceable>subquery</>)</literal>
3350
Allow most <literal>IN</literal> subqueries to be processed as
3357
Pattern matching operations can use indexes regardless of
3361
There is no way for non-ASCII locales to use the standard
3362
indexes for <literal>LIKE</literal> comparisons. This release
3363
adds a way to create a special index for
3364
<literal>LIKE</literal>.
3369
<para>Allow the postmaster to preload libraries using <varname>preload_libraries</varname> (Joe)</para>
3371
For shared libraries that require a long time to load, this
3372
option is available so the library can be preloaded in the
3373
postmaster and inherited by all database sessions.
3379
Improve optimizer cost computations, particularly for subqueries (Tom)
3385
Avoid sort when subquery <literal>ORDER BY</literal> matches upper query (Tom)
3391
Deduce that <literal>WHERE a.x = b.y AND b.y = 42</literal> also
3392
means <literal>a.x = 42</literal> (Tom)
3398
Allow hash/merge joins on complex joins (Tom)
3404
Allow hash joins for more data types (Tom)
3410
Allow join optimization of explicit inner joins, disable with
3411
<varname>join_collapse_limit</varname> (Tom)
3417
Add parameter <varname>from_collapse_limit</varname> to control
3418
conversion of subqueries to joins (Tom)
3424
Use faster and more powerful regular expression code from Tcl
3425
(Henry Spencer, Tom)
3431
Use bit-mapped relation sets in the optimizer (Tom)
3436
<para>Improve connection startup time (Tom)</para>
3438
The new client/server protocol requires fewer network packets to
3439
start a database session.
3445
Improve trigger/constraint performance (Stephan)
3451
Improve speed of <literal>col IN (const, const, const, ...)</literal> (Tom)
3457
Fix hash indexes which were broken in rare cases (Tom)
3461
<listitem><para>Improve hash index concurrency and speed (Tom)</para>
3463
Prior releases suffered from poor hash index performance,
3464
particularly for high concurrency situations. This release fixes
3465
that, and the development group is interested in reports
3466
comparing B-tree and hash index performance.
3471
<para>Align shared buffers on 32-byte boundary for copy speed improvement (Manfred Spraul)</para>
3473
Certain CPU's perform faster data copies when addresses are
3479
<para>Data type <type>numeric</type> reimplemented for better performance (Tom)</para>
3481
<type>numeric</type> used to be stored in base 100. The new code
3482
uses base 10000, for significantly better performance.
3489
<title>Server Configuration Changes</title>
3493
<para>Rename server parameter <varname>server_min_messages</> to <varname>log_min_messages</> (Bruce)</para>
3495
This was done so most parameters that control the server logs
3496
begin with <literal>log_</>.
3500
<listitem><para>Rename <varname>show_*_stats</> to <varname>log_*_stats</> (Bruce)</para></listitem>
3501
<listitem><para>Rename <varname>show_source_port</> to <varname>log_source_port</> (Bruce)</para></listitem>
3502
<listitem><para>Rename <varname>hostname_lookup</> to <varname>log_hostname</> (Bruce)</para></listitem>
3505
<para>Add <varname>checkpoint_warning</> to warn of excessive checkpointing (Bruce)</para>
3507
In prior releases, it was difficult to determine if checkpoint
3508
was happening too frequently. This feature adds a warning to the
3509
server logs when excessive checkpointing happens.
3513
<listitem><para>New read-only server parameters for localization (Tom)</para></listitem>
3517
Change debug server log messages to output as <literal>DEBUG</>
3518
rather than <literal>LOG</> (Bruce)
3523
<para>Prevent server log variables from being turned off by non-superusers (Bruce)</para>
3525
This is a security feature so non-superusers cannot disable
3526
logging that was enabled by the administrator.
3532
<varname>log_min_messages</>/<varname>client_min_messages</> now
3533
controls <varname>debug_*</> output (Bruce)
3536
This centralizes client debug information so all debug output
3537
can be sent to either the client or server logs.
3542
<para>Add Mac OS X Rendezvous server support (Chris Campbell)</para>
3544
This allows Mac OS X hosts to query the network for available
3545
<productname>PostgreSQL</productname> servers.
3551
Add ability to print only slow statements using
3552
<varname>log_min_duration_statement</varname>
3556
This is an often requested debugging feature that allows
3557
administrators to see only slow queries in their server logs.
3562
<para>Allow <filename>pg_hba.conf</filename> to accept netmasks in CIDR format (Andrew Dunstan)</para>
3564
This allows administrators to merge the host IP address and
3565
netmask fields into a single CIDR field in <filename>pg_hba.conf</filename>.
3569
<listitem><para>New read-only parameter <varname>is_superuser</varname> (Tom)</para></listitem>
3572
<para>New parameter <varname>log_error_verbosity</varname> to control error detail (Tom)</para>
3574
This works with the new error reporting feature to supply
3575
additional error information like hints, file names and line
3581
<para><literal>postgres --describe-config</literal> now dumps server config variables (Aizaz Ahmed, Peter)</para>
3583
This option is useful for administration tools that need to know
3584
the configuration variable names and their minimums, maximums,
3585
defaults, and descriptions.
3591
Add new columns in <literal>pg_settings</literal>:
3592
<literal>context</>, <literal>type</>, <literal>source</>,
3593
<literal>min_val</>, <literal>max_val</> (Joe)
3599
Make default <varname>shared_buffers</> 1000 and
3600
<varname>max_connections</> 100, if possible (Tom)
3603
Prior versions defaulted to 64 shared buffers so <productname>PostgreSQL</productname>
3604
would start on even very old systems. This release tests the
3605
amount of shared memory allowed by the platform and selects more
3606
reasonable default values if possible. Of course, users are
3607
still encouraged to evaluate their resource load and size
3608
<varname>shared_buffers</varname> accordingly.
3614
New <filename>pg_hba.conf</filename> record type
3615
<literal>hostnossl</> to prevent SSL connections (Jon
3619
In prior releases, there was no way to prevent SSL connections
3620
if both the client and server supported SSL. This option allows
3627
Remove parameter <varname>geqo_random_seed</varname>
3634
Add server parameter <varname>regex_flavor</varname> to control regular expression processing (Tom)
3640
Make <command>pg_ctl</command> better handle nonstandard ports (Greg)
3647
<title>Query Changes</title>
3650
<listitem><para>New SQL-standard information schema (Peter)</para></listitem>
3651
<listitem><para>Add read-only transactions (Peter)</para></listitem>
3652
<listitem><para>Print key name and value in foreign-key violation messages (Dmitry Tkach)</para></listitem>
3655
<para>Allow users to see their own queries in <literal>pg_stat_activity</literal> (Kevin Brown)</para>
3657
In prior releases, only the superuser could see query strings
3658
using <literal>pg_stat_activity</literal>. Now ordinary users
3659
can see their own query strings.
3664
<para>Fix aggregates in subqueries to match SQL standard (Tom)</para>
3666
The SQL standard says that an aggregate function appearing
3667
within a nested subquery belongs to the outer query if its
3668
argument contains only outer-query variables. Prior
3669
<productname>PostgreSQL</productname> releases did not handle
3670
this fine point correctly.
3675
<para>Add option to prevent auto-addition of tables referenced in query (Nigel J. Andrews)</para>
3677
By default, tables mentioned in the query are automatically
3678
added to the <literal>FROM</> clause if they are not already
3679
there. This is compatible with historic
3680
<productname>POSTGRES</productname> behavior but is contrary to
3681
the SQL standard. This option allows selecting
3682
standard-compatible behavior.
3687
<para>Allow <literal>UPDATE ... SET col = DEFAULT</literal> (Rod)</para>
3689
This allows <command>UPDATE</command> to set a column to its
3690
declared default value.
3695
<para>Allow expressions to be used in <literal>LIMIT</>/<literal>OFFSET</> (Tom)</para>
3697
In prior releases, <literal>LIMIT</>/<literal>OFFSET</> could
3698
only use constants, not expressions.
3703
<para>Implement <literal>CREATE TABLE AS EXECUTE</literal> (Neil, Peter)</para>
3709
<title>Object Manipulation Changes</title>
3713
<para>Make <command>CREATE SEQUENCE</command> grammar more conforming to SQL:2003 (Neil)</para>
3717
<para>Add statement-level triggers (Neil)</para>
3719
While this allows a trigger to fire at the end of a statement,
3720
it does not allow the trigger to access all rows modified by the
3721
statement. This capability is planned for a future release.
3726
<para>Add check constraints for domains (Rod)</para>
3728
This greatly increases the usefulness of domains by allowing
3729
them to use check constraints.
3734
<para>Add <command>ALTER DOMAIN</command> (Rod)</para>
3736
This allows manipulation of existing domains.
3741
<para>Fix several zero-column table bugs (Tom)</para>
3743
<productname>PostgreSQL</productname> supports zero-column tables. This fixes various bugs
3744
that occur when using such tables.
3749
<para>Have <literal>ALTER TABLE ... ADD PRIMARY KEY</literal> add not-null constraint (Rod)</para>
3751
In prior releases, <literal>ALTER TABLE ... ADD
3752
PRIMARY</literal> would add a unique index, but not a not-null
3753
constraint. That is fixed in this release.
3757
<listitem><para>Add <literal>ALTER TABLE ... WITHOUT OIDS</literal> (Rod)</para>
3759
This allows control over whether new and updated rows will have
3760
an OID column. This is most useful for saving storage space.
3766
Add <literal>ALTER SEQUENCE</literal> to modify minimum, maximum,
3767
increment, cache, cycle values (Rod)
3772
<para>Add <literal>ALTER TABLE ... CLUSTER ON</literal> (Alvaro Herrera)</para>
3774
This command is used by <command>pg_dump</command> to record the
3775
cluster column for each table previously clustered. This
3776
information is used by database-wide cluster to cluster all
3777
previously clustered tables.
3781
<listitem><para>Improve automatic type casting for domains (Rod, Tom)</para></listitem>
3782
<listitem><para>Allow dollar signs in identifiers, except as first character (Tom)</para></listitem>
3783
<listitem><para>Disallow dollar signs in operator names, so <literal>x=$1</> works (Tom)</para></listitem>
3787
Allow copying table schema using <literal>LIKE
3788
<replaceable>subtable</replaceable></literal>, also SQL:2003
3789
feature <literal>INCLUDING DEFAULTS</literal> (Rod)
3795
Add <literal>WITH GRANT OPTION</literal> clause to
3796
<command>GRANT</command> (Peter)
3799
This enabled <command>GRANT</command> to give other users the
3800
ability to grant privileges on a object.
3807
<title>Utility Command Changes</title>
3811
<para>Add <literal>ON COMMIT</literal> clause to <command>CREATE TABLE</command> for temporary tables (Gavin)</para>
3813
This adds the ability for a table to be dropped or all rows
3814
deleted on transaction commit.
3819
<para>Allow cursors outside transactions using <literal>WITH HOLD</literal> (Neil)</para>
3821
In previous releases, cursors were removed at the end of the
3822
transaction that created them. Cursors can now be created with
3823
the <literal>WITH HOLD</literal> option, which allows them to
3824
continue to be accessed after the creating transaction has
3830
<para><literal>FETCH 0</literal> and <literal>MOVE 0 </literal> now do nothing (Bruce)</para>
3832
In previous releases, <literal>FETCH 0</literal> fetched all
3833
remaining rows, and <literal>MOVE 0</literal> moved to the end
3840
Cause <command>FETCH</command> and <command>MOVE</command> to
3841
return the number of rows fetched/moved, or zero if at the
3842
beginning/end of cursor, per SQL standard (Bruce)
3845
In prior releases, the row count returned by
3846
<command>FETCH</command> and <command>MOVE</command> did not
3847
accurately reflect the number of rows processed.
3852
<para>Properly handle <literal>SCROLL</literal> with cursors, or
3853
report an error (Neil)</para>
3855
Allowing random access (both forward and backward scrolling) to
3856
some kinds of queries cannot be done without some additional
3857
work. If <literal>SCROLL</literal> is specified when the cursor
3858
is created, this additional work will be performed. Furthermore,
3859
if the cursor has been created with <literal>NO SCROLL</literal>,
3860
no random access is allowed.
3866
Implement SQL-compatible options <literal>FIRST</>,
3867
<literal>LAST</>, <literal>ABSOLUTE <replaceable>n</></>,
3868
<literal>RELATIVE <replaceable>n</></> for
3869
<command>FETCH</command> and <command>MOVE</command> (Tom)
3874
<para>Allow <command>EXPLAIN</command> on <command>DECLARE CURSOR</command> (Tom)</para>
3878
<para>Allow <command>CLUSTER</command> to use index marked as pre-clustered by default (Alvaro Herrera)</para>
3882
<para>Allow <command>CLUSTER</command> to cluster all tables (Alvaro Herrera)</para>
3884
This allows all previously clustered tables in a database to be
3885
reclustered with a single command.
3889
<listitem><para>Prevent <command>CLUSTER</command> on partial indexes (Tom)</para></listitem>
3891
<listitem><para>Allow DOS and Mac line-endings in <command>COPY</> files (Bruce)</para></listitem>
3895
Disallow literal carriage return as a data value,
3896
backslash-carriage-return and <literal>\r</> are still allowed
3902
<para><command>COPY</> changes (binary, <literal>\.</>) (Tom)</para>
3906
<para>Recover from <command>COPY</command> failure cleanly (Tom)</para>
3910
<para>Prevent possible memory leaks in <command>COPY</command> (Tom)</para>
3914
<para>Make <command>TRUNCATE</command> transaction-safe (Rod)</para>
3916
<command>TRUNCATE</command> can now be used inside a
3917
transaction. If the transaction aborts, the changes made by the
3918
<command>TRUNCATE</command> are automatically rolled back.
3924
Allow prepare/bind of utility commands like
3925
<command>FETCH</command> and <command>EXPLAIN</command> (Tom)
3930
<para>Add <command>EXPLAIN EXECUTE</command> (Neil)</para>
3934
<para>Improve <command>VACUUM</command> performance on indexes by reducing WAL traffic (Tom)</para>
3938
<para>Functional indexes have been generalized into indexes on expressions (Tom)</para>
3940
In prior releases, functional indexes only supported a simple
3941
function applied to one or more column names. This release
3942
allows any type of scalar expression.
3948
Have <command>SHOW TRANSACTION ISOLATION</command> match input
3949
to <command>SET TRANSACTION ISOLATION</command>
3956
Have <command>COMMENT ON DATABASE</command> on nonlocal
3957
database generate a warning, rather than an error (Rod)
3961
Database comments are stored in database-local tables so
3962
comments on a database have to be stored in each database.
3968
Improve reliability of <command>LISTEN</>/<command>NOTIFY</> (Tom)
3973
<para>Allow <command>REINDEX</command> to reliably reindex nonshared system catalog indexes (Tom)</para>
3975
This allows system tables to be reindexed without the
3976
requirement of a standalone session, which was necessary in
3977
previous releases. The only tables that now require a standalone
3978
session for reindexing are the global system tables
3979
<literal>pg_database</>, <literal>pg_shadow</>, and
3980
<literal>pg_group</>.
3987
<title>Data Type and Function Changes</title>
3992
New server parameter <varname>extra_float_digits</varname> to
3993
control precision display of floating-point numbers (Pedro
3997
This controls output precision which was causing regression
4002
<listitem><para>Allow <literal>+1300</literal> as a numeric time-zone specifier, for FJST (Tom)</para></listitem>
4006
Remove rarely used functions <function>oidrand</>,
4007
<function>oidsrand</>, and <function>userfntest</> functions
4013
<para>Add <function>md5()</> function to main server, already in <filename>contrib/pgcrypto</filename> (Joe)</para>
4015
An MD5 function was frequently requested. For more complex
4016
encryption capabilities, use
4017
<filename>contrib/pgcrypto</filename>.
4021
<listitem><para>Increase date range of <type>timestamp</type> (John Cochran)</para></listitem>
4025
Change <literal>EXTRACT(EPOCH FROM timestamp)</literal> so
4026
<type>timestamp without time zone</type> is assumed to be in
4027
local time, not GMT (Tom)
4031
<listitem><para>Trap division by zero in case the operating system doesn't prevent it (Tom)</para></listitem>
4032
<listitem><para>Change the <type>numeric</type> data type internally to base 10000 (Tom)</para></listitem>
4033
<listitem><para>New <function>hostmask()</function> function (Greg Wickham)</para></listitem>
4034
<listitem><para>Fixes for <function>to_char()</function> and <function>to_timestamp()</function> (Karel)</para></listitem>
4038
Allow functions that can take any argument data type and return
4039
any data type, using <type>anyelement</type> and
4040
<type>anyarray</type> (Joe)
4043
This allows the creation of functions that can work with any
4050
Arrays can now be specified as <literal>ARRAY[1,2,3]</literal>,
4051
<literal>ARRAY[['a','b'],['c','d']]</literal>, or
4052
<literal>ARRAY[ARRAY[ARRAY[2]]]</literal> (Joe)
4058
Allow proper comparisons for arrays, including <literal>ORDER
4059
BY</literal> and <literal>DISTINCT</literal> support
4064
<listitem><para>Allow indexes on array columns (Joe)</para></listitem>
4065
<listitem><para>Allow array concatenation with <literal>||</literal> (Joe)</para></listitem>
4069
Allow <literal>WHERE</literal> qualification
4070
<literal><replaceable>expr</> <replaceable>op</> ANY/SOME/ALL
4071
(<replaceable>array_expr</>)</literal> (Joe)
4074
This allows arrays to behave like a list of values, for purposes
4075
like <literal>SELECT * FROM tab WHERE col IN
4076
(array_val)</literal>.
4082
New array functions <function>array_append</>,
4083
<function>array_cat</>, <function>array_lower</>,
4084
<function>array_prepend</>, <function>array_to_string</>,
4085
<function>array_upper</>, <function>string_to_array</> (Joe)
4089
<listitem><para>Allow user defined aggregates to use polymorphic functions (Joe)</para></listitem>
4090
<listitem><para>Allow assignments to empty arrays (Joe)</para></listitem>
4094
Allow 60 in seconds fields of <type>time</type>,
4095
<type>timestamp</type>, and <type>interval</type> input values
4099
Sixty-second values are needed for leap seconds.
4103
<listitem><para>Allow <type>cidr</type> data type to be cast to <type>text</type> (Tom)</para></listitem>
4105
<listitem><para>Disallow invalid time zone names in SET TIMEZONE</para></listitem>
4109
Trim trailing spaces when <type>char</type> is cast to
4110
<type>varchar</> or <type>text</> (Tom)
4116
Make <type>float(<replaceable>p</>)</> measure the precision
4117
<replaceable>p</> in binary digits, not decimal digits
4123
<para>Add IPv6 support to the <type>inet</type> and <type>cidr</type> data types (Michael Graff)</para>
4127
<para>Add <function>family()</function> function to report whether address is IPv4 or IPv6 (Michael Graff)</para>
4132
Have <literal>SHOW datestyle</literal> generate output similar
4133
to that used by <literal>SET datestyle</literal> (Tom)
4139
Make <literal>EXTRACT(TIMEZONE)</literal> and <literal>SET/SHOW
4140
TIME ZONE</literal> follow the SQL convention for the sign of
4141
time zone offsets, i.e., positive is east from UTC (Tom)
4146
<para>Fix <literal>date_trunc('quarter', ...)</literal> (Böjthe Zoltán)</para>
4148
Prior releases returned an incorrect value for this function call.
4153
<para>Make <function>initcap()</function> more compatible with Oracle (Mike Nolan)</para>
4155
<function>initcap()</function> now uppercases a letter appearing
4156
after any non-alphanumeric character, rather than only after
4162
<para>Allow only <varname>datestyle</varname> field order for date values not in ISO-8601 format (Greg)</para>
4167
Add new <varname>datestyle</varname> values <literal>MDY</>,
4168
<literal>DMY</>, and <literal>YMD</> to set input field order;
4169
honor <literal>US</> and <literal>European</> for backward
4176
String literals like <literal>'now'</literal> or
4177
<literal>'today'</literal> will no longer work as a column
4178
default. Use functions such as <function>now()</function>,
4179
<function>current_timestamp</function> instead. (change
4180
required for prepared statements) (Tom)
4185
<para>Treat NaN as larger than any other value in <function>min()</>/<function>max()</> (Tom)</para>
4187
NaN was already sorted after ordinary numeric values for most
4188
purposes, but <function>min()</> and <function>max()</> didn't
4194
<para>Prevent interval from suppressing <literal>:00</literal>
4195
seconds display</para>
4200
New functions <function>pg_get_triggerdef(prettyprint)</function>
4201
and <function>pg_conversion_is_visible()</function> (Christopher)
4206
<para>Allow time to be specified as <literal>040506</> or <literal>0405</> (Tom)</para>
4211
Input date order must now be <literal>YYYY-MM-DD</literal> (with 4-digit year) or
4212
match <varname>datestyle</varname>
4218
Make <function>pg_get_constraintdef</function> support
4219
unique, primary-key, and check constraints (Christopher)
4226
<title>Server-Side Language Changes</title>
4231
Prevent PL/pgSQL crash when <literal>RETURN NEXT</literal> is
4232
used on a zero-row record variable (Tom)
4238
Make PL/Python's <function>spi_execute</function> interface
4239
handle null values properly (Andrew Bosma)
4244
<para>Allow PL/pgSQL to declare variables of composite types without <literal>%ROWTYPE</literal> (Tom)</para>
4248
<para>Fix PL/Python's <function>_quote()</function> function to handle big integers</para>
4252
<para>Make PL/Python an untrusted language, now called <literal>plpythonu</literal> (Kevin Jacobs, Tom)</para>
4254
The Python language no longer supports a restricted execution
4255
environment, so the trusted version of PL/Python was removed. If
4256
this situation changes, a version of PL/Python that can be used
4257
by non-superusers will be readded.
4262
<para>Allow polymorphic PL/pgSQL functions (Joe, Tom)</para>
4266
<para>Allow polymorphic SQL functions (Joe)</para>
4271
Improved compiled function caching mechanism in PL/pgSQL with
4272
full support for polymorphism (Joe)
4278
Add new parameter <literal>$0</> in PL/pgSQL representing the
4279
function's actual return type (Joe)
4285
Allow PL/Tcl and PL/Python to use the same trigger on multiple tables (Tom)
4291
Fixed PL/Tcl's <function>spi_prepare</function> to accept fully
4292
qualified type names in the parameter type list
4300
<title>psql Changes</title>
4304
<para>Add <literal>\pset pager always</literal> to always use pager (Greg)</para>
4306
This forces the pager to be used even if the number of rows is
4307
less than the screen height. This is valuable for rows that
4308
wrap across several screen rows.
4312
<listitem><para>Improve tab completion (Rod, Ross Reedstrom, Ian Barwick)</para></listitem>
4313
<listitem><para>Reorder <literal>\?</> help into groupings (Harald Armin Massa, Bruce)</para></listitem>
4314
<listitem><para>Add backslash commands for listing schemas, casts, and conversions (Christopher)</para></listitem>
4318
<command>\encoding</> now changes based on the server parameter
4319
<varname>client_encoding</varname> (Tom)
4322
In previous versions, <command>\encoding</command> was not aware
4323
of encoding changes made using <literal>SET
4324
client_encoding</literal>.
4329
<para>Save editor buffer into readline history (Ross)</para>
4331
When <command>\e</> is used to edit a query, the result is saved
4332
in the readline history for retrieval using the up arrow.
4336
<listitem><para>Improve <command>\d</command> display (Christopher)</para></listitem>
4337
<listitem><para>Enhance HTML mode to be more standards-conforming (Greg)</para></listitem>
4340
<para>New <command>\set AUTOCOMMIT off</command> capability (Tom)</para>
4342
This takes the place of the removed server parameter <varname>autocommit</varname>.
4347
<para>New <command>\set VERBOSITY</command> to control error detail (Tom)</para>
4349
This controls the new error reporting details.
4353
<listitem><para>New prompt escape sequence <literal>%x</literal> to show transaction status (Tom)</para></listitem>
4354
<listitem><para>Long options for <application>psql</application> are now available on all platforms</para></listitem>
4359
<title>pg_dump Changes</title>
4362
<listitem><para>Multiple pg_dump fixes, including tar format and large objects</para></listitem>
4363
<listitem><para>Allow pg_dump to dump specific schemas (Neil)</para></listitem>
4366
<para>Make pg_dump preserve column storage characteristics (Christopher)</para>
4368
This preserves <literal>ALTER TABLE ... SET STORAGE</literal> information.
4372
<listitem><para>Make pg_dump preserve <command>CLUSTER</command> characteristics (Christopher)</para></listitem>
4376
Have pg_dumpall use <command>GRANT</>/<command>REVOKE</> to dump database-level privileges (Tom)
4382
Allow pg_dumpall to support the options <option>-a</>,
4383
<option>-s</>, <option>-x</> of pg_dump (Tom)
4387
<listitem><para>Prevent pg_dump from lowercasing identifiers specified on the command line (Tom)</para></listitem>
4391
pg_dump options <option>--use-set-session-authorization</option>
4392
and <option>--no-reconnect</option> now do nothing, all dumps
4393
use <command>SET SESSION AUTHORIZATION</command>
4396
pg_dump no longer reconnects to switch users, but instead always
4397
uses <command>SET SESSION AUTHORIZATION</command>. This will
4398
reduce password prompting during restores.
4403
<para>Long options for <application>pg_dump</application> are now available on all platforms</para>
4405
<productname>PostgreSQL</productname> now includes its own
4406
long-option processing routines.
4413
<title>libpq Changes</title>
4418
Add function <function>PQfreemem</function> for freeing memory on
4419
Windows, suggested for <command>NOTIFY</command> (Bruce)
4422
Windows requires that memory allocated in a library be freed by
4423
a function in the same library, hence
4424
<function>free()</function> doesn't work for freeing memory
4425
allocated by libpq. <function>PQfreemem</function> is the proper
4426
way to free libpq memory, especially on Windows, and is
4427
recommended for other platforms as well.
4432
<para>Document service capability, and add sample file (Bruce)</para>
4434
This allows clients to look up connection information in a
4435
central file on the client machine.
4441
Make <function>PQsetdbLogin</function> have the same defaults as
4442
<function>PQconnectdb</function> (Tom)
4446
<listitem><para>Allow libpq to cleanly fail when result sets are too large (Tom)</para></listitem>
4450
Improve performance of function <function>PQunescapeBytea</function> (Ben Lamb)
4456
Allow thread-safe libpq with <filename>configure</filename>
4457
option <option>--enable-thread-safety</option> (Lee Kindness,
4464
Allow function <function>pqInternalNotice</function> to accept a
4465
format string and arguments instead of just a preformatted
4466
message (Tom, Sean Chittenden)
4472
Control SSL negotiation with <literal>sslmode</literal> values
4473
<literal>disable</literal>, <literal>allow</literal>,
4474
<literal>prefer</literal>, and <literal>require</literal> (Jon
4480
<para>Allow new error codes and levels of text (Tom)</para>
4484
<para>Allow access to the underlying table and column of a query result (Tom)</para>
4486
This is helpful for query-builder applications that want to know
4487
the underlying table and column names associated with a specific
4492
<listitem><para>Allow access to the current transaction status (Tom)</para></listitem>
4493
<listitem><para>Add ability to pass binary data directly to the server (Tom)</para></listitem>
4497
Add function <function>PQexecPrepared</function> and
4498
<function>PQsendQueryPrepared</function> functions which perform
4499
bind/execute of previously prepared statements (Tom)
4506
<title>JDBC Changes</title>
4509
<listitem><para>Allow <function>setNull</function> on updateable result sets</para></listitem>
4510
<listitem><para>Allow <function>executeBatch</function> on a prepared statement (Barry)</para></listitem>
4511
<listitem><para>Support SSL connections (Barry)</para></listitem>
4512
<listitem><para>Handle schema names in result sets (Paul Sorenson)</para></listitem>
4513
<listitem><para>Add refcursor support (Nic Ferrier)</para></listitem>
4518
<title>Miscellaneous Interface Changes</title>
4522
<para>Prevent possible memory leak or core dump during libpgtcl shutdown (Tom)</para>
4525
<para>Add Informix compatibility to ECPG (Michael)</para>
4527
This allows ECPG to process embedded C programs that were
4528
written using certain Informix extensions.
4533
<para>Add type <type>decimal</type> to ECPG that is fixed length, for Informix (Michael)</para>
4538
Allow thread-safe embedded SQL programs with
4539
<filename>configure</filename> option
4540
<option>--enable-thread-safety</option> (Lee Kindness, Bruce)
4543
This allows multiple threads to access the database at the same
4549
<para>Moved Python client PyGreSQL to <ulink url="http://www.pygresql.org"></ulink> (Marc)</para>
4555
<title>Source Code Changes</title>
4558
<listitem><para>Prevent need for separate platform geometry regression result files (Tom)</para></listitem>
4559
<listitem><para>Improved PPC locking primitive (Reinhard Max)</para></listitem>
4560
<listitem><para>New function <function>palloc0</function> to allocate and clear memory (Bruce)</para></listitem>
4561
<listitem><para>Fix locking code for s390x CPU (64-bit) (Tom)</para></listitem>
4562
<listitem><para>Allow OpenBSD to use local ident credentials (William Ahern)</para></listitem>
4563
<listitem><para>Make query plan trees read-only to executor (Tom)</para></listitem>
4564
<listitem><para>Add Darwin startup scripts (David Wheeler)</para></listitem>
4565
<listitem><para>Allow libpq to compile with Borland C++ compiler (Lester Godwin, Karl Waclawek)</para></listitem>
4566
<listitem><para>Use our own version of <function>getopt_long()</function> if needed (Peter)</para></listitem>
4567
<listitem><para>Convert administration scripts to C (Peter)</para></listitem>
4568
<listitem><para> Bison >= 1.85 is now required to build the <productname>PostgreSQL</> grammar, if building from CVS</para></listitem>
4569
<listitem><para>Merge documentation into one book (Peter)</para></listitem>
4570
<listitem><para>Add Windows compatibility functions (Bruce)</para></listitem>
4571
<listitem><para>Allow client interfaces to compile under MinGW (Bruce)</para></listitem>
4572
<listitem><para>New <function>ereport()</function> function for error reporting (Tom)</para></listitem>
4573
<listitem><para>Support Intel compiler on Linux (Peter)</para></listitem>
4574
<listitem><para>Improve Linux startup scripts (Slawomir Sudnik, Darko Prenosil)</para></listitem>
4575
<listitem><para>Add support for AMD Opteron and Itanium (Jeffrey W. Baker, Bruce)</para></listitem>
4577
<para>Remove <option>--enable-recode</option> option from <command>configure</command></para>
4579
This was no longer needed now that we have <command>CREATE CONVERSION</command>.
4583
<para>Generate a compile error if spinlock code is not found (Bruce)</para>
4585
Platforms without spinlock code will now fail to compile, rather
4586
than silently using semaphores. This failure can be disabled
4587
with a new <command>configure</command> option.
4594
<title>Contrib Changes</title>
4597
<listitem><para>Change dbmirror license to BSD</para></listitem>
4598
<listitem><para>Improve earthdistance (Bruno Wolff III)</para></listitem>
4599
<listitem><para>Portability improvements to pgcrypto (Marko Kreen)</para></listitem>
4600
<listitem><para>Prevent crash in xml (John Gray, Michael Richards)</para></listitem>
4601
<listitem><para>Update oracle</para></listitem>
4602
<listitem><para>Update mysql</para></listitem>
4603
<listitem><para>Update cube (Bruno Wolff III)</para></listitem>
4604
<listitem><para>Update earthdistance to use cube (Bruno Wolff III)</para></listitem>
4605
<listitem><para>Update btree_gist (Oleg)</para></listitem>
4606
<listitem><para>New tsearch2 full-text search module (Oleg, Teodor)</para></listitem>
4607
<listitem><para>Add hash-based crosstab function to tablefuncs (Joe)</para></listitem>
4608
<listitem><para>Add serial column to order <function>connectby()</> siblings in tablefuncs (Nabil Sayegh,Joe)</para></listitem>
4609
<listitem><para>Add named persistent connections to dblink (Shridhar Daithanka)</para></listitem>
4610
<listitem><para>New pg_autovacuum allows automatic <command>VACUUM</command> (Matthew T. O'Connor)</para></listitem>
4611
<listitem><para>Make pgbench honor environment variables <envar>PGHOST</>, <envar>PGPORT</>, <envar>PGUSER</> (Tatsuo)</para></listitem>
4612
<listitem><para>Improve intarray (Teodor Sigaev)</para></listitem>
4613
<listitem><para>Improve pgstattuple (Rod)</para></listitem>
4614
<listitem><para>Fix bug in <function>metaphone()</function> in fuzzystrmatch</para></listitem>
4615
<listitem><para>Improve adddepend (Rod)</para></listitem>
4616
<listitem><para>Update spi/timetravel (Böjthe Zoltán)</para></listitem>
4617
<listitem><para>Fix dbase <option>-s</> option and improve non-ASCII handling (Thomas Behr, Márcio Smiderle)</para></listitem>
4618
<listitem><para>Remove array module because features now included by default (Joe)</para></listitem>