Moved configure script from src/ to the top level directory. Moved
configuration helper things into config/ dir. Adjusted some relative paths
in makefiles.
Tom Lane [Tue, 6 Jun 2000 17:44:25 +0000 (17:44 +0000)]
init_fcache was being careless about using SearchSysCacheTuple result
over multiple lookups --- it should use SearchSysCacheTupleCopy instead.
This accounts for rare failures like 'init_fcache: null probin for procedure 481'
when running concurrently with a VACUUM.
Tom Lane [Tue, 6 Jun 2000 16:50:37 +0000 (16:50 +0000)]
typeTypeName() must return a pstrdup'd copy of the type name, not a
direct pointer into the syscache entry for the type. In some cases
the syscache entry might get flushed before we are done using the
returned type name. This bug accounts for difficult-to-repeat
failures seen when INSERTs into columns of certain data types are
run in parallel with VACUUMs of system tables. There may be related
problems elsewhere --- we need to take a harder look at uses of
syscache data.
Peter Mount [Tue, 6 Jun 2000 11:06:09 +0000 (11:06 +0000)]
Added org/postgresql/DriverClass.java to the list of files removed by make clean (it's dynamically built)
Fixed Statement, so that the update count is valid when an SQL DELETE operation is done.
While fixing the update count, made it easier to get the OID of the last insert as well. Example is in example/basic.java
Tom Lane [Mon, 5 Jun 2000 07:29:25 +0000 (07:29 +0000)]
Latest round of fmgr updates. All functions with bool,char, or int2
inputs have been converted to newstyle. This should go a long way towards
fixing our portability problems with platforms where char and short
parameters are passed differently from int-width parameters. Still
more to do for the Alpha port however.
Tom Lane [Mon, 5 Jun 2000 07:16:13 +0000 (07:16 +0000)]
Simplify build/install process for bki and description files. There's
no reason for them to be copied into src/backend rather than being
installed straight from the catalog subdirectory. This also avoids
some peculiar behavior (bugs?) present in at least gmake 3.78.1: it
won't always update the bki files in backend/ even when the ones in
backend/catalog/ are newer.
Tom Lane [Sun, 4 Jun 2000 22:08:53 +0000 (22:08 +0000)]
If user re-DECLAREs an existing cursor name, close the old cursor of
that name and issue a NOTICE to the effect that we did. Previously,
code would try to assign the new cursor declaration to the old portal,
but this didn't work reliably since new parsetree is still sitting in
blank portal and is likely to get clobbered.
Tom Lane [Sun, 4 Jun 2000 20:50:50 +0000 (20:50 +0000)]
Repair bug reported by ldm@apartia.com: Append nodes, which don't
actually use their targetlist, are given a targetlist that is just a
pointer to the first appended plan's targetlist. This is OK, but what
is not OK is that any sub-select expressions in said tlist were being
entered in the subPlan lists of both the Append and the first appended
plan. That led to two startup and two shutdown calls for the same
plan node at exec time, which led to crashes. Fix is to not generate
a list of subPlans for an Append node. Same problem and fix apply
to other node types that don't have a real, functioning targetlist:
Material, Sort, Unique, Hash.
Tom Lane [Fri, 2 Jun 2000 04:04:54 +0000 (04:04 +0000)]
If create/drop database are going to call closeAllVfds(), they ought
to do it at the last moment before calling system() ... not at some
randomly-chosen earlier point in the routine ...
Tom Lane [Fri, 2 Jun 2000 03:58:34 +0000 (03:58 +0000)]
Create an fd.c entry point that is just like plain open(2) except that
it will close VFDs if necessary to surmount ENFILE or EMFILE failures.
Make use of this in md.c, xlog.c, and user.c routines that were
formerly vulnerable to these failures. In particular, this should
handle failures of mdblindwrt() that have been observed under heavy
load conditions. (By golly, every other process on the system may
crash after Postgres eats up all the kernel FDs, but Postgres will
keep going!)
Tom Lane [Fri, 2 Jun 2000 02:00:28 +0000 (02:00 +0000)]
Correct portability problem introduced by yours truly --- I used a
conditional expression x?y:z in an awk program. Seems old versions
of awk don't have that ...
Tom Lane [Wed, 31 May 2000 15:38:53 +0000 (15:38 +0000)]
Tweak recognition of range-clause pairs so that 'var > $1 AND var < $2'
(ie, parameters instead of consts) will be treated as a range query.
We do not know the actual selectivities involved, but it seems like
a good idea to use a smaller estimate than we would use for two unrelated
inequalities.
Peter Eisentraut [Wed, 31 May 2000 00:28:42 +0000 (00:28 +0000)]
The heralded `Grand Unified Configuration scheme' (GUC)
That means you can now set your options in either or all of $PGDATA/configuration,
some postmaster option (--enable-fsync=off), or set a SET command. The list of
options is in backend/utils/misc/guc.c, documentation will be written post haste.
pg_options is gone, so is that pq_geqo config file. Also removed were backend -K,
-Q, and -T options (no longer applicable, although -d0 does the same as -Q).
Tom Lane [Tue, 30 May 2000 04:25:00 +0000 (04:25 +0000)]
Third round of fmgr updates: eliminate calls using fmgr() and
fmgr_faddr() in favor of new-style calls. Lots of cleanup of
sloppy casts to use XXXGetDatum and DatumGetXXX ...
Tom Lane [Mon, 29 May 2000 20:18:30 +0000 (20:18 +0000)]
Tweak fmgrtab generation so that the F_XXX macros that give OIDs for
built-in procedures are named after the prosrc field of pg_proc (ie,
the actual C function name), not the proname field. This did not use
to make a difference back when the two were always the same, but in the
presence of overloaded proname values we'd best try to use the C name
instead. AFAICT this change affects no existing code, but it is
necessary to be able to get at some built-in functions that no macro
was being generated for before.
Tom Lane [Mon, 29 May 2000 19:16:57 +0000 (19:16 +0000)]
Repair problems with overrun of timezone name length. Increase MAXTZLEN
to 10, and be consistent about whether it counts the trailing null (it
does not). Also increase MAXDATELEN to be sure no buffer overflows are
caused by the longer MAXTZLEN.
Tom Lane [Mon, 29 May 2000 05:45:56 +0000 (05:45 +0000)]
Generated header files parse.h and fmgroids.h are now copied into
the src/include tree, so that -I backend is no longer necessary anywhere.
Also, clean up some bit rot in contrib tree.
Tom Lane [Sun, 28 May 2000 20:33:28 +0000 (20:33 +0000)]
Constant-expression simplifier now knows how to simplify strict functions
that have at least one constant-NULL input, even if other inputs are
not constants.
Tom Lane [Sun, 28 May 2000 17:56:29 +0000 (17:56 +0000)]
First round of changes for new fmgr interface. fmgr itself and the
key call sites are changed, but most called functions are still oldstyle.
An exception is that the PL managers are updated (so, for example, NULL
handling now behaves as expected in plperl and plpgsql functions).
NOTE initdb is forced due to added column in pg_proc.
Tom Lane [Sat, 27 May 2000 05:13:38 +0000 (05:13 +0000)]
define YY_NEVER_INTERACTIVE for flex, to persuade flex that it's not
necessary to call isatty() for each and every received query. That's
one less kernel call per query cycle ...
Tom Lane [Fri, 26 May 2000 17:19:15 +0000 (17:19 +0000)]
Reduce eqsel()'s fudge-factor for estimating the frequency of values
other than the most common value in a column. We had had 0.5, make it
0.1 to make it more likely that an indexscan will be chosen. Really
need better statistics instead, but this should stem the bleeding
meanwhile ...