mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
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
This commit is contained in:
@ -2875,7 +2875,7 @@ attnameAttNum(Relation rd, const char *attname, bool sysColOK)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < rd->rd_rel->relnatts; i++)
|
||||
for (i = 0; i < RelationGetNumberOfAttributes(rd); i++)
|
||||
{
|
||||
Form_pg_attribute att = rd->rd_att->attrs[i];
|
||||
|
||||
|
Reference in New Issue
Block a user