Tom Lane [Sun, 12 Nov 2000 20:51:52 +0000 (20:51 +0000)]
Keep track of the last active slot in the shared ProcState array, so
that search loops only have to scan that far and not through all maxBackends
entries. This eliminates a performance penalty for setting maxBackends
much higher than the average number of active backends. Also, eliminate
no-longer-used 'backend tag' concept. Remove setting of environment
variables at backend start (except for CYR_RECODE), since none of them
are being examined by the backend any longer.
Tom Lane [Sun, 12 Nov 2000 00:37:02 +0000 (00:37 +0000)]
Restructure handling of inheritance queries so that they work with outer
joins, and clean things up a good deal at the same time. Append plan node
no longer hacks on rangetable at runtime --- instead, all child tables are
given their own RT entries during planning. Concept of multiple target
tables pushed up into execMain, replacing bug-prone implementation within
nodeAppend. Planner now supports generating Append plans for inheritance
sets either at the top of the plan (the old way) or at the bottom. Expanding
at the bottom is appropriate for tables used as sources, since they may
appear inside an outer join; but we must still expand at the top when the
target of an UPDATE or DELETE is an inheritance set, because we actually need
a different targetlist and junkfilter for each target table in that case.
Fortunately a target table can't be inside an outer join... Bizarre mutual
recursion between union_planner and prepunion.c is gone --- in fact,
union_planner doesn't really have much to do with union queries anymore,
so I renamed it grouping_planner.
Allow interpretation of INTERVALs with more timezone-like syntax.
Define conversions to and from text for date, time, and timetz.
Have millisecond and microsecond return full # of seconds in those units.
Previously, only returned full fractional part in those units.
Fix bug in recent improvement to type resolution code. Forgot to retain
"best choice" type category when resolving UNKNOWN function and operator
arguments. Thanks to Tom Lane for finding test case.
Bruce Momjian [Fri, 10 Nov 2000 22:06:26 +0000 (22:06 +0000)]
the bug was not fixed in the snapshot of November 5th. Also the enterprise
edition of the driver did not compile. I have fixed both issues again. I have
attached the modified files to this email, maybe you can check them into the
repository. (Fixes are marked with //FIXME). Enterprise edition driver now
compiles and seems to work.
Tom Lane [Fri, 10 Nov 2000 20:13:27 +0000 (20:13 +0000)]
Adjust INET/CIDR display conventions and reimplement some INET/CIDR
functions, per recent discussions on pghackers. For now, I have called
the verbose-display formatting function text(), but will reconsider if
enough people object.
initdb forced.
Hiroshi Inoue [Fri, 10 Nov 2000 09:38:21 +0000 (09:38 +0000)]
Use SearchSysCacheTupleCopy() instead of SearchSysCacheTuple() in
order to continue to access the tuple more than now.
This would resolve a segmentation fault error.
Tom Lane [Fri, 10 Nov 2000 00:33:12 +0000 (00:33 +0000)]
Clean up syscache so that recursive invocation is safe, and remove error
message about recursive use of a syscache. Also remove most of the
specialized indexscan routines in indexing.c --- it turns out that
catcache.c is perfectly able to perform the indexscan for itself,
in fact has already looked up all the information needed to do so!
This should be faster as well as needing far less boilerplate code.
Tom Lane [Thu, 9 Nov 2000 18:12:53 +0000 (18:12 +0000)]
ExecEndAppend() neglected to close indices on appended result rels,
and improperly prevented the main result rel from being closed if it
wasn't one of the Append's own result rels. Per report from Hiroshi.
Tom Lane [Wed, 8 Nov 2000 22:10:03 +0000 (22:10 +0000)]
Make DROP TABLE rollback-able: postpone physical file delete until commit.
(WAL logging for this is not done yet, however.) Clean up a number of really
crufty things that are no longer needed now that DROP behaves nicely. Make
temp table mapper do the right things when drop or rename affecting a temp
table is rolled back. Also, remove "relation modified while in use" error
check, in favor of locking tables at first reference and holding that lock
throughout the statement.
Enable fallback to string type when argument(s) are of UNKNOWN type.
Same code exactly as for function resolution.
An obvious example is for
select '1' = '01';
which used to throw an error and which now resolves to two text strings.
Add -V option to backend, to show version, since --version doesn't seem
to work everywhere. Also, on FreeBSD you need to set the optreset variable
to 1 before parsing the command line a second time with getopt().
Bruce Momjian [Mon, 6 Nov 2000 17:07:43 +0000 (17:07 +0000)]
Makefile.ports (copied from makefiles/Makefile.aix) is included before
the default target in GNUmakefile is reached. This patch calls that
default target.
Add tests for more INTERVAL syntax.
Add more tests for JOIN syntax.
All tests pass on my Linux box (except for the usual couple of lines
for geometry).
Fix INTERVAL output when year/month has different sign as day/hour etc.
Previously, all fields were unsigned, with only a trailing "ago" to
indicate negative intervals. Now, ISO format does not use "ago", and
and the traditional PostgreSQL format has the first numeric field unsigned
with "ago" supporting that field. So "1 month - 2 days ago" is two days
less than a month in the past.
Fix interval arithmetic across daylight savings time boundaries.
Previously, most math across boundaries introduced a one hour offset.
Allow some date/time functions to return NULL if called with NULL args.
Implement functions for AT TIME ZONE support.
Support "SAT" as an Australian time zone if USE_AUSTRALIAN_RULES
is defined.
Allow type resolution for UNKNOWN arguments to functions to fall back to
any available string type. Previously, all candidate choices must have
fallen within the same "type category" for PostgreSQL to be willing to
choose any of them.
Need to apply the same fixup to operator type resolution.
Add some configure checks for DocBook and related tools. With a somewhat
standard installation layout it should be possible to build the HTML
and print documentation without additional manual setup.
Tom Lane [Sun, 5 Nov 2000 01:42:07 +0000 (01:42 +0000)]
UNION select in a CREATE RULE caused a weird error, because transformRuleStmt
got confused by 'dummy' targetlist built for the UNION's toplevel query.
Fix by making dummy targetlist a little less cheesy.
Tom Lane [Sun, 5 Nov 2000 00:15:54 +0000 (00:15 +0000)]
Allow ORDER BY, LIMIT in sub-selects. Fix most (not all) cases where
the grammar did not allow redundant parentheses around sub-selects.
Distinguish LIMIT ALL from LIMIT 0; make the latter behave as one would
expect.
Remove .SECONDARY: target again, because GNU make 3.78.1 will get mighty
confused in src/interfaces/libpq for some reason. Seemingly, different
GNU make versions have several mutually conflicting problems with implicit
rule chains. Words are not sufficient...
Separate CFLAGS_SL and CXXFLAGS_SL, to allow building with C and C++
compilers from different providers. (Especially important since the
C++ compiler that goes with your favourite C compiler might not work.)
Add global .SECONDARY: target to not allow make to delete intermediate
target files in implicit rule chains. That might have been a cool idea
but it seems to be too buggy to work, as it caused spurious recompiles in
several places.
Tom Lane [Fri, 3 Nov 2000 19:01:36 +0000 (19:01 +0000)]
Fix bug reported by bobson: aclinsert3 would delete the 'world' entry
from an ACL list if it had no permissions remaining, which confused
aclcheck terribly. Also clean up code a little.
Add configure check to see whether <string.h> and <strings.h> may both be
included, and then include <strings.h> if so. Several systems already
needed <strings.h> anyway. Some new systems that claim to conform to the
Unix 9x "standard" do not declare str[n]casemp() in string.h, and C99
compilers will not like that.