Tom Lane [Fri, 30 May 2003 20:23:10 +0000 (20:23 +0000)]
Small performance improvement for hash joins and hash aggregation:
when the plan is ReScanned, we don't have to rebuild the hash table
if there is no parameter change for its child node. This idea has
been used for a long time in Sort and Material nodes, but was not in
the hash code till now.
Tom Lane [Thu, 29 May 2003 22:30:02 +0000 (22:30 +0000)]
Ensure that in all flex lexers that are part of the backend, a
yy_fatal_error() call results in elog(ERROR) not exit(). This was
already fixed in the main lexer and plpgsql, but extend same technique
to all the other dot-l files. Also, on review of the possible calls
to yy_fatal_error(), it seems safe to use elog(ERROR) not elog(FATAL).
Tom Lane [Thu, 29 May 2003 20:40:36 +0000 (20:40 +0000)]
Adopt latest bison's spelling of 'syntax error' rather than 'parse error'
for grammar-detected problems. Revert Makefile hack that kept it looking
like the pre-bison-1.875 output.
Tom Lane [Thu, 29 May 2003 19:15:34 +0000 (19:15 +0000)]
Don't explicitly close() the session socket during backend exit; instead
leave it for the kernel to do after the process dies. This allows clients
to wait for the backend to exit if they wish (after sending X message,
wait till EOF is detected on the socket).
Barry Lind [Thu, 29 May 2003 03:21:32 +0000 (03:21 +0000)]
Initial attempt to integrate in V3 protocol support. This is still a work in
progress, although all RTs pass using the V3 protocol on a 7.4 database and also pass using the V2 protocol on a 7.3 database.
SSL support is known not to work.
Tom Lane [Wed, 28 May 2003 22:32:50 +0000 (22:32 +0000)]
Fix some planner performance problems with large WHERE clauses, by
introducing new 'FastList' list-construction subroutines to use in
hot spots. This avoids the O(N^2) behavior of repeated lappend's
by keeping a tail pointer, while not changing behavior by reversing
list order as the lcons() method would do.
Tom Lane [Wed, 28 May 2003 18:19:09 +0000 (18:19 +0000)]
Fix things so that an error occuring during standalone-backend processing
in initdb will result in exit(1), allowing the initdb script to realize
that there's something wrong.
Tom Lane [Wed, 28 May 2003 17:25:02 +0000 (17:25 +0000)]
In bootstrap and standalone-backend modes, do not sort LOG elevel out
of order; the 'server log' output is actually client output in these
scenarios and we ought to treat elevels the same way as in the client
case. This allows initdb to not send backend stderr to /dev/null anymore,
which makes it much more likely that people will notice problems during
initdb.
Tom Lane [Wed, 28 May 2003 16:04:02 +0000 (16:04 +0000)]
Replace functional-index facility with expressional indexes. Any column
of an index can now be a computed expression instead of a simple variable.
Restrictions on expressions are the same as for predicates (only immutable
functions, no sub-selects). This fixes problems recently introduced with
inlining SQL functions, because the inlining transformation is applied to
both expression trees so the planner can still match them up. Along the
way, improve efficiency of handling index predicates (both predicates and
index expressions are now cached by the relcache) and fix 7.3 oversight
that didn't record dependencies of predicate expressions.
Bruce Momjian [Tue, 27 May 2003 17:49:47 +0000 (17:49 +0000)]
Make debug_ GUC varables output DEBUG1 rather than LOG, and mention in
docs that CLIENT/LOG_MIN_MESSAGES now controls debug_* output location.
Doc changes included.
Tom Lane [Mon, 26 May 2003 17:51:38 +0000 (17:51 +0000)]
Make sure printtup() always sends the number of columns previously
advertised in RowDescription message. Depending on the physical tuple's
column count is not really correct, since according to heap_getattr()
conventions the tuple may be short some columns, which will automatically
get read as nulls. Problem has been latent since forever, but was only
exposed by recent change to skip a projection step in SELECT * FROM...
Tom Lane [Mon, 26 May 2003 00:11:29 +0000 (00:11 +0000)]
Cause CHAR(n) to TEXT or VARCHAR conversion to automatically strip trailing
blanks, in hopes of reducing the surprise factor for newbies. Remove
redundant operators for VARCHAR (it depends wholly on TEXT operations now).
Clean up resolution of ambiguous operators/functions to avoid surprising
choices for domains: domains are treated as equivalent to their base types
and binary-coercibility is no longer considered a preference item when
choosing among multiple operators/functions. IsBinaryCoercible now correctly
reflects the notion that you need *only* relabel the type to get from type
A to type B: that is, a domain is binary-coercible to its base type, but
not vice versa. Various marginal cleanup, including merging the essentially
duplicate resolution code in parse_func.c and parse_oper.c. Improve opr_sanity
regression test to understand about binary compatibility (using pg_cast),
and fix a couple of small errors in the catalogs revealed thereby.
Restructure "special operator" handling to fetch operators via index opclasses
rather than hardwiring assumptions about names (cleans up the pattern_ops
stuff a little).
Bruce Momjian [Sun, 25 May 2003 04:44:41 +0000 (04:44 +0000)]
Move item:
< * Update clients to use data types, typmod, schema.table.column names of
< result sets using new query protocol 453a452,453
> o Update clients to use data types, typmod, schema.table.column names of
> result sets using new query protocol
Tom Lane [Fri, 23 May 2003 22:33:23 +0000 (22:33 +0000)]
Improve implementation of btrim/ltrim/rtrim: provide a special case for
single-byte encodings, and a direct C implementation of the single-argument
forms (where spaces are always what gets trimmed). This is in preparation
for using rtrim1() as the bpchar-to-text cast operator, but is a useful
performance improvement even if we decide not to do that.
Tom Lane [Thu, 22 May 2003 16:39:30 +0000 (16:39 +0000)]
Adjust configure so that extern tzname[] will be checked for
independently of whether the struct tm tm_zone member exists.
Also run autoheader, which seems not to have been done lately;
it added about three more things to pg_config.h.in than I was expecting...
Tom Lane [Thu, 22 May 2003 14:39:28 +0000 (14:39 +0000)]
Repair sometimes-incorrect computation of StartUpID after a crash, per
example from Rao Kumar. This is a very corner corner-case, requiring
a minimum of three closely-spaced database crashes and an unlucky
positioning of the second recovery's checkpoint record before you'd notice
any problem. But the consequences are dire enough that it's a must-fix.
Tom Lane [Sun, 18 May 2003 01:06:26 +0000 (01:06 +0000)]
Add code to test for unknown timezone names (following some ideas from
Ross Reedstrom, a couple months back) and to detect timezones that are
using leap-second timekeeping. The unknown-zone-name test is pretty
heuristic and ugly, but it seems better than the old behavior of just
switching to GMT given a bad name. Also make DecodePosixTimezone() a
tad more robust.
Tom Lane [Thu, 15 May 2003 23:39:27 +0000 (23:39 +0000)]
Revert change of inclusion order for pg_config_os.h; this broke plperl
on Linux and would have who knows what unpleasant effects on other platforms.
If you need another include file for Windows, then add it; don't go
messing with the semantics of every other port's include files.