diff options
author | Bruce Momjian <bruce@momjian.us> | 2007-02-21 20:02:17 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2007-02-21 20:02:17 +0000 |
commit | 6f519ad01c08b3866df3774558621937644036b9 (patch) | |
tree | 7bcccc344761c666665d2c3a5f0a2e00c43d71d9 /src/backend/parser/parse_expr.c | |
parent | 526b1d697985642ee42959d65903f1d504ae57b0 (diff) | |
download | postgresql-6f519ad01c08b3866df3774558621937644036b9.tar.gz postgresql-6f519ad01c08b3866df3774558621937644036b9.zip |
btree source code cleanups:
I refactored findsplitloc and checksplitloc so that the division of
labor is more clear IMO. I pushed all the space calculation inside the
loop to checksplitloc.
I also fixed the off by 4 in free space calculation caused by
PageGetFreeSpace subtracting sizeof(ItemIdData), even though it was
harmless, because it was distracting and I felt it might come back to
bite us in the future if we change the page layout or alignments.
There's now a new function PageGetExactFreeSpace that doesn't do the
subtraction.
findsplitloc now tries the "just the new item to right page" split as
well. If people don't like the refactoring, I can write a patch to just
add that.
Heikki Linnakangas
Diffstat (limited to 'src/backend/parser/parse_expr.c')
0 files changed, 0 insertions, 0 deletions