You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Drop the rule against included index columns duplicating key columns.
The initial version of the included-index-column feature stated thatincluded columns couldn't be the same as any key column of the index.While it'd be pretty silly to do that, since the included column would beentirely redundant, we've never prohibited redundant index columns beforeso it's not very consistent to do so here. Moreover, the prohibitionwas itself badly implemented, so that it failed to reject columns thatwere effectively identical but not spelled quite alike, as reported byAditya Toshniwal.(Moreover, it's not hard to imagine that for some non-btree index types,such cases would be non-silly anyhow: the index might use a lossyrepresentation for key columns but be able to support retrieval of theoriginal form of included columns.)Hence, let's just drop the prohibition.In passing, do some copy-editing on the documentation for theincluded-column feature.Yugo Nagata; documentation and test corrections by meDiscussion:https://postgr.es/m/CAM9w-_mhBCys4fQNfaiQKTRrVWtoFrZ-wXmDuE9Nj5y-Y7aDKQ@mail.gmail.com