Commit Graph

20292 Commits

Author SHA1 Message Date
Tom Lane
1d3942e152 Split the release notes into a separate file for each (active) major branch,
as per my recent proposal.  release.sgml itself is now just a stub that should
change rarely; ideally, only once per major release to add a new include line.
Most editing work will occur in the release-N.N.sgml files.  To update a back
branch for a minor release, just copy the appropriate release-N.N.sgml
file(s) into the back branch.

This commit doesn't change the end-product documentation at all, only the
source layout.  However, it makes it easy to start omitting ancient information
from newer branches' documentation, should we ever decide to do that.
2009-05-02 20:18:09 +00:00
Tom Lane
7c26416ffd When checking for datetime field overflow, we should allow a fractional-second
part that rounds up to exactly 1.0 second.  The previous coding rejected input
like "00:12:57.9999999999999999999999999999", with the exact number of nines
needed to cause failure varying depending on float-timestamp option and
possibly on platform.  Obviously this should round up to the next integral
second, if we don't have enough precision to distinguish the value from that.
Per bug #4789 from Robert Kruus.

In passing, fix a missed check for fractional seconds in one copy of the
"is it greater than 24:00:00" code.

Broken all the way back, so patch all the way back.
2009-05-01 19:29:34 +00:00
Tom Lane
6e7b2d846c Fix the handling of sub-SELECTs appearing in the arguments of an outer-level
aggregate function.  By definition, such a sub-SELECT cannot reference any
variables of query levels between itself and the aggregate's semantic level
(else the aggregate would've been assigned to that lower level instead).
So the correct, most efficient implementation is to treat the sub-SELECT as
being a sub-select of that outer query level, not the level the aggregate
syntactically appears in.  Not doing so also confuses the heck out of our
parameter-passing logic, as illustrated in bug report from Daniel Grace.

Fortunately, we were already copying the whole Aggref expression up to the
outer query level, so all that's needed is to delay SS_process_sublinks
processing of the sub-SELECT until control returns to the outer level.

This has been broken since we introduced spec-compliant treatment of
outer aggregates in 7.4; so patch all the way back.
2009-04-25 16:45:25 +00:00
Bruce Momjian
fe3ba84b89 Remove HELIOS Software GmbH name and copyright from AIX dynloader files,
per approval from Helmut Tschemernjak, President.

Only back branches;  files removed from CVS HEAD.
2009-04-25 15:53:34 +00:00
Magnus Hagander
9785f7382e Remove beer-ware license from crypt-md5.c, per
approval from Poul-Henning Kamp.

This makes the file the same standard 2-clause BSD as the
rest of PostgreSQL.
2009-04-15 18:58:28 +00:00
Tom Lane
4a33e604d9 Update time zone data files to tzdata release 2009e: DST law changes in
Argentina/San_Luis, Cuba, Jordan (historical correction only), Morocco,
Palestine, Syria, Tunisia.
2009-04-09 20:51:11 +00:00
Teodor Sigaev
077d10dcb9 Fix 'all at one page bug' in picksplit method of R-tree emulation. Add defense
from buggy user-defined picksplit to GiST.
2009-04-07 17:48:11 +00:00
Tom Lane
c58da65628 Defend against non-ASCII letters in fuzzystrmatch code. The functions
still don't behave very sanely for multibyte encodings, but at least
they won't be indexing off the ends of static arrays.
2009-04-07 15:54:22 +00:00
Tom Lane
27cc7db660 Rewrite interval_hash() so that the hashcodes are equal for values that
interval_eq() considers equal.  I'm not sure how that fundamental requirement
escaped us through multiple revisions of this hash function, but there it is;
it's been wrong since interval_hash was first written for PG 7.1.
Per bug #4748 from Roman Kononov.

Backpatch to all supported releases.

This patch changes the contents of hash indexes for interval columns.  That's
no particular problem for PG 8.4, since we've broken on-disk compatibility
of hash indexes already; but it will require a migration warning note in
the next minor releases of all existing branches: "if you have any hash
indexes on columns of type interval, REINDEX them after updating".
2009-04-04 04:53:58 +00:00
Tom Lane
8d1c2ca390 Fix contrib/pgstattuple and contrib/pageinspect to prevent attempts to read
temporary tables of other sessions; that is unsafe because of the way our
buffer management works.  Per report from Stuart Bishop.
This is redundant with the bufmgr.c checks in HEAD, but not at all redundant
in the back branches.
2009-03-31 22:56:18 +00:00
Magnus Hagander
9350a4ce20 Don't crash initdb when we fail to get the current username.
Give an error message and exit instead, like we do elsewhere...

Per report from Wez Furlong and Robert Treat.
2009-03-31 18:58:20 +00:00
Marc G. Fournier
d60fdd2502 tag 8.0.21 2009-03-13 02:30:37 +00:00
Tom Lane
d92059fe9f Update back-branch release notes. 2009-03-12 22:36:33 +00:00
Tom Lane
c62b17c874 Fix core dump due to null-pointer dereference in to_char() when datetime
format codes are misapplied to a numeric argument.  (The code still produces
a pretty bogus error message in such cases, but I'll settle for stopping the
crash for now.)  Per bug #4700 from Sergey Burladyan.

Problem exists in all supported branches, so patch all the way back.
In HEAD, also clean up some ugly coding in the nearby cache management
code.
2009-03-12 00:53:56 +00:00
Heikki Linnakangas
feee205a3c Add MUST (Mauritius Island Summer Time) to the list of known abbreviations.
Mauritius began using DST in the summer 2008-2009; the Olson library has been
updated already.

Xavier Bugaud
2009-03-05 14:29:12 +00:00
Tom Lane
3694e3ed17 Put back our old workaround for machines that declare cbrt() in math.h but
fail to provide the function itself.  Not sure how we escaped testing anything
later than 7.3 on such cases, but they still exist, as per André Volpato's
report about AIX 5.3.
2009-03-04 22:08:46 +00:00
Tom Lane
d2fda36128 Ooops ... fix some confusion between gettext() and _() in my previous patch.
This has moved around in past releases, so just copying-and-pasting from HEAD
didn't work as intended.
2009-03-03 00:17:36 +00:00
Tom Lane
40df3efa76 When we are in error recursion trouble, arrange to suppress translation and
encoding conversion of any elog/ereport message being sent to the frontend.
This generalizes a patch that I put in last October, which suppressed
translation of only specific messages known to be associated with recursive
can't-translate-the-message behavior.  As shown in bug #4680, we need a more
general answer in order to have some hope of coping with broken encoding
conversion setups.  This approach seems a good deal less klugy anyway.

Patch in all supported branches.
2009-03-02 21:19:14 +00:00
Tom Lane
5f1f0db872 Fix buffer allocations in encoding conversion routines so that they won't
fail on zero-length inputs.  This isn't an issue in normal use because the
conversion infrastructure skips calling the converters for empty strings.
However a problem was created by yesterday's patch to check whether the
right conversion function is supplied in CREATE CONVERSION.  The most
future-proof fix seems to be to make the converters safe for this corner case.
2009-02-28 18:50:14 +00:00
Heikki Linnakangas
64deed0dba In CREATE CONVERSION, test that the given function is a valid conversion
function for the specified source and destination encodings. We do that by
calling the function with an empty string. If it can't perform the requested
conversion, it will throw an error.

Backport to 7.4 - 8.3. Per bug report #4680 by Denis Afonin.
2009-02-27 16:35:47 +00:00
Marc G. Fournier
287e6acae8 commit first then tag 8.0.20 2009-01-30 04:59:15 +00:00
Tom Lane
e4f5645d72 Update back-branch release notes. 2009-01-30 00:38:14 +00:00
Peter Eisentraut
4919f74177 Translation updates 2009-01-29 22:04:05 +00:00
Tom Lane
fba3896cb4 Update time zone data files to tzdata release 2009a: introduces Asia/Kathmandu
as the preferred spelling of that zone name, corrects historical DST
information for Switzerland and Cuba.
2009-01-29 20:00:32 +00:00
Tom Lane
7612c1d813 Replace argument-checking Asserts with regular test-and-elog checks in all
encoding conversion functions.  These are not can't-happen cases because
it's possible to create a conversion with the wrong conversion function
for the specified encoding pair.  That would lead to an Assert crash in
an Assert-enabled build, or incorrect conversion otherwise, neither of
which is desirable.  This would be a DOS issue if production databases
were customarily built with asserts enabled, but fortunately that's not so.
Per an observation by Heikki.

Back-patch to all supported branches.
2009-01-29 19:25:01 +00:00
Magnus Hagander
5ecd9dc75a Go over all OpenSSL return values and make sure we compare them
to the documented API value. The previous code got it right as
it's implemented, but accepted too much/too little compared to
the API documentation.

Per comment from Zdenek Kotala.
2009-01-28 15:06:51 +00:00
Teodor Sigaev
473b40d23e Fix uninitialized variables in get_covers 2009-01-16 12:09:30 +00:00
Teodor Sigaev
b7394a6e6e Fix URL generation in headline. Only tag lexeme will be replaced by space.
Per http://archives.postgresql.org/pgsql-bugs/2008-12/msg00013.php
2009-01-15 18:17:12 +00:00
Teodor Sigaev
696dbd873d Fix generation of too long headline with ShortWords.
Per http://archives.postgresql.org/pgsql-hackers/2008-09/msg01088.php
2009-01-15 18:16:52 +00:00
Tom Lane
0cdeea0e54 Remove references to pgsql-ports and pgsql-patches mailing lists from
various documentation, since those lists are now dead/deprecated.
Point to pgsql-bugs and/or pgsql-hackers as appropriate.
2009-01-06 17:28:01 +00:00
Heikki Linnakangas
fea5ec5263 Fix logic in lazy vacuum to decide if it's worth trying to truncate the heap.
If the table was smaller than REL_TRUNCATE_FRACTION (= 16) pages, we always
tried to acquire AccessExclusiveLock on it even if there was no empty pages
at the end.

Report by Simon Riggs. Back-patch all the way to 7.4.
2009-01-06 14:56:03 +00:00
Marc G. Fournier
d297635721 tag for 8.0.19 2008-10-31 02:54:50 +00:00
Tom Lane
f1ac413466 Update back-branch release notes. 2008-10-30 22:23:25 +00:00
Peter Eisentraut
60278b1cc8 Translation updates 2008-10-30 19:21:26 +00:00
Tom Lane
ed0f09a0af Update time zone data files to tzdata release 2008i (DST law changes in
Argentina, Brazil, Mauritius, Syria).
2008-10-30 13:17:23 +00:00
Peter Eisentraut
28faad52c7 Missing space in error message 2008-10-30 12:16:32 +00:00
Tom Lane
d24efb83ee Install a more robust solution for the problem of infinite error-processing
recursion when we are unable to convert a localized error message to the
client's encoding.  We've been over this ground before, but as reported by
Ibrar Ahmed, it still didn't work in the case of conversion failures for
the conversion-failure message itself :-(.  Fix by installing a "circuit
breaker" that disables attempts to localize this message once we get into
recursion trouble.

Patch all supported branches, because it is in fact broken in all of them;
though I had to add some missing translations to the older branches in
order to expose the failure in the particular test case I was using.
2008-10-27 19:37:48 +00:00
Tom Lane
b1b2140035 Fix an old bug in after-trigger handling: AfterTriggerEndQuery took the
address of afterTriggers->query_stack[afterTriggers->query_depth] and hung
onto it through all its firings of triggers.  However, if a trigger causes
sufficiently many nested query executions, query_stack will get repalloc'd
bigger, leaving AfterTriggerEndQuery --- and hence afterTriggerInvokeEvents
--- using a stale pointer.

So far as I can find, the only consequence of this error is to stomp on a
couple of words of already-freed memory; which would lead to a failure only if
that chunk had already gotten re-allocated for something else.  So it's hard
to exhibit a simple failure case, but this is surely a bug.

I noticed this while working on my recent patch to reduce pending-trigger
space usage.  The present patch is mighty ugly, because it requires making
afterTriggerInvokeEvents know about all the possible event lists it might get
called on.  Fortunately, this is only needed in back branches because CVS HEAD
avoids the problem in a different way: afterTriggerInvokeEvents only touches
the passed AfterTriggerEventList pointer once at startup.  Back branches are
stable enough that wiring in knowledge of all possible call usages doesn't
seem like a killer problem.

Back-patch to 8.0.  7.4's trigger code is completely different and doesn't
seem to have the problem (it doesn't even use repalloc).
2008-10-25 03:33:05 +00:00
Teodor Sigaev
12956db2b3 Fix small bug in headline generation.
Patch from Sushant Sinha <sushant354@gmail.com>
http://archives.postgresql.org/pgsql-hackers/2008-07/msg00785.php
2008-10-17 17:42:32 +00:00
Tom Lane
4a59796840 Fix SPI_getvalue and SPI_getbinval to range-check the given attribute number
according to the TupleDesc's natts, not the number of physical columns in the
tuple.  The previous coding would do the wrong thing in cases where natts is
different from the tuple's column count: either incorrectly report error when
it should just treat the column as null, or actually crash due to indexing off
the end of the TupleDesc's attribute array.  (The second case is probably not
possible in modern PG versions, due to more careful handling of inheritance
cases than we once had.  But it's still a clear lack of robustness here.)

The incorrect error indication is ignored by all callers within the core PG
distribution, so this bug has no symptoms visible within the core code, but
it might well be an issue for add-on packages.  So patch all the way back.
2008-10-16 13:23:49 +00:00
Michael Meskes
f99df7c573 Optional argument should be optional. 2008-10-10 12:19:18 +00:00
Tom Lane
603ce02654 Fix overly tense optimization of PLpgSQL_func_hashkey: we must represent
the isTrigger state explicitly, not rely on nonzero-ness of trigrelOid
to indicate trigger-hood, because trigrelOid will be left zero when compiling
for validation.  The (useless) function hash entry built by the validator
was able to match an ordinary non-trigger call later in the same session,
thereby bypassing the check that is supposed to prevent such a call.
Per report from Alvaro.

It might be worth suppressing the useless hash entry altogether, but
that's a bigger change than I want to consider back-patching.

Back-patch to 8.0.  7.4 doesn't have the problem because it doesn't
have validation mode.
2008-10-09 16:35:33 +00:00
Tom Lane
cb0a4fed98 Fix improper display of fractional seconds in interval values
when using --enable-integer-datetimes and a non-ISO datestyle.

Ron Mayer
2008-10-02 13:48:03 +00:00
Tom Lane
c6b808ea8d Recent patches to pg_ctl broke "pg_ctl restart" for the case where no
command-line options had been given to the postmaster; and just plain
broke it altogether in 8.1 and 8.0.  Per report from KaiGai Kohei.
2008-09-30 13:14:28 +00:00
Marc G. Fournier
b0ea4828e4 tag for 8.0.18 2008-09-19 03:23:34 +00:00
Tom Lane
9ca010304d Update back-branch release notes. 2008-09-19 02:45:56 +00:00
Tom Lane
a763929571 Update time zone data files to tzdata release 2008f (DST law changes in
Argentina, Bahamas, Brazil, Mauritius, Morocco, Pakistan, Palestine, Paraguay).
2008-09-17 14:19:10 +00:00
Tom Lane
2b74fcedc4 Widen the nLocks counts in local lock tables from int to int64. This
forestalls potential overflow when the same table (or other object, but
usually tables) is accessed by very many successive queries within a single
transaction.  Per report from Michael Milligan.

Back-patch to 8.0, which is as far back as the patch conveniently applies.
There have been no reports of overflow in pre-8.3 releases, but clearly the
risk existed all along.  (Michael's report suggests that 8.3 may consume lock
counts faster than prior releases, but with no test case to look at it's hard
to be sure about that.  Widening the counts seems a good future-proofing
measure in any event.)
2008-09-16 01:56:56 +00:00
Tom Lane
c1758175f8 Fix pg_dump docs to acknowledge that you can use -Z with plain text output. Pointed out by Daniel Migowski. 2008-08-26 00:03:43 +00:00
Tom Lane
af3f5293ef Fix pg_dump/pg_restore's ExecuteSqlCommand() to behave suitably if PQexec
returns NULL instead of a PGresult.  The former coding would fail, which
is OK, but it neglected to give you the PQerrorMessage that might tell
you why.  In the oldest branches, there was another problem: it'd sometimes
report PQerrorMessage from the wrong connection.
2008-08-16 02:25:30 +00:00