1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-17 06:41:24 +03:00

17235 Commits

Author SHA1 Message Date
Tom Lane
f16cd6ec38 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:21 +00:00
Tom Lane
2a0f7d1b31 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:42 +00:00
Tom Lane
9af91a527b 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:34 +00:00
Bruce Momjian
41a74fa05d 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:26 +00:00
Magnus Hagander
65face6a12 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:26 +00:00
Teodor Sigaev
ca1316dfa3 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:49:40 +00:00
Tom Lane
1b40567c55 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:30 +00:00
Tom Lane
7ca0bae2b0 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:54:07 +00:00
Tom Lane
ed00200dac 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:28 +00:00
Marc G. Fournier
e3c0d679dc tag 7.4.25 REL7_4_25 2009-03-13 02:39:42 +00:00
Tom Lane
dbb6d2f959 Update back-branch release notes. 2009-03-12 22:36:46 +00:00
Tom Lane
aff86a81b5 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:54:04 +00:00
Heikki Linnakangas
cb5a81b546 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:26 +00:00
Tom Lane
4c13245896 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:53 +00:00
Tom Lane
80be60530f 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:44 +00:00
Tom Lane
1f3832b5d2 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:23 +00:00
Tom Lane
5156266ab6 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:25 +00:00
Heikki Linnakangas
17485e504d 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:53 +00:00
Marc G. Fournier
cedefbdf13 tag 7.4.24 REL7_4_24 2009-01-30 03:54:33 +00:00
Tom Lane
fc39a00022 Update back-branch release notes. 2009-01-30 00:38:26 +00:00
Peter Eisentraut
ef8074d892 Translation updates 2009-01-29 22:02:17 +00:00
Tom Lane
20112509bc 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:15 +00:00
Magnus Hagander
d8b324ebd8 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:48 +00:00
Teodor Sigaev
d01bcba483 Fix uninitialized variables in get_covers 2009-01-16 12:10:34 +00:00
Teodor Sigaev
e0408ba3d5 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:30:10 +00:00
Teodor Sigaev
f58cccb0b5 Fix generation of too long headline with ShortWords.
Per http://archives.postgresql.org/pgsql-hackers/2008-09/msg01088.php
2009-01-15 18:29:47 +00:00
Alvaro Herrera
b379d53c30 Backpatch to 7.4 the part of 1.84 (from the 8.0 timeline) that wasn't already
patched, viz. str_numth().  The rest of that patch was already applied as part
of 1.69.2.1.  Per report and patch from Andreas 'ads' Scherbaum.

The involved revisions were:

revision 1.84
date: 2005-01-12 22:40:13 -0300;  author: tgl;  state: Exp;  lines: +9 -7;
branches:  1.84.4;
Remove unportable assumption that it's okay to use the target buffer
of an sprintf() as a source string.  Demonstrably does not work with
recent gcc and/or glibc on some platforms.

and

revision 1.69.2.1
date: 2005-03-25 20:42:21 -0400;  author: tgl;  state: Exp;  lines: +24 -8;
Prevent to_char(interval) from dumping core on month-related formats
when a zero-month interval is given.  Per discussion with Karel.
2009-01-13 15:28:42 +00:00
Tom Lane
e3a4d5cf8c 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:15 +00:00
Heikki Linnakangas
4d79a50494 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:13 +00:00
Marc G. Fournier
31f6cfb690 tag 7.4.23 REL7_4_23 2008-10-31 03:15:21 +00:00
Tom Lane
ef15b87f45 Update back-branch release notes. 2008-10-30 22:23:39 +00:00
Peter Eisentraut
3b5767cba7 Translation updates 2008-10-30 19:19:35 +00:00
Tom Lane
771374b34b 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:56 +00:00
Teodor Sigaev
ca2ecbdaca 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:44:15 +00:00
Tom Lane
6b969fa8af 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:57 +00:00
Michael Meskes
74f7c8e4d6 Optional argument should be optional. 2008-10-10 12:19:03 +00:00
Tom Lane
c15b9a505d 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:12 +00:00
Marc G. Fournier
b304b8640b tag for 7.4.22 REL7_4_22 2008-09-19 03:30:27 +00:00
Tom Lane
ff1c15e020 Update back-branch release notes. 2008-09-19 02:46:08 +00:00
Tom Lane
d32b17a5fd 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:52 +00:00
Tom Lane
7eb9f613c3 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:38 +00:00
Tom Lane
45b8e6ed68 Do not allow Unique nodes to be scanned backwards. The code claimed that it
would work, but in fact it didn't return the same rows when moving backwards
as when moving forwards.  This would have no visible effect in a DISTINCT
query (at least assuming the column datatypes use a strong definition of
equality), but it gave entirely wrong answers for DISTINCT ON queries.
2008-08-05 21:29:01 +00:00
Tom Lane
20c20dfeec Fix performance bug in write_syslog(): the code to preferentially break the
log message at newlines cost O(N^2) for very long messages with few or no
newlines.  For messages in the megabyte range this became the dominant cost.
Per gripe from Achilleas Mantzios.

Patch all the way back, since this is a safe change with no portability
risks.  I am also thinking of increasing PG_SYSLOG_LIMIT, but that should
be done separately.
2008-07-08 22:18:18 +00:00
Tom Lane
99772d6465 Fix estimate_num_groups() to assume that GROUP BY expressions yielding boolean
results always contribute two groups, regardless of the expression contents.
This is very substantially more accurate than the regular heuristic for
certain boolean tests like "col IS NULL".  Per gripe from Sam Mason.

Back-patch to all supported releases, since the behavior of
estimate_num_groups() hasn't changed all that much since 7.4.
2008-07-07 20:25:40 +00:00
Tom Lane
2e09f53ed3 Create a script to handle stamping release version numbers into files,
replacing the tedious and error-prone manual process we've been using.
2008-06-10 18:09:26 +00:00
Tom Lane
0c423f0258 Fix datetime input functions to correctly detect integer overflow when
running on a 64-bit platform ... strtol() will happily return 64-bit
output in that case.  Per bug #4231 from Geoff Tolley.
2008-06-09 19:34:40 +00:00
Tom Lane
9acedf8faf tag 7.4.21 REL7_4_21 2008-06-09 00:16:58 +00:00
Tom Lane
33266e0716 Stamp 7.4.21 (except for configure.in/configure) 2008-06-08 22:15:45 +00:00
Tom Lane
ad17600267 Update release notes for 8.3.3 et al. 2008-06-07 22:11:40 +00:00
Tom Lane
c760d70af4 Fix pg_get_ruledef() so that negative numeric constants are parenthesized.
This is needed because :: casting binds more tightly than minus, so for
example -1::integer is not the same as (-1)::integer, and there are cases
where the difference is important.  In particular this caused a failure
in SELECT DISTINCT ... ORDER BY ... where expressions that should have
matched were seen as different by the parser; but I suspect that there
could be other cases where failure to parenthesize leads to subtler
semantic differences in reloaded rules.  Per report from Alexandr Popov.
2008-06-06 18:00:09 +00:00