Commit Graph

25942 Commits

Author SHA1 Message Date
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
Bruce Momjian c2d30556a1 Update release notes to current CVS. 2007-11-30 03:27:48 +00:00
Bruce Momjian c3facf0041 Update Japanese FAQ.
Jun Kuwamura
2007-11-29 17:09:21 +00:00
Peter Eisentraut 42a0c88ead Translation updates 2007-11-29 08:50:36 +00:00
Bruce Momjian 6559c4a202 Add additional PITR documentation.
Simon Riggs
2007-11-28 22:35:54 +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
Bruce Momjian 664782ee74 RETURN NEXT doc improvement, per Alvaro. 2007-11-28 21:47:39 +00:00
Bruce Momjian 5cbf206c79 Update RETURN NEXT documentation for plpgsql. 2007-11-28 20:56:35 +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
Bruce Momjian 62312ce36d Plpgsql doc cleanup.
Guillaume Lelarge
2007-11-28 20:13:06 +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 9293425819 spell checker run 2007-11-28 15:42:31 +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 c1c772225d Add credit to Pavel Stehule for XML functionality 2007-11-28 11:03:50 +00:00
Peter Eisentraut 87ce0fa369 Fix column number 2007-11-28 10:10:14 +00:00
Peter Eisentraut 3f9ef2bf8c Properly recognize and announce input errors. 2007-11-28 09:17:46 +00:00
Bruce Momjian 492ae18f0d Add a few current_* variable index entries to the docs.
Guillaume Lelarge
2007-11-28 05:13:41 +00:00
Bruce Momjian 497365f48a Add comments about VACUUM to free space map docs.
Joshua D. Drake
2007-11-28 05:01:24 +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
Bruce Momjian a0a9c5bcb9 Add example of MONEY casting to numeric if locale is known. 2007-11-27 16:46:36 +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
Bruce Momjian 8fb93b757d Wording improvement for MONEY casting. 2007-11-27 06:05:57 +00:00
Bruce Momjian ee13b734fa Add documentation about the issues of casting MONEY to/from numeric
types.
2007-11-27 05:49:58 +00:00
Bruce Momjian 91e95588af Add:
< * -Make 64-bit version of the MONEY data type
< * Add locale-aware MONEY type, and support multiple currencies
<
<   http://archives.postgresql.org/pgsql-general/2005-08/msg01432.php
<   http://archives.postgresql.org/pgsql-hackers/2007-03/msg01181.php
<
< * MONEY dumps in a locale-specific format making it difficult to
<   restore to a system with a different locale
>
> * MONEY data type
>
> 	o -Make 64-bit version of the MONEY data type
> 	* Add locale-aware MONEY type, and support multiple currencies
>
> 	  http://archives.postgresql.org/pgsql-general/2005-08/msg01432.php
> 	  http://archives.postgresql.org/pgsql-hackers/2007-03/msg01181.php
>
> 	* MONEY dumps in a locale-specific format making it difficult to
> 	  restore to a system with a different locale
> 	* Allow MONEY to be cast to/from other numeric data types
2007-11-26 23:31:09 +00:00
Peter Eisentraut c534ba182c Change index_name to name for consistency. 2007-11-26 21:36:33 +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
Peter Eisentraut 3f398e4a27 Require a specific Autoconf version, instead of a lower bound only. 2007-11-26 12:31:07 +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