Release 8.2.13Release date2009-03-16
This release contains a variety of fixes from 8.2.12.
For information about new features in the 8.2 major release, see
.
Migration to Version 8.2.13
A dump/restore is not required for those running 8.2.X.
However, if you are upgrading from a version earlier than 8.2.11,
see the release notes for 8.2.11.
Changes
Prevent error recursion crashes when encoding conversion fails (Tom)
This change extends fixes made in the last two minor releases for
related failure scenarios. The previous fixes were narrowly tailored
for the original problem reports, but we have now recognized that
any> error thrown by an encoding conversion function could
potentially lead to infinite recursion while trying to report the
error. The solution therefore is to disable translation and encoding
conversion and report the plain-ASCII form of any error message,
if we find we have gotten into a recursive error reporting situation.
(CVE-2009-0922)
Disallow CREATE CONVERSION> with the wrong encodings
for the specified conversion function (Heikki)
This prevents one possible scenario for encoding conversion failure.
The previous change is a backstop to guard against other kinds of
failures in the same area.
Fix core dump when to_char()> is given format codes that
are inappropriate for the type of the data argument (Tom)
Fix possible failure in contrib/tsearch2> when C locale is
used with a multi-byte encoding (Teodor)
Crashes were possible on platforms where wchar_t> is narrower
than int>; Windows in particular.
Fix extreme inefficiency in contrib/tsearch2> parser's
handling of an email-like string containing multiple @>
characters (Heikki)
Fix decompilation of CASE WHEN> with an implicit coercion
(Tom)
This mistake could lead to Assert failures in an Assert-enabled build,
or an unexpected CASE WHEN clause> error message in other
cases, when trying to examine or dump a view.
Fix possible misassignment of the owner of a TOAST table's rowtype (Tom)
If CLUSTER> or a rewriting variant of ALTER TABLE>
were executed by someone other than the table owner, the
pg_type> entry for the table's TOAST table would end up
marked as owned by that someone. This caused no immediate problems,
since the permissions on the TOAST rowtype aren't examined by any
ordinary database operation. However, it could lead to unexpected
failures if one later tried to drop the role that issued the command
(in 8.1 or 8.2), or owner of data type appears to be invalid>
warnings from pg_dump> after having done so (in 8.3).
Fix PL/pgSQL to not treat INTO> after INSERT> as
an INTO-variables clause anywhere in the string, not only at the start;
in particular, don't fail for INSERT INTO> within
CREATE RULE> (Tom)
Clean up PL/pgSQL error status variables fully at block exit
(Ashesh Vashi and Dave Page)
This is not a problem for PL/pgSQL itself, but the omission could cause
the PL/pgSQL Debugger to crash while examining the state of a function.
Retry failed calls to CallNamedPipe()> on Windows
(Steve Marshall, Magnus)
It appears that this function can sometimes fail transiently;
we previously treated any failure as a hard error, which could
confuse LISTEN>/NOTIFY> as well as other
operations.
Add MUST> (Mauritius Island Summer Time) to the default list
of known timezone abbreviations (Xavier Bugaud)
Release 8.2.12Release date2009-02-02
This release contains a variety of fixes from 8.2.11.
For information about new features in the 8.2 major release, see
.
Migration to Version 8.2.12
A dump/restore is not required for those running 8.2.X.
However, if you are upgrading from a version earlier than 8.2.11,
see the release notes for 8.2.11.
Changes
Improve handling of URLs in headline()> function (Teodor)
Improve handling of overlength headlines in headline()>
function (Teodor)
Prevent possible Assert failure or misconversion if an encoding
conversion is created with the wrong conversion function for the
specified pair of encodings (Tom, Heikki)
Fix possible Assert failure if a statement executed in PL/pgSQL is
rewritten into another kind of statement, for example if an
INSERT> is rewritten into an UPDATE> (Heikki)
Ensure that a snapshot is available to datatype input functions (Tom)
This primarily affects domains that are declared with CHECK>
constraints involving user-defined stable or immutable functions. Such
functions typically fail if no snapshot has been set.
Make it safer for SPI-using functions to be used within datatype I/O;
in particular, to be used in domain check constraints (Tom)
Avoid unnecessary locking of small tables in VACUUM>
(Heikki)
Fix a problem that made UPDATE RETURNING tableoid>
return zero instead of the correct OID (Tom)
Fix planner misestimation of selectivity when transitive equality
is applied to an outer-join clause (Tom)
This could result in bad plans for queries like
... from a left join b on a.a1 = b.b1 where a.a1 = 42 ...>
Improve optimizer's handling of long IN> lists (Tom)
This change avoids wasting large amounts of time on such lists
when constraint exclusion is enabled.
Ensure that the contents of a holdable cursor don't depend on the
contents of TOAST tables (Tom)
Previously, large field values in a cursor result might be represented
as TOAST pointers, which would fail if the referenced table got dropped
before the cursor is read, or if the large value is deleted and then
vacuumed away. This cannot happen with an ordinary cursor,
but it could with a cursor that is held past its creating transaction.
Fix memory leak when a set-returning function is terminated without
reading its whole result (Tom)
Fix contrib/dblink>'s
dblink_get_result(text,bool)> function (Joe)
Fix possible garbage output from contrib/sslinfo> functions
(Tom)
Fix configure> script to properly report failure when
unable to obtain linkage information for PL/Perl (Andrew)
Make all documentation reference pgsql-bugs> and/or
pgsql-hackers> as appropriate, instead of the
now-decommissioned pgsql-ports> and pgsql-patches>
mailing lists (Tom)
Update time zone data files to tzdata> release 2009a (for
Kathmandu and historical DST corrections in Switzerland, Cuba)
Release 8.2.11Release date2008-11-03
This release contains a variety of fixes from 8.2.10.
For information about new features in the 8.2 major release, see
.
Migration to Version 8.2.11
A dump/restore is not required for those running 8.2.X.
However, if you are upgrading from a version earlier than 8.2.7,
see the release notes for 8.2.7. Also, if you were running a previous
8.2.X release, it is recommended to REINDEX> all GiST
indexes after the upgrade.
Changes
Fix GiST index corruption due to marking the wrong index entry
dead> after a deletion (Teodor)
This would result in index searches failing to find rows they
should have found. Corrupted indexes can be fixed with
REINDEX>.
Fix backend crash when the client encoding cannot represent a localized
error message (Tom)
We have addressed similar issues before, but it would still fail if
the character has no equivalent> message itself couldn't
be converted. The fix is to disable localization and send the plain
ASCII error message when we detect such a situation.
Fix possible crash when deeply nested functions are invoked from
a trigger (Tom)
Improve optimization of expression> IN>
(expression-list>) queries (Tom, per an idea from Robert
Haas)
Cases in which there are query variables on the right-hand side had been
handled less efficiently in 8.2.x and 8.3.x than in prior versions.
The fix restores 8.1 behavior for such cases.
Fix mis-expansion of rule queries when a sub-SELECT> appears
in a function call in FROM>, a multi-row VALUES>
list, or a RETURNING> list (Tom)
The usual symptom of this problem is an unrecognized node type>
error.
Fix memory leak during rescan of a hashed aggregation plan (Neil)
Ensure an error is reported when a newly-defined PL/pgSQL trigger
function is invoked as a normal function (Tom)
Prevent possible collision of relfilenode> numbers
when moving a table to another tablespace with ALTER SET
TABLESPACE> (Heikki)
The command tried to re-use the existing filename, instead of
picking one that is known unused in the destination directory.
Fix incorrect tsearch2 headline generation when single query
item matches first word of text (Sushant Sinha)
Fix improper display of fractional seconds in interval values when
using a non-ISO datestyle in an
Ensure SPI_getvalue> and SPI_getbinval>
behave correctly when the passed tuple and tuple descriptor have
different numbers of columns (Tom)
This situation is normal when a table has had columns added or removed,
but these two functions didn't handle it properly.
The only likely consequence is an incorrect error indication.
Fix ecpg>'s parsing of CREATE ROLE> (Michael)
Fix recent breakage of pg_ctl restart> (Tom)
Ensure pg_control> is opened in binary mode
(Itagaki Takahiro)
pg_controldata> and pg_resetxlog>
did this incorrectly, and so could fail on Windows.
Update time zone data files to tzdata> release 2008i (for
DST law changes in Argentina, Brazil, Mauritius, Syria)
Release 8.2.10Release date2008-09-22
This release contains a variety of fixes from 8.2.9.
For information about new features in the 8.2 major release, see
.
Migration to Version 8.2.10
A dump/restore is not required for those running 8.2.X.
However, if you are upgrading from a version earlier than 8.2.7,
see the release notes for 8.2.7.
Changes
Fix bug in btree WAL recovery code (Heikki)
Recovery failed if the WAL ended partway through a page split operation.
Fix potential miscalculation of datfrozenxid> (Alvaro)
This error may explain some recent reports of failure to remove old
pg_clog> data.
Widen local lock counters from 32 to 64 bits (Tom)
This responds to reports that the counters could overflow in
sufficiently long transactions, leading to unexpected lock is
already held> errors.
Fix possible duplicate output of tuples during a GiST index scan (Teodor)
Fix missed permissions checks when a view contains a simple
UNION ALL> construct (Heikki)
Permissions for the referenced tables were checked properly, but not
permissions for the view itself.
Add checks in executor startup to ensure that the tuples produced by an
INSERT> or UPDATE> will match the target table's
current rowtype (Tom)
ALTER COLUMN TYPE>, followed by re-use of a previously
cached plan, could produce this type of situation. The check protects
against data corruption and/or crashes that could ensue.
Fix possible repeated drops during DROP OWNED> (Tom)
This would typically result in strange errors such as cache
lookup failed for relation NNN>.
Fix AT TIME ZONE> to first try to interpret its timezone
argument as a timezone abbreviation, and only try it as a full timezone
name if that fails, rather than the other way around as formerly (Tom)
The timestamp input functions have always resolved ambiguous zone names
in this order. Making AT TIME ZONE> do so as well improves
consistency, and fixes a compatibility bug introduced in 8.1:
in ambiguous cases we now behave the same as 8.0 and before did,
since in the older versions AT TIME ZONE> accepted
only> abbreviations.
Fix datetime input functions to correctly detect integer overflow when
running on a 64-bit platform (Tom)
Prevent integer overflows during units conversion when displaying a
configuration parameter that has units (Tom)
Improve performance of writing very long log messages to syslog (Tom)
Allow spaces in the suffix part of an LDAP URL in
pg_hba.conf> (Tom)
Fix bug in backwards scanning of a cursor on a SELECT DISTINCT
ON> query (Tom)
Fix planner bug with nested sub-select expressions (Tom)
If the outer sub-select has no direct dependency on the parent query,
but the inner one does, the outer value might not get recalculated
for new parent query rows.
Fix planner to estimate that GROUP BY> expressions yielding
boolean results always result in two groups, regardless of the
expressions' contents (Tom)
This is very substantially more accurate than the regular GROUP
BY> estimate for certain boolean tests like col>
IS NULL>.
Fix PL/PgSQL to not fail when a FOR> loop's target variable
is a record containing composite-type fields (Tom)
Fix PL/Tcl to behave correctly with Tcl 8.5, and to be more careful
about the encoding of data sent to or from Tcl (Tom)
On Windows, work around a Microsoft bug by preventing
libpq> from trying to send more than 64kB per system call
(Magnus)
Improve pg_dump> and pg_restore>'s
error reporting after failure to send a SQL command (Tom)
Fix pg_ctl> to properly preserve postmaster
command-line arguments across a restart> (Bruce)
Update time zone data files to tzdata> release 2008f (for
DST law changes in Argentina, Bahamas, Brazil, Mauritius, Morocco,
Pakistan, Palestine, and Paraguay)
Release 8.2.9Release date2008-06-12
This release contains one serious and one minor bug fix over 8.2.8.
For information about new features in the 8.2 major release, see
.
Migration to Version 8.2.9
A dump/restore is not required for those running 8.2.X.
However, if you are upgrading from a version earlier than 8.2.7,
see the release notes for 8.2.7.
Changes
Make pg_get_ruledef()> parenthesize negative constants (Tom)
Before this fix, a negative constant in a view or rule might be dumped
as, say, -42::integer>, which is subtly incorrect: it should
be (-42)::integer> due to operator precedence rules.
Usually this would make little difference, but it could interact with
another recent patch to cause
PostgreSQL> to reject what had been a valid
SELECT DISTINCT> view query. Since this could result in
pg_dump> output failing to reload, it is being treated
as a high-priority fix. The only released versions in which dump
output is actually incorrect are 8.3.1 and 8.2.7.
Make ALTER AGGREGATE ... OWNER TO> update
pg_shdepend> (Tom)
This oversight could lead to problems if the aggregate was later
involved in a DROP OWNED> or REASSIGN OWNED>
operation.
Release 8.2.8Release datenever released
This release contains a variety of fixes from 8.2.7.
For information about new features in the 8.2 major release, see
.
Migration to Version 8.2.8
A dump/restore is not required for those running 8.2.X.
However, if you are upgrading from a version earlier than 8.2.7,
see the release notes for 8.2.7.
Changes
Fix ERRORDATA_STACK_SIZE exceeded crash that
occurred on Windows when using UTF-8 database encoding and a different
client encoding (Tom)
Fix ALTER TABLE ADD COLUMN ... PRIMARY KEY> so that the new
column is correctly checked to see if it's been initialized to all
non-nulls (Brendan Jurd)
Previous versions neglected to check this requirement at all.
Fix possible CREATE TABLE> failure when inheriting the
same> constraint from multiple parent relations that
inherited that constraint from a common ancestor (Tom)
Fix pg_get_ruledef()> to show the alias, if any, attached
to the target table of an UPDATE> or DELETE>
(Tom)
Fix GIN bug that could result in a too many LWLocks
taken failure (Teodor)
Avoid possible crash when decompressing corrupted data
(Zdenek Kotala)
Repair two places where SIGTERM exit of a backend could leave corrupted
state in shared memory (Tom)
Neither case is very important if SIGTERM is used to shut down the
whole database cluster together, but there was a problem if someone
tried to SIGTERM individual backends.
Fix conversions between ISO-8859-5 and other encodings to handle
Cyrillic Yo> characters (e> and E> with
two dots) (Sergey Burladyan)
Fix several datatype input functions, notably array_in()>,
that were allowing unused bytes in their results to contain
uninitialized, unpredictable values (Tom)
This could lead to failures in which two apparently identical literal
values were not seen as equal, resulting in the parser complaining
about unmatched ORDER BY> and DISTINCT>
expressions.
Fix a corner case in regular-expression substring matching
(substring(string> from
pattern>)) (Tom)
The problem occurs when there is a match to the pattern overall but
the user has specified a parenthesized subexpression and that
subexpression hasn't got a match. An example is
substring('foo' from 'foo(bar)?')>.
This should return NULL, since (bar)> isn't matched, but
it was mistakenly returning the whole-pattern match instead (ie,
foo>).
Update time zone data files to tzdata> release 2008c (for
DST law changes in Morocco, Iraq, Choibalsan, Pakistan, Syria, Cuba, and
Argentina/San_Luis)
Fix incorrect result from ecpg>'s
PGTYPEStimestamp_sub()> function (Michael)
Fix broken GiST comparison function for contrib/tsearch2>'s
tsquery> type (Teodor)
Fix possible crashes in contrib/cube> functions (Tom)
Fix core dump in contrib/xml2>'s
xpath_table()> function when the input query returns a
NULL value (Tom)
Fix contrib/xml2>'s makefile to not override
CFLAGS> (Tom)
Fix DatumGetBool> macro to not fail with gcc>
4.3 (Tom)
This problem affects old style> (V0) C functions that
return boolean. The fix is already in 8.3, but the need to
back-patch it was not realized at the time.
Release 8.2.7Release date2008-03-17
This release contains a variety of fixes from 8.2.6.
For information about new features in the 8.2 major release, see
.
Migration to Version 8.2.7
A dump/restore is not required for those running 8.2.X.
However, you might need to REINDEX> indexes on textual
columns after updating, if you are affected by the Windows locale
issue described below.
Changes
Fix character string comparison for Windows locales that consider
different character combinations as equal (Tom)
This fix applies only on Windows and only when using UTF-8
database encoding. The same fix was made for all other cases
over two years ago, but Windows with UTF-8 uses a separate code
path that was not updated. If you are using a locale that
considers some non-identical strings as equal, you may need to
REINDEX> to fix existing indexes on textual columns.
Repair potential deadlock between concurrent VACUUM FULL>
operations on different system catalogs (Tom)
Fix longstanding LISTEN>/NOTIFY>
race condition (Tom)
In rare cases a session that had just executed a
LISTEN> might not get a notification, even though
one would be expected because the concurrent transaction executing
NOTIFY> was observed to commit later.
A side effect of the fix is that a transaction that has executed
a not-yet-committed LISTEN> command will not see any
row in pg_listener> for the LISTEN>,
should it choose to look; formerly it would have. This behavior
was never documented one way or the other, but it is possible that
some applications depend on the old behavior.
Disallow LISTEN> and UNLISTEN> within a
prepared transaction (Tom)
This was formerly allowed but trying to do it had various unpleasant
consequences, notably that the originating backend could not exit
as long as an UNLISTEN> remained uncommitted.
Disallow dropping a temporary table within a
prepared transaction (Heikki)
This was correctly disallowed by 8.1, but the check was inadvertently
broken in 8.2.
Fix rare crash when an error occurs during a query using a hash index
(Heikki)
Fix memory leaks in certain usages of set-returning functions (Neil)
Fix input of datetime values for February 29 in years BC (Tom)
The former coding was mistaken about which years were leap years.
Fix unrecognized node type> error in some variants of
ALTER OWNER> (Tom)
Ensure pg_stat_activity>.waiting> flag
is cleared when a lock wait is aborted (Tom)
Fix handling of process permissions on Windows Vista (Dave, Magnus)
In particular, this fix allows starting the server as the Administrator
user.
Update time zone data files to tzdata> release 2008a
(in particular, recent Chile changes); adjust timezone abbreviation
VET> (Venezuela) to mean UTC-4:30, not UTC-4:00 (Tom)
Fix pg_ctl> to correctly extract the postmaster's port
number from command-line options (Itagaki Takahiro, Tom)
Previously, pg_ctl start -w> could try to contact the
postmaster on the wrong port, leading to bogus reports of startup
failure.
Use
This is known to be necessary when building PostgreSQL>
with gcc> 4.3 or later.
Correctly enforce statement_timeout> values longer
than INT_MAX> microseconds (about 35 minutes) (Tom)
This bug affects only builds with
Fix unexpected PARAM_SUBLINK ID> planner error when
constant-folding simplifies a sub-select (Tom)
Fix logical errors in constraint-exclusion handling of IS
NULL> and NOT> expressions (Tom)
The planner would sometimes exclude partitions that should not
have been excluded because of the possibility of NULL results.
Fix another cause of failed to build any N-way joins>
planner errors (Tom)
This could happen in cases where a clauseless join needed to be
forced before a join clause could be exploited.
Fix incorrect constant propagation in outer-join planning (Tom)
The planner could sometimes incorrectly conclude that a variable
could be constrained to be equal to a constant, leading
to wrong query results.
Fix display of constant expressions in ORDER BY>
and GROUP BY> (Tom)
An explictly casted constant would be shown incorrectly. This could
for example lead to corruption of a view definition during
dump and reload.
Fix libpq> to handle NOTICE messages correctly
during COPY OUT (Tom)
This failure has only been observed to occur when a user-defined
datatype's output routine issues a NOTICE, but there is no
guarantee it couldn't happen due to other causes.
Release 8.2.6Release date2008-01-07
This release contains a variety of fixes from 8.2.5,
including fixes for significant security issues.
For information about new features in the 8.2 major release, see
.
Migration to Version 8.2.6
A dump/restore is not required for those running 8.2.X.
Changes
Prevent functions in indexes from executing with the privileges of
the user running VACUUM>, ANALYZE>, etc (Tom)
Functions used in index expressions and partial-index
predicates are evaluated whenever a new table entry is made. It has
long been understood that this poses a risk of trojan-horse code
execution if one modifies a table owned by an untrustworthy user.
(Note that triggers, defaults, check constraints, etc. pose the
same type of risk.) But functions in indexes pose extra danger
because they will be executed by routine maintenance operations
such as VACUUM FULL>, which are commonly performed
automatically under a superuser account. For example, a nefarious user
can execute code with superuser privileges by setting up a
trojan-horse index definition and waiting for the next routine vacuum.
The fix arranges for standard maintenance operations
(including VACUUM>, ANALYZE>, REINDEX>,
and CLUSTER>) to execute as the table owner rather than
the calling user, using the same privilege-switching mechanism already
used for SECURITY DEFINER> functions. To prevent bypassing
this security measure, execution of SET SESSION
AUTHORIZATION> and SET ROLE> is now forbidden within a
SECURITY DEFINER> context. (CVE-2007-6600)
Repair assorted bugs in the regular-expression package (Tom, Will Drewry)
Suitably crafted regular-expression patterns could cause crashes,
infinite or near-infinite looping, and/or massive memory consumption,
all of which pose denial-of-service hazards for applications that
accept regex search patterns from untrustworthy sources.
(CVE-2007-4769, CVE-2007-4772, CVE-2007-6067)
Require non-superusers who use /contrib/dblink> to use only
password authentication, as a security measure (Joe)
The fix that appeared for this in 8.2.5 was incomplete, as it plugged
the hole for only some dblink> functions. (CVE-2007-6601,
CVE-2007-3278)
Fix bugs in WAL replay for GIN indexes (Teodor)
Fix GIN index build to work properly when
maintenance_work_mem> is 4GB or more (Tom)
Update time zone data files to tzdata> release 2007k
(in particular, recent Argentina changes) (Tom)
Improve planner's handling of LIKE/regex estimation in non-C locales
(Tom)
Fix planning-speed problem for deep outer-join nests, as well as
possible poor choice of join order (Tom)
Fix planner failure in some cases of WHERE false AND var IN
(SELECT ...)> (Tom)
Make CREATE TABLE ... SERIAL> and
ALTER SEQUENCE ... OWNED BY> not change the
currval()> state of the sequence (Tom)
Preserve the tablespace and storage parameters of indexes that are
rebuilt by ALTER TABLE ... ALTER COLUMN TYPE> (Tom)
Make archive recovery always start a new WAL timeline, rather than only
when a recovery stop time was used (Simon)
This avoids a corner-case risk of trying to overwrite an existing
archived copy of the last WAL segment, and seems simpler and cleaner
than the original definition.
Make VACUUM> not use all of maintenance_work_mem>
when the table is too small for it to be useful (Alvaro)
Fix potential crash in translate()> when using a multibyte
database encoding (Tom)
Make corr()> return the correct result for negative
correlation values (Neil)
Fix overflow in extract(epoch from interval)> for intervals
exceeding 68 years (Tom)
Fix PL/Perl to not fail when a UTF-8 regular expression is used
in a trusted function (Andrew)
Fix PL/Perl to cope when platform's Perl defines type bool>
as int> rather than char> (Tom)
While this could theoretically happen anywhere, no standard build of
Perl did things this way ... until Mac OS X> 10.5.
Fix PL/Python to work correctly with Python 2.5 on 64-bit machines
(Marko Kreen)
Fix PL/Python to not crash on long exception messages (Alvaro)
Fix pg_dump> to correctly handle inheritance child tables
that have default expressions different from their parent's (Tom)
Fix libpq> crash when PGPASSFILE> refers
to a file that is not a plain file (Martin Pitt)
ecpg> parser fixes (Michael)
Make contrib/pgcrypto> defend against
OpenSSL> libraries that fail on keys longer than 128
bits; which is the case at least on some Solaris versions (Marko Kreen)
Make contrib/tablefunc>'s crosstab()> handle
NULL rowid as a category in its own right, rather than crashing (Joe)
Fix tsvector> and tsquery> output routines to
escape backslashes correctly (Teodor, Bruce)
Fix crash of to_tsvector()> on huge input strings (Teodor)
Require a specific version of Autoconf> to be used
when re-generating the configure> script (Peter)
This affects developers and packagers only. The change was made
to prevent accidental use of untested combinations of
Autoconf> and PostgreSQL> versions.
You can remove the version check if you really want to use a
different Autoconf> version, but it's
your responsibility whether the result works or not.
Update gettimeofday> configuration check so that
PostgreSQL> can be built on newer versions of
MinGW> (Magnus)
Release 8.2.5Release date2007-09-17
This release contains a variety of fixes from 8.2.4.
For information about new features in the 8.2 major release, see
.
Migration to Version 8.2.5
A dump/restore is not required for those running 8.2.X.
Changes
Prevent index corruption when a transaction inserts rows and
then aborts close to the end of a concurrent VACUUM>
on the same table (Tom)
Fix ALTER DOMAIN ADD CONSTRAINT> for cases involving
domains over domains (Tom)
Make CREATE DOMAIN ... DEFAULT NULL> work properly (Tom)
Fix some planner problems with outer joins, notably poor
size estimation for t1 LEFT JOIN t2 WHERE t2.col IS NULL>
(Tom)
Allow the interval> data type to accept input consisting only of
milliseconds or microseconds (Neil)
Allow timezone name to appear before the year in timestamp> input (Tom)
Fixes for GIN> indexes used by /contrib/tsearch2> (Teodor)
Speed up rtree index insertion (Teodor)
Fix excessive logging of SSL> error messages (Tom)
Fix logging so that log messages are never interleaved when using
the syslogger process (Andrew)
Fix crash when log_min_error_statement> logging runs out
of memory (Tom)
Fix incorrect handling of some foreign-key corner cases (Tom)
Fix stddev_pop(numeric)> and var_pop(numeric)> (Tom)
Prevent REINDEX> and CLUSTER> from failing
due to attempting to process temporary tables of other sessions (Alvaro)
Update the time zone database rules, particularly New Zealand's upcoming changes (Tom)
Windows socket and semaphore improvements (Magnus)
Make pg_ctl -w> work properly in Windows service mode (Dave Page)
Fix memory allocation bug when using MIT Kerberos> on Windows (Magnus)
Suppress timezone name (%Z>) in log timestamps on Windows
because of possible encoding mismatches (Tom)
Require non-superusers who use /contrib/dblink> to use only
password authentication, as a security measure (Joe)
Restrict /contrib/pgstattuple> functions to superusers, for security reasons (Tom)
Do not let /contrib/intarray> try to make its GIN opclass
the default (this caused problems at dump/restore) (Tom)
Release 8.2.4Release date2007-04-23
This release contains a variety of fixes from 8.2.3,
including a security fix.
For information about new features in the 8.2 major release, see
.
Migration to Version 8.2.4
A dump/restore is not required for those running 8.2.X.
Changes
Support explicit placement of the temporary-table schema within
search_path>, and disable searching it for functions
and operators (Tom)
This is needed to allow a security-definer function to set a
truly secure value of search_path>. Without it,
an unprivileged SQL user can use temporary objects to execute code
with the privileges of the security-definer function (CVE-2007-2138).
See CREATE FUNCTION> for more information.
Fix shared_preload_libraries> for Windows
by forcing reload in each backend (Korry Douglas)
Fix to_char()> so it properly upper/lower cases localized day or month
names (Pavel Stehule)
/contrib/tsearch2> crash fixes (Teodor)
Require COMMIT PREPARED> to be executed in the same
database as the transaction was prepared in (Heikki)
Allow pg_dump> to do binary backups larger than two gigabytes
on Windows (Magnus)
New traditional (Taiwan) Chinese FAQ> (Zhou Daojing)
Prevent the statistics collector from writing to disk too frequently (Tom)
Fix potential-data-corruption bug in how VACUUM FULL> handles
UPDATE> chains (Tom, Pavan Deolasee)
Fix bug in domains that use array types (Tom)
Fix pg_dump> so it can dump a serial column's sequence
using
Planner fixes, including improving outer join and bitmap scan
selection logic (Tom)
Fix possible wrong answers or crash when a PL/pgSQL function tries
to RETURN> from within an EXCEPTION> block
(Tom)
Fix PANIC during enlargement of a hash index (Tom)
Fix POSIX-style timezone specs to follow new USA DST rules (Tom)
Release 8.2.3Release date2007-02-07
This release contains two fixes from 8.2.2.
For information about new features in the 8.2 major release, see
.
Migration to Version 8.2.3
A dump/restore is not required for those running 8.2.X.
Changes
Remove overly-restrictive check for type length in constraints and
functional indexes(Tom)
Fix optimization so MIN/MAX in subqueries can again use indexes (Tom)
Release 8.2.2Release date2007-02-05
This release contains a variety of fixes from 8.2.1, including
a security fix.
For information about new features in the 8.2 major release, see
.
Migration to Version 8.2.2
A dump/restore is not required for those running 8.2.X.
Changes
Remove security vulnerabilities that allowed connected users
to read backend memory (Tom)
The vulnerabilities involve suppressing the normal check that a SQL
function returns the data type it's declared to, and changing the
data type of a table column (CVE-2007-0555, CVE-2007-0556). These
errors can easily be exploited to cause a backend crash, and in
principle might be used to read database content that the user
should not be able to access.
Fix not-so-rare-anymore bug wherein btree index page splits could fail
due to choosing an infeasible split point (Heikki Linnakangas)
Fix Borland C compile scripts (L Bayuk)
Properly handle to_char('CC')> for years ending in
00> (Tom)
Year 2000 is in the twentieth century, not the twenty-first.
/contrib/tsearch2> localization improvements (Tatsuo, Teodor)
Fix incorrect permission check in
information_schema.key_column_usage> view (Tom)
The symptom is relation with OID nnnnn does not exist> errors.
To get this fix without using initdb>, use CREATE OR
REPLACE VIEW> to install the corrected definition found in
share/information_schema.sql>. Note you will need to do
this in each database.
Improve VACUUM> performance for databases with many tables (Tom)
Fix for rare Assert() crash triggered by UNION> (Tom)
Fix potentially incorrect results from index searches using
ROW> inequality conditions (Tom)
Tighten security of multi-byte character processing for UTF8 sequences
over three bytes long (Tom)
Fix bogus permission denied> failures occurring on Windows
due to attempts to fsync already-deleted files (Magnus, Tom)
Fix bug that could cause the statistics collector
to hang on Windows (Magnus)
This would in turn lead to autovacuum not working.
Fix possible crashes when an already-in-use PL/pgSQL function is
updated (Tom)
Improve PL/pgSQL handling of domain types (Sergiy Vyshnevetskiy, Tom)
Fix possible errors in processing PL/pgSQL exception blocks (Tom)
Release 8.2.1Release date2007-01-08
This release contains a variety of fixes from 8.2.
For information about new features in the 8.2 major release, see
.
Migration to Version 8.2.1
A dump/restore is not required for those running 8.2.
Changes
Fix crash with SELECT> ... LIMIT ALL> (also
LIMIT NULL>) (Tom)
Several /contrib/tsearch2> fixes (Teodor)
On Windows, make log messages coming from the operating system use
ASCII> encoding (Hiroshi Saito)
This fixes a conversion problem when there is a mismatch between
the encoding of the operating system and database server.
Fix Windows linking of pg_dump> using
win32.mak>
(Hiroshi Saito)
Fix planner mistakes for outer join queries (Tom)
Fix several problems in queries involving sub-SELECTs (Tom)
Fix potential crash in SPI during subtransaction abort (Tom)
This affects all PL functions since they all use SPI.
Improve build speed of PDF> documentation (Peter)
Re-add JST> (Japan) timezone abbreviation (Tom)
Improve optimization decisions related to index scans (Tom)
Have psql> print multi-byte combining characters as
before, rather than output as \u> (Tom)
Improve index usage of regular expressions that use parentheses (Tom)
This improves psql> \d> performance also.
Make pg_dumpall> assume that databases have public
CONNECT> privilege, when dumping from a pre-8.2 server (Tom)
This preserves the previous behavior that anyone can connect to a
database if allowed by pg_hba.conf>.
Release 8.2Release date2006-12-05Overview
This release adds many functionality and performance improvements that
were requested by users, including:
Query language enhancements including INSERT/UPDATE/DELETE
RETURNING, multirow VALUES lists, and
optional target-table alias in
UPDATE>/DELETE
Index creation without blocking concurrent
INSERT>/UPDATE>/DELETE>
operations
Many query optimization improvements, including support for
reordering outer joins
Improved sorting performance with lower memory usage
More efficient locking with better concurrency
More efficient vacuuming
Easier administration of warm standby servers
New FILLFACTOR support for tables and indexes
Monitoring, logging, and performance tuning additions
More control over creating and dropping objects
Table inheritance relationships can be defined
for and removed from pre-existing tables
COPY TO can copy the output of an arbitrary
SELECT statement
Array improvements, including nulls in arrays
Aggregate-function improvements, including multiple-input
aggregates and SQL:2003 statistical functions
Many contrib/ improvements
Migration to Version 8.2
A dump/restore using pg_dump is
required for those wishing to migrate data from any previous
release.
Observe the following incompatibilities:
Set escape_string_warning>
to on> by default (Bruce)
This issues a warning if backslash escapes are used in
non-escape (non-E''>)
strings.
Change the row
constructor syntax (ROW(...)>) so that
list elements foo.*> will be expanded to a list
of their member fields, rather than creating a nested
row type field as formerly (Tom)
The new behavior is substantially more useful since it
allows, for example, triggers to check for data changes
with IF row(new.*) IS DISTINCT FROM row(old.*)>.
The old behavior is still available by omitting .*>.
Make row comparisons
follow SQL> standard semantics and allow them
to be used in index scans (Tom)
Previously, row = and <> comparisons followed the
standard but < <= > >= did not. A row comparison
can now be used as an index constraint for a multicolumn
index matching the row value.
Make row IS NOT> NULL
tests follow SQL> standard semantics (Tom)
The former behavior conformed to the standard for simple cases
with IS NULL>, but IS NOT NULL> would return
true if any row field was non-null, whereas the standard says it
should return true only when all fields are non-null.
Make SET
CONSTRAINT> affect only one constraint (Kris Jurka)
In previous releases, SET CONSTRAINT> modified
all constraints with a matching name. In this release,
the schema search path is used to modify only the first
matching constraint. A schema specification is also
supported. This more nearly conforms to the SQL standard.
Remove RULE> permission for tables, for security reasons
(Tom)
As of this release, only a table's owner can create or modify
rules for the table. For backwards compatibility,
GRANT>/REVOKE RULE> is still accepted,
but it does nothing.
Array comparison improvements (Tom)
Now array dimensions are also compared.
Change array concatenation
to match documented behavior (Tom)
This changes the previous behavior where concatenation
would modify the array lower bound.
Make command-line options of postmaster>
and postgres>
identical (Peter)
This allows the postmaster to pass arguments to each backend
without using -o>. Note that some options are now
only available as long-form options, because there were conflicting
single-letter options.
Deprecate use of postmaster> symbolic link (Peter)
postmaster> and postgres>
commands now act identically, with the behavior determined
by command-line options. The postmaster> symbolic link is
kept for compatibility, but is not really needed.
Change log_duration>
to output even if the query is not output (Tom)
In prior releases, log_duration> only printed if
the query appeared earlier in the log.
Make to_char(time)>
and to_char(interval)>
treat HH> and HH12> as 12-hour
intervals
Most applications should use HH24> unless they
want a 12-hour display.
Zero unmasked bits in conversion from INET> to CIDR> (Tom)
This ensures that the converted value is actually valid for
CIDR>.
Remove australian_timezones> configuration variable
(Joachim Wieland)
This variable has been superseded by a more general facility
for configuring timezone abbreviations.
Improve cost estimation for nested-loop index scans (Tom)
This might eliminate the need to set unrealistically small
values of random_page_cost>.
If you have been using a very small random_page_cost>,
please recheck your test cases.
Change behavior of pg_dump> -n> and
-t> options. (Greg Sabino Mullane)
See the pg_dump> manual page for details.
Change libpq>
PQdsplen()> to return a useful value (Martijn
van Oosterhout)
Declare libpq>
PQgetssl()> as returning void *>,
rather than SSL *> (Martijn van Oosterhout)
This allows applications to use the function without including
the OpenSSL headers.
C-language loadable modules must now include a
PG_MODULE_MAGIC>
macro call for version compatibility checking
(Martijn van Oosterhout)
For security's sake, modules used by a PL/PerlU function are no
longer available to PL/Perl functions (Andrew)
This also implies that data can no longer be shared between a PL/Perl
function and a PL/PerlU function.
Some Perl installations have not been compiled with the correct flags
to allow multiple interpreters to exist within a single process.
In this situation PL/Perl and PL/PerlU cannot both be used in a
single backend. The solution is to get a Perl installation which
supports multiple interpreters.
In contrib/xml2/>, rename xml_valid()> to
xml_is_well_formed()> (Tom)
xml_valid()> will remain for backward compatibility,
but its behavior will change to do schema checking in a future
release.
Remove contrib/ora2pg/>, now at
Remove contrib modules that have been migrated to PgFoundry:
adddepend>, dbase>, dbmirror>,
fulltextindex>, mac>, userlock>
Remove abandoned contrib modules:
mSQL-interface>, tips>
Remove QNX> and BEOS> ports (Bruce)
These ports no longer had active maintainers.
Changes
Below you will find a detailed account of the
changes between PostgreSQL 8.2 and
the previous major release.
Performance Improvements
Allow the planner to reorder outer
joins in some circumstances (Tom)
In previous releases, outer joins would always be evaluated in
the order written in the query. This change allows the
query optimizer to consider reordering outer joins, in cases where
it can determine that the join order can be changed without
altering the meaning of the query. This can make a
considerable performance difference for queries involving
multiple outer joins or mixed inner and outer joins.
Improve efficiency of IN>
(list-of-expressions) clauses (Tom)
Improve sorting speed and reduce memory usage (Simon, Tom)
Improve subtransaction performance (Alvaro, Itagaki Takahiro,
Tom)
Add FILLFACTOR> to table and index creation (ITAGAKI
Takahiro)
This leaves extra free space in each table or index page,
allowing improved performance as the database grows. This
is particularly valuable to maintain clustering.
Increase default values for shared_buffers>
and max_fsm_pages>
(Andrew)
Improve locking performance by breaking the lock manager tables into
sections
(Tom)
This allows locking to be more fine-grained, reducing
contention.
Reduce locking requirements of sequential scans (Qingqing
Zhou)
Reduce locking required for database creation and destruction
(Tom)
Improve the optimizer's selectivity estimates for LIKE>, ILIKE>, and
regular expression
operations (Tom)
Improve planning of joins to inherited
tables and UNION
ALL> views (Tom)
Allow constraint
exclusion to be applied to inherited UPDATE> and
DELETE> queries (Tom)
SELECT> already honored constraint exclusion.
Improve planning of constant WHERE> clauses, such as
a condition that depends only on variables inherited from an
outer query level (Tom)
Protocol-level unnamed prepared statements are re-planned
for each set of BIND> values (Tom)
This improves performance because the exact parameter values
can be used in the plan.
Speed up vacuuming of B-Tree indexes (Heikki Linnakangas,
Tom)
Avoid extra scan of tables without indexes during VACUUM> (Greg Stark)
Improve multicolumn GiST>
indexing (Oleg, Teodor)
Remove dead index entries before B-Tree page split (Junji
Teramoto)
Server Changes
Allow a forced switch to a new transaction log file (Simon, Tom)
This is valuable for keeping warm standby slave servers
in sync with the master. Transaction log file switching now also happens
automatically during pg_stop_backup()>.
This ensures that all
transaction log files needed for recovery can be archived immediately.
Add WAL> informational functions (Simon)
Add functions for interrogating the current transaction log insertion
point and determining WAL> filenames from the
hex WAL> locations displayed by pg_stop_backup()>
and related functions.
Improve recovery from a crash during WAL> replay (Simon)
The server now does periodic checkpoints during WAL>
recovery, so if there is a crash, future WAL>
recovery is shortened. This also eliminates the need for
warm standby servers to replay the entire log since the
base backup if they crash.
Improve reliability of long-term WAL> replay
(Heikki, Simon, Tom)
Formerly, trying to roll forward through more than 2 billion
transactions would not work due to XID wraparound. This meant
warm standby servers had to be reloaded
from fresh base backups periodically.
Add archive_timeout>
to force transaction log file switches at a given interval (Simon)
This enforces a maximum replication delay for warm standby servers.
Add native LDAP>
authentication (Magnus Hagander)
This is particularly useful for platforms that do not
support PAM>, such as Windows.
Add GRANT
CONNECT ON DATABASE> (Gevik Babakhani)
This gives SQL-level control over database access. It works as
an additional filter on top of the existing
pg_hba.conf>
controls.
Add support for SSL>
Certificate Revocation List (CRL>) files
(Libor Hohoš)
The server and libpq> both recognize CRL>
files now.
GiST> indexes are
now clusterable (Teodor)
Remove routine autovacuum server log entries (Bruce)
pg_stat_activity>
now shows autovacuum activity.
Track maximum XID age within individual tables, instead of whole databases (Alvaro)
This reduces the overhead involved in preventing transaction
ID wraparound, by avoiding unnecessary VACUUMs.
Add last vacuum and analyze timestamp columns to the stats
collector (Larry Rosenman)
These values now appear in the pg_stat_*_tables>
system views.
Improve performance of statistics monitoring, especially
stats_command_string>
(Tom, Bruce)
This release enables stats_command_string> by
default, now that its overhead is minimal. This means
pg_stat_activity>
will now show all active queries by default.
Add a waiting> column to pg_stat_activity>
(Tom)
This allows pg_stat_activity> to show all the
information included in the ps> display.
Add configuration parameter update_process_title>
to control whether the ps> display is updated
for every command (Bruce)
On platforms where it is expensive to update the ps>
display, it might be worthwhile to turn this off and rely solely on
pg_stat_activity> for status information.
Allow units to be specified in configuration settings
(Peter)
For example, you can now set shared_buffers>
to 32MB> rather than mentally converting sizes.
Add support for include
directives in postgresql.conf> (Joachim
Wieland)
Improve logging of protocol-level prepare/bind/execute
messages (Bruce, Tom)
Such logging now shows statement names, bind parameter
values, and the text of the query being executed. Also,
the query text is properly included in logged error messages
when enabled by log_min_error_statement>.
Prevent max_stack_depth>
from being set to unsafe values
On platforms where we can determine the actual kernel stack depth
limit (which is most), make sure that the initial default value of
max_stack_depth> is safe, and reject attempts to set it
to unsafely large values.
Enable highlighting of error location in query in more
cases (Tom)
The server is now able to report a specific error location for
some semantic errors (such as unrecognized column name), rather
than just for basic syntax errors as before.
Fix failed to re-find parent key> errors in
VACUUM> (Tom)
Clean out pg_internal.init> cache files during server
restart (Simon)
This avoids a hazard that the cache files might contain stale
data after PITR recovery.
Fix race condition for truncation of a large relation across a
gigabyte boundary by VACUUM> (Tom)
Fix bug causing needless deadlock errors on row-level locks (Tom)
Fix bugs affecting multi-gigabyte hash indexes (Tom)
Each backend process is now its own process group leader (Tom)
This allows query cancel to abort subprocesses invoked from a
backend or archive/recovery process.
Query Changes
Add INSERT>/UPDATE>/DELETE>
RETURNING> (Jonah Harris, Tom)
This allows these commands to return values, such as the
computed serial key for a new row. In the UPDATE>
case, values from the updated version of the row are returned.
Add support for multiple-row VALUES> clauses,
per SQL standard (Joe, Tom)
This allows INSERT> to insert multiple rows of
constants, or queries to generate result sets using constants.
For example, INSERT ... VALUES (...), (...),
....>, and SELECT * FROM (VALUES (...), (...),
....) AS alias(f1, ...)>.
Allow UPDATE>
and DELETE>
to use an alias for the target table (Atsushi Ogawa)
The SQL standard does not permit an alias in these commands, but
many database systems allow one anyway for notational convenience.
Allow UPDATE>
to set multiple columns with a list of values (Susanne
Ebrecht)
This is basically a short-hand for assigning the columns
and values in pairs. The syntax is UPDATE tab
SET (column>, ...) = (val>, ...)>.
Make row comparisons work per standard (Tom)
The forms <, <=, >, >= now compare rows lexicographically,
that is, compare the first elements, if equal compare the second
elements, and so on. Formerly they expanded to an AND condition
across all the elements, which was neither standard nor very useful.
Add CASCADE>
option to TRUNCATE> (Joachim Wieland)
This causes TRUNCATE> to automatically include all tables
that reference the specified table(s) via foreign keys. While
convenient, this is a dangerous tool — use with caution!
Support FOR UPDATE> and FOR SHARE>
in the same SELECT>
command (Tom)
Add IS NOT
DISTINCT FROM> (Pavel Stehule)
This operator is similar to equality (=>), but
evaluates to true when both left and right operands are
NULL>, and to false when just one is, rather than
yielding NULL> in these cases.
Improve the length output used by UNION>/INTERSECT>/EXCEPT>
(Tom)
When all corresponding columns are of the same defined length, that
length is used for the result, rather than a generic length.
Allow ILIKE>
to work for multi-byte encodings (Tom)
Internally, ILIKE> now calls lower()>
and then uses LIKE>. Locale-specific regular
expression patterns still do not work in these encodings.
Enable standard_conforming_strings>
to be turned on> (Kevin Grittner)
This allows backslash escaping in strings to be disabled,
making PostgreSQL> more
standards-compliant. The default is off> for backwards
compatibility, but future releases will default this to on>.
Do not flatten subqueries that contain volatile>
functions in their target lists (Jaime Casanova)
This prevents surprising behavior due to multiple evaluation
of a volatile> function (such as random()>
or nextval()>). It might cause performance
degradation in the presence of functions that are unnecessarily
marked as volatile>.
Add system views pg_prepared_statements>
and pg_cursors>
to show prepared statements and open cursors (Joachim Wieland, Neil)
These are very useful in pooled connection setups.
Support portal parameters in EXPLAIN> and EXECUTE> (Tom)
This allows, for example, JDBC> ?> parameters to
work in these commands.
If SQL>-level PREPARE> parameters
are unspecified, infer their types from the content of the
query (Neil)
Protocol-level PREPARE> already did this.
Allow LIMIT> and OFFSET> to exceed
two billion (Dhanaraj M)
Object Manipulation Changes
Add TABLESPACE> clause to CREATE TABLE AS>
(Neil)
This allows a tablespace to be specified for the new table.
Add ON COMMIT> clause to CREATE TABLE AS>
(Neil)
This allows temporary tables to be truncated or dropped on
transaction commit. The default behavior is for the table
to remain until the session ends.
Add INCLUDING CONSTRAINTS> to CREATE TABLE LIKE>
(Greg Stark)
This allows easy copying of CHECK> constraints to a new
table.
Allow the creation of placeholder (shell) types (Martijn van Oosterhout)
A shell type declaration creates a type name, without specifying
any of the details of the type. Making a shell type is useful
because it allows cleaner declaration of the type's input/output
functions, which must exist before the type can be defined for
real>. The syntax is CREATE TYPE typename>.
Aggregate functions
now support multiple input parameters (Sergey Koposov, Tom)
Add new aggregate creation syntax (Tom)
The new syntax is CREATE AGGREGATE
aggname> (input_type>)
(parameter_list>). This more
naturally supports the new multi-parameter aggregate
functionality. The previous syntax is still supported.
Add ALTER ROLE PASSWORD NULL>
to remove a previously set role password (Peter)
Add DROP> object IF EXISTS> for many
object types (Andrew)
This allows DROP> operations on non-existent
objects without generating an error.
Add DROP OWNED>
to drop all objects owned by a role (Alvaro)
Add REASSIGN
OWNED> to reassign ownership of all objects owned
by a role (Alvaro)
This, and DROP OWNED> above, facilitate dropping
roles.
Add GRANT ON SEQUENCE>
syntax (Bruce)
This was added for setting sequence-specific permissions.
GRANT ON TABLE> for sequences is still supported
for backward compatibility.
Add USAGE>
permission for sequences that allows only currval()>
and nextval()>, not setval()>
(Bruce)
USAGE> permission allows more fine-grained
control over sequence access. Granting USAGE>
allows users to increment
a sequence, but prevents them from setting the sequence to
an arbitrary value using setval()>.
Add ALTER TABLE
[ NO ] INHERIT> (Greg Stark)
This allows inheritance to be adjusted dynamically, rather than
just at table creation and destruction. This is very valuable
when using inheritance to implement table partitioning.
Allow comments on global
objects to be stored globally (Kris Jurka)
Previously, comments attached to databases were stored in individual
databases, making them ineffective, and there was no provision
at all for comments on roles or tablespaces. This change adds a new
shared catalog pg_shdescription
and stores comments on databases, roles, and tablespaces therein.
Utility Command Changes
Add option to allow indexes to be created without blocking
concurrent writes to the table (Greg Stark, Tom)
The new syntax is CREATE
INDEX CONCURRENTLY>. The default behavior is
still to block table modification while a index is being
created.
Provide advisory
locking functionality (Abhijit Menon-Sen, Tom)
This is a new locking API designed to replace what used to be
in /contrib/userlock. The userlock code is now on pgfoundry.
Allow COPY> to
dump a SELECT> query (Zoltan Boszormenyi, Karel
Zak)
This allows COPY> to dump arbitrary SQL>
queries. The syntax is COPY (SELECT ...) TO>.
Make the COPY>
command return a command tag that includes the number of
rows copied (Volkan YAZICI)
Allow VACUUM>
to expire rows without being affected by other concurrent
VACUUM> operations (Hannu Krossing, Alvaro, Tom)
Make initdb>
detect the operating system locale and set the default
DateStyle> accordingly (Peter)
This makes it more likely that the installed
postgresql.conf> DateStyle> value will
be as desired.
Reduce number of progress messages displayed by initdb> (Tom)
Date/Time Changes
Allow full timezone names in timestamp> input values
(Joachim Wieland)
For example, '2006-05-24 21:11
America/New_York'::timestamptz>.
Support configurable timezone abbreviations (Joachim Wieland)
A desired set of timezone abbreviations can be chosen via the
configuration parameter timezone_abbreviations>.
Add pg_timezone_abbrevs>
and pg_timezone_names>
views to show supported timezones (Magnus Hagander)
Add clock_timestamp()>,
statement_timestamp()>,
and transaction_timestamp()>
(Bruce)
clock_timestamp()> is the current wall-clock time,
statement_timestamp()> is the time the current
statement arrived at the server, and
transaction_timestamp()> is an alias for
now()>.
Allow to_char()>
to print localized month and day names (Euler Taveira de
Oliveira)
Allow to_char(time)>
and to_char(interval)>
to output AM>/PM> specifications
(Bruce)
Intervals and times are treated as 24-hour periods, e.g.
25 hours> is considered AM>.
Add new function justify_interval()>
to adjust interval units (Mark Dilger)
Allow timezone offsets up to 14:59 away from GMT
Kiribati uses GMT+14, so we'd better accept that.
Interval computation improvements (Michael Glaesemann, Bruce)
Other Data Type and Function Changes
Allow arrays to contain NULL> elements (Tom)
Allow assignment to array elements not contiguous with the existing
entries (Tom)
The intervening array positions will be filled with nulls.
This is per SQL standard.
New built-in operators
for array-subset comparisons (@>>,
<@>, &&>) (Teodor, Tom)
These operators can be indexed for many data types using
GiST> or GIN> indexes.
Add convenient arithmetic operations on
INET>/CIDR> values (Stephen R. van den
Berg)
The new operators are &> (and), |>
(or), ~> (not), inet> +> int8>,
inet> -> int8>, and
inet> -> inet>.
Add new aggregate functions
from SQL:2003 (Neil)
The new functions are var_pop()>,
var_samp()>, stddev_pop()>, and
stddev_samp()>. var_samp()> and
stddev_samp()> are merely renamings of the
existing aggregates variance()> and
stddev()>. The latter names remain available
for backward compatibility.
Add SQL:2003 statistical aggregates
(Sergey Koposov)
New functions: regr_intercept()>,
regr_slope()>, regr_r2()>,
corr()>, covar_samp()>,
covar_pop()>, regr_avgx()>,
regr_avgy()>, regr_sxy()>,
regr_sxx()>, regr_syy()>,
regr_count()>.
Allow domains to be
based on other domains (Tom)
Properly enforce domain CHECK> constraints
everywhere (Neil, Tom)
For example, the result of a user-defined function that is
declared to return a domain type is now checked against the
domain's constraints. This closes a significant hole in the domain
implementation.
Fix problems with dumping renamed SERIAL> columns
(Tom)
The fix is to dump a SERIAL> column by explicitly
specifying its DEFAULT> and sequence elements,
and reconstructing the SERIAL> column on reload
using a new ALTER
SEQUENCE OWNED BY> command. This also allows
dropping a SERIAL> column specification.
Add a server-side sleep function pg_sleep()>
(Joachim Wieland)
Add all comparison operators for the tid> (tuple id) data
type (Mark Kirkwood, Greg Stark, Tom)
PL/PgSQL Server-Side Language Changes
Add TG_table_name> and TG_table_schema> to
trigger parameters (Andrew)
TG_relname> is now deprecated. Comparable
changes have been made in the trigger parameters for the other
PLs as well.
Allow FOR> statements to return values to scalars
as well as records and row types (Pavel Stehule)
Add a BY> clause to the FOR> loop,
to control the iteration increment (Jaime Casanova)
Add STRICT> to SELECT
INTO> (Matt Miller)
STRICT> mode throws an exception if more or less
than one row is returned by the SELECT>, for
Oracle PL/SQL> compatibility.
PL/Perl Server-Side Language Changes
Add table_name> and table_schema> to
trigger parameters (Adam Sjøgren)
Add prepared queries (Dmitry Karasik)
Make $_TD> trigger data a global variable (Andrew)
Previously, it was lexical, which caused unexpected sharing
violations.
Run PL/Perl and PL/PerlU in separate interpreters, for security
reasons (Andrew)
In consequence, they can no longer share data nor loaded modules.
Also, if Perl has not been compiled with the requisite flags to
allow multiple interpreters, only one of these languages can be used
in any given backend process.
PL/Python Server-Side Language Changes
Named parameters are passed as ordinary variables, as well as in the
args[]> array (Sven Suursoho)
Add table_name> and table_schema> to
trigger parameters (Andrew)
Allow returning of composite types and result sets (Sven Suursoho)
Return result-set as list>, iterator>,
or generator >(Sven Suursoho)
Allow functions to return void> (Neil)
Python 2.5 is now supported (Tom)
psql> Changes
Add new command \password> for changing role
password with client-side password encryption (Peter)
Allow \c> to connect to a new host and port
number (David, Volkan YAZICI)
Add tablespace display to \l+> (Philip Yarra)
Improve \df> slash command to include the argument
names and modes (OUT> or INOUT>) of
the function (David Fetter)
Support binary COPY> (Andreas Pflug)
Add option to run the entire session in a single transaction
(Simon)
Use option -1> or --single-transaction>.
Support for automatically retrieving SELECT>
results in batches using a cursor (Chris Mair)
This is enabled using \set FETCH_COUNT
n>. This
feature allows large result sets to be retrieved in
psql> without attempting to buffer the entire
result set in memory.
Make multi-line values align in the proper column
(Martijn van Oosterhout)
Field values containing newlines are now displayed in a more
readable fashion.
Save multi-line statements as a single entry, rather than
one line at a time (Sergey E. Koposov)
This makes up-arrow recall of queries easier. (This is
not available on Windows, because that platform uses the native
command-line editing present in the operating system.)
Make the line counter 64-bit so it can handle files with more
than two billion lines (David Fetter)
Report both the returned data and the command status tag
for INSERT>/UPDATE>/DELETE
RETURNING> (Tom)
pg_dump> Changes
Allow complex selection of objects to be included or excluded
by pg_dump> (Greg Sabino Mullane)
pg_dump> now supports multiple -n>
(schema) and -t> (table) options, and adds
-N> and -T> options to exclude objects.
Also, the arguments of these switches can now be wild-card expressions
rather than single object names, for example
-t 'foo*'>, and a schema can be part of
a -t> or -T> switch, for example
-t schema1.table1>.
Add pg_restore>
--no-data-for-failed-tables> option to suppress
loading data if table creation failed (i.e., the table already
exists) (Martin Pitt)
Add pg_restore>
option to run the entire session in a single transaction
(Simon)
Use option -1> or --single-transaction>.
libpq> Changes
Add PQencryptPassword()>
to encrypt passwords (Tom)
This allows passwords to be sent pre-encrypted for commands
like ALTER ROLE ...
PASSWORD>.
Add function PQisthreadsafe()>
(Bruce)
This allows applications to query the thread-safety status
of the library.
Add PQdescribePrepared()>,
PQdescribePortal()>,
and related functions to return information about previously
prepared statements and open cursors (Volkan YAZICI)
Allow LDAP> lookups
from pg_service.conf>
(Laurenz Albe)
Allow a hostname in ~/.pgpass>
to match the default socket directory (Bruce)
A blank hostname continues to match any Unix-socket connection,
but this addition allows entries that are specific to one of
several postmasters on the machine.
ecpg> Changes
Allow SHOW> to
put its result into a variable (Joachim Wieland)
Add COPY TO STDOUT>
(Joachim Wieland)
Add regression tests (Joachim Wieland, Michael)
Major source code cleanups (Joachim Wieland, Michael)
Windows> Port
Allow MSVC> to compile the PostgreSQL>
server (Magnus, Hiroshi Saito)
Add MSVC> support for utility commands and pg_dump> (Hiroshi
Saito)
Add support for Windows code pages 1253>,
1254>, 1255>, and 1257>
(Kris Jurka)
Drop privileges on startup, so that the server can be started from
an administrative account (Magnus)
Stability fixes (Qingqing Zhou, Magnus)
Add native semaphore implementation (Qingqing Zhou)
The previous code mimicked SysV semaphores.
Source Code Changes
Add GIN> (Generalized
Inverted iNdex) index access method (Teodor, Oleg)
Remove R-tree indexing (Tom)
Rtree has been re-implemented using GiST>. Among other
differences, this means that rtree indexes now have support
for crash recovery via write-ahead logging (WAL).
Reduce libraries needlessly linked into the backend (Martijn
van Oosterhout, Tom)
Add a configure flag to allow libedit to be preferred over
GNU> readline (Bruce)
Use configure --with-libedit-preferred>.
Allow installation into directories containing spaces
(Peter)
Improve ability to relocate installation directories (Tom)
Add support for Solaris x86_64> using the
Solaris> compiler (Pierre Girard, Theo
Schlossnagle, Bruce)
Add DTrace> support (Robert Lor)
Add PG_VERSION_NUM> for use by third-party
applications wanting to test the backend version in C using >
and < comparisons (Bruce)
Add XLOG_BLCKSZ> as independent from BLCKSZ>
(Mark Wong)
Add LWLOCK_STATS> define to report locking
activity (Tom)
Emit warnings for unknown configure> options
(Martijn van Oosterhout)
Add server support for plugin> libraries
that can be used for add-on tasks such as debugging and performance
measurement (Korry Douglas)
This consists of two features: a table of rendezvous
variables> that allows separately-loaded shared libraries to
communicate, and a new configuration parameter local_preload_libraries>
that allows libraries to be loaded into specific sessions without
explicit cooperation from the client application. This allows
external add-ons to implement features such as a PL/PgSQL debugger.
Rename existing configuration parameter
preload_libraries> to shared_preload_libraries>
(Tom)
This was done for clarity in comparison to
local_preload_libraries>.
Add new configuration parameter server_version_num>
(Greg Sabino Mullane)
This is like server_version, but is an
integer, e.g. 80200>. This allows applications to
make version checks more easily.
Add a configuration parameter seq_page_cost>
(Tom)
Re-implement the regression test script as a C program
(Magnus, Tom)
Allow loadable modules to allocate shared memory and
lightweight locks (Marc Munro)
Add automatic initialization and finalization of dynamically
loaded libraries (Ralf Engelschall, Tom)
New functions
_PG_init()> and _PG_fini()> are
called if the library defines such symbols. Hence we no
longer need to specify an initialization function in
shared_preload_libraries>; we can assume that
the library used the _PG_init()> convention
instead.
Add PG_MODULE_MAGIC>
header block to all shared object files (Martijn van
Oosterhout)
The magic block prevents version mismatches between loadable object
files and servers.
Add shared library support for AIX (Laurenz Albe)
New XML>
documentation section (Bruce)
Contrib Changes
Major tsearch2 improvements (Oleg, Teodor)
multibyte encoding support, including UTF8>
query rewriting support
improved ranking functions
thesaurus dictionary support
Ispell dictionaries now recognize MySpell>
format, used by OpenOffice>
GIN> support
Add adminpack module containing Pgadmin> administration
functions (Dave)
These functions provide additional file system access
routines not present in the default PostgreSQL>
server.
Add sslinfo module (Victor Wagner)
Reports information about the current connection's SSL>
certificate.
Add pgrowlocks module (Tatsuo)
This shows row locking information for a specified table.
Add hstore module (Oleg, Teodor)
Add isn module, replacing isbn_issn (Jeremy Kronuz)
This new implementation supports EAN13>, UPC>,
ISBN> (books), ISMN> (music), and
ISSN> (serials).
Add index information functions to pgstattuple (ITAGAKI Takahiro,
Satoshi Nagayasu)
Add pg_freespacemap module to display free space map information
(Mark Kirkwood)
pgcrypto now has all planned functionality (Marko Kreen)
Include iMath library in pgcrypto to have the public-key encryption
functions always available.
Add SHA224 algorithm that was missing in OpenBSD code.
Activate builtin code for SHA224/256/384/512 hashes on older
OpenSSL to have those algorithms always available.
New function gen_random_bytes() that returns cryptographically strong
randomness. Useful for generating encryption keys.
Remove digest_exists(), hmac_exists() and cipher_exists() functions.
Improvements to cube module (Joshua Reich)
New functions are cube(float[])>,
cube(float[], float[])>, and
cube_subset(cube, int4[])>.
Add async query capability to dblink (Kai Londenberg,
Joe Conway)
New operators for array-subset comparisons (@>>,
<@>, &&>) (Tom)
Various contrib packages already had these operators for their
datatypes, but the naming wasn't consistent. We have now added
consistently named array-subset comparison operators to the core code
and all the contrib packages that have such functionality.
(The old names remain available, but are deprecated.)
Add uninstall scripts for all contrib packages that have install
scripts (David, Josh Drake)