---------------- * closerel * ---------------- */
| 674 | * ---------------- |
| 675 | */ |
| 676 | void |
| 677 | closerel(char *name) |
| 678 | { |
| 679 | if (name) |
| 680 | { |
| 681 | if (boot_reldesc) |
| 682 | { |
| 683 | if (strcmp(RelationGetRelationName(boot_reldesc), name) != 0) |
| 684 | elog(ERROR, "close of %s when %s was expected", |
| 685 | name, RelationGetRelationName(boot_reldesc)); |
| 686 | } |
| 687 | else |
| 688 | elog(ERROR, "close of %s before any relation was opened", |
| 689 | name); |
| 690 | } |
| 691 | |
| 692 | if (boot_reldesc == NULL) |
| 693 | elog(ERROR, "no open relation to close"); |
| 694 | else |
| 695 | { |
| 696 | elog(DEBUG4, "close relation %s", |
| 697 | RelationGetRelationName(boot_reldesc)); |
| 698 | table_close(boot_reldesc, NoLock); |
| 699 | boot_reldesc = NULL; |
| 700 | } |
| 701 | } |
| 702 | |
| 703 | |
| 704 |
no test coverage detected