* Given a Query and rangetable index, return relation's RowMarkClause if any * * Returns NULL if relation is not selected FOR UPDATE/SHARE */
| 3708 | * Returns NULL if relation is not selected FOR UPDATE/SHARE |
| 3709 | */ |
| 3710 | RowMarkClause * |
| 3711 | get_parse_rowmark(Query *qry, Index rtindex) |
| 3712 | { |
| 3713 | ListCell *l; |
| 3714 | |
| 3715 | foreach(l, qry->rowMarks) |
| 3716 | { |
| 3717 | RowMarkClause *rc = (RowMarkClause *) lfirst(l); |
| 3718 | |
| 3719 | if (rc->rti == rtindex) |
| 3720 | return rc; |
| 3721 | } |
| 3722 | return NULL; |
| 3723 | } |
| 3724 | |
| 3725 | /* |
| 3726 | * given relation and att name, return attnum of variable |
no test coverage detected