summaryrefslogtreecommitdiff
path: root/src/include
Commit message (Collapse)AuthorAgeFilesLines
...
* Add int2-vs-int8 comparison operators. These are now necessary becauseTom Lane2000-07-283-3/+57
| | | | | | | the planner may try to generate them as a result of transitivity of the existing int2-vs-int4 and int4-vs-int8 operators. In fact, it is now necessary that mergejoinable cross-datatype operators form closed sets. Add an opr_sanity regress test to detect missing operators.
* Remove <values.h> inclusions, no-longer-needed MAXINT definitions.Tom Lane2000-07-282-9/+3
|
* Fix sloppy macro coding (not enough parentheses).Tom Lane2000-07-281-27/+22
|
* Some pedantic compile syntax errors to fix with the following patchBruce Momjian2000-07-271-2/+2
| | | | | | for today's snapshot Andreas
* Clean up and document btree code for ordering keys. Neat stuff,Tom Lane2000-07-251-13/+14
| | | | | | actually, but who could understand it with no comments? Fix bug while at it: _bt_orderkeys would try to invoke comparisons on NULL inputs, given the right sort of redundant quals.
* Deduce equality constraints that are implied by transitivity ofTom Lane2000-07-242-2/+5
| | | | | | | | mergejoinable qual clauses, and add them to the query quals. For example, WHERE a = b AND b = c will cause us to add AND a = c. This is necessary to ensure that it's safe to use these variables as interchangeable sort keys, which is something 7.0 knows how to do. Should provide a useful improvement in planning ability, too.
* 2nd try for the index tuple toast hack. This time as suggestedJan Wieck2000-07-221-14/+29
| | | | | | by Tom. Jan
* Remove 'Array' node type, which has evidently been dead code forTom Lane2000-07-222-35/+9
| | | | a very long time.
* Arrays are toastable. (At least if you initdb, which I didn't force.)Tom Lane2000-07-222-136/+84
| | | | | | | Remove a bunch of crufty code for large-object-based arrays, which is superseded by TOAST and likely hasn't worked in a long time anyway. Clean up array code a little, and in particular eliminate its habit of scribbling on the input array (ie, modifying the input tuple :-().
* Temporary fix to make TOAST vacuum-safe. All values are forced to beJan Wieck2000-07-211-1/+15
| | | | | | | in memory (plain or compressed) in the tuple returned from the heap-am. So no index will ever contain an external reference. Jan
* Major overhaul of btree index code. Eliminate special BTP_CHAIN logic forTom Lane2000-07-212-79/+80
| | | | | | | | | | | | duplicate keys by letting search go to the left rather than right when an equal key is seen at an upper tree level. Fix poor choice of page split point (leading to insertion failures) that was forced by chaining logic. Don't store leftmost key in non-leaf pages, since it's not necessary. Don't create root page until something is first stored in the index, so an unused index is now 8K not 16K. (Doesn't seem to be as easy to get rid of the metadata page, unfortunately.) Massive cleanup of unreadable code, fix poor, obsolete, and just plain wrong documentation and comments. See src/backend/access/nbtree/README for the gory details.
* Add distprep target to take some of the job of the release_prep script.Peter Eisentraut2000-07-191-2/+2
| | | | | | | | | | | | | 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.
* 'const' decorations are fine, but not when they're inserted withoutTom Lane2000-07-181-2/+2
| | | | bothering to clean up the resulting warnings ...
* I concur with Andreas: unconditionally including <sys/fcntl.h> is notTom Lane2000-07-171-2/+2
| | | | | portable. Seems to have been added for O_BINARY, which is only needed for __CYGWIN32__, so include it here only in that case.
* Revise aggregate functions per earlier discussions in pghackers.Tom Lane2000-07-1711-150/+227
| | | | | | | | | | | 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...
* Rename templates to match names in makefiles/Makefile.* and include/port.Peter Eisentraut2000-07-152-0/+0
| | | | | Read templates after compiler is detected. Convert all templates to real shell scripts. Rename bsd->openbsd, alpha->osf.
* Remove useless and dangerous 'opt_type' option from CREATE INDEX.Tom Lane2000-07-151-9/+12
|
* Cleanup of code for creating index entries. Functional indexes withTom Lane2000-07-1412-127/+66
| | | | | | | | | | | | | 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).
* Remove references to symbols that no longer get definedPeter Eisentraut2000-07-141-8/+5
|
* Implement nested block comments in the backend and in psql.Thomas G. Lockhart2000-07-142-2/+13
| | | | | | | | | | | | | | 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.
* Remove a bunch of unused configure tests, in particular cases wherePeter Eisentraut2000-07-123-40/+6
| | | | | | | | | | * 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).
* Add assert checking to GUC ("debug_assertions")Peter Eisentraut2000-07-121-2/+2
| | | | | Rename settings net_server to tcpip_socket, max_backends to max_connections Add --help and --version to postmaster, reformat help output
* First stage of reclaiming memory in executor by resetting short-termTom Lane2000-07-1211-270/+169
| | | | | | 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.
* Here is the patch with memory leak checker. This checker allow detectBruce Momjian2000-07-113-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in-chunk leaks, overwrite-next-chunk leaks and overwrite block-freeptr leaks. A in-chunk leak --- if something overwrite space after wanted (via palloc() size, but it is still inside chunk. For example x = palloc(12); /* create 16b chunk */ memset(x, '#', 13); 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? Karel
* oidvectortypes: use SQL type names and separate by commasPeter Eisentraut2000-07-091-3/+3
| | | | | | 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 :-/Peter Eisentraut2000-07-092-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Remove long-dead support for invoking queries from dynamically loadedTom Lane2000-07-084-208/+16
| | | | | | 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.
* Fix misuse of StrNCpy to copy and add null to non-null-terminated data.Tom Lane2000-07-071-6/+14
| | | | | | | 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.
* - format_type function, in use by psqlPeter Eisentraut2000-07-074-20/+30
| | | | | - added bigint as synonym of int8 - set typelem of varlen non-array types to 0
* Rename cash_words_out to cash_words.Bruce Momjian2000-07-072-3/+3
|
* Backend makefile cleanup. make maintainer-clean is now completelyPeter Eisentraut2000-07-062-7/+56
| | | | | | | | | | | | | | | 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.
* Functions on 'text' type updated to new fmgr style. 'text' isTom Lane2000-07-067-160/+169
| | | | now TOAST-able.
* Update textin() and textout() to new fmgr style. This is just phaseTom Lane2000-07-052-6/+6
| | | | | 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.
* add check for libz compression library for pg_dumpMarc G. Fournier2000-07-051-1/+4
|
* attached to this mail is a patch from a colleague that makesBruce Momjian2000-07-052-2/+25
| | | | | | | | | | | | | | 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. Reinhard Max
* Bugfix in ALTER TABLE CREATE TOAST TABLEJan Wieck2000-07-051-2/+3
| | | | | | | Automatically create toast table at CREATE TABLE if new table has toastable attributes. Jan
* Expand secondary password file feature, so that you can use thesePeter Eisentraut2000-07-042-2/+2
| | | | | | files to restrict the set of users that can connect to a database but can still use the pg_shadow password. (You just leave off the password field in the secondary file.)
* Make toast-table creation and deletion work somewhat reliably.Tom Lane2000-07-044-12/+15
| | | | | | | Don't go through pg_exec_query_dest(), but directly to the execution routines. Also, extend parameter lists so that there's no need to change the global setting of allowSystemTableMods, a hack that was certain to cause trouble in the event of any error.
* miscVadim B. Mikheev2000-07-044-10/+26
|
* tuptoaster.h should surely not #include postgres.h.Tom Lane2000-07-041-2/+1
|
* TOAST changes to catalogJan Wieck2000-07-031-2/+2
| | | | Jan
* TOASTJan Wieck2000-07-037-190/+230
| | | | | | | | WARNING: This is actually broken - we have self-deadlocks due to concurrent changes in buffer management. Vadim and me are working on it. Jan
* Move PGPORT envar handling to ResetAllOptions(). Improve long optionsPeter Eisentraut2000-07-031-2/+2
| | | | | parsing to not clobber the optarg string -- so that we can bring SetOptsFile() up to speed.
* heap' loggingVadim B. Mikheev2000-07-034-9/+21
|
* Attached is a new patch which addresses this problem. (oids inBruce Momjian2000-07-023-34/+51
| | | | | | regression tests). Chris Bitmead
* Version number now set in configure, available through Makefile.globalPeter Eisentraut2000-07-023-27/+10
| | | | | | | | | | and config.h. Adjusted all referring code. Scrapped pg_version and changed initdb accordingly. Integrated src/utils/version.c into src/backend/utils/init/miscinit.c. Changed all callers. Set version number to `7.1devel'. (Non-numeric version suffixes now allowed.)
* Fixes for Solaris/cc suggested by <pgsql-hackers@thewrittenword.com>Peter Eisentraut2000-06-301-111/+70
| | | | | | | | Don't use DISABLE_COMPLEX_MACRO on Solaris. Don't define the replacement function in the header file. Use -KPIC, not -K PIC. Use CC to link C++ libraries, not ld/ar. Eliminate file not found warnings in tcl build code.
* Use a private memory context to store rule information in each relcacheTom Lane2000-06-303-13/+8
| | | | | | | | | | | | | | entry that has rules. This allows us to release the rule parsetrees on relcache flush without needing a working freeObject() routine. Formerly, the rule trees were leaked permanently at relcache flush. Also, clean up handling of rule creation and deletion --- there was not sufficient locking of the relation being modified, and there was no reliable notification of other backends that a relcache reload was needed. Also, clean up relcache.c code so that scans of system tables needed to load a relcache entry are done in the caller's memory context, not in CacheMemoryContext. This prevents any un-pfreed memory from those scans from becoming a permanent memory leak.
* Rearrange config.h entries into a more sensible order, and add someTom Lane2000-06-291-108/+152
| | | | | | | documentation. Let's try to keep this file a bit neater in future, hmm? Also (to get back to the original point) update info about FUNC_MAX_ARGS, and add additional config symbols for debugging new memory management changes.
* First phase of memory management rewrite (see backend/utils/mmgr/READMETom Lane2000-06-2821-579/+239
| | | | | | | | | | | | | for details). It doesn't really do that much yet, since there are no short-term memory contexts in the executor, but the infrastructure is in place and long-term contexts are handled reasonably. A few long- standing bugs have been fixed, such as 'VACUUM; anything' in a single query string crashing. Also, out-of-memory is now considered a recoverable ERROR, not FATAL. Eliminate a large amount of crufty, now-dead code in and around memory management. Fix problem with holding off SIGTRAP, SIGSEGV, etc in postmaster and backend startup.