aboutsummaryrefslogtreecommitdiff
path: root/src/include/access/gist_private.h
diff options
context:
space:
mode:
authorAlexander Korotkov <akorotkov@postgresql.org>2019-03-10 11:36:47 +0300
committerAlexander Korotkov <akorotkov@postgresql.org>2019-03-10 11:37:17 +0300
commitf2e403803fe6deb8cff59ea09dff42c6163b2110 (patch)
tree1c3afef6e11f6498002b88219d9644e71bb5972d /src/include/access/gist_private.h
parenta0b762626884b3b949c2703abb1c4b42fbbdfdc6 (diff)
downloadpostgresql-f2e403803fe6deb8cff59ea09dff42c6163b2110.tar.gz
postgresql-f2e403803fe6deb8cff59ea09dff42c6163b2110.zip
Support for INCLUDE attributes in GiST indexes
Similarly to B-tree, GiST index access method gets support of INCLUDE attributes. These attributes aren't used for tree navigation and aren't present in non-leaf pages. But they are present in leaf pages and can be fetched during index-only scan. The point of having INCLUDE attributes in GiST indexes is slightly different from the point of having them in B-tree. The main point of INCLUDE attributes in B-tree is to define UNIQUE constraint over part of attributes enabled for index-only scan. In GiST the main point of INCLUDE attributes is to use index-only scan for attributes, whose data types don't have GiST opclasses. Discussion: https://postgr.es/m/73A1A452-AD5F-40D4-BD61-978622FF75C1%40yandex-team.ru Author: Andrey Borodin, with small changes by me Reviewed-by: Andreas Karlsson
Diffstat (limited to 'src/include/access/gist_private.h')
-rw-r--r--src/include/access/gist_private.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/access/gist_private.h b/src/include/access/gist_private.h
index 3698942f9da..463d2bfc7b9 100644
--- a/src/include/access/gist_private.h
+++ b/src/include/access/gist_private.h
@@ -78,7 +78,9 @@ typedef struct GISTSTATE
MemoryContext scanCxt; /* context for scan-lifespan data */
MemoryContext tempCxt; /* short-term context for calling functions */
- TupleDesc tupdesc; /* index's tuple descriptor */
+ TupleDesc leafTupdesc; /* index's tuple descriptor */
+ TupleDesc nonLeafTupdesc; /* truncated tuple descriptor for non-leaf
+ * pages */
TupleDesc fetchTupdesc; /* tuple descriptor for tuples returned in an
* index-only scan */