|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.152 2000/11/16 22:30:17 tgl Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.153 2000/12/22 19:21:37 tgl Exp $ |
12 | 12 | *
|
13 | 13 | *
|
14 | 14 | * INTERFACE ROUTINES
|
|
61 | 61 | #include "utils/builtins.h"
|
62 | 62 | #include "utils/catcache.h"
|
63 | 63 | #include "utils/fmgroids.h"
|
| 64 | +#include "utils/lsyscache.h" |
64 | 65 | #include "utils/relcache.h"
|
65 | 66 | #include "utils/syscache.h"
|
66 | 67 | #include "utils/temprel.h"
|
@@ -970,12 +971,16 @@ RelationRemoveInheritance(Relation relation)
|
970 | 971 | if (HeapTupleIsValid(tuple))
|
971 | 972 | {
|
972 | 973 | Oid subclass = ((Form_pg_inherits) GETSTRUCT(tuple))->inhrelid;
|
| 974 | + char *subclassname; |
973 | 975 |
|
974 |
| - heap_endscan(scan); |
975 |
| - heap_close(catalogRelation, RowExclusiveLock); |
976 |
| - |
977 |
| - elog(ERROR, "Relation '%u' inherits '%s'", |
978 |
| - subclass, RelationGetRelationName(relation)); |
| 976 | + subclassname = get_rel_name(subclass); |
| 977 | + /* Just in case get_rel_name fails... */ |
| 978 | + if (subclassname) |
| 979 | + elog(ERROR, "Relation \"%s\" inherits from \"%s\"", |
| 980 | + subclassname, RelationGetRelationName(relation)); |
| 981 | + else |
| 982 | + elog(ERROR, "Relation %u inherits from \"%s\"", |
| 983 | + subclass, RelationGetRelationName(relation)); |
979 | 984 | }
|
980 | 985 | heap_endscan(scan);
|
981 | 986 |
|
|
0 commit comments