Joe Conway [Sun, 30 Nov 2003 20:53:43 +0000 (20:53 +0000)]
Make PQescapeBytea and byteaout consistent with each other, and
octal escape all octets outside the range 0x20 to 0x7e. This fixes
the problem pointed out by Sergey Yatskevich here:
http://archives.postgresql.org/pgsql-bugs/2003-11/msg00140.php
Joe Conway [Fri, 28 Nov 2003 05:03:48 +0000 (05:03 +0000)]
Fix regression in dblink_disconnect() reported by Eduardo Stern:
persistent_conn was left dangling after a disconnect in the
unnamed connection case, causing a subsequent disconnect to
crash the backend.
Tom Lane [Wed, 26 Nov 2003 20:50:26 +0000 (20:50 +0000)]
Second try at fixing no-room-to-move-down PANIC in compact_fsm_storage.
Ward's report that it can still happen in RC2 forces me to realize that
this is not a can't-happen condition after all, and that the compaction
code had better cope rather than panicking.
Tom Lane [Tue, 25 Nov 2003 23:59:32 +0000 (23:59 +0000)]
Repair subselect.c's occasional assignment of the wrong vartypmod to
Vars created to fill subplan args lists. This is an ancient error, going
back at least to 7.0, but is more easily triggered in 7.4 than before
because we no longer compare varlevelsup when deciding whether a Param
slot can be re-used. Fixes bug reported by Klint Gore.
Tom Lane [Tue, 25 Nov 2003 19:17:16 +0000 (19:17 +0000)]
Band-aid solution for problems with SubPlans used in hash join clauses,
per report from Andrew Holm-Hansen. The difficulty arises from the fact
that the planner allowed a Hash node's hashkeys to share substructure
with the parent HashJoin node's hashclauses, plus some rather bizarre
choices about who initializes what during executor startup. A cleaner
but more invasive solution is to not store hashkeys separately in the
plan tree at all, but let the HashJoin node deconstruct hashclauses
during executor startup. I plan to fix it that way in HEAD.
Tom Lane [Mon, 24 Nov 2003 16:54:15 +0000 (16:54 +0000)]
Overdue code review for ALTER SEQUENCE patch. Don't generate illegal Node
tree for CYCLE option; don't assume zeros are invalid values for sequence
fields other than increment_by; don't reset cache_value when not told to;
simplify code for testing whether to apply defaults.
Peter Eisentraut [Mon, 24 Nov 2003 13:11:27 +0000 (13:11 +0000)]
Rename USE_THREADS to ENABLE_THREAD_SAFETY to avoid name clash with Perl.
Fixes compliation failure with --enable-thread-safety --with-perl and Perl
5.6.1.
Tom Lane [Sun, 16 Nov 2003 20:29:34 +0000 (20:29 +0000)]
Fix datetime input parsing to accept YYYY-MONTHNAME-DD and related syntaxes,
which had been unintentionally broken by recent changes to tighten up the
DateStyle rules for all-numeric date input. Add documentation and
regression tests for this, too.
Tom Lane [Sat, 15 Nov 2003 17:24:19 +0000 (17:24 +0000)]
Make creation of statistics collection socket more robust, by allowing it
to try additional addresses returned from getaddrinfo() if the first one
fails at the bind() or connect() steps. Per yesterday's discussion.
Tom Lane [Fri, 14 Nov 2003 22:56:25 +0000 (22:56 +0000)]
Repair error in syntax documentation for CREATE TABLE: one does not put
a comma between multiple column_constraint's for a single column.
Per report from Tomislaw Kitynski.
Tom Lane [Fri, 14 Nov 2003 15:43:34 +0000 (15:43 +0000)]
Fix misstatement about the required value of SEMVMX. Given our current
usage of PGSemaMagic, the minimum required value is actually 537, but
say 1000 just to use a round number. 255 is *not* good enough.
Tom Lane [Wed, 12 Nov 2003 22:55:42 +0000 (22:55 +0000)]
AcceptResult() was missing a case for PGRES_EMPTY_QUERY --- probably
my fault. Adding it fixes bogus message display when reading a block
comment at the end of a script file.
Tom Lane [Tue, 11 Nov 2003 21:23:26 +0000 (21:23 +0000)]
Fix thinko in reltime and tinterval operator classes that I added a
couple months ago: the >= and > operators were swapped. Not worth
forcing an initdb for this, but we should get it right in the release.
Will be patched separately in HEAD.
Bruce Momjian [Sun, 9 Nov 2003 03:47:59 +0000 (03:47 +0000)]
I have attached a more comprehensive MSWIN FAQ patch. Basically, the
instructions were way out of date and incorrect. Installing Postgres
from Cygwin is easier these days than the FAQ would imply.
This patch already includes Andrew's previous patch.
Tom Lane [Fri, 7 Nov 2003 21:56:02 +0000 (21:56 +0000)]
Cause stats processes to detach from shared memory when started, so that
they do not prevent the postmaster from deleting the shmem segment during
a post-backend-crash restart cycle. Per recent discussion.
Tom Lane [Fri, 7 Nov 2003 21:27:50 +0000 (21:27 +0000)]
zero_damaged_pages must absolutely NOT be marked GUC_DISALLOW_IN_FILE,
else it cannot be used to handle failures detected during WAL replay.
Fortunately this flag isn't actually enforced yet, but get it right.
Tom Lane [Wed, 5 Nov 2003 22:00:52 +0000 (22:00 +0000)]
Fix for this problem:
regression=# select 1 from tenk1 ta cross join tenk1 tb for update;
ERROR: no relation entry for relid 3
7.3 said "SELECT FOR UPDATE cannot be applied to a join", which was better
but still wrong, considering that 7.2 took the query just fine. Fix by
making transformForUpdate() ignore JOIN and other special RTE types,
rather than trying to mark them FOR UPDATE. The actual error message now
only appears if you explicitly name the join in FOR UPDATE.
Tom Lane [Sun, 2 Nov 2003 21:56:15 +0000 (21:56 +0000)]
Provide a way to run the parallel regression tests with a user-specified
limit on the number of simultaneous connections. Andrew Dunstan, with
review by Tom Lane.