Tom Lane [Fri, 7 Nov 2003 21:55:50 +0000 (21:55 +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:38 +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.
Bruce Momjian [Fri, 7 Nov 2003 15:31:14 +0000 (15:31 +0000)]
Add:
> * Allow CREATE TABLE foo (f1 INT CHECK (f1 > 0) CHECK (f1 < 10)) to work
> by searching for non-conflicting constraint names, and prefix with table name
Tom Lane [Wed, 5 Nov 2003 22:00:46 +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.
Tom Lane [Fri, 31 Oct 2003 20:00:49 +0000 (20:00 +0000)]
When a superuser does GRANT or REVOKE on an object he doesn't own,
process the command as though it were issued by the object owner.
This prevents creating weird scenarios in which the same privileges
may appear to flow from different sources, and ensures that a superuser
can in fact revoke all privileges if he wants to. In particular this
means that the regression tests work when run by a superuser other than
the original bootstrap userid. Per report from Larry Rosenman.
Tom Lane [Fri, 31 Oct 2003 17:43:10 +0000 (17:43 +0000)]
Minor cleanup of PQunescapeBytea(). Avoid unportable assumptions about
behavior of malloc and realloc when request size is 0. Fix escape
sequence recognizer so that only valid 3-digit octal sequences are
treated as escape sequences ... isdigit() is not a correct test.
Jan Wieck [Fri, 31 Oct 2003 03:58:21 +0000 (03:58 +0000)]
Fix for possible referential integrity violation when a qualified ON INSERT
rule split the query into one INSERT and one UPDATE where the UPDATE
then hit's the just created row without modifying the key fields again.
In this special case, the new key slipped in totally unchecked.
Tom Lane [Fri, 31 Oct 2003 03:58:15 +0000 (03:58 +0000)]
Small fix to Christopher's recent improvements --- underscore is not
a special character in regexes, but it is for LIKE, so NOT LIKE 'pg_%'
is incorrect. Need NOT LIKE 'pg\_%'.
Tom Lane [Fri, 31 Oct 2003 00:18:55 +0000 (00:18 +0000)]
Use Tcl ByteArray objects to avoid unwanted character set translation
in libpgtcl's lo_read/lo_write commands. Also, deal correctly with
failure return from lo_read(). ljb and Tom Lane.
Tom Lane [Thu, 30 Oct 2003 21:37:38 +0000 (21:37 +0000)]
Further work on tab completion code: arrange for system catalogs to be
offered for completion only when the input-so-far is at least 'pg_'.
This seems to be the best compromise behavior emerging from yesterday's
discussion. While at it, refactor code to eliminate repetitive use of
nearly identical queries, which was exceedingly tedious to maintain.
Also const-ify code more thoroughly in hopes of moving constant data into
text segment, and remove unnecessary length limit on queries.
Tom Lane [Wed, 29 Oct 2003 22:20:54 +0000 (22:20 +0000)]
Fix some corner cases in ACL manipulation: don't foul up on an empty
ACL array, and force languages to be treated as owned by the bootstrap
user ID. (pg_language should have a lanowner column, but until it does
this will have to do as a workaround.)
Tom Lane [Tue, 28 Oct 2003 23:35:52 +0000 (23:35 +0000)]
Don't include "schema." in the set of possible tab completions once
"schema." has been typed. This allows readline to complete subsequent
characters immediately if all relations in the target schema start with
the same prefix. This actually worked before, but I unintentionally
broke it a few days ago.
Also, make completion schema-aware for GRANT, REVOKE, VACUUM.