aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gist.c
diff options
context:
space:
mode:
authorDean Rasheed <dean.a.rasheed@gmail.com>2017-07-06 09:58:06 +0100
committerDean Rasheed <dean.a.rasheed@gmail.com>2017-07-06 09:58:06 +0100
commitc03911d9454a0cf5d88910ad46b433ab342c39e0 (patch)
tree34f57852c176e71f9feceb4c2a19ce490338a8d1 /src/backend/access/gist/gist.c
parentec86af917551f52246848dd148885df034273f3d (diff)
downloadpostgresql-c03911d9454a0cf5d88910ad46b433ab342c39e0.tar.gz
postgresql-c03911d9454a0cf5d88910ad46b433ab342c39e0.zip
Simplify the logic checking new range partition bounds.
The previous logic, whilst not actually wrong, was overly complex and involved doing two binary searches, where only one was really necessary. This simplifies that logic and improves the comments. One visible change is that if the new partition overlaps multiple existing partitions, the error message now always reports the overlap with the first existing partition (the one with the lowest bounds). The old code would sometimes report the clash with the first partition and sometimes with the last one. Original patch idea from Amit Langote, substantially rewritten by me. Discussion: https://postgr.es/m/CAAJ_b947mowpLdxL3jo3YLKngRjrq9+Ej4ymduQTfYR+8=YAYQ@mail.gmail.com
Diffstat (limited to 'src/backend/access/gist/gist.c')
0 files changed, 0 insertions, 0 deletions