Peter Eisentraut [Wed, 19 Jul 2000 16:30:27 +0000 (16:30 +0000)]
Add distprep target to take some of the job of the release_prep script.
The latter updated accordingly. Also add `dist' and `distcheck' targets
to play with, but caveat packager.
Updated backend/bootstrap and backend/parser makefile to make them
marginally builddir aware and fix the usual set of things.
Add rule to automatically remake config.h dependent on config.h.in and
config.status. (Adopted from Autoconf manual and about every other
package.) On a good day we should now have a complete and accurate set
of dependencies throughout everything.
Jan Wieck [Wed, 19 Jul 2000 11:53:02 +0000 (11:53 +0000)]
Added untrusted PL/TclU (pltclu) language. Executes all procedures
in a non-safe interpreter, so with full OS access! Language is
restricted to be used by DB superusers.
Added "argisnull n" and "return_null" commands to gain full control
over NULL values from new FMGR capabilities.
Tom Lane [Tue, 18 Jul 2000 05:02:19 +0000 (05:02 +0000)]
Add an opr_sanity check for misdefined aggregates that have transition
type different from input type but are expecting ExecAgg to insert the
first non-null input as the starting transition value. This has always
been verboten, but wasn't checked for until now...
Tom Lane [Tue, 18 Jul 2000 04:45:59 +0000 (04:45 +0000)]
Update pltcl regress test's expected output for 7.0 psql output format.
NOTE: this implementation of tcl_avg() fails with 'divide by zero'
for zero input rows. It ought to return NULL, but pltcl does not
currently provide a way to do that, so I'm leaving the problem unsolved
for now.
Peter Eisentraut [Mon, 17 Jul 2000 22:31:59 +0000 (22:31 +0000)]
End users shouldn't have to invoke a separate command to install the
documentation. Therefore it's now installed by default. If there is no
documentation to be found (i.e., you are not using the distribution)
then this step is skipped.
Add --docdir option to configure to control installation directory.
Tom Lane [Mon, 17 Jul 2000 04:35:55 +0000 (04:35 +0000)]
I concur with Andreas: unconditionally including <sys/fcntl.h> is not
portable. Seems to have been added for O_BINARY, which is only needed
for __CYGWIN32__, so include it here only in that case.
Tom Lane [Mon, 17 Jul 2000 03:05:41 +0000 (03:05 +0000)]
Revise aggregate functions per earlier discussions in pghackers.
There's now only one transition value and transition function.
NULL handling in aggregates is a lot cleaner. Also, use Numeric
accumulators instead of integer accumulators for sum/avg on integer
datatypes --- this avoids overflow at the cost of being a little slower.
Implement VARIANCE() and STDDEV() aggregates in the standard backend.
Also, enable new LIKE selectivity estimators by default. Unrelated
change, but as long as I had to force initdb anyway...
Bruce Momjian [Sun, 16 Jul 2000 19:27:29 +0000 (19:27 +0000)]
Hmm. I didn't expect a change since I hadn't added tests for the new
stuff, but fixing the bug that existed in reporting the constraint name
changes the error line. Patch to expected output enclosed.
Peter Eisentraut [Sat, 15 Jul 2000 15:54:52 +0000 (15:54 +0000)]
Rename templates to match names in makefiles/Makefile.* and include/port.
Read templates after compiler is detected. Convert all templates to real
shell scripts. Rename bsd->openbsd, alpha->osf.
Bruce Momjian [Sat, 15 Jul 2000 12:37:14 +0000 (12:37 +0000)]
This should be a slighly more complete patch for commands/command.c
AlterTableAddConstraint. The major changes from the last patch
are that it should hopefully check for references to temp tables
(not in the shadow case, but at defination time) from permanent tables in
foreign keys and refuse them and that it doesn't allow the table(s)
being constrained to be views (because those cases don't currently
work).
Stephan SzaboThis should be a slighly more complete patch for commands/command.c
AlterTableAddConstraint. The major changes from the last patch
are that it should hopefully check for references to temp tables
(not in the shadow case, but at defination time) from permanent tables in
foreign keys and refuse them and that it doesn't allow the table(s)
being constrained to be views (because those cases don't currently
work).
Tom Lane [Fri, 14 Jul 2000 22:18:02 +0000 (22:18 +0000)]
Cleanup of code for creating index entries. Functional indexes with
pass-by-ref data types --- eg, an index on lower(textfield) --- no longer
leak memory during index creation or update. Clean up a lot of redundant
code ... did you know that copy, vacuum, truncate, reindex, extend index,
and bootstrap each basically duplicated the main executor's logic for
extracting information about an index and preparing index entries?
Functional indexes should be a little faster now too, due to removal
of repeated function lookups.
CREATE INDEX 'opt_type' clause is deimplemented by these changes,
but I haven't removed it from the parser yet (need to merge with
Thomas' latest change set first).
Implement nested block comments in the backend and in psql.
Include updates for the comment.sql regression test.
Implement SET SESSION CHARACTERISTICS and SET DefaultXactIsoLevel.
Implement SET SESSION CHARACTERISTICS TRANSACTION COMMIT
and SET AutoCommit in the parser only.
Need to add code to actually do something.
Implement WITHOUT TIME ZONE type qualifier.
Define SCHEMA keyword, along with stubbed-out grammar.
Implement "[IN|INOUT|OUT] [varname] type" function arguments
in parser only; INOUT and OUT throws an elog(ERROR).
Add PATH as a type-specific token, since PATH is in SQL99
to support schema resource search and resolution.
Change order of builds to get parser before commands.
This will ensure building parse.h for commands, though this is also
covered with other build rules.
Add information on SET SESSION CHARACTERISTICS.
Fix references to pg_hba.conf(5) since that is no longer a man page.
Make minor repairs to "Compatibility" subsections.
Update docs for TIME WITHOUT TIME ZONE.
Add information on SET SESSION CHARACTERISTICS.
Fix references to pg_hba.conf(5) since that is no longer a man page.
Tom Lane [Thu, 13 Jul 2000 05:47:29 +0000 (05:47 +0000)]
Planner did the wrong thing with index-scan-backward plans: generated
them, but forgot to attach relevant restriction clauses, so that the
plan represented a scan over the whole table with restrictions applied
as qpquals not indexquals. Another day, another bug...
Peter Eisentraut [Wed, 12 Jul 2000 22:59:15 +0000 (22:59 +0000)]
Remove a bunch of unused configure tests, in particular cases where
* the result is not recorded anywhere
* the result is not used anywhere
* the result is only used in some places, whereas others have been getting away with it
* the result is used improperly
Also make command line options handling a little better (e.g., --disable-locale,
while redundant, should really still *dis*able).
Peter Eisentraut [Wed, 12 Jul 2000 17:38:53 +0000 (17:38 +0000)]
Add assert checking to GUC ("debug_assertions")
Rename settings net_server to tcpip_socket, max_backends to max_connections
Add --help and --version to postmaster, reformat help output
Tom Lane [Wed, 12 Jul 2000 05:15:20 +0000 (05:15 +0000)]
Repair missing MEMORY_CONTEXT_CHECKING logic for realloc().
Doesn't anyone around here run regression tests before submitting
patches, or before committing them?
Tom Lane [Wed, 12 Jul 2000 02:37:39 +0000 (02:37 +0000)]
First stage of reclaiming memory in executor by resetting short-term
memory contexts. Currently, only leaks in expressions executed as
quals or projections are handled. Clean up some old dead cruft in
executor while at it --- unused fields in state nodes, that sort of thing.
this leak is in the current source total invisible, because chunk is 16b and
leak is in the "align space".
For this feature I add data_size to StandardChunk, and all memory which go
from AllocSetAlloc() is marked as 0x7F.
The MemoryContextCheck() is compiled '#ifdef USE_ASSERT_CHECKING'.
I add this checking to 'tcop/postgres.c' and is active after each backend
query, but it is probably not sufficient, because some MemoryContext exist
only during memory processing --- will good if someone who known where
it is needful (Tom:-) add it for others contexts;
A problem in the current source is that we have still some malloc()
allocation that is not needful and this allocation is total invisible for
all context routines. For example Dllist in backend (pretty dirty it is in
catcache where values in Dllist are palloc-ed, but list is malloc-ed).
--- and BTW. this Dllist design stand in the way for query cache :-)
Tom, if you agree I start replace some mallocs.
BTW. --- Tom, have you idea for across transaction presistent allocation for
SQL functions? (like regex - now it is via malloc)
I almost forget. I add one if() to AllocSetAlloc(), for 'size' that are
greater than ALLOC_BIGCHUNK_LIMIT is not needful check AllocSetFreeIndex(),
because 'fidx' is always 'ALLOCSET_NUM_FREELISTS - 1'. It a little brisk up
allocation for very large chunks. Right?
oidvectortypes: use SQL type names and separate by commas
psql \df: use format_type and oidvectortypes
map type REAL to float4, not float8
psql \dd :work around UNION bug
Another round of those unportable config/build changes :-/
* Add option to build with OpenSSL out of the box. Fix thusly exposed
bit rot. Although it compiles now, getting this to do something
useful is left as an exercise.
* Fix Kerberos options to defer checking for required libraries until
all the other libraries are checked for.
* Change default odbcinst.ini and krb5.srvtab path to PREFIX/etc.
* Install work around for Autoconf's install-sh relative path anomaly.
Get rid of old INSTL_*_OPTS variables, now that we don't need them
anymore.
* Use `gunzip -c' instead of g?zcat. Reportedly broke on AIX.
* Look for only one of readline.h or readline/readline.h, not both.
* Make check for PS_STRINGS cacheable. Don't test for the header files
separately.
* Disable fcntl(F_SETLK) test on Linux.
* Substitute the standard GCC warnings set into CFLAGS in configure,
don't add it on in Makefile.global.
* Sweep through contrib tree to teach makefiles standard semantics.
... and in completely unrelated news:
* Make postmaster.opts arbitrary options-aware. I still think we need to
save the environment as well.
Tom Lane [Sat, 8 Jul 2000 03:04:41 +0000 (03:04 +0000)]
Remove long-dead support for invoking queries from dynamically loaded
backend functions via backend PQexec(). The SPI interface has long
been our only documented way to do this, and the backend pqexec/portal
code is unused and suffering bit-rot. I'm putting it out of its misery.
Tom Lane [Fri, 7 Jul 2000 21:12:53 +0000 (21:12 +0000)]
Fix misuse of StrNCpy to copy and add null to non-null-terminated data.
Does not work since it fetches one byte beyond the source data, and when
the phase of the moon is wrong, the source data is smack up against the
end of backend memory and you get SIGSEGV. Don't laugh, this is a fix
for an actual user bug report.
Bruce Momjian [Fri, 7 Jul 2000 01:23:44 +0000 (01:23 +0000)]
|> The Makefile.shlib changes will have to be discussed with other Linux
|> developers so we are sure it will work on all platforms.
The problem with the current settings is that the linker is called
directly. This is wrong, it should always be called through the
compiler
driver (the only exception is `ld -r'). This will make sure that the
necessary libraries like libgcc are linked in.
But there is still a different problem with the setting of LDFLAGS_ODBC.
The psqlodbc module defines the functions _init and _fini which are
reserved for the shared library initialisation. These should be changed
to constructor functions. Then LDFLAGS_ODBC can be changed to be just
`-lm'. Btw, why does it use -Bsymbolic?
Backend makefile cleanup. make maintainer-clean is now completely
functional.
Handle include file installation in src/include/Makefile
genbki.sh improvements: Don't substitute anything by config.status,
instead pass in AWK and CPP through environment. Change calling
convention to support named output files, so we get to see error
messages on stderr.
Rename bootstrap template files and install them into PREFIX/share.
Update initdb to that effect and other readability improvements
in initdb.
Tom Lane [Wed, 5 Jul 2000 23:12:09 +0000 (23:12 +0000)]
Update textin() and textout() to new fmgr style. This is just phase
one of updating the whole text datatype, but there are so dang many
calls of these two routines that it seems worth a separate commit.
Jan Wieck [Wed, 5 Jul 2000 16:17:43 +0000 (16:17 +0000)]
Changed TOAST relations to have relkind RELKIND_TOASTVALUE.
Special handling of TOAST relations during VACUUM. TOAST relations
are vacuumed while the lock on the master table is still active.
The ANALYZE flag doesn't propagate to their vacuuming because the
toaster access routines allways use index access ignoring stats, so
why compute them at all.
Protection of TOAST relations against normal INSERT/UPDATE/DELETE
while offering SELECT for debugging purposes.
Bruce Momjian [Wed, 5 Jul 2000 16:09:31 +0000 (16:09 +0000)]
attached to this mail is a patch from a colleague that makes
PostgreSQL-7.0.2 run on Linux for the Intel-IA64 architecture. It also
fixes a bug in the configure scripts that caused configure to fail on
the fcntl(F_SETLK) test.
This fix triggered a bug in the fcntl(F_SETLK) code of the Linux
kernel when used on unix domain sockets resulting in postmaster to
segfault immediately after startup. There is a fix available and
included in the kernel that will be on SuSE Linux 7.0, but kernels <=
2.2.16 still have this bug.