pgsql: CREATE INDEX ... INCLUDING (column[, ...]) - Mailing list pgsql-committers
From | Teodor Sigaev |
---|---|
Subject | pgsql: CREATE INDEX ... INCLUDING (column[, ...]) |
Date | |
Msg-id | E1aoZXr-00038W-EP@gemulon.postgresql.org Whole thread Raw |
Responses |
Re: pgsql: CREATE INDEX ... INCLUDING (column[, ...])
|
List | pgsql-committers |
CREATE INDEX ... INCLUDING (column[, ...]) Now indexes (but only B-tree for now) can contain "extra" column(s) which doesn't participate in index structure, they are just stored in leaf tuples. It allows to use index only scan by using single index instead of two or more indexes. Author: Anastasia Lubennikova with minor editorializing by me Reviewers: David Rowley, Peter Geoghegan, Jeff Janes Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/386e3d7609c49505e079c40c65919d99feb82505 Modified Files -------------- contrib/dblink/dblink.c | 26 +-- contrib/tcn/tcn.c | 6 +- doc/src/sgml/catalogs.sgml | 8 + doc/src/sgml/indexam.sgml | 5 +- doc/src/sgml/indices.sgml | 7 +- doc/src/sgml/ref/create_index.sgml | 41 +++- doc/src/sgml/ref/create_table.sgml | 36 ++- src/backend/access/brin/brin.c | 1 + src/backend/access/common/indextuple.c | 31 +++ src/backend/access/gin/ginutil.c | 1 + src/backend/access/gist/gist.c | 1 + src/backend/access/hash/hash.c | 1 + src/backend/access/index/genam.c | 16 +- src/backend/access/nbtree/nbtinsert.c | 45 +++- src/backend/access/nbtree/nbtpage.c | 5 +- src/backend/access/nbtree/nbtree.c | 1 + src/backend/access/nbtree/nbtsearch.c | 2 + src/backend/access/nbtree/nbtsort.c | 48 +++- src/backend/access/nbtree/nbtutils.c | 25 ++- src/backend/access/spgist/spgutils.c | 1 + src/backend/bootstrap/bootparse.y | 2 + src/backend/bootstrap/bootstrap.c | 2 +- src/backend/catalog/heap.c | 3 +- src/backend/catalog/index.c | 45 ++-- src/backend/catalog/indexing.c | 1 + src/backend/catalog/pg_constraint.c | 26 ++- src/backend/catalog/toasting.c | 1 + src/backend/commands/indexcmds.c | 60 +++-- src/backend/commands/matview.c | 6 +- src/backend/commands/tablecmds.c | 9 +- src/backend/commands/trigger.c | 1 + src/backend/commands/typecmds.c | 1 + src/backend/executor/execIndexing.c | 14 +- src/backend/executor/nodeIndexscan.c | 8 +- src/backend/nodes/copyfuncs.c | 2 + src/backend/nodes/equalfuncs.c | 2 + src/backend/nodes/outfuncs.c | 3 + src/backend/optimizer/path/indxpath.c | 2 +- src/backend/optimizer/path/pathkeys.c | 7 + src/backend/optimizer/util/plancat.c | 32 +-- src/backend/parser/analyze.c | 6 +- src/backend/parser/gram.y | 57 +++-- src/backend/parser/parse_relation.c | 2 +- src/backend/parser/parse_target.c | 2 +- src/backend/parser/parse_utilcmd.c | 121 +++++++++-- src/backend/utils/adt/ruleutils.c | 32 +++ src/backend/utils/adt/selfuncs.c | 4 +- src/backend/utils/cache/relcache.c | 83 ++++--- src/backend/utils/sort/tuplesort.c | 5 +- src/bin/pg_dump/pg_dump.c | 65 +++++- src/bin/pg_dump/pg_dump.h | 6 +- src/include/access/amapi.h | 2 + src/include/access/itup.h | 2 + src/include/access/nbtree.h | 3 +- src/include/catalog/catversion.h | 2 +- src/include/catalog/pg_constraint.h | 23 +- src/include/catalog/pg_constraint_fn.h | 21 +- src/include/catalog/pg_index.h | 38 ++-- src/include/nodes/execnodes.h | 9 +- src/include/nodes/parsenodes.h | 5 +- src/include/nodes/relation.h | 13 +- src/include/utils/rel.h | 16 +- src/test/regress/expected/create_index.out | 19 ++ src/test/regress/expected/index_including.out | 301 ++++++++++++++++++++++++++ src/test/regress/parallel_schedule | 2 +- src/test/regress/serial_schedule | 1 + src/test/regress/sql/create_index.sql | 20 ++ src/test/regress/sql/index_including.sql | 181 ++++++++++++++++ 68 files changed, 1320 insertions(+), 255 deletions(-)
pgsql-committers by date: