1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-26 23:43:30 +03:00
Commit Graph

5465 Commits

Author SHA1 Message Date
Tom Lane
a4ffca6bdf Fix longstanding error in _bt_search(): should moveright at top of loop not
bottom.  Otherwise we fail to moveright when the root page was split while
we were "in flight" to it.  This is not a significant problem when the root
is above the leaf level, but if the root was also a leaf (ie, a single-page
index just got split) we may return the wrong leaf page to the caller,
resulting in failure to find a key that is in fact present.  Bug has existed
at least since 7.1, probably forever.
2003-07-29 22:18:48 +00:00
Tom Lane
091b9c211c Fix timestamp_date for HAVE_INT64_TIMESTAMP case. 2003-07-24 04:38:27 +00:00
Tom Lane
fa67e2ce4f Repair 7.3 breakage in timestamp-to-date conversion for dates before 2000. 2003-07-24 00:21:31 +00:00
Tom Lane
3abd1390ba wups, took out one memset too many ... 2003-07-22 19:13:25 +00:00
Tom Lane
3196738793 Back-patch fix for bugs in pgstat_initstats. 2003-07-22 19:00:36 +00:00
Tom Lane
004d2be5d9 Oh, for crying in a bucket ... relax Assert so that glibc's strxfrm
does not dump core.
2003-07-17 22:20:22 +00:00
Tom Lane
df32af15b6 Work around buggy strxfrm() present in some Solaris releases. 2003-07-17 20:52:42 +00:00
Tom Lane
19de9d2fee For COMMENT ON DATABASE where database name is unknown or not the current
database, emit a WARNING and do nothing, rather than raising ERROR.
Per recent discussion in which we concluded this is the best way to deal
with database dumps that are reloaded into a database of a new name.
2003-07-17 20:14:09 +00:00
Tom Lane
0a49e774b1 Repair boundary-case bug introduced by patch of two months ago that
fixed incorrect initial setting of StartUpID.  The logic in XLogWrite()
expects that Write->curridx is advanced to the next page as soon as
LogwrtResult points to the end of the current page, but StartupXLOG()
failed to make that happen when the old WAL ended exactly on a page
boundary.  Per trouble report from Hannu Krosing.
2003-07-17 16:45:25 +00:00
Tom Lane
537c1c1983 Fix a *second* buffer overrun bug in to_ascii(). Grumble. 2003-07-14 16:41:46 +00:00
Tom Lane
263b42f289 Don't generate 'zero' typeids in the output from gen_cross_product.
This is no longer necessary or appropriate since we don't use zero typeid
as a wildcard anymore, and it fixes a nasty performance problem with
functions with many parameters.  Per recent example from Reuven Lerner.
2003-06-25 20:07:54 +00:00
Tom Lane
5fbc1d4a45 Fix bugs in interval-to-time conversion: HAVE_INT64_TIMESTAMP case did not
work at all, and neither case behaved sanely for negative intervals.
2003-06-16 18:56:53 +00:00
Tom Lane
1e2d20910b Fix SQL function executor for case where last command of a function is
not a SELECT.  We didn't use to allow that, but we do now.
2003-06-12 17:29:37 +00:00
Tom Lane
f9e42d2522 Add defense in assign_session_authorization() against trying to do
catalog lookups when not in a transaction.  This prevents bizarre
failures if someone tries to set a value for session_authorization in
postgresql.conf.  Per report from Fernando Nasser.
2003-06-06 16:25:52 +00:00
Tom Lane
bab030b288 Repair sometimes-incorrect computation of StartUpID after a crash, per
example from Rao Kumar.  This is a very corner corner-case, requiring
a minimum of three closely-spaced database crashes and an unlucky
positioning of the second recovery's checkpoint record before you'd notice
any problem.  But the consequences are dire enough that it's a must-fix.
2003-05-22 14:39:49 +00:00
Tom Lane
3284e342a2 Back-patch Jan's fix to avoid primary key lookup (and lock) if foreign key
does not change on UPDATE.
2003-05-21 18:14:46 +00:00
Tom Lane
529ec66d53 Back-patch change to avoid O(N^2) behavior with lots of deferred triggers,
by making deferredTriggerInvokeEvents only scan events added since it last ran.
2003-05-19 17:23:54 +00:00
Tom Lane
3ffaf20461 Apply fixes for problems with dropped columns whose types have also been
dropped.  Add regression test, too.
2003-05-12 00:17:34 +00:00
Tom Lane
016e059fcf Adjust CreateCheckpoint so that buffer dumping activities and cleanup of
dead xlog segments are not considered part of a critical section.  It is
not necessary to force a database-wide panic if we get a failure in these
operations.  Per recent trouble reports.
2003-05-10 18:01:49 +00:00
Tom Lane
c04e80cf87 Allow 60 in seconds fields of timestamp, time, interval input values.
Per recent discussion on pgsql-general, this is appropriate for spec
compliance, and has the nice side-effect of easing porting from old
pg_dump files that exhibit the 59.999=>60.000 roundoff problem.
2003-05-04 04:30:35 +00:00
Tom Lane
f1b3af29c1 When a TIMESTAMP, TIME, or INTERVAL precision is specified larger than our
implementation limits, do not issue an ERROR; instead issue a NOTICE and use
the max supported value.  Per pgsql-general discussion of 28-Apr, this is
needed to allow easy porting from pre-7.3 releases where the limits were
higher.

