Bruce Momjian [Wed, 9 May 2001 13:27:15 +0000 (13:27 +0000)]
If it's true that the ALTER TABLE x ADD CONSTRAINT x CHECK (x) syntax is
supported in 7.1.1, here is a patch to that alter_table.sgml that documents
it.
Tom Lane [Wed, 9 May 2001 00:35:09 +0000 (00:35 +0000)]
Cause planner to make use of average-column-width statistic that is now
collected by ANALYZE. Also, add some modest amount of intelligence to
guesses that are used for varlena columns in the absence of any ANALYZE
statistics. The 'width' reported by EXPLAIN is finally something less
than totally bogus for varlena columns ... and, in consequence, hashjoin
estimating should be a little better ...
Tom Lane [Tue, 8 May 2001 19:47:02 +0000 (19:47 +0000)]
Append and SubqueryScan nodes were not passing changed-parameter signals down
to their children, leading to misbehavior if they had any children that paid
attention to chgParam (most plan node types don't). Append's bug has been
there a long time, but nobody had noticed because it used to be difficult
to create a query where an Append would be used below the top level of a
plan; so there were never any parameters getting passed down. SubqueryScan
is new in 7.1 ... and I'd modeled its behavior on Append :-(
Need to factor out strdup.o for separate treatment since it's in a
different directory. This makes dependency tracking work and copes with
compilers that don't suport -c and -o together.
Bruce Momjian [Tue, 8 May 2001 17:51:30 +0000 (17:51 +0000)]
drop_function.sgml:
===================
In Notes:
Refer to CREATE FUNCTION for information on creating aggregate functions.
^^^^^^^^^^^^^^^^^^^
I assume it must read C function instead.
In Compatibility SQL/PSM:
SQL/PSM is a proposed standard.
We had that before: remove proposed.
drop_index.sgml:
================
<REFNAME>: Removes existing indexes from a database
as far as I can see index should be singular. The command description is
written as if only one index can be removed at a time. Interestingly
enough, in v7.0.2 it was in fact singular. Am I mistaken here?
drop_operator.sgml:
===================
In Outputs the arguments are referred to as type and type2, but the synopsis
and Inputs section these are left_type and right_type, respectively. Also,
oper is used in Outputs versus id in Inputs/Synopsis. In the translation I
follow the replaceables used in the Inputs/Synopsis part.
Bruce Momjian [Tue, 8 May 2001 17:35:57 +0000 (17:35 +0000)]
drop_function.sgml:
===================
In Notes:
Refer to CREATE FUNCTION for information on creating aggregate functions.
^^^^^^^^^^^^^^^^^^^
I assume it must read C function instead.
Tom Lane [Tue, 8 May 2001 01:00:53 +0000 (01:00 +0000)]
Un-break exec_move_row() for case that a NULL tuple and tupdesc are
passed, which occurs when no rows are retrieved by a SELECT.
Mea maxima culpa ... I should have caught this.
Bruce Momjian [Mon, 7 May 2001 17:20:19 +0000 (17:20 +0000)]
> Occasionally and without warning I get this from my daily vacuum
> cronjob:
> NOTICE: RegisterSharedInvalid: SI buffer overflow
> NOTICE: InvalidateSharedInvalid: cache state reset
> I don't understand what these mean. Should I be concerned about them
> and what do they signify?
No real need to worry. Those should've been downgraded to DEBUG-level
messages a release or two back, but nobody bothered...
Tom Lane [Mon, 7 May 2001 00:43:27 +0000 (00:43 +0000)]
Rewrite of planner statistics-gathering code. ANALYZE is now available as
a separate statement (though it can still be invoked as part of VACUUM, too).
pg_statistic redesigned to be more flexible about what statistics are
stored. ANALYZE now collects a list of several of the most common values,
not just one, plus a histogram (not just the min and max values). Random
sampling is used to make the process reasonably fast even on very large
tables. The number of values and histogram bins collected is now
user-settable via an ALTER TABLE command.
There is more still to do; the new stats are not being used everywhere
they could be in the planner. But the remaining changes for this project
should be localized, and the behavior is already better than before.
A not-very-related change is that sorting now makes use of btree comparison
routines if it can find one, rather than invoking '<' twice.
Tom Lane [Fri, 4 May 2001 18:39:16 +0000 (18:39 +0000)]
Seems like we should not hold off cancel/die interrupts while we are
running deferred triggers. They are really part of the regular
transaction, and they could take awhile.
Tom Lane [Thu, 3 May 2001 22:53:07 +0000 (22:53 +0000)]
Consolidate several near-identical uses of mktime() into a single
routine DetermineLocalTimeZone(). In that routine, be more wary of
broken mktime() implementations than the original code was: don't allow
mktime to change the already-set y/m/d/h/m/s information, and don't
use tm_gmtoff if mktime failed. Possibly this will resolve some of
the complaints we've been hearing from users of Middle Eastern timezones
on RedHat.
Bruce Momjian [Thu, 3 May 2001 21:38:45 +0000 (21:38 +0000)]
BTW it does not add encodign it just patches existing one (KOI8) to
support two - KOI8-R and KOI8-U (latter is superset of the former if
not to take to the account pseudographics)
Tom Lane [Thu, 3 May 2001 19:00:37 +0000 (19:00 +0000)]
Ensure that btree sort ordering functions and boolean comparison operators
give consistent results for all datatypes. Types float4, float8, and
numeric were broken for NaN values; abstime, timestamp, and interval
were broken for INVALID values; timetz was just plain broken (some
possible pairs of values were neither < nor = nor >). Also clean up
text, bpchar, varchar, and bit/varbit to eliminate duplicate code and
thereby reduce the probability of similar inconsistencies arising in
the future.
Allow a string argument to the EXTRACT() function.
This is an extension to the SQL9x standard, but is consistant with usage
of the underlying date_part() function used to implement it.
Example: EXTRACT('YEAR',...)
No impact on regression tests.
Tom Lane [Mon, 30 Apr 2001 20:05:40 +0000 (20:05 +0000)]
exec_move_row() should be more forgiving of tuples with a different
number of columns than it was expecting, for reasons that are now
documented in the code...
Tom Lane [Mon, 30 Apr 2001 19:24:47 +0000 (19:24 +0000)]
Suppress pull-up of subqueries that are in the nullable side of an outer
join. This is needed to avoid improper evaluation of expressions that
should be nulled out, as in Victor Wagner's bug report of 4/27/01.
Pretty ugly solution, but no time to do anything better for 7.1.1.
Bruce Momjian [Sat, 28 Apr 2001 13:59:07 +0000 (13:59 +0000)]
In create_function there is a remark concerning SQL/PSM not
being ratified as yet. This is certainly no longer true, it wasn't
even true in Q2/1998 when I did a little research for Date's book.
SQL/PSM had been published on 1996-12-15 as ISO/IEC 9075:4. So you
might want to update that section.
Tom Lane [Wed, 25 Apr 2001 22:04:37 +0000 (22:04 +0000)]
Tweak nestloop costing to weight restart cost of inner path more heavily.
Without this, it was making some pretty silly decisions about whether an
expensive sub-SELECT should be the inner or outer side of a join...