summaryrefslogtreecommitdiff
path: root/src/backend/access/nbtree/nbtutils.c
AgeCommit message (Collapse)Author
2001-03-22pgindent run. Make it all clean.Bruce Momjian
2001-01-24Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian
2000-11-21Put external declarations into header files.Peter Eisentraut
2000-07-25Clean up and document btree code for ordering keys. Neat stuff,Tom Lane
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.
2000-07-21Fix sloppiness about alignment requirements in findsplitloc() spaceTom Lane
calculation, also make it stop when it has a 'good enough' split instead of exhaustively trying all split points.
2000-07-21Major overhaul of btree index code. Eliminate special BTP_CHAIN logic forTom Lane
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.
2000-05-30Third round of fmgr updates: eliminate calls using fmgr() andTom Lane
fmgr_faddr() in favor of new-style calls. Lots of cleanup of sloppy casts to use XXXGetDatum and DatumGetXXX ...
2000-04-12Ye-old pgindent run. Same 4-space tabs.Bruce Momjian
2000-02-18Replace inefficient _bt_invokestrat calls with direct calls to theTom Lane
appropriate btree three-way comparison routine. Not clear why the three-way comparison routines were being used in some paths and not others in btree --- incomplete changes by someone long ago, maybe? Anyway, this makes for a nice speedup in CREATE INDEX.
2000-01-26Add:Bruce Momjian
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
1999-09-27Currently,only the first column of multi-column indicesBruce Momjian
is used to find start scan position of Indexscan-s. To speed up finding scan start position,I have changed _bt_first() to use as many keys as possible. I'll attach the patch here. Regards. Hiroshi Inoue
1999-07-17 Move some system includes into c.h, and remove duplicates.Bruce Momjian
1999-07-16Final cleanup.Bruce Momjian
1999-07-15Remove unused #includes in *.c files.Bruce Momjian
1999-07-15Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian
1999-07-14Cleanup of /include #include's, for 6.6 only.Bruce Momjian
1999-05-25Get rid of page-level locking in btree-s.Vadim B. Mikheev
LockBuffer is used to acquire read/write access to index pages. Pages are released before leaving index internals.
1999-04-13There are some bugs about backward scanning usingBruce Momjian
indexes. 1. Index Scan using plural indexids never scan backward as to the order of indexids. 2. The cursor using Index scan is not usable after moving past the end. This patch solves above bugs. Moreover the change of _bt_first() would be useful to extend ORDER BY patch by Jan Wieck for all descending order cases. Hiroshi Inoue
1999-02-13Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian
1999-02-03Cleanup of source files where 'return' or 'var =' is alone on a line.Bruce Momjian
1998-09-07Alignment cleanup so no more massive switch statements for alignment,Bruce Momjian
just two macros.
1998-09-01Renaming cleanup, no pgindent yet.Bruce Momjian
1998-08-19heap_fetch requires buffer pointer, must be released; heap_getnextBruce Momjian
no longer returns buffer pointer, can be gotten from scan; descriptor; bootstrap can create multi-key indexes; pg_procname index now is multi-key index; oidint2, oidint4, oidname are gone (must be removed from regression tests); use System Cache rather than sequential scan in many places; heap_modifytuple no longer takes buffer parameter; remove unused buffer parameter in a few other functions; oid8 is not index-able; remove some use of single-character variable names; cleanup Buffer variables usage and scan descriptor looping; cleaned up allocation and freeing of tuples; 18k lines of diff;
1998-06-15Remove un-needed braces around single statements.Bruce Momjian
1998-04-27This patch...Bruce Momjian
1. Removes the unnecessary "#define AbcRegProcedure 123"'s from pg_proc.h. 2. Changes those #defines to use the names already defined in fmgr.h. 3. Forces the make of fmgr.h in backend/Makefile instead of having it made as a dependency in access/common/Makefile *hack*hack*hack* 4. Rearranged the #includes to a less helter-skelter arrangement, also changing <file.h> to "file.h" to signify a non-system header. 5. Removed "pg_proc.h" from files where its only purpose was for the #defines removed in item #1. 6. Added "fmgr.h" to each file changed for completeness sake. Turns out that #6 was not necessary for some files because fmgr.h was being included in a roundabout way SIX levels deep by the first include. "access/genam.h" ->"access/relscan.h" ->"utils/rel.h" ->"access/strat.h" ->"access/skey.h" ->"fmgr.h" So adding fmgr.h really didn't add anything to the compile, hopefully just made it clearer to the programmer. S Darren.
1998-01-15Thank god for searchable mail archives.PostgreSQL Daemon
Patch by: wieck@sapserv.debis.de (Jan Wieck) One of the design rules of PostgreSQL is extensibility. And to follow this rule means (at least for me) that there should not only be a builtin PL. Instead I would prefer a defined interface for PL implemetations.
1998-01-07Goodbye ABORT. Hello ERROR for all errors.Bruce Momjian
1998-01-05Change elog(WARN) to elog(ERROR) and elog(ABORT).Bruce Momjian
1997-09-18Inline memset() as MemSet().Bruce Momjian
1997-09-08Used modified version of indent that understands over 100 typedefs.Bruce Momjian
1997-09-08Another PGINDENT run that changes variable indenting and case label ↵Bruce Momjian
indenting. Also static variable indenting.
1997-09-07Massive commit to run PGINDENT on all *.c and *.h files.Bruce Momjian
1997-08-19Make functions static where possible, enclose unused functions in #ifdef ↵Bruce Momjian
NOT_USED.
1997-04-161. BTREE_VERSION_1: using bti_itup->t_tid as unique identifier for a givenVadim B. Mikheev
index tuple (logical position within A LEVEL). bti_oid & bti_dummy taken off from BTItemData. 2. Fix for multi-column indices (nbtsearch.c): _bt_binsrch() - for searches on internal pages having keysize < number of attrs we point at the last item < the scankey, not at the first item = the scankey; _bt_moveright() - if keysize < number of attrs we compare scankey with _last_ item on current page to decide should we move right or not.
1997-03-24+ NULLs handlingVadim B. Mikheev
Actually required by multi-column indices support. We still don't use btree for 'A is (not) null', but now btree keep items with NULL attrs using single rule for placing/finding items on pages: NULLs greater NOT_NULLs and NULL = NULL. + Bulkload code (nbtsort.c) support for multi-column indices building and NULLs. + Fix for btendscan()->pfree(scanopaque) from Chris Dunlop.
1997-03-18Patches for Vadim's multikey indexing...Marc G. Fournier
1996-11-05Almost done access...Marc G. Fournier
1996-11-03More include file cleanupsMarc G. Fournier
1996-11-03Changes required so that access/* compiles cleanly...Marc G. Fournier
cleaning up behind myself before *yawn* bed :)
1996-10-23Major code cleanups from D'arcy (-Wall -Werror)Marc G. Fournier
1996-10-20#include file cleanupMarc G. Fournier
1996-07-30Fixes:Marc G. Fournier
> INDEXED searches in some cases DO NOT WORK. > Although simple search expressions (i.e. with a constant value on > the right side of an operator) work, performing a join (by putting > a field of some other table on the right side of an operator) produces > empty output. > WITHOUT indices, everything works fine. > submitted by: "Vadim B. Mikheev" <root@ais.sable.krasnoyarsk.su>
1996-07-09Postgres95 1.01 Distribution - Virgin SourcesPG95-1_01Marc G. Fournier