users/simon/postgres.git
16 years agoDo not set connection values if no connection is open.
Michael Meskes [Thu, 3 Sep 2009 09:09:01 +0000 (09:09 +0000)]
Do not set connection values if no connection is open.

16 years agoUpdate time zone data files to tzdata release 2009l: DST law changes in
Tom Lane [Thu, 3 Sep 2009 04:44:35 +0000 (04:44 +0000)]
Update time zone data files to tzdata release 2009l: DST law changes in
Egypt, Mauritius, Bangladesh.

16 years agoRemove initdb's rather gratuitous check to see if the backend created a
Tom Lane [Thu, 3 Sep 2009 01:40:11 +0000 (01:40 +0000)]
Remove initdb's rather gratuitous check to see if the backend created a
flat password file, because it never will anymore.  We had managed to
miss this during the recent flat-file-ectomy because it only happens if
--pwfile or --pwprompt is specified to initdb.  Apparently, few hackers
use those.  Reported by Erik Rijkers.

16 years agoRevert Makefile modification that broke the MSVC build.
Magnus Hagander [Wed, 2 Sep 2009 19:14:14 +0000 (19:14 +0000)]
Revert Makefile modification that broke the MSVC build.

16 years agoFix subquery pullup to wrap a PlaceHolderVar around the entire RowExpr
Tom Lane [Wed, 2 Sep 2009 17:52:24 +0000 (17:52 +0000)]
Fix subquery pullup to wrap a PlaceHolderVar around the entire RowExpr
that's generated for a whole-row Var referencing the subquery, when the
subquery is in the nullable side of an outer join.  The previous coding
instead put PlaceHolderVars around the elements of the RowExpr.  The effect
was that when the outer join made the subquery outputs go to null, the
whole-row Var produced ROW(NULL,NULL,...) rather than just NULL.  There
are arguments afoot about whether those things ought to be semantically
indistinguishable, but for the moment they are not entirely so, and the
planner needs to take care that its machinations preserve the difference.
Per bug #5025.

Making this feasible required refactoring ResolveNew() to allow more caller
control over what is substituted for a Var.  I chose to make ResolveNew()
a wrapper around a new general-purpose function replace_rte_variables().
I also fixed the ancient bogosity that ResolveNew might fail to set
a query's hasSubLinks field after inserting a SubLink in it.  Although
all current callers make sure that happens anyway, we've had bugs of that
sort before, and it seemed like a good time to install a proper solution.

Back-patch to 8.4.  The problem can be demonstrated clear back to 8.0,
but the fix would be too invasive in earlier branches; not to mention
that people may be depending on the subtly-incorrect behavior.  The
8.4 series is new enough that fixing this probably won't cause complaints,
but it might in older branches.  Also, 8.4 shows the incorrect behavior
in more cases than older branches do, because it is able to flatten
subqueries in more cases.

16 years agoFix pg_ctl's readfile() to not go into infinite loop on an empty file
Tom Lane [Wed, 2 Sep 2009 02:40:52 +0000 (02:40 +0000)]
Fix pg_ctl's readfile() to not go into infinite loop on an empty file
(could happen if either postgresql.conf or postmaster.opts is empty).
It's been broken since the C version was written for 8.0, so patch
all the way back.

initdb's copy of the function is broken in the same way, but it's
less important there since the input files should never be empty.
Patch that in HEAD only, and also fix some cosmetic differences that
crept into that copy of the function.

Per report from Corry Haines and Jeff Davis.

16 years agoForce VACUUM to recalculate oldestXmin even when we haven't changed our