Tom Lane [Tue, 21 Dec 2004 18:33:36 +0000 (18:33 +0000)]
exec_eval_simple_expr() needs to do CommandCounterIncrement() not just
GetTransactionSnapshot() to ensure ActiveSnapshot advances properly.
Sigh. Extend regression test so it reveals this error too.
Bruce Momjian [Tue, 21 Dec 2004 01:02:28 +0000 (01:02 +0000)]
I was recently surprised to find that EXTRACT's day of the week
numbering is different than TO_CHAR's ditto. EXTRACT starts at 0==Sunday
while TO_CHAR starts at 1==Sunday.
A suggestion for two documentation notes is attached as a patch to
current CVS HEAD.
Tom Lane [Mon, 20 Dec 2004 17:40:59 +0000 (17:40 +0000)]
In pipe_read_line Windows code, loop to ensure we get a whole line
from the child process; fixes observed problems when the returned
version number is '8.0.0' rather than '8.0.0rc1'. Magnus Hagander
Tom Lane [Mon, 20 Dec 2004 17:13:41 +0000 (17:13 +0000)]
Remove direct inclusions of <com_err.h> as well as configure test for
its presence. This amounts to desupporting Kerberos 5 releases 1.0.*,
which is small loss, and simplifies use of our Kerberos code on platforms
with Red-Hat-style include file layouts. Per gripe from John Gray and
followup discussion.
Tom Lane [Sun, 19 Dec 2004 20:20:27 +0000 (20:20 +0000)]
plpgsql's exec_eval_simple_expr() now has to take responsibility for
advancing ActiveSnapshot when we are inside a volatile function.
Per example from Gaetano Mendola. Add a regression test to catch
similar problems in future.
Tom Lane [Sun, 19 Dec 2004 19:39:47 +0000 (19:39 +0000)]
Prevent evaluation of backticks while discarding unwanted arguments
after an unknown or failed psql backslash command, and also while
discarding "extra" arguments of a putatively valid backslash command.
In the case of an unknown/failed command, make sure we discard the
whole rest of the line, rather than trying to resume at the next
backslash. Per discussion with Thomer Gil.
Neil Conway [Fri, 17 Dec 2004 03:51:36 +0000 (03:51 +0000)]
Allow 'ELSEIF' as an alternative to 'ELSIF' in PL/PgSQL. There have been
several reports of users being confused when they attempt to use ELSEIF
and run into trouble due to PL/PgSQL's lax parser. The parser will be
improved for 8.1, but we can fix most of the problem by allowing ELSEIF
for now.
Tom Lane [Thu, 16 Dec 2004 20:41:01 +0000 (20:41 +0000)]
Cause configure --with-tcl to check for presence of <tcl.h>, as per
gripe from John Gray. Also fix thinko in pltcl Makefile: if a special
Tcl include directory is specified, that ought to be searched first.
Tom Lane [Wed, 15 Dec 2004 21:13:34 +0000 (21:13 +0000)]
Fix another place broken by new List implementation :-(. Per example
from goranpop@nspoint.net. I think this escaped notice because in
simple cases the list is NIL on entry.
Tom Lane [Wed, 15 Dec 2004 20:15:17 +0000 (20:15 +0000)]
Disallow SETOF in the input of parseTypeString(). Formerly it was
silently ignored, allowing one to write bizarre things like
DECLARE x setof int;
in plpgsql. This has misled at least one novice into thinking that
plpgsql variables could be sets ...
Tom Lane [Tue, 14 Dec 2004 22:50:23 +0000 (22:50 +0000)]
In 'make installcheck' for contrib/, insert 'sleep 1' between subdirectory
checks, to ensure the previous test backend has time to quit out of the
regression database. Also, allow all the checks to be run even if one
of them fails. Per suggestions from Andrew Dunstan to improve the
usefulness of buildfarm testing.
Tom Lane [Tue, 14 Dec 2004 22:16:32 +0000 (22:16 +0000)]
Cope with circularities involving a view's ON SELECT rule. I originally
thought there couldn't be any, but the folly of this was exposed by an
example from andrew@supernews.com 5-Dec-2004. The patch applies the
identical logic already used for table constraints and defaults to ON
SELECT rules, so I have reasonable confidence in it even though it might
look like complicated logic.
Tom Lane [Tue, 14 Dec 2004 21:35:20 +0000 (21:35 +0000)]
Fix pg_dump to ensure that a comment on a table CHECK constraint cannot
be emitted too soon. The previous code got this right in the case where
the CHECK was emitted as a separate ALTER TABLE command, but not in the
case where the CHECK is emitted right in CREATE TABLE. Per report from
Slawomir Sudnik.
Note: this code is pretty ugly; it'd perhaps be better to treat comments
as independently sortable dump objects. That'd be much too invasive a
change for RC time though.
Neil Conway [Tue, 14 Dec 2004 01:59:41 +0000 (01:59 +0000)]
Prevent pg_resetxlog from being run as root. If this is allowed, some
root-owned files will be written to the data directory, leaving it in an
unusable state.
Bruce Momjian [Mon, 13 Dec 2004 14:21:32 +0000 (14:21 +0000)]
Add:
>
> * Allow the size of the buffer cache used by temporary objects to be
> specified as a GUC variable
>
> Larger local buffer cache sizes requires more efficient handling of
> local cache lookups.
Tom Lane [Sun, 12 Dec 2004 20:17:06 +0000 (20:17 +0000)]
PREPARE and EXPLAIN need to copy the source query just like we recently
had to do in DECLARE CURSOR. AFAICS these are all the places affected.
PREPARE case per example from Michael Fuhr, EXPLAIN case located by
grepping for planner calls ...
Tom Lane [Sun, 12 Dec 2004 05:07:50 +0000 (05:07 +0000)]
Upgrade formrdesc() so that it can correctly initialize the tupledesc
(rd_att) field of a nailed-in-cache relcache entry. This fixes the bug
reported by Alvaro 8-Dec-2004; I believe it probably also explains
Grant Finnemore's report of 10-Sep-2004.
In an unrelated change in the same file, put back 7.4's response to
failure to rename() the relcache init file, ie, unlink the useless
temp file. I did not put back the warning message, since there might
actually be some reason not to have that.
Tom Lane [Sat, 11 Dec 2004 23:26:51 +0000 (23:26 +0000)]
Instead of supposing (wrongly, in the general case) that the rowtype
of an inheritance child table is binary-compatible with the rowtype of
its parent, invent an expression node type that does the conversion
correctly. Fixes the new bug exhibited by Kris Shannon as well as a
lot of old bugs that would only show up when using multiple inheritance
or after altering the parent table.