Commit Graph

17845 Commits

Author SHA1 Message Date
Peter Eisentraut cac82bb20c Realign the running text in this file to 79 characters wide. Some other
copy-editing.
2007-12-07 16:44:56 +00:00
Magnus Hagander a0c4ac77ad Disable asserts by default on msvc build (to make it the same
as in unix)
2007-12-06 17:07:37 +00:00
Alvaro Herrera 59c841506c Change wording of logged message when cancelling an autovacuum task, using
american speling (unlike this commit message).  Per complaint from Mike C. on
bug #3790 and subsequent discussion.
2007-12-06 14:32:54 +00:00
Magnus Hagander 024014a448 Don't send an empty SSPI negotiation packet at the end of the negotiation.
Fixes bug #3750
2007-12-04 13:02:53 +00:00
Tom Lane f538329f9d Fix build_minmax_path() to cope if an IS NULL clause turns up in the
indexable-clauses list for a btree index.  Formerly it just Asserted that
all such clauses were opclauses, but that's no longer true in 8.3.
Per bug #3796 from Matthias Schoeneich.
2007-12-03 22:37:17 +00:00
Magnus Hagander 739338e88a Default to integer timestamps being off until 8.4, to correspond
to the settings used for other platforms.
2007-12-03 17:17:05 +00:00
Magnus Hagander 8aa318c631 Don't try to install README.spi
Hannes Eder
2007-12-03 15:42:58 +00:00
Tom Lane 01434d41d4 Stamp 8.3beta4. 2007-12-03 00:11:01 +00:00
Tom Lane a63b63ff96 Revert COPY OUT to follow the pre-8.3 handling of ASCII control characters,
namely that \r, \n, \t, \b, \f, \v are dumped as those two-character
representations rather than a backslash and the literal control character.
I had made it do the other to save some code, but this was ill-advised,
because dump files in which these characters appear literally are prone to
newline mangling.  Fortunately, doing it the old way should only cost a few
more lines of code, and not slow down the copy loop materially.
Per bug #3795 from Lou Duchez.
2007-12-03 00:03:05 +00:00
Tom Lane 265f904d8f Code review for LIKE ... INCLUDING INDEXES patch. Fix failure to propagate
constraint status of copied indexes (bug #3774), as well as various other
small bugs such as failure to pstrdup when needed.  Allow INCLUDING INDEXES
indexes to be merged with identical declared indexes (perhaps not real useful,
but the code is there and having it not apply to LIKE indexes seems pretty
unorthogonal).  Avoid useless work in generateClonedIndexStmt().  Undo some
poorly chosen API changes, and put a couple of routines in modules that seem
to be better places for them.
2007-12-01 23:44:44 +00:00
Tom Lane ba9da684b5 Suppress compiler warnings in recent plperl patch. Avoid uselessly expensive
lookup of the well-known OID of textout().
2007-12-01 17:58:42 +00:00
Andrew Dunstan b8f28759d4 Revert inadvertantly committed change. 2007-12-01 15:30:09 +00:00
Andrew Dunstan 6e73b50449 Workaround for perl problem where evaluating UTF8 regexes can cause
implicit loading of modules, thereby breaking Safe rules.
We compile and call a tiny perl function on trusted interpreter init, after which
the problem does not occur.
2007-12-01 15:20:34 +00:00
Tom Lane 895a94de6d Avoid incrementing the CommandCounter when CommandCounterIncrement is called
but no database changes have been made since the last CommandCounterIncrement.
This should result in a significant improvement in the number of "commands"
that can typically be performed within a transaction before hitting the 2^32
CommandId size limit.  In particular this buys back (and more) the possible
adverse consequences of my previous patch to fix plan caching behavior.

The implementation requires tracking whether the current CommandCounter
value has been "used" to mark any tuples.  CommandCounter values stored into
snapshots are presumed not to be used for this purpose.  This requires some
small executor changes, since the executor used to conflate the curcid of
the snapshot it was using with the command ID to mark output tuples with.
Separating these concepts allows some small simplifications in executor APIs.

Something for the TODO list: look into having CommandCounterIncrement not do
AcceptInvalidationMessages.  It seems fairly bogus to be doing it there,
but exactly where to do it instead isn't clear, and I'm disinclined to mess
with asynchronous behavior during late beta.
2007-11-30 21:22:54 +00:00
Tom Lane f0f18c7087 Repair bug that allowed RevalidateCachedPlan to attempt to rebuild a cached
plan before the effects of DDL executed in an immediately prior SPI operation
had been absorbed.  Per report from Chris Wood.

This patch has an unpleasant side effect of causing the number of
CommandCounterIncrement()s done by a typical plpgsql function to
approximately double.  Amelioration of the consequences of that
will be undertaken in a separate patch.
2007-11-30 18:38:34 +00:00
Magnus Hagander 7c43106db2 Add win32error.c to libpq, needed to resolve _dosmaperr. 2007-11-30 16:21:19 +00:00
Magnus Hagander 35736874f9 Use _dosmaperr() to deal with errors opening files in pgwin32_open().
Per complaint from Alvaro and subsequent discussion.
2007-11-30 11:16:43 +00:00
Peter Eisentraut 42a0c88ead Translation updates 2007-11-29 08:50:36 +00:00
Tom Lane bb0e3011f8 Make a cleanup pass over error reports in tsearch code. Use ereport
for user-facing errors, fix some poor choices of errcode, adhere to
message style guide.
2007-11-28 21:56:30 +00:00
Tom Lane 03ffc4d6d5 Improve test coverage of CLOBBER_CACHE_ALWAYS by having it also force
reloading of operator class information on each use of LookupOpclassInfo.
Had this been in place a year ago, it would have helped me find a bug
in the then-new 'operator family' code.  Now that we have a build farm
member testing CLOBBER_CACHE_ALWAYS on a regular basis, it seems worth
expending a little bit of effort here.
2007-11-28 20:44:26 +00:00
Tom Lane 11fccbeaeb Adjust the names of a couple of tsearch index support functions that had
inappropriately generic-sounding names.  This is more or less free since
we already forced initdb for the next beta, and it may prevent confusion or
name conflicts (particularly at the C-global-symbol level) down the road.
Per my proposal yesterday.
2007-11-28 19:33:05 +00:00
Tom Lane d54ca56743 Install a lookaside cache to speed up repeated lookups of the same operator
by short-circuiting schema search path and ambiguous-operator resolution
computations.  Remarkably, this buys as much as 45% speedup of repetitive
simple queries that involve operators that are not an exact match to the
input datatypes.  It should be marginally faster even for exact-match
cases, though I've not had success in proving an improvement in benchmark
tests.  Per report from Guillame Smet and subsequent discussion.
2007-11-28 18:47:56 +00:00
Peter Eisentraut a238bd146d Proper capitalization of Ispell 2007-11-28 15:42:46 +00:00
Peter Eisentraut 96ee6ff502 Fix XML Schema structure for char types without length (bug #3782) 2007-11-28 14:01:51 +00:00
Peter Eisentraut 2609345c85 Improve terminology 2007-11-28 13:30:36 +00:00
Peter Eisentraut 178c78c79f Fix typo 2007-11-28 13:30:16 +00:00
Peter Eisentraut 3f9ef2bf8c Properly recognize and announce input errors. 2007-11-28 09:17:46 +00:00
Bruce Momjian 43e082fc98 Change a stop word on the right-hand-side in the thesaurus file to be an
ERROR, not NOTICE.
2007-11-28 04:24:38 +00:00
Tom Lane a54d3fb2e6 Fix plpgsql to not lookup block labels except in contexts where a block label
is sane (eg, EXIT argument or first part of a qualified identifier), and cause
more-closely-nested record variables to take precedence over outer block
labels.  This cures the breakage exhibited by Marko Kreen that 8.3 no longer
allowed a function's name to be used for a variable within the function, and
makes plpgsql's handling of block labels more like Oracle's.  It's important
to fix this now because we are documenting the use of block labels as variable
qualifiers for the first time in 8.3.
2007-11-27 19:58:44 +00:00
Tom Lane 42fd80de53 Fix pg_regress to check the directory it is actually reading files from,
not the image that (theoretically) should exist in the current directory.

Jørgen Austvik
2007-11-27 19:13:30 +00:00
Tom Lane 3f89964234 Add quote_literal(anyelement) to preserve (and, in fact, extend) a
useful consequence of the former liberal implicit casting to text;
namely that you can feed non-string values to quote_literal() and get
unsurprising results.  Per discussion.
2007-11-27 18:29:11 +00:00
Tom Lane 66d7bbf674 Suppress compiler warning. 2007-11-27 18:13:01 +00:00
Peter Eisentraut 7888b52076 Make casts from xml to text independent of the XML option setting, thus
immutable and indexable.  Also fix the volatility settings of some other
XML-related functions.
2007-11-27 12:21:05 +00:00
Peter Eisentraut 542d04e179 correct capitalization 2007-11-27 12:17:27 +00:00
Tom Lane 07daff63c5 Fix select_common_type() so that it can select a domain type, if all inputs
to a UNION, CASE, or related construct are of the same domain type.  The
main part of this routine smashes domains to their base types, which seems
necessary because the logic involves TypeCategory() and IsPreferredType(),
neither of which work usefully on domains.  However, we can add a first
pass that just detects whether all the inputs are exactly the same type,
and if so accept that without question (so long as it's not UNKNOWN).
Per recent gripe from Dean Rasheed.

In passing, remove some tests for InvalidOid, which have clearly been dead
code for quite some time now, because getBaseType() would fail on that input.

Also, clarify the manual's not-very-precise description of the existing
algorithm's behavior.
2007-11-26 16:46:51 +00:00
Andrew Dunstan 5575826b70 Allow for X as well as x to be the prefix for hexadecimal character ref entity numbers,
as in HTML.
2007-11-25 19:35:41 +00:00
Andrew Dunstan 3de1f0daac Fix XML tag namespace change inadvertantly missed from previous fix. Add
regression test for XML names and numeric entities.
2007-11-25 15:37:11 +00:00
Peter Eisentraut a999ff63ff Use double quotes for quoting xml attributes. 2007-11-25 12:08:11 +00:00
Tom Lane 66b1f4daa8 Fix thinko in comment. 2007-11-25 02:09:46 +00:00
Tom Lane 86be19bf70 Reduce routine successful-archiving message from LOG to DEBUG1 grade,
to reduce chattiness of logs.  Per discussion.
Simon Riggs
2007-11-24 21:37:04 +00:00
Tom Lane ae3ff7adf7 Fix (I think) broken usage of MultiByteToWideChar. I had missed the
subtlety that this function only returns a null terminator if it's
fed input that includes one; which, in the usage here, it's not.
This probably fixes bugs reported by Thomas Haegi.
2007-11-24 21:20:07 +00:00
Tom Lane 0f20e7a83e Slightly more paranoia and slightly better comments for use of
Windows-specific MultiByteToWideChar/WideCharToMultiByte calls.
2007-11-24 21:16:55 +00:00
Tom Lane ffd8721228 Add missed entry for new money regression test. 2007-11-24 20:41:35 +00:00
Tom Lane 229d406a9b Move resetting of currSchema to a spot where it's not vulnerable to getting
missed in possible future partial-drop scenarios.  Improve comment.
Per report from Zoltan Boszormenyi.
2007-11-24 20:26:49 +00:00
D'Arcy J.M. Cain 03debe19a7 Add regression tests for MONEY type. 2007-11-24 19:49:23 +00:00
Tom Lane aca467b9b3 Save another little bit of planner overhead on simple queries, by having
clauselist_selectivity skip some analysis that's useless when there's only
one clause in the given list.  Actually this can win even for not-so-simple
queries, because we also apply clauselist_selectivity to sublists such as the
quals matching an index; which are likely to have only a single entry even
when the total query is quite complicated.
2007-11-24 19:08:51 +00:00
Bruce Momjian 7ebbc815d9 If pg_dump drops a schema, make sure 'search_path' it SET the next time
it is needed --- basically don't remember the previous 'search_path'
after a drop schema because it might have failed but be created later.
2007-11-24 17:45:32 +00:00
Bruce Momjian 8a52d0c94d Clarify how MONEY trims off trailing thousands separator. 2007-11-24 16:18:48 +00:00
Bruce Momjian 5f128d5fe8 Make the MONEY data type have a thousands separator != decimal symbol,
if the locale has the thousands separator as "".  This now matches the
to_char and psql numericlocale behavior.  (Previously this data type was
basically useless for such setups.)
2007-11-24 15:28:02 +00:00
Bruce Momjian 0d072761d3 Borland BCC does not support SSPI, per cnliou9@fastmail.fm. 2007-11-24 01:55:26 +00:00