Commit Graph

24556 Commits

Author SHA1 Message Date
Tom Lane 66bbc2fdd5 Add -lcrypto as one of the possible link dependencies of libkrb5.
Per report from Jim Rosenberg.  This possibly should get back-patched,
but I'm a bit suspicious of it still because of the lack of prior reports.
2007-03-26 02:37:17 +00:00
Tom Lane 287ed68dd2 Remove assertion that constraint_exclusion risks wrong answers if
table constraints are changed; this is no longer true now that we
have a plan invalidation mechanism.
2007-03-26 01:41:57 +00:00
Tom Lane dc1b8cea93 Fix plancache's invalidation callback to do the right thing for a SI
reset event, namely invalidate everything.  This oversight probably
explains the rare failures that some buildfarm machines have been
showing for the plancache regression test.
2007-03-26 00:36:19 +00:00
Tom Lane 1cc97d175c Make _SPI_execute_plan pass the query source string down to ProcessUtility
if possible.  I had left this undone in the first pass at the API change
for ProcessUtility, but forgot to revisit it after the plancache changes
made it possible to do it.
2007-03-25 23:42:43 +00:00
Tom Lane bf8236526b Remove the prohibition on executing cursor commands through SPI_execute.
Vadim had included this restriction in the original design of the SPI code,
but I'm darned if I can see a reason for it.

