* Returns true if the IndexPath corresponds to a "text" * index. This is used to force the index cost to 0 to make sure * we use the text index. */
| 1012 | * we use the text index. |
| 1013 | */ |
| 1014 | static bool |
| 1015 | IsTextIndexMatch(IndexPath *path) |
| 1016 | { |
| 1017 | ListCell *cell; |
| 1018 | foreach(cell, path->indexclauses) |
| 1019 | { |
| 1020 | IndexClause *clause = lfirst(cell); |
| 1021 | if (IsTextPathOpFamilyOid( |
| 1022 | path->indexinfo->relam, |
| 1023 | path->indexinfo->opfamily[clause->indexcol])) |
| 1024 | { |
| 1025 | return true; |
| 1026 | } |
| 1027 | } |
| 1028 | |
| 1029 | return false; |
| 1030 | } |
| 1031 | |
| 1032 | |
| 1033 | static IndexScanDesc |
no test coverage detected