Commit Graph

24585 Commits

Author SHA1 Message Date
Magnus Hagander 96b171903d Make ECPG regression tests use native threading instead of pthreads, now that
ecpglib supports it.
Change configure (patch from Bruce) and msvc build system to no longer require
 pthreads on win32, since all parts of postgresql can be thread-safe using the
 native platform functions.
2007-03-29 15:30:52 +00:00
Michael Meskes ddcb5bbf76 - Added patch by Magnus Hagander <magnus@hagander.net> to use native
win32 threads.
- Fixed regression tests to run threading tests.
2007-03-29 12:02:24 +00:00
Tom Lane fba8113c1b Teach CLUSTER to skip writing WAL if not needed (ie, not using archiving)
--- Simon.
Also, code review and cleanup for the previous COPY-no-WAL patches --- Tom.
2007-03-29 00:15:39 +00:00
Neil Conway 4591fb1aa8 Code cleanup for the new regexp UDFs: we can hardcode the OID and some
properties of the "text" type, and then simplify the code accordingly.
Patch from Jeremy Drake.
2007-03-28 22:59:37 +00:00
Neil Conway 74b667ad42 Replace 4-clause licensed blf.[ch] with blowfish implementation
from PuTTY with is under minimal BSD/MIT license. Marko Kreen.
2007-03-28 22:48:58 +00:00
Alvaro Herrera 7d4c9a5793 Add the "recheck" logic to autovacuum worker code. The worker first builds
its table list and then rechecks pgstat before vacuuming each table to
verify that no one has vacuumed the table in the meantime.

In the current autovacuum world this only means that a worker will not
vacuum a table that a user has vacuumed manually after the worker started.
When support for multiple autovacuum workers is introduced, this will reduce
the probability of simultaneous workers on the same database doing redundant
work.
2007-03-28 22:17:12 +00:00
Magnus Hagander 685badd213 Fix compiler warnings in ereport messages on mingw.
ITAGAKI Takahiro
2007-03-28 08:06:11 +00:00
Bruce Momjian 553c7aeebf Add URL for:
* Automatically create rules on views so they are updateable, per SQL99
>   http://archives.postgresql.org/pgsql-patches/2006-08/msg00255.php
2007-03-28 02:17:45 +00:00
Tom Lane 0565579c5b Fix uninitialized-variable bug. 2007-03-28 01:28:34 +00:00
Tom Lane bf94076348 Fix array coercion expressions to ensure that the correct volatility is
seen by code inspecting the expression.  The best way to do this seems
to be to drop the original representation as a function invocation, and
instead make a special expression node type that represents applying
the element-type coercion function to each array element.  In this way
the element function is exposed and will be checked for volatility.
Per report from Guillaume Smet.
2007-03-27 23:21:12 +00:00
Magnus Hagander 87564ffc6a Install import libraries used to link to libpq, ecpg and the backend. 2007-03-27 21:47:10 +00:00
Alvaro Herrera f1a596bdfb Cosmetic changes: rename some struct fields, and move the fetching of pgstat
table entries to a separate routine.  Don't pass the pgstat database entry to
do_autovacuum; rather, have it fetch it by itself.
2007-03-27 20:36:03 +00:00
Bruce Momjian 1678e16cb3 Remove item due to lack of interest:
< * %Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(),
<   pg_get_tabledef(), pg_get_domaindef(), pg_get_functiondef()
<
<   These would be for application use, not for use by pg_dump.
<
2007-03-27 17:27:01 +00:00
Bruce Momjian d3afd68051 Add:
>
> * Allow configuration of backend priorities via the operating system
>
>   Though backend priorities make priority inversion during lock
>   waits possible, research shows that this is not a huge problem.
>   http://archives.postgresql.org/pgsql-general/2007-02/msg00493.php
2007-03-27 15:36:40 +00:00
Bruce Momjian b8f856512e Fix typo in Makefile.
Marko Kreen
2007-03-27 14:29:51 +00:00
Tom Lane 856b87c294 Fix typo, ensable -> enable, per Steve Gieseking. 2007-03-27 03:25:28 +00:00
Bruce Momjian 06d5fddfbf Add documentation for pulling the CVS repository using rsync, and
mention cvsup last.
2007-03-27 01:45:22 +00:00
Bruce Momjian 64652e8632 Update:
* Improve dead row detection during multi-statement transactions usage
2007-03-26 23:48:43 +00:00
Bruce Momjian 997b3c1b5d Add:
> * Increase the number of rows recognized as dead during multi-statement
>   transactions
>
>   http://archives.postgresql.org/pgsql-patches/2007-03/msg00358.php
>
2007-03-26 23:47:53 +00:00
Bruce Momjian 87d82561c5 Remove Andrew Yu copyright, with permission from author. 2007-03-26 21:51:15 +00:00
Bruce Momjian 9dd3ec6c3b Remove advertising clause from Berkeley BSD-licensed files, per
instructions from Berkeley.
2007-03-26 21:44:11 +00:00
Bruce Momjian 357be8c974 Properly fix PORTNAME in configure. 2007-03-26 21:30:56 +00:00
Bruce Momjian 0b1e4f8530 User PORTNAME for win32 tests, rather than $template, for consistency. 2007-03-26 19:46:56 +00:00
Tom Lane b581b85406 Fix seriously broken markup for libpq-envars cross-references. 2007-03-26 17:23:37 +00:00
Tom Lane 55a7cf80a0 Allow non-superuser database owners to create procedural languages.
A DBA is allowed to create a language in his database if it's marked
"tmpldbacreate" in pg_pltemplate.  The factory default is that this is set
for all standard trusted languages, but of course a superuser may adjust
the settings.  In service of this, add the long-foreseen owner column to
pg_language; renaming, dropping, and altering owner of a PL now follow
normal ownership rules instead of being superuser-only.
Jeremy Drake, with some editorialization by Tom Lane.
2007-03-26 16:58:41 +00:00
Teodor Sigaev 66daeb074b Add checking of end of line in parsing stopword list. Thanks to sharp eyes of Tom lane 2007-03-26 13:57:07 +00:00
Teodor Sigaev debb3aa8e9 Fix stopword and synonym files parsing bug in MSVC build, per report from
Magnus Hagander. Also, now it ignores space symbol after stopwords.
2007-03-26 12:25:35 +00:00
Tatsuo Ishii a6fbd2f12a Fix pg_wchar_table's maxmblen field of EUC_CN, EUC_TW, MULE_INTERNAL
and GB18030. patches from ITAGAKI Takahiro.
2007-03-26 11:15:13 +00:00
Tom Lane 7ee8fd9113 Seems some people have been forgetting to run autoheader. 2007-03-26 02:38:22 +00:00
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