I left the macro definition of SPI_ERROR_CURSOR in place, so as not to
needlessly break any SPI callers that are checking for it, but that code
will never actually be returned anymore.
2007-03-25 23:27:59 +00:00
Tom Lane e85a01df67 Clean up the representation of special snapshots by including a "method
pointer" in every Snapshot struct.  This allows removal of the case-by-case
tests in HeapTupleSatisfiesVisibility, which should make it a bit faster
(I didn't try any performance tests though).  More importantly, we are no
longer violating portable C practices by assuming that small integers are
distinct from all pointer values, and HeapTupleSatisfiesDirty no longer
has a non-reentrant API involving side-effects on a global variable.

There were a couple of places calling HeapTupleSatisfiesXXX routines
directly rather than through the HeapTupleSatisfiesVisibility macro.
Since these places had to be changed anyway, I chose to make them go
through the macro for uniformity.

Along the way I renamed HeapTupleSatisfiesSnapshot to HeapTupleSatisfiesMVCC
to emphasize that it's only used with MVCC-type snapshots.  I was sorely
tempted to rename HeapTupleSatisfiesVisibility to HeapTupleSatisfiesSnapshot,
but forebore for the moment to avoid confusion and reduce the likelihood that
this patch breaks some of the pending patches.  Might want to reconsider
doing that later.
2007-03-25 19:45:14 +00:00
Tatsuo Ishii 75c6519ff6 Add new encoding EUC_JIS_2004 and SHIFT_JIS_2004,
along with new conversions among EUC_JIS_2004, SHIFT_JIS_2004 and UTF-8.
catalog version has been bump up.
2007-03-25 11:56:04 +00:00
Bruce Momjian 7b4726e6c3 Add:
>
> * Allow BEFORE INSERT triggers on views
>
>   http://archives.postgresql.org/pgsql-general/2007-02/msg01466.php
2007-03-25 02:21:19 +00:00
Bruce Momjian b72426d351 Add:
> 	o Add more logical syntax CLUSTER table ORDER BY index;
> 	  support current syntax for backward compatibility
2007-03-24 23:12:34 +00:00
Magnus Hagander 8ca1571665 Support for installing NLS files, and update support to use gettext
from gnuwin32.
2007-03-24 22:16:49 +00:00
Bruce Momjian 36d35a14df Document that LDAP URLs should be double-quoted in pg_hba.conf because
commas are often present in the URL.

Backpatch to 8.2.X.
2007-03-24 21:46:23 +00:00
Magnus Hagander 5e37b4cb1a Install contrib sql and readme files 2007-03-24 15:28:48 +00:00
Magnus Hagander ecfb932a5a Properly parse the name of contrib modules that aren't named the same
way as their directory (notably xml2/pgxml and intarray/_int)
2007-03-24 14:13:27 +00:00
Alvaro Herrera e019bbc9e8 Set the node properly, per Tom. 2007-03-23 21:57:10 +00:00
Alvaro Herrera a0abe87f1c Separate the code to start a new worker into its own function. The code is
exactly the same, modulo whitespace.
2007-03-23 21:45:17 +00:00
Alvaro Herrera 6287eb7adc Separate fetch of pg_autovacuum tuple into its own function. 2007-03-23 21:23:13 +00:00
Alvaro Herrera 8aaecaf809 We no longer need to palloc the VacuumStmt node; keeping it on the stack is
simpler.
2007-03-23 20:56:39 +00:00
Tom Lane 23a41573c4 Adjust DatumGetBool macro so that it isn't fooled by garbage in the Datum
to the left of the actual bool value.  While in most cases there won't be
any, our support for old-style user-defined functions violates the C spec
to the extent of calling functions that might return char or short through
a function pointer declared to return "char *", which we then coerce to
Datum.  It is not surprising that the result might contain garbage
high-order bits ... what is surprising is that we didn't see such cases
long ago.  Per report from Magnus.
2007-03-23 20:24:41 +00:00
Tom Lane 547b6e537a Fix plancache so that any required replanning is done with the same
search_path that was active when the plan was first made.  To do this,
improve namespace.c to support a stack of "override" search path settings
(we must have a stack since nested replan events are entirely possible).
This facility replaces the "special namespace" hack formerly used by
CREATE SCHEMA, and should be able to support per-function search path
settings as well.
2007-03-23 19:53:52 +00:00
Tatsuo Ishii 4c35ec53a9 Allow 4 bytes UTF-8 (UCS-4 range 00010000-001FFFFF)
This is necessary to support JIS X 0213 <--> UTF-8 conversion.
2007-03-23 13:51:30 +00:00
Magnus Hagander 6b77e3a8cc Forgot commit: support for special-cases in pgcrypto 2007-03-23 10:05:34 +00:00
Magnus Hagander 3024b0aa94 Support for running contribcheck on msvc 2007-03-23 09:57:55 +00:00
Magnus Hagander e69f7f450c Generate SQL files for /contrib (based on .sql.in) 2007-03-23 09:53:33 +00:00
Magnus Hagander fb8155d0d2 Add define to exclude configured libraries, to be able to easily build a
stripped down version of libpq. To be used by the installer.
2007-03-23 08:43:51 +00:00
Magnus Hagander 1ca6ab1c78 Remove headers for old sysv shmem emulation that I forgot.
Also remove headers for old sysv semaphore emulation that were forgotten
when that was changed about a year ago.
2007-03-23 08:30:55 +00:00
Bruce Momjian 1e2bfb5811 Cleanup for procarray.c. 2007-03-23 03:16:39 +00:00
Bruce Momjian 404c00434c Add:
>
> * Fix cases where invalid byte encodings are accepted by the database,
>   but throw an error on SELECT
>
>   http://archives.postgresql.org/pgsql-hackers/2007-03/msg00767.php
2007-03-22 20:55:19 +00:00
Bruce Momjian 9c51b922b6 Add comment that pg_dump 'append' format is used only by pg_dump, per
Dave Page.
2007-03-22 20:47:12 +00:00
Bruce Momjian 760b988f9d Add to TODO:
CLUSTER:
>
> 	o %Add VERBOSE option to report tables as they are processed,
> 	  like VACUUM VERBOSE
2007-03-22 20:38:42 +00:00
Bruce Momjian ea3b212fee Commit newest version of xmlpath().
Nikolay Samokhvalov
2007-03-22 20:26:30 +00:00
Bruce Momjian f317a03734 In pg_dump, strcasecmp -> pg_strcasecmp. 2007-03-22 20:18:49 +00:00
Bruce Momjian e651bcf3f6 Add xmlpath() to evaluate XPath expressions, with namespaces support.
Nikolay Samokhvalov
2007-03-22 20:14:58 +00:00
Tom Lane 4f896dac17 Arrange for PreventTransactionChain to reject commands submitted as part
of a multi-statement simple-Query message.  This bug goes all the way
back, but unfortunately is not nearly so easy to fix in existing releases;
it is only the recent ProcessUtility API change that makes it fixable in
HEAD.  Per report from William Garrison.
2007-03-22 19:55:04 +00:00
Bruce Momjian 686956375a Allow the pgstat process to restart immediately after a receiving
SIGQUIT signal, rather than waiting for PGSTAT_RESTART_INTERVAL.
2007-03-22 19:53:31 +00:00
Tom Lane a4127b713d Allow DROP TABLESPACE to succeed (with a warning) if the pg_tblspc symlink
doesn't exist.  This allows DROP to be used to clean out the pg_tablespace
catalog entry in a situation where a previous DROP attempt failed before
committing but after having removed the directories and symlink.

Per report from William Garrison.  Even though his test case depends on an
unrelated bug in PreventTransactionChain, it's certainly possible for this
situation to arise due to other problems, eg a system crash at just the
right time.
2007-03-22 19:51:44 +00:00
Bruce Momjian 832b6d00e9 Properly enforce pg_dump -F formation options; only single letter or
full words support, per report from Mark Stosberg.
2007-03-22 19:42:02 +00:00
Alvaro Herrera 8f65c02f33 Remove the currently unused FRONTEND case in dllist.c. This allows the usage
of palloc instead of malloc, which means a list can be freed simply by deleting
the memory context that contains it.
2007-03-22 18:57:52 +00:00
Teodor Sigaev bb8998a475 Fix parser bug on Windows with UTF8 encoding and C locale, the reason was
sizeof(wchar_t) = 2 instead of 4.
2007-03-22 15:58:24 +00:00
Bruce Momjian c68a631ce7 Remove tabs in SGML files. 2007-03-22 15:46:56 +00:00
Bruce Momjian 183c12e0d7 Remove tabs from SGML file. 2007-03-22 15:45:56 +00:00
Magnus Hagander d55227f01b Forgot to add file needed for PL regression tests 2007-03-22 13:43:02 +00:00
Tom Lane 54d20024c1 Fix some problems with selectivity estimation for partial indexes.
First, genericcostestimate() was being way too liberal about including
partial-index conditions in its selectivity estimate, resulting in
substantial underestimates for situations such as an indexqual "x = 42"
used with an index on x "WHERE x >= 40 AND x < 50".  While the code is
intentionally set up to favor selecting partial indexes when available,
this was too much...

Second, choose_bitmap_and() was likewise easily fooled by cases of this
type, since it would similarly think that the partial index had selectivity
independent of the indexqual.

Fixed by using predicate_implied_by() rather than simple equality checks
to determine redundancy.  This is a good deal more expensive but I don't
see much alternative.  At least the extra cost is only paid when there's
actually a partial index under consideration.

Per report from Jeff Davis.  I'm not going to risk back-patching this,
though.
2007-03-21 22:18:12 +00:00
Bruce Momjian 2b49e5d3cb Add:
<
<
> 	o During index creation, pre-sort the tuples to improve build speed
>
> 	  http://archives.postgresql.org/pgsql-hackers/2007-03/msg01199.php
>
2007-03-21 21:25:46 +00:00
Bruce Momjian 5fc7ba76dd Remove TODO item, not wanted:
< * Add NUMERIC division operator that doesn't round?
<
<   Currently NUMERIC _rounds_ the result to the specified precision.
<   This means division can return a result that multiplied by the
<   divisor is greater than the dividend, e.g. this returns a value > 10:
<
<     SELECT (10::numeric(2,0) / 6::numeric(2,0))::numeric(2,0) * 6;
<
<   The positive modulus result returned by NUMERICs might be considered
<   inaccurate, in one sense.
<
2007-03-21 21:21:21 +00:00
Magnus Hagander 17fdd7833e Add documentation about vcregress. 2007-03-21 19:22:52 +00:00
Bruce Momjian bebbea0c1e Add URL for:
* Add locale-aware MONEY type, and support multiple currencies
  http://archives.postgresql.org/pgsql-hackers/2007-03/msg01181.php
2007-03-21 16:43:31 +00:00
Magnus Hagander e8a85e6f84 Add support for running regression tests on procedural languages 2007-03-21 16:21:40 +00:00
Magnus Hagander 3c5d5f070a Properly return exitcode when regression tests fails. 2007-03-21 15:39:03 +00:00
Magnus Hagander 18d82d03b5 Native shared memory implementation for win32.
Uses same underlying tech as before, but not the sysv emulation layer.
2007-03-21 14:39:23 +00:00
Bruce Momjian 3b765dba78 Add URL for:
* Allow accurate statistics to be collected on indexes with more than
  one column or expression indexes, perhaps using per-index statistics
>   http://archives.postgresql.org/pgsql-hackers/2007-03/msg01131.php
2007-03-21 00:33:08 +00:00