Unrelated change in same area: accept GLOBAL TEMP/TEMPORARY as a synonym
for TEMPORARY, as per pgsql-hackers discussion of 15-Apr.  We previously
rejected it, but that was based on a misreading of the spec --- SQL92's
GLOBAL temp tables are really closer to what we have than their LOCAL ones.
2003-05-04 00:04:10 +00:00
Tom Lane
2df153b0f6 Repair permissions problem in RI triggers: query parsing has to be done
as the correct user, not only query execution.  Per report from Sean
Chittenden.
2003-04-26 22:21:58 +00:00
Tom Lane
66e0ea47a0 Back-patch fixes for zero-column tables in COPY, pg_dump. 2003-04-25 22:14:33 +00:00
Tom Lane
de9c299aba Make [VACUUM] ANALYZE safe on zero-column tables. 2003-04-25 21:29:22 +00:00
Tom Lane
60bc45a107 Fix misbehavior of func_error() on type names containing '%'.
Will patch separately but equivalently in HEAD.
2003-04-23 18:20:10 +00:00
Tom Lane
f094673357 Fix misbehavior of replace() on strings containing '%'.
Will patch separately but equivalently in HEAD.
2003-04-23 18:19:23 +00:00
Tom Lane
a72fd0d60e Prevent palloc(0) error when parent table has zero columns. 2003-04-21 15:20:02 +00:00
Tom Lane
9ccfbe254a Fix char-vs-pg_wchar confusion in p_ere(), per failure report from
Tom O'Dowd.  This fix is not relevant to CVS tip anymore, but we should
fix it in 7.3.*.
2003-04-20 17:37:22 +00:00
Tom Lane
dc3e14d3d5 Fix stupid oversight ... 2003-04-16 04:38:05 +00:00
Tom Lane
d38fdbc939 eqjoinsel's logic for case where MCV lists are not present should
account for NULLs; in hindsight this is obvious since the code for
the MCV-lists case would reduce to this when there are zero entries
in both lists.  Per example from Alec Mitchell.
2003-04-15 05:18:30 +00:00
Tom Lane
811c512f62 Second try at avoiding conflicts with system isblank(). 2003-04-13 04:07:31 +00:00
Tom Lane
041ab272c7 Guard against macro versions of isblank(). 2003-04-12 22:28:40 +00:00
Tatsuo Ishii
5d6b0a43dc Fix encoding conversion function bug.
See following posting for more details.

Subject: Re: [HACKERS] [BUGS] Bug #943: Server-Encoding from EUC_TW to UTF-8 doesn't
From: Tatsuo Ishii <t-ishii@sra.co.jp>
To: michael.enke@wincor-nixdorf.com, pgsql-bugs@postgresql.org
Cc: pgsql-hackers@postgresql.org
Date: Sat, 12 Apr 2003 10:51:45 +0900 (JST)
2003-04-12 08:01:23 +00:00
Tom Lane
8d477bd33a Fix error recovery for SSL_read/SSL_write calls. 2003-04-10 23:03:13 +00:00
Tom Lane
19f60754e1 Remove premature attempt to constant-fold type coercion expressions.
While usually safe, this fails if the coercion function needs the
query snapshot to be set already.  Per example from Nigel Andrews.
2003-04-10 02:47:57 +00:00
Tom Lane
8fe728b009 Back-patch changes to validate page header fields immediately after
reading in any page.  Also back-port the zero_damaged_pages boolean
that determines what to do about it.
2003-04-04 00:32:57 +00:00
Tom Lane
a880697f09 Repair incorrect checking of grouped/ungrouped variables in the presence
of unnamed joins; per pghackers discussion 31-Mar-03.
2003-04-03 18:04:17 +00:00
Tom Lane
8af8be8633 Fix buffer overrun in to_ascii(), per report from Guido Notari. 2003-04-02 21:08:07 +00:00
Tom Lane
28295da0a5 TestConfiguration returns int, not bool. This mistake is relatively
harmless on signed-char machines but would lead to core dump in the
deadlock detection code if char is unsigned.  Amazingly, this bug has
been here since 7.1 and yet wasn't reported till now.  Thanks to Robert
Bruccoleri for providing the opportunity to track it down.
2003-03-31 20:32:50 +00:00
Bruce Momjian
ba4de4e06a Properly document default value of log_min_error_statement in postgresql.conf. 2003-03-30 21:38:13 +00:00
Bruce Momjian
b602639dc6 Backpatch SSL return value changes. 2003-03-30 21:36:44 +00:00
Bruce Momjian
8df03b2c86 [ Backpatch to 7.3.X.]
typing error in src/backend/libpq/be-secure.c ???

Long Description
In src/backend/libpq/be-secure.c: secure_write
on SSL_ERROR_WANT_WRITE call secure_read instead
secure_write again. May be is this a typing error?

Sergey N. Yatskevich (syatskevich@n21lab.gosniias.msk.ru)
2003-03-29 03:57:05 +00:00
Tom Lane
a69550a363 Fix bogus coding of SET DEFAULT ri triggers ... or at least make it less
bogus than it was.  Per bug report from Adrian Pop.
2003-03-27 19:25:52 +00:00
Tom Lane
9ae5b8cb92 GetTupleForTrigger must use outer transaction's command counter for time
qual checking, not GetCurrentCommandId.  Per test case from Steve Wolfe.
2003-03-27 14:33:21 +00:00
Tom Lane
579adfd654 Band-aid patch for Shraibman's 'out of free buffers' bug: disable the
keys_are_unique optimization introduced in 7.3.  A better fix will
appear in 7.4, but I think back-patching it is too risky for the stable
branch.
2003-03-23 21:55:14 +00:00
Tom Lane
2d0cf42cd4 Tweak selectivity and related routines to cope with domains. Per report
from Andreas Pflug.
2003-03-23 01:49:13 +00:00
Tom Lane
cebedc36ed Prevent infinite loop in ln_var() due to roundoff error.
Per report from Dave Marin.
2003-03-14 00:15:41 +00:00
Tom Lane
d144f96bf0 GROUP BY got confused if there were multiple equal() GROUP BY items.
This bug has been latent since 7.0 or maybe even further back, but it
was only exposed when parse_clause.c stopped suppressing duplicate
items (see its rev 1.96 of 18-Aug-02).
2003-03-13 16:58:49 +00:00
Tom Lane
f069bd0560 Tweak dependency code to suppress NOTICEs generated by new method for
cleaning out temp namespaces.  We don't really want the server log to be
cluttered with 'Drop cascades to table foo' every time someone uses a
temp table...
2003-03-06 22:55:03 +00:00
Tom Lane
d8e2689e32 Repair bug reported by Laurent Perez: bad plan generated when UPDATE or
DELETE of an inheritance tree references another inherited relation.
This bug has been latent since 7.1; I'm still not quite sure why 7.1 and
7.2 don't manifest it (at least, they don't crash on a simple test case).
2003-03-05 18:38:26 +00:00