? src/backend/catalog/pg_depend.c ? src/include/catalog/pg_depend.h Index: src/backend/catalog/Makefile =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/catalog/Makefile,v retrieving revision 1.37 diff -c -r1.37 Makefile *** src/backend/catalog/Makefile 2001/08/25 18:52:41 1.37 --- src/backend/catalog/Makefile 2002/03/14 14:05:04 *************** *** 12,18 **** OBJS = catalog.o heap.o index.o indexing.o aclchk.o \ pg_aggregate.o pg_largeobject.o pg_operator.o pg_proc.o \ ! pg_type.o BKIFILES = postgres.bki postgres.description --- 12,18 ---- OBJS = catalog.o heap.o index.o indexing.o aclchk.o \ pg_aggregate.o pg_largeobject.o pg_operator.o pg_proc.o \ ! pg_type.o pg_depend.o BKIFILES = postgres.bki postgres.description *************** *** 26,32 **** # indexing.h had better be last. POSTGRES_BKI_SRCS := $(addprefix $(top_srcdir)/src/include/catalog/,\ ! pg_proc.h pg_type.h pg_attribute.h pg_class.h \ pg_attrdef.h pg_relcheck.h pg_inherits.h pg_index.h \ pg_operator.h pg_opclass.h pg_am.h pg_amop.h pg_amproc.h \ pg_language.h pg_largeobject.h pg_aggregate.h pg_statistic.h \ --- 26,32 ---- # indexing.h had better be last. POSTGRES_BKI_SRCS := $(addprefix $(top_srcdir)/src/include/catalog/,\ ! pg_depend.h pg_proc.h pg_type.h pg_attribute.h pg_class.h \ pg_attrdef.h pg_relcheck.h pg_inherits.h pg_index.h \ pg_operator.h pg_opclass.h pg_am.h pg_amop.h pg_amproc.h \ pg_language.h pg_largeobject.h pg_aggregate.h pg_statistic.h \ Index: src/backend/catalog/README =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/catalog/README,v retrieving revision 1.2 diff -c -r1.2 README *** src/backend/catalog/README 2002/01/04 17:06:51 1.2 --- src/backend/catalog/README 2002/03/14 14:05:04 *************** *** 35,48 **** If you need to find a valid OID for a set of tuples that refer to each other, use the unused_oids script. It generates inclusive ranges of *unused* OIDs (i.e., the line "45-900" means OIDs 45 through 900 have ! not been allocated yet). However, you should not rely 100% on this ! script, since it only looks at the .h files in the catalog/ directory. ! Do a pg_grepsrc (recursive grep) of the source tree to insure that ! there aren't any hidden crocks (i.e., explicit use of a numeric OID) ! anywhere in the code. (tgl 1/2002: that advice is obsolete; there are ! no hardcoded uses of OIDs in the C files anymore. All OIDs that are known ! directly to C code should be referenced via #defines in the catalog .h files. ! So unused_oids is sufficient for assigning new OIDs.) ----------------------------------------------------------------- --- 35,56 ---- If you need to find a valid OID for a set of tuples that refer to each other, use the unused_oids script. It generates inclusive ranges of *unused* OIDs (i.e., the line "45-900" means OIDs 45 through 900 have ! not been allocated yet). All OIDs that are known directly to C code ! should be referenced via #defines in the catalog .h files. So ! unused_oids is sufficient for assigning new OIDs.). The unused_oids ! script simply 'discovers' those which are free. ! ! - BOOTSTRAP tables must be at the start of the Makefile POSTGRES_BKI_SRCS ! variable, as these will not be created through standard function means, but ! will be written directly to disk. Thats how pg_class is created without ! depending on functions which depend on the existance of pg_class. The ! list of files this currently includes is: ! pg_proc.h pg_type.h pg_attribute.h pg_class.h ! ! Don't forget to add the entry to heap.c to function heap_create() which ! sets the OID of the relation when it's a bootstrapped system table. It's ! near the top of the function with the comment beginning in 'Real ugly stuff' ! ----------------------------------------------------------------- Index: src/backend/catalog/heap.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/catalog/heap.c,v retrieving revision 1.186 diff -c -r1.186 heap.c *** src/backend/catalog/heap.c 2002/03/07 16:35:33 1.186 --- src/backend/catalog/heap.c 2002/03/14 14:05:10 *************** *** 37,42 **** --- 37,43 ---- #include "catalog/index.h" #include "catalog/indexing.h" #include "catalog/pg_attrdef.h" + #include "catalog/pg_depend.h" #include "catalog/pg_inherits.h" #include "catalog/pg_index.h" #include "catalog/pg_relcheck.h" *************** *** 49,54 **** --- 50,56 ---- #include "optimizer/planmain.h" #include "optimizer/prep.h" #include "optimizer/var.h" + #include "parser/parse.h" /* For keyword RESTRICT */ #include "parser/parse_expr.h" #include "parser/parse_relation.h" #include "parser/parse_target.h" *************** *** 71,77 **** char *temp_relname); static void DeleteAttributeTuples(Relation rel); static void DeleteRelationTuple(Relation rel); - static void DeleteTypeTuple(Relation rel); static void RelationRemoveIndexes(Relation relation); static void RelationRemoveInheritance(Relation relation); static void AddNewRelationType(char *typeName, Oid new_rel_oid, --- 73,78 ---- *************** *** 255,260 **** --- 256,266 ---- nailme = true; relid = RelOid_pg_proc; } + else if (strcmp(DependRelationName, relname) == 0) + { + nailme = true; + relid = RelOid_pg_depend; + } else if (strcmp(RelationRelationName, relname) == 0) { nailme = true; *************** *** 958,963 **** --- 964,970 ---- /* * delete the relation tuple from pg_class, and finish up. */ + simple_heap_delete(pg_class_desc, &tup->t_self); heap_freetuple(tup); *************** *** 1127,1239 **** heap_close(pg_attribute_desc, RowExclusiveLock); } - /* -------------------------------- - * DeleteTypeTuple - * - * If the user attempts to destroy a relation and there - * exists attributes in other relations of type - * "relation we are deleting", then we have to do something - * special. presently we disallow the destroy. - * -------------------------------- - */ - static void - DeleteTypeTuple(Relation rel) - { - Relation pg_type_desc; - HeapScanDesc pg_type_scan; - Relation pg_attribute_desc; - HeapScanDesc pg_attribute_scan; - ScanKeyData key; - ScanKeyData attkey; - HeapTuple tup; - HeapTuple atttup; - Oid typoid; - - /* - * open pg_type - */ - pg_type_desc = heap_openr(TypeRelationName, RowExclusiveLock); - - /* - * create a scan key to locate the type tuple corresponding to this - * relation. - */ - ScanKeyEntryInitialize(&key, 0, - Anum_pg_type_typrelid, - F_OIDEQ, - ObjectIdGetDatum(RelationGetRelid(rel))); - - pg_type_scan = heap_beginscan(pg_type_desc, - 0, - SnapshotNow, - 1, - &key); - - /* - * use heap_getnext() to fetch the pg_type tuple. If this tuple is - * not valid then something's wrong. - */ - tup = heap_getnext(pg_type_scan, 0); - - if (!HeapTupleIsValid(tup)) - { - heap_endscan(pg_type_scan); - heap_close(pg_type_desc, RowExclusiveLock); - elog(ERROR, "DeleteTypeTuple: type \"%s\" does not exist", - RelationGetRelationName(rel)); - } - - /* - * now scan pg_attribute. if any other relations have attributes of - * the type of the relation we are deleteing then we have to disallow - * the deletion. should talk to stonebraker about this. -cim 6/19/90 - */ - typoid = tup->t_data->t_oid; - - pg_attribute_desc = heap_openr(AttributeRelationName, RowExclusiveLock); - - ScanKeyEntryInitialize(&attkey, - 0, - Anum_pg_attribute_atttypid, - F_OIDEQ, - ObjectIdGetDatum(typoid)); - - pg_attribute_scan = heap_beginscan(pg_attribute_desc, - 0, - SnapshotNow, - 1, - &attkey); - - /* - * try and get a pg_attribute tuple. if we succeed it means we can't - * delete the relation because something depends on the schema. - */ - atttup = heap_getnext(pg_attribute_scan, 0); - - if (HeapTupleIsValid(atttup)) - { - Oid relid = ((Form_pg_attribute) GETSTRUCT(atttup))->attrelid; - - heap_endscan(pg_attribute_scan); - heap_close(pg_attribute_desc, RowExclusiveLock); - heap_endscan(pg_type_scan); - heap_close(pg_type_desc, RowExclusiveLock); - - elog(ERROR, "DeleteTypeTuple: column of type %s exists in relation %u", - RelationGetRelationName(rel), relid); - } - heap_endscan(pg_attribute_scan); - heap_close(pg_attribute_desc, RowExclusiveLock); - - /* - * Ok, it's safe so we delete the relation tuple from pg_type and - * finish up. - */ - simple_heap_delete(pg_type_desc, &tup->t_self); - - heap_endscan(pg_type_scan); - heap_close(pg_type_desc, RowExclusiveLock); - } /* ---------------------------------------------------------------- * heap_drop_with_catalog - removes all record of named relation from catalogs --- 1134,1139 ---- *************** *** 1244,1252 **** * 4) remove pg_class tuple * 5) remove pg_attribute tuples and related descriptions * 6) remove pg_description tuples ! * 7) remove pg_type tuples ! * 8) RemoveConstraints () ! * 9) unlink relation * * old comments * Except for vital relations, removes relation from --- 1144,1151 ---- * 4) remove pg_class tuple * 5) remove pg_attribute tuples and related descriptions * 6) remove pg_description tuples ! * 7) RemoveConstraints () ! * 8) unlink relation * * old comments * Except for vital relations, removes relation from *************** *** 1269,1279 **** heap_drop_with_catalog(const char *relname, bool allow_system_table_mods) { ! Relation rel; ! Oid rid; ! bool has_toasttable; ! bool istemp = is_temp_rel_name(relname); ! int i; /* * Open and lock the relation. --- 1168,1180 ---- heap_drop_with_catalog(const char *relname, bool allow_system_table_mods) { ! Relation rel; ! Oid rid; ! bool has_toasttable; ! bool istemp = is_temp_rel_name(relname); ! int i, natts; ! ObjectAddress myself; ! HeapTuple tuple; /* * Open and lock the relation. *************** *** 1308,1314 **** if (rel->rd_rules != NULL) RelationRemoveRules(rid); ! /* triggers */ RelationRemoveTriggers(rel); /* --- 1209,1218 ---- if (rel->rd_rules != NULL) RelationRemoveRules(rid); ! /* triggers ! * ! * Should be updated to use pg_depend methods ! */ RelationRemoveTriggers(rel); /* *************** *** 1316,1325 **** */ RelationRemoveInheritance(rel); /* ! * remove indexes if necessary */ ! RelationRemoveIndexes(rel); /* * delete attribute tuples --- 1220,1248 ---- */ RelationRemoveInheritance(rel); + /* ! * Deal with dependencies ! * ! * Take care of any attributes first, then the main object ! * last when objectSubId = 0. Ignore system attributes. */ ! tuple = SearchSysCache(RELNAME, CStringGetDatum(relname), 0, 0, 0); ! if (!HeapTupleIsValid(tuple)) ! elog(ERROR, "Relation %s doesn't exist", relname); ! ! natts = ((Form_pg_class) GETSTRUCT(tuple))->relnatts; ! ! /* Must free before calling dependDelete */ ! ReleaseSysCache(tuple); ! ! myself.classId = RelOid_pg_class; ! myself.objectId = rid; ! for (i = natts; i >= 0; i--) ! { ! myself.objectSubId = i; ! dependDelete(&myself, RESTRICT); ! } /* * delete attribute tuples *************** *** 1333,1350 **** RemoveStatistics(rel); - RemoveConstraints(rel); - /* ! * delete type tuple */ ! DeleteTypeTuple(rel); /* * delete relation tuple */ DeleteRelationTuple(rel); /* * unlink the relation's physical file and finish up. */ --- 1256,1275 ---- RemoveStatistics(rel); /* ! * Remove constraints if necessary ! * ! * Should be updated to use pg_depend methods */ ! RemoveConstraints(rel); ! /* * delete relation tuple */ DeleteRelationTuple(rel); + /* * unlink the relation's physical file and finish up. */ *************** *** 1358,1363 **** --- 1283,1290 ---- */ heap_close(rel, NoLock); + + /* * flush the relation from the relcache */ *************** *** 1374,1379 **** --- 1301,1307 ---- sprintf(toast_relname, "pg_toast_%u", rid); heap_drop_with_catalog(toast_relname, true); } + } Index: src/backend/catalog/index.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/catalog/index.c,v retrieving revision 1.173 diff -c -r1.173 index.c *** src/backend/catalog/index.c 2002/03/03 17:47:54 1.173 --- src/backend/catalog/index.c 2002/03/14 14:05:15 *************** *** 32,37 **** --- 32,39 ---- #include "catalog/heap.h" #include "catalog/index.h" #include "catalog/indexing.h" + #include "catalog/pg_class.h" + #include "catalog/pg_depend.h" #include "catalog/pg_index.h" #include "catalog/pg_opclass.h" #include "catalog/pg_proc.h" *************** *** 41,46 **** --- 43,49 ---- #include "miscadmin.h" #include "optimizer/clauses.h" #include "optimizer/prep.h" + #include "parser/parse.h" /* For keyword RESTRICT */ #include "parser/parse_func.h" #include "storage/sinval.h" #include "storage/smgr.h" *************** *** 602,607 **** --- 605,613 ---- bool istemp = is_temp_rel_name(heapRelationName); char *temp_relname = NULL; + ObjectAddress myself; + int i; + SetReindexProcessing(false); /* *************** *** 634,640 **** else indexTupDesc = ConstructTupleDescriptor(heapRelation, indexInfo->ii_NumKeyAttrs, ! indexInfo->ii_KeyAttrNumbers, classObjectId); if (istemp) --- 640,646 ---- else indexTupDesc = ConstructTupleDescriptor(heapRelation, indexInfo->ii_NumKeyAttrs, ! indexInfo->ii_KeyAttrNumbers, classObjectId); if (istemp) *************** *** 673,678 **** --- 679,713 ---- */ indexoid = UpdateRelationRelation(indexRelation, temp_relname); + + myself.classId = RelOid_pg_class; + myself.objectId = indexoid; + myself.objectSubId = 0; + + /* Store dependencies on the attributes */ + for (i = 0; i < indexInfo->ii_NumIndexAttrs; i++) + { + ObjectAddress dependee; + + dependee.classId = RelOid_pg_class; + dependee.objectId = heapoid; + dependee.objectSubId = indexInfo->ii_KeyAttrNumbers[i]; + + /* We always cascade index drops with attribute drops */ + dependCreate(&myself, &dependee, true); + } + + /* Store the dependency on the function (if appropriate) */ + if (OidIsValid(indexInfo->ii_FuncOid)) { + ObjectAddress dependee; + + dependee.classId = RelOid_pg_proc; + dependee.objectId = indexInfo->ii_FuncOid; + dependee.objectSubId = 0; + + dependCreate(&myself, &dependee, false); + } + /* * We create the disk file for this relation here */ *************** *** 752,757 **** --- 787,794 ---- HeapTuple tuple; int16 attnum; int i; + + ObjectAddress myself; Assert(OidIsValid(indexId)); *************** *** 780,790 **** */ /* - * fix DESCRIPTION relation - */ - DeleteComments(indexId, RelOid_pg_class); - - /* * fix RELATION relation */ relationRelation = heap_openr(RelationRelationName, RowExclusiveLock); --- 817,822 ---- *************** *** 814,819 **** --- 846,852 ---- Int16GetDatum(attnum), 0, 0))) { + simple_heap_delete(attributeRelation, &tuple->t_self); heap_freetuple(tuple); attnum++; *************** *** 862,867 **** --- 895,905 ---- RelationForgetRelation(indexId); + myself.classId = RelOid_pg_class; + myself.objectId = indexId; + myself.objectSubId = 0; + dependDelete(&myself, RESTRICT); + /* if it's a temp index, clear the temp mapping table entry */ remove_temp_rel_by_relid(indexId); } *************** *** 1237,1242 **** --- 1275,1281 ---- CatalogIndexInsert(idescs, Num_pg_class_indices, pg_class, tuple); CatalogCloseIndices(Num_pg_class_indices, idescs); } + } else { Index: src/backend/catalog/pg_type.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/catalog/pg_type.c,v retrieving revision 1.67 diff -c -r1.67 pg_type.c *** src/backend/catalog/pg_type.c 2002/03/07 16:35:33 1.67 --- src/backend/catalog/pg_type.c 2002/03/14 14:05:18 *************** *** 17,22 **** --- 17,23 ---- #include "access/heapam.h" #include "catalog/catname.h" #include "catalog/indexing.h" + #include "catalog/pg_depend.h" #include "catalog/pg_type.h" #include "miscadmin.h" #include "parser/parse_func.h" *************** *** 297,302 **** --- 298,306 ---- Oid argList[FUNC_MAX_ARGS]; ScanKeyData typeKey[1]; + ObjectAddress dependee; + ObjectAddress myself; + /* * check that the type is not already defined. It might exist as a * shell type, however (but only if assignedTypeOid is not given). *************** *** 504,509 **** --- 508,569 ---- CatalogOpenIndices(Num_pg_type_indices, Name_pg_type_indices, idescs); CatalogIndexInsert(idescs, Num_pg_type_indices, pg_type_desc, tup); CatalogCloseIndices(Num_pg_type_indices, idescs); + } + + /* + * Create dependencies + */ + + /* Load our object address */ + myself.classId = RelOid_pg_type; + myself.objectId = typeObjectId; + myself.objectSubId = 0; + + /* Dependency on the input function */ + dependee.classId = RelOid_pg_proc; + dependee.objectId = DatumGetObjectId(values[Anum_pg_type_typinput - 1]); + dependee.objectSubId = 0; + dependCreate(&myself, &dependee, false); + + /* Dependency on the output function */ + dependee.classId = RelOid_pg_proc; + dependee.objectId = DatumGetObjectId(values[Anum_pg_type_typoutput - 1]); + dependee.objectSubId = 0; + dependCreate(&myself, &dependee, false); + + /* Dependency on the receive function */ + dependee.classId = RelOid_pg_proc; + dependee.objectId = DatumGetObjectId(values[Anum_pg_type_typreceive - 1]); + dependee.objectSubId = 0; + dependCreate(&myself, &dependee, false); + + /* Dependency on the send function */ + dependee.classId = RelOid_pg_proc; + dependee.objectId = DatumGetObjectId(values[Anum_pg_type_typsend - 1]); + dependee.objectSubId = 0; + dependCreate(&myself, &dependee, false); + + /* + * Dependency on the relation for complex types. Assume it's for + * a relation of somekind and drop it when the relation is removed. + */ + if (DatumGetObjectId(values[Anum_pg_type_typrelid - 1]) != InvalidOid) { + dependee.classId = RelOid_pg_class; + dependee.objectId = DatumGetObjectId(values[Anum_pg_type_typrelid - 1]); + dependee.objectSubId = 0; + dependCreate(&myself, &dependee, true); + } + + /* + * Dependency on the element Id for arrays. We can assume that it's for + * an array and that we should always cascade into this type when the base + * type is being removed. + */ + if (DatumGetObjectId(values[Anum_pg_type_typelem - 1]) != InvalidOid) { + dependee.classId = RelOid_pg_type; + dependee.objectId = DatumGetObjectId(values[Anum_pg_type_typelem - 1]); + dependee.objectSubId = 0; + dependCreate(&myself, &dependee, true); } heap_close(pg_type_desc, RowExclusiveLock); Index: src/backend/commands/proclang.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/commands/proclang.c,v retrieving revision 1.29 diff -c -r1.29 proclang.c *** src/backend/commands/proclang.c 2002/02/18 23:11:11 1.29 --- src/backend/commands/proclang.c 2002/03/14 14:05:19 *************** *** 18,28 **** --- 18,30 ---- #include "access/heapam.h" #include "catalog/catname.h" #include "catalog/indexing.h" + #include "catalog/pg_depend.h" #include "catalog/pg_language.h" #include "catalog/pg_proc.h" #include "commands/proclang.h" #include "fmgr.h" #include "miscadmin.h" + #include "parser/parse.h" /* For keyword RESTRICT */ #include "utils/builtins.h" #include "utils/syscache.h" *************** *** 49,65 **** void CreateProceduralLanguage(CreatePLangStmt *stmt) { ! char languageName[NAMEDATALEN]; ! HeapTuple procTup; ! Oid typev[FUNC_MAX_ARGS]; ! char nulls[Natts_pg_language]; ! Datum values[Natts_pg_language]; ! Relation rel; ! HeapTuple tup; ! TupleDesc tupDesc; ! int i; /* * Check permission --- 51,70 ---- void CreateProceduralLanguage(CreatePLangStmt *stmt) { ! char languageName[NAMEDATALEN]; ! HeapTuple procTup; ! Oid typev[FUNC_MAX_ARGS]; ! char nulls[Natts_pg_language]; ! Datum values[Natts_pg_language]; ! Relation rel; ! HeapTuple tup; ! TupleDesc tupDesc; ! ObjectAddress myself; ! ObjectAddress proc; ! ! int i; /* * Check permission *************** *** 96,101 **** --- 101,111 ---- elog(ERROR, "PL handler function %s() isn't of return type Opaque", stmt->plhandler); + /* Address of the PL handler function */ + proc.classId = RelOid_pg_proc; + proc.objectId = procTup->t_data->t_oid; + proc.objectSubId = 0; + /* * Insert the new language into pg_language */ *************** *** 132,137 **** --- 142,155 ---- CatalogCloseIndices(Num_pg_language_indices, idescs); } + /* Address of myself */ + myself.classId = RelationGetRelid(rel); + myself.objectId = tup->t_data->t_oid; + myself.objectSubId = 0; + + /* Create dependency on the language PL Handler function */ + dependCreate(&myself, &proc, false); + heap_close(rel, RowExclusiveLock); } *************** *** 171,176 **** --- 189,197 ---- if (!((Form_pg_language) GETSTRUCT(langTup))->lanispl) elog(ERROR, "Language %s isn't a created procedural language", languageName); + + /* Deal with Dependencies */ + dependDeleteTuple(langTup, rel, RESTRICT); simple_heap_delete(rel, &langTup->t_self); Index: src/backend/commands/remove.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/commands/remove.c,v retrieving revision 1.68 diff -c -r1.68 remove.c *** src/backend/commands/remove.c 2002/03/07 16:35:34 1.68 --- src/backend/commands/remove.c 2002/03/14 14:05:19 *************** *** 16,27 **** --- 16,29 ---- #include "access/heapam.h" #include "catalog/catname.h" + #include "catalog/pg_depend.h" #include "catalog/pg_language.h" #include "catalog/pg_proc.h" #include "catalog/pg_type.h" #include "commands/comment.h" #include "commands/defrem.h" #include "miscadmin.h" + #include "parser/parse.h" #include "parser/parse_agg.h" #include "parser/parse_expr.h" #include "parser/parse_func.h" *************** *** 87,92 **** --- 89,97 ---- elog(ERROR, "RemoveOperator: operator '%s': permission denied", operatorName); + /* Deal with dependencies */ + dependDeleteTuple(tup, relation, RESTRICT); + /* Delete any comments associated with this operator */ DeleteComments(tup->t_data->t_oid, RelationGetRelid(relation)); *************** *** 119,233 **** heap_close(relation, RowExclusiveLock); } - #ifdef NOTYET - /* - * this stuff is to support removing all reference to a type - * don't use it - pma 2/1/94 - */ - /* - * SingleOpOperatorRemove - * Removes all operators that have operands or a result of type 'typeOid'. - */ - static void - SingleOpOperatorRemove(Oid typeOid) - { - Relation rel; - ScanKeyData key[3]; - HeapScanDesc scan; - HeapTuple tup; - static attnums[3] = {7, 8, 9}; /* left, right, return */ - int i; - - ScanKeyEntryInitialize(&key[0], - 0, 0, F_OIDEQ, (Datum) typeOid); - rel = heap_openr(OperatorRelationName, RowExclusiveLock); - for (i = 0; i < 3; ++i) - { - key[0].sk_attno = attnums[i]; - scan = heap_beginscan(rel, 0, SnapshotNow, 1, key); - while (HeapTupleIsValid(tup = heap_getnext(scan, 0))) - { - /* Delete any comments associated with this operator */ - DeleteComments(tup->t_data->t_oid, RelationGetRelid(rel)); - - simple_heap_delete(rel, &tup->t_self); - } - - heap_endscan(scan); - } - heap_close(rel, RowExclusiveLock); - } - - /* - * AttributeAndRelationRemove - * Removes all entries in the attribute and relation relations - * that contain entries of type 'typeOid'. - * Currently nothing calls this code, it is untested. - */ - static void - AttributeAndRelationRemove(Oid typeOid) - { - struct oidlist - { - Oid reloid; - struct oidlist *next; - }; - struct oidlist *oidptr, - *optr; - Relation rel; - ScanKeyData key[1]; - HeapScanDesc scan; - HeapTuple tup; - - /* - * Get the oid's of the relations to be removed by scanning the entire - * attribute relation. We don't need to remove the attributes here, - * because amdestroy will remove all attributes of the relation. XXX - * should check for duplicate relations - */ - - ScanKeyEntryInitialize(&key[0], - 0, 3, F_OIDEQ, (Datum) typeOid); - - oidptr = (struct oidlist *) palloc(sizeof(*oidptr)); - oidptr->next = NULL; - optr = oidptr; - rel = heap_openr(AttributeRelationName, AccessShareLock); - scan = heap_beginscan(rel, 0, SnapshotNow, 1, key); - while (HeapTupleIsValid(tup = heap_getnext(scan, 0))) - { - optr->reloid = ((Form_pg_attribute) GETSTRUCT(tup))->attrelid; - optr->next = (struct oidlist *) palloc(sizeof(*oidptr)); - optr = optr->next; - } - optr->next = NULL; - heap_endscan(scan); - heap_close(rel, AccessShareLock); - - optr = oidptr; - - ScanKeyEntryInitialize(&key[0], 0, - ObjectIdAttributeNumber, - F_OIDEQ, (Datum) 0); - /* get RowExclusiveLock because heap_destroy will need it */ - rel = heap_openr(RelationRelationName, RowExclusiveLock); - while (PointerIsValid((char *) optr->next)) - { - key[0].sk_argument = (Datum) (optr++)->reloid; - scan = heap_beginscan(rel, 0, SnapshotNow, 1, key); - tup = heap_getnext(scan, 0); - if (HeapTupleIsValid(tup)) - { - char *name; - - name = NameStr(((Form_pg_class) GETSTRUCT(tup))->relname); - heap_drop_with_catalog(name, allowSystemTableMods); - } - heap_endscan(scan); - } - heap_close(rel, RowExclusiveLock); - } - #endif /* NOTYET */ /* * TypeRemove --- 124,129 ---- *************** *** 239,245 **** { Relation relation; HeapTuple tup; - char *shadow_type; if (!pg_ownercheck(GetUserId(), typeName, TYPENAME)) elog(ERROR, "RemoveType: type '%s': permission denied", --- 135,140 ---- *************** *** 253,273 **** if (!HeapTupleIsValid(tup)) elog(ERROR, "RemoveType: type '%s' does not exist", typeName); /* Delete any comments associated with this type */ DeleteComments(tup->t_data->t_oid, RelationGetRelid(relation)); - - simple_heap_delete(relation, &tup->t_self); - - ReleaseSysCache(tup); ! /* Also, delete the "array of" that type */ ! shadow_type = makeArrayTypeName(typeName); ! tup = SearchSysCache(TYPENAME, ! PointerGetDatum(shadow_type), ! 0, 0, 0); ! if (!HeapTupleIsValid(tup)) ! elog(ERROR, "RemoveType: type '%s' does not exist", shadow_type); ! simple_heap_delete(relation, &tup->t_self); ReleaseSysCache(tup); --- 148,163 ---- if (!HeapTupleIsValid(tup)) elog(ERROR, "RemoveType: type '%s' does not exist", typeName); + /* + * We expect this to cascade to forcibly cascade to the + * array version of the type where this is a base type. + */ + dependDeleteTuple(tup, relation, RESTRICT); + /* Delete any comments associated with this type */ DeleteComments(tup->t_data->t_oid, RelationGetRelid(relation)); ! /* Drop the type */ simple_heap_delete(relation, &tup->t_self); ReleaseSysCache(tup); *************** *** 340,345 **** --- 230,238 ---- elog(WARNING, "Removing built-in function \"%s\"", functionName); } + /* Deal with dependencies */ + dependDeleteTuple(tup, relation, RESTRICT); + /* Delete any comments associated with this function */ DeleteComments(tup->t_data->t_oid, RelationGetRelid(relation)); *************** *** 395,400 **** --- 288,296 ---- if (!HeapTupleIsValid(tup)) agg_error("RemoveAggregate", aggName, basetypeID); + + /* Deal with dependencies */ + dependDeleteTuple(tup, relation, RESTRICT); /* Remove any comments related to this aggregate */ DeleteComments(tup->t_data->t_oid, RelationGetRelid(relation)); Index: src/backend/commands/trigger.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/commands/trigger.c,v retrieving revision 1.105 diff -c -r1.105 trigger.c *** src/backend/commands/trigger.c 2002/03/08 04:37:14 1.105 --- src/backend/commands/trigger.c 2002/03/14 14:05:33 *************** *** 18,23 **** --- 18,24 ---- #include "catalog/catalog.h" #include "catalog/catname.h" #include "catalog/indexing.h" + #include "catalog/pg_depend.h" #include "catalog/pg_language.h" #include "catalog/pg_proc.h" #include "catalog/pg_trigger.h" *************** *** 25,30 **** --- 26,32 ---- #include "commands/trigger.h" #include "executor/executor.h" #include "miscadmin.h" + #include "parser/parse.h" /* For keyword RESTRICT */ #include "utils/acl.h" #include "utils/builtins.h" #include "utils/fmgroids.h" *************** *** 352,357 **** --- 354,362 ---- if (namestrcmp(&(pg_trigger->tgname), stmt->trigname) == 0) { + /* Deal with dependencies */ + dependDeleteTuple(tuple, tgrel, RESTRICT); + /* Delete any comments associated with this trigger */ DeleteComments(tuple->t_data->t_oid, RelationGetRelid(tgrel)); *************** *** 423,428 **** --- 428,436 ---- while (HeapTupleIsValid(tup = systable_getnext(tgscan))) { + /* Deal with dependencies */ + dependDeleteTuple(tup, tgrel, RESTRICT); + /* Delete any comments associated with this trigger */ DeleteComments(tup->t_data->t_oid, RelationGetRelid(tgrel)); Index: src/backend/rewrite/rewriteRemove.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/rewrite/rewriteRemove.c,v retrieving revision 1.45 diff -c -r1.45 rewriteRemove.c *** src/backend/rewrite/rewriteRemove.c 2001/08/10 18:57:37 1.45 --- src/backend/rewrite/rewriteRemove.c 2002/03/14 14:05:54 *************** *** 16,28 **** #include "postgres.h" - #include "utils/builtins.h" #include "access/heapam.h" #include "catalog/catname.h" #include "catalog/pg_rewrite.h" #include "commands/comment.h" #include "rewrite/rewriteRemove.h" #include "rewrite/rewriteSupport.h" #include "utils/fmgroids.h" #include "utils/syscache.h" --- 16,31 ---- #include "postgres.h" #include "access/heapam.h" #include "catalog/catname.h" + #include "catalog/pg_depend.h" #include "catalog/pg_rewrite.h" #include "commands/comment.h" + #include "nodes/parsenodes.h" /* Required by parser/parse.h */ + #include "parser/parse.h" /* For keyword RESTRICT */ #include "rewrite/rewriteRemove.h" #include "rewrite/rewriteSupport.h" + #include "utils/builtins.h" #include "utils/fmgroids.h" #include "utils/syscache.h" *************** *** 115,120 **** --- 118,126 ---- hasMoreRules = event_relation->rd_rules != NULL && event_relation->rd_rules->numLocks > 1; + + /* Deal with dependencies */ + dependDeleteTuple(tuple, RewriteRelation, RESTRICT); /* * Delete any comments associated with this rule Index: src/include/catalog/catname.h =================================================================== RCS file: /projects/cvsroot/pgsql/src/include/catalog/catname.h,v retrieving revision 1.23 diff -c -r1.23 catname.h *** src/include/catalog/catname.h 2001/11/05 17:46:31 1.23 --- src/include/catalog/catname.h 2002/03/14 14:06:01 *************** *** 22,27 **** --- 22,28 ---- #define AccessMethodProcedureRelationName "pg_amproc" #define AttributeRelationName "pg_attribute" #define DatabaseRelationName "pg_database" + #define DependRelationName "pg_depend" #define DescriptionRelationName "pg_description" #define GroupRelationName "pg_group" #define IndexRelationName "pg_index" Index: src/include/catalog/pg_attribute.h =================================================================== RCS file: /projects/cvsroot/pgsql/src/include/catalog/pg_attribute.h,v retrieving revision 1.83 diff -c -r1.83 pg_attribute.h *** src/include/catalog/pg_attribute.h 2002/03/07 16:35:38 1.83 --- src/include/catalog/pg_attribute.h 2002/03/14 14:06:07 *************** *** 291,296 **** --- 291,324 ---- DATA(insert ( 1262 tableoid 26 0 4 -7 0 -1 -1 t p f i f f)); /* ---------------- + * pg_depend + * ---------------- + */ + #define Schema_pg_depend \ + { 1077, {"classid"}, 26, 0, 4, 1, 0, -1, -1, true, 'p', false, 'i', false, false }, \ + { 1077, {"objid"}, 26, 0, 4, 2, 0, -1, -1, true, 'p', false, 'i', false, false }, \ + { 1077, {"objsubid"}, 23, 0, 4, 3, 0, -1, -1, true, 'p', false, 'i', false, false }, \ + { 1077, {"depclassid"}, 26, 0, 4, 4, 0, -1, -1, true, 'p', false, 'i', false, false }, \ + { 1077, {"depobjid"}, 26, 0, 4, 5, 0, -1, -1, true, 'p', false, 'i', false, false }, \ + { 1077, {"depobjsubid"}, 23, 0, 4, 6, 0, -1, -1, true, 'p', false, 'i', false, false }, \ + { 1077, {"alwayscascade"}, 16, 0, 1, 7, 0, -1, -1, true, 'p', false, 'c', false, false } + + DATA(insert ( 1077 classid 26 0 4 1 0 -1 -1 t p f i f f)); + DATA(insert ( 1077 objid 26 0 4 2 0 -1 -1 t p f i f f)); + DATA(insert ( 1077 objsubid 23 0 4 3 0 -1 -1 t p f i f f)); + DATA(insert ( 1077 depclassid 26 0 4 4 0 -1 -1 t p f i f f)); + DATA(insert ( 1077 depobjid 26 0 4 5 0 -1 -1 t p f i f f)); + DATA(insert ( 1077 depobjsubid 23 0 4 6 0 -1 -1 t p f i f f)); + DATA(insert ( 1077 alwayscascade 16 0 1 7 0 -1 -1 t p f c f f)); + DATA(insert ( 1077 ctid 27 0 6 -1 0 -1 -1 f p f i f f)); + DATA(insert ( 1077 oid 26 0 4 -2 0 -1 -1 t p f i f f)); + DATA(insert ( 1077 xmin 28 0 4 -3 0 -1 -1 t p f i f f)); + DATA(insert ( 1077 cmin 29 0 4 -4 0 -1 -1 t p f i f f)); + DATA(insert ( 1077 xmax 28 0 4 -5 0 -1 -1 t p f i f f)); + DATA(insert ( 1077 cmax 29 0 4 -6 0 -1 -1 t p f i f f)); + DATA(insert ( 1077 tableoid 26 0 4 -7 0 -1 -1 t p f i f f)); + + /* ---------------- * pg_proc * ---------------- */ Index: src/include/catalog/pg_class.h =================================================================== RCS file: /projects/cvsroot/pgsql/src/include/catalog/pg_class.h,v retrieving revision 1.61 diff -c -r1.61 pg_class.h *** src/include/catalog/pg_class.h 2002/03/07 16:35:38 1.61 --- src/include/catalog/pg_class.h 2002/03/14 14:06:08 *************** *** 148,154 **** --- 148,158 ---- DESCR(""); DATA(insert OID = 376 ( pg_xactlock 0 PGUID 0 0 0 0 0 0 f t s 1 0 0 0 0 0 f f f f _null_ )); DESCR(""); + DATA(insert OID = 1077 ( pg_depend 90 PGUID 0 1077 0 0 0 0 f f r 7 0 0 0 0 0 f f f f _null_ )); + DESCR(""); + + #define RelOid_pg_type 1247 #define RelOid_pg_attribute 1249 #define RelOid_pg_proc 1255 *************** *** 156,161 **** --- 160,167 ---- #define RelOid_pg_shadow 1260 #define RelOid_pg_group 1261 #define RelOid_pg_database 1262 + #define RelOid_pg_depend 1077 + /* Xact lock pseudo-table */ #define XactLockTableId 376 Index: src/include/catalog/pg_type.h =================================================================== RCS file: /projects/cvsroot/pgsql/src/include/catalog/pg_type.h,v retrieving revision 1.116 diff -c -r1.116 pg_type.h *** src/include/catalog/pg_type.h 2002/03/07 16:35:38 1.116 --- src/include/catalog/pg_type.h 2002/03/14 14:06:12 *************** *** 262,267 **** --- 262,268 ---- DATA(insert OID = 86 ( pg_shadow PGUID 4 4 t c t \054 1260 0 int4in int4out int4in int4out i p _null_)); DATA(insert OID = 87 ( pg_group PGUID 4 4 t c t \054 1261 0 int4in int4out int4in int4out i p _null_)); DATA(insert OID = 88 ( pg_database PGUID 4 4 t c t \054 1262 0 int4in int4out int4in int4out i p _null_)); + DATA(insert OID = 90 ( pg_depend PGUID 4 4 t c t \054 1077 0 int4in int4out int4in int4out i p _null_)); /* OIDS 100 - 199 */ Index: src/test/regress/expected/alter_table.out =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/regress/expected/alter_table.out,v retrieving revision 1.32 diff -c -r1.32 alter_table.out *** src/test/regress/expected/alter_table.out 2002/03/06 06:10:52 1.32 --- src/test/regress/expected/alter_table.out 2002/03/14 14:06:27 *************** *** 44,49 **** --- 44,52 ---- (1 row) DROP TABLE tmp; + NOTICE: Implicitly droping Type tmp + NOTICE: Implicitly droping Index pg_toast_138472_idx + NOTICE: Implicitly droping Type pg_toast_138472 -- the wolf bug - schema mods caused inconsistent row descriptors CREATE TABLE tmp ( initial int4 *************** *** 89,94 **** --- 92,100 ---- (1 row) DROP TABLE tmp; + NOTICE: Implicitly droping Type tmp + NOTICE: Implicitly droping Index pg_toast_138597_idx + NOTICE: Implicitly droping Type pg_toast_138597 -- -- rename - -- should preserve indices, which we can check by seeing if a SELECT *************** *** 306,316 **** --- 312,328 ---- NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s) ERROR: UNIQUE constraint matching given keys for referenced table "tmp4" not found DROP TABLE tmp5; + NOTICE: Implicitly droping Type tmp5 DROP TABLE tmp4; + NOTICE: Implicitly droping Index tmp4_a_key + NOTICE: Implicitly droping Type tmp4 DROP TABLE tmp3; NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "tmp2" NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "tmp2" + NOTICE: Implicitly droping Type tmp3 DROP TABLE tmp2; + NOTICE: Implicitly droping Index tmp2_pkey + NOTICE: Implicitly droping Type tmp2 -- Foreign key adding test with mixed types -- Note: these tables are TEMP to avoid name conflicts when this test -- is run in parallel with foreign_key.sql. *************** *** 331,336 **** --- 343,351 ---- -- This should succeed, even though they are different types -- because varchar=int does exist DROP TABLE FKTABLE; + NOTICE: Implicitly droping Type pg_temp_76265_2 + NOTICE: Implicitly droping Index pg_toast_139041_idx + NOTICE: Implicitly droping Type pg_toast_139041 CREATE TEMP TABLE FKTABLE (ftest1 varchar); ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable; NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s) *************** *** 340,346 **** --- 355,366 ---- DROP TABLE pktable; NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "fktable" NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "fktable" + NOTICE: Implicitly droping Index pg_temp_76265_1 + NOTICE: Implicitly droping Type pg_temp_76265_0 DROP TABLE fktable; + NOTICE: Implicitly droping Type pg_temp_76265_3 + NOTICE: Implicitly droping Index pg_toast_139081_idx + NOTICE: Implicitly droping Type pg_toast_139081 CREATE TEMP TABLE PKTABLE (ptest1 int, ptest2 text, PRIMARY KEY(ptest1, ptest2)); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'pktable_pkey' for table 'pktable' *************** *** 352,357 **** --- 372,378 ---- You will have to retype this query using an explicit cast -- Again, so should this... DROP TABLE FKTABLE; + NOTICE: Implicitly droping Type pg_temp_76265_6 CREATE TEMP TABLE FKTABLE (ftest1 cidr, ftest2 datetime); ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2) references pktable(ptest1, ptest2); *************** *** 360,365 **** --- 381,387 ---- You will have to retype this query using an explicit cast -- This fails because we mixed up the column ordering DROP TABLE FKTABLE; + NOTICE: Implicitly droping Type pg_temp_76265_7 CREATE TEMP TABLE FKTABLE (ftest1 int, ftest2 text); ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2) references pktable(ptest2, ptest1); *************** *** 383,388 **** --- 405,411 ---- -- should succeed insert into atacc1 (test) values (4); drop table atacc1; + NOTICE: Implicitly droping Type atacc1 -- let's do one where the check fails when added create table atacc1 ( test int ); -- insert a soon to be failing row *************** *** 392,403 **** --- 415,428 ---- ERROR: AlterTableAddConstraint: rejected due to CHECK constraint atacc_test1 insert into atacc1 (test) values (4); drop table atacc1; + NOTICE: Implicitly droping Type atacc1 -- let's do one where the check fails because the column doesn't exist create table atacc1 ( test int ); -- add a check constraint (fails) alter table atacc1 add constraint atacc_test1 check (test1>3); ERROR: Attribute 'test1' not found drop table atacc1; + NOTICE: Implicitly droping Type atacc1 -- something a little more complicated create table atacc1 ( test int, test2 int, test3 int); -- add a check constraint (fails) *************** *** 408,413 **** --- 433,439 ---- -- should succeed insert into atacc1 (test,test2,test3) values (4,4,5); drop table atacc1; + NOTICE: Implicitly droping Type atacc1 -- lets do some naming tests create table atacc1 (test int check (test>3), test2 int); alter table atacc1 add check (test2>test); *************** *** 415,420 **** --- 441,447 ---- insert into atacc1 (test2, test) values (3, 4); ERROR: ExecAppend: rejected due to CHECK constraint $2 drop table atacc1; + NOTICE: Implicitly droping Type atacc1 -- inheritance related tests create table atacc1 (test int); create table atacc2 (test2 int); *************** *** 429,436 **** --- 456,466 ---- ERROR: ExecAppend: rejected due to CHECK constraint foo insert into atacc3 (test2) values (3); drop table atacc3; + NOTICE: Implicitly droping Type atacc3 drop table atacc2; + NOTICE: Implicitly droping Type atacc2 drop table atacc1; + NOTICE: Implicitly droping Type atacc1 -- let's try only to add only to the parent create table atacc1 (test int); create table atacc2 (test2 int); *************** *** 444,451 **** --- 474,484 ---- insert into atacc3 (test2) values (-3); insert into atacc3 (test2) values (3); drop table atacc3; + NOTICE: Implicitly droping Type atacc3 drop table atacc2; + NOTICE: Implicitly droping Type atacc2 drop table atacc1; + NOTICE: Implicitly droping Type atacc1 -- test unique constraint adding create table atacc1 ( test int ); -- add a unique constraint *************** *** 462,467 **** --- 495,502 ---- alter table atacc1 add constraint atacc_oid1 unique(oid); NOTICE: ALTER TABLE / ADD UNIQUE will create implicit index 'atacc_oid1' for table 'atacc1' drop table atacc1; + NOTICE: Implicitly droping Index atacc_test1 + NOTICE: Implicitly droping Type atacc1 -- let's do one where the unique constraint fails when added create table atacc1 ( test int ); -- insert soon to be failing rows *************** *** 473,478 **** --- 508,514 ---- ERROR: Cannot create unique index. Table contains non-unique values insert into atacc1 (test) values (3); drop table atacc1; + NOTICE: Implicitly droping Type atacc1 -- let's do one where the unique contsraint fails -- because the column doesn't exist create table atacc1 ( test int ); *************** *** 480,485 **** --- 516,522 ---- alter table atacc1 add constraint atacc_test1 unique (test1); ERROR: ALTER TABLE: column "test1" named in key does not exist drop table atacc1; + NOTICE: Implicitly droping Type atacc1 -- something a little more complicated create table atacc1 ( test int, test2 int); -- add a unique constraint *************** *** 495,500 **** --- 532,539 ---- insert into atacc1 (test,test2) values (5,4); insert into atacc1 (test,test2) values (5,5); drop table atacc1; + NOTICE: Implicitly droping Index atacc_test1 + NOTICE: Implicitly droping Type atacc1 -- lets do some naming tests create table atacc1 (test int, test2 int, unique(test)); NOTICE: CREATE TABLE / UNIQUE will create implicit index 'atacc1_test_key' for table 'atacc1' *************** *** 505,507 **** --- 544,549 ---- insert into atacc1 (test2, test) values (2, 3); ERROR: Cannot insert a duplicate key into unique index atacc1_test_key drop table atacc1; + NOTICE: Implicitly droping Index atacc1_test2_key + NOTICE: Implicitly droping Index atacc1_test_key + NOTICE: Implicitly droping Type atacc1 Index: src/test/regress/expected/bit.out =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/regress/expected/bit.out,v retrieving revision 1.2 diff -c -r1.2 bit.out *** src/test/regress/expected/bit.out 2001/05/22 16:37:17 1.2 --- src/test/regress/expected/bit.out 2002/03/14 14:06:32 *************** *** 108,113 **** --- 108,114 ---- --- Bit operations DROP TABLE varbit_table; + NOTICE: Implicitly droping Type varbit_table CREATE TABLE varbit_table (a BIT VARYING(16), b BIT VARYING(16)); COPY varbit_table FROM stdin; SELECT a, b, ~a AS "~ a", a & b AS "a & b", *************** *** 158,165 **** --- 159,168 ---- (10 rows) DROP TABLE varbit_table; + NOTICE: Implicitly droping Type varbit_table --- Bit operations DROP TABLE bit_table; + NOTICE: Implicitly droping Type bit_table CREATE TABLE bit_table (a BIT(16), b BIT(16)); COPY bit_table FROM stdin; SELECT a,b,~a AS "~ a",a & b AS "a & b", *************** *** 210,215 **** --- 213,219 ---- (10 rows) DROP TABLE bit_table; + NOTICE: Implicitly droping Type bit_table -- The following should fail select B'001' & B'10'; ERROR: cannot AND bit strings of different sizes *************** *** 508,511 **** --- 512,517 ---- (16 rows) DROP TABLE BIT_SHIFT_TABLE; + NOTICE: Implicitly droping Type bit_shift_table DROP TABLE VARBIT_SHIFT_TABLE; + NOTICE: Implicitly droping Type varbit_shift_table Index: src/test/regress/expected/boolean.out =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/regress/expected/boolean.out,v retrieving revision 1.9 diff -c -r1.9 boolean.out *** src/test/regress/expected/boolean.out 2000/01/04 16:19:34 1.9 --- src/test/regress/expected/boolean.out 2002/03/14 14:06:33 *************** *** 276,279 **** --- 276,281 ---- -- - thomas 1997-11-30 -- DROP TABLE BOOLTBL1; + NOTICE: Implicitly droping Type booltbl1 DROP TABLE BOOLTBL2; + NOTICE: Implicitly droping Type booltbl2 Index: src/test/regress/expected/case.out =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/regress/expected/case.out,v retrieving revision 1.5 diff -c -r1.5 case.out *** src/test/regress/expected/case.out 2000/09/12 21:07:16 1.5 --- src/test/regress/expected/case.out 2002/03/14 14:06:34 *************** *** 276,279 **** --- 276,281 ---- -- Clean up -- DROP TABLE CASE_TBL; + NOTICE: Implicitly droping Type case_tbl DROP TABLE CASE2_TBL; + NOTICE: Implicitly droping Type case2_tbl Index: src/test/regress/expected/char.out =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/regress/expected/char.out,v retrieving revision 1.6 diff -c -r1.6 char.out *** src/test/regress/expected/char.out 2001/05/21 16:54:46 1.6 --- src/test/regress/expected/char.out 2002/03/14 14:06:35 *************** *** 101,106 **** --- 101,107 ---- (2 rows) DROP TABLE CHAR_TBL; + NOTICE: Implicitly droping Type char_tbl -- -- Now test longer arrays of char -- Index: src/test/regress/expected/create_type.out =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/regress/expected/create_type.out,v retrieving revision 1.4 diff -c -r1.4 create_type.out *** src/test/regress/expected/create_type.out 2001/09/06 02:07:42 1.4 --- src/test/regress/expected/create_type.out 2002/03/14 14:06:36 *************** *** 38,40 **** --- 38,41 ---- (1 row) DROP TABLE default_test; + NOTICE: Implicitly droping Type default_test Index: src/test/regress/expected/foreign_key.out =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/regress/expected/foreign_key.out,v retrieving revision 1.13 diff -c -r1.13 foreign_key.out *** src/test/regress/expected/foreign_key.out 2002/03/06 06:10:56 1.13 --- src/test/regress/expected/foreign_key.out 2002/03/14 14:06:48 *************** *** 57,63 **** --- 57,68 ---- DROP TABLE PKTABLE; NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "fktable" + NOTICE: Implicitly droping Index pktable_pkey + NOTICE: Implicitly droping Type pktable + NOTICE: Implicitly droping Index pg_toast_138474_idx + NOTICE: Implicitly droping Type pg_toast_138474 DROP TABLE FKTABLE; + NOTICE: Implicitly droping Type fktable -- -- check set NULL and table constraint on multiple columns -- *************** *** 140,146 **** --- 145,156 ---- DROP TABLE PKTABLE; NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "fktable" + NOTICE: Implicitly droping Index pktable_pkey + NOTICE: Implicitly droping Type pktable + NOTICE: Implicitly droping Index pg_toast_138533_idx + NOTICE: Implicitly droping Type pg_toast_138533 DROP TABLE FKTABLE; + NOTICE: Implicitly droping Type fktable -- -- check set default and table constraint on multiple columns -- *************** *** 225,231 **** --- 235,246 ---- DROP TABLE PKTABLE; NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "fktable" + NOTICE: Implicitly droping Index pktable_pkey + NOTICE: Implicitly droping Type pktable + NOTICE: Implicitly droping Index pg_toast_138636_idx + NOTICE: Implicitly droping Type pg_toast_138636 DROP TABLE FKTABLE; + NOTICE: Implicitly droping Type fktable -- -- First test, check with no on delete or on update -- *************** *** 300,306 **** --- 315,326 ---- DROP TABLE PKTABLE; NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "fktable" + NOTICE: Implicitly droping Index pktable_pkey + NOTICE: Implicitly droping Type pktable + NOTICE: Implicitly droping Index pg_toast_138705_idx + NOTICE: Implicitly droping Type pg_toast_138705 DROP TABLE FKTABLE; + NOTICE: Implicitly droping Type fktable -- MATCH unspecified -- Base test restricting update/delete CREATE TABLE PKTABLE ( ptest1 int, ptest2 int, ptest3 int, ptest4 text, PRIMARY KEY(ptest1, ptest2, ptest3) ); *************** *** 365,371 **** --- 385,396 ---- DROP TABLE FKTABLE; NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" + NOTICE: Implicitly droping Type fktable DROP TABLE PKTABLE; + NOTICE: Implicitly droping Index pktable_pkey + NOTICE: Implicitly droping Type pktable + NOTICE: Implicitly droping Index pg_toast_138794_idx + NOTICE: Implicitly droping Type pg_toast_138794 -- cascade update/delete CREATE TABLE PKTABLE ( ptest1 int, ptest2 int, ptest3 int, ptest4 text, PRIMARY KEY(ptest1, ptest2, ptest3) ); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'pktable_pkey' for table 'pktable' *************** *** 464,470 **** --- 489,500 ---- DROP TABLE FKTABLE; NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" + NOTICE: Implicitly droping Type fktable DROP TABLE PKTABLE; + NOTICE: Implicitly droping Index pktable_pkey + NOTICE: Implicitly droping Type pktable + NOTICE: Implicitly droping Index pg_toast_138857_idx + NOTICE: Implicitly droping Type pg_toast_138857 -- set null update / set default delete CREATE TABLE PKTABLE ( ptest1 int, ptest2 int, ptest3 int, ptest4 text, PRIMARY KEY(ptest1, ptest2, ptest3) ); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'pktable_pkey' for table 'pktable' *************** *** 570,576 **** --- 600,611 ---- DROP TABLE FKTABLE; NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" + NOTICE: Implicitly droping Type fktable DROP TABLE PKTABLE; + NOTICE: Implicitly droping Index pktable_pkey + NOTICE: Implicitly droping Type pktable + NOTICE: Implicitly droping Index pg_toast_138948_idx + NOTICE: Implicitly droping Type pg_toast_138948 -- set default update / set null delete CREATE TABLE PKTABLE ( ptest1 int, ptest2 int, ptest3 int, ptest4 text, PRIMARY KEY(ptest1, ptest2, ptest3) ); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'pktable_pkey' for table 'pktable' *************** *** 689,695 **** --- 724,735 ---- DROP TABLE FKTABLE; NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" + NOTICE: Implicitly droping Type fktable DROP TABLE PKTABLE; + NOTICE: Implicitly droping Index pktable_pkey + NOTICE: Implicitly droping Type pktable + NOTICE: Implicitly droping Index pg_toast_139057_idx + NOTICE: Implicitly droping Type pg_toast_139057 CREATE TABLE PKTABLE (ptest1 int PRIMARY KEY); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'pktable_pkey' for table 'pktable' CREATE TABLE FKTABLE_FAIL1 ( ftest1 int, CONSTRAINT fkfail1 FOREIGN KEY (ftest2) REFERENCES PKTABLE); *************** *** 703,708 **** --- 743,750 ---- DROP TABLE FKTABLE_FAIL2; ERROR: table "fktable_fail2" does not exist DROP TABLE PKTABLE; + NOTICE: Implicitly droping Index pktable_pkey + NOTICE: Implicitly droping Type pktable -- Test for referencing column number smaller than referenced constraint CREATE TABLE PKTABLE (ptest1 int, ptest2 int, UNIQUE(ptest1, ptest2)); NOTICE: CREATE TABLE / UNIQUE will create implicit index 'pktable_ptest1_key' for table 'pktable' *************** *** 712,717 **** --- 754,761 ---- DROP TABLE FKTABLE_FAIL1; ERROR: table "fktable_fail1" does not exist DROP TABLE PKTABLE; + NOTICE: Implicitly droping Index pktable_ptest1_key + NOTICE: Implicitly droping Type pktable -- -- Tests for mismatched types -- *************** *** 736,748 **** --- 780,800 ---- DROP TABLE FKTABLE; NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" + NOTICE: Implicitly droping Type fktable + NOTICE: Implicitly droping Index pg_toast_139194_idx + NOTICE: Implicitly droping Type pg_toast_139194 -- As should this CREATE TABLE FKTABLE (ftest1 varchar REFERENCES pktable(ptest1)); NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) DROP TABLE FKTABLE; NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" + NOTICE: Implicitly droping Type fktable + NOTICE: Implicitly droping Index pg_toast_139217_idx + NOTICE: Implicitly droping Type pg_toast_139217 DROP TABLE PKTABLE; + NOTICE: Implicitly droping Index pktable_pkey + NOTICE: Implicitly droping Type pktable -- Two columns, two tables CREATE TABLE PKTABLE (ptest1 int, ptest2 text, PRIMARY KEY(ptest1, ptest2)); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'pktable_pkey' for table 'pktable' *************** *** 777,789 **** DROP TABLE FKTABLE; NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" -- As does this CREATE TABLE FKTABLE (ftest1 int, ftest2 text, FOREIGN KEY(ftest1, ftest2) REFERENCES pktable(ptest1, ptest2)); NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) DROP TABLE FKTABLE; NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" ! DROP TABLE PKTABLE; -- Two columns, same table -- Make sure this still works... CREATE TABLE PKTABLE (ptest1 int, ptest2 text, ptest3 int, ptest4 text, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest3, --- 829,851 ---- DROP TABLE FKTABLE; NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" + NOTICE: Implicitly droping Type fktable + NOTICE: Implicitly droping Index pg_toast_139253_idx + NOTICE: Implicitly droping Type pg_toast_139253 -- As does this CREATE TABLE FKTABLE (ftest1 int, ftest2 text, FOREIGN KEY(ftest1, ftest2) REFERENCES pktable(ptest1, ptest2)); NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) DROP TABLE FKTABLE; NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" ! NOTICE: Implicitly droping Type fktable ! NOTICE: Implicitly droping Index pg_toast_139280_idx ! NOTICE: Implicitly droping Type pg_toast_139280 ! DROP TABLE PKTABLE; ! NOTICE: Implicitly droping Index pktable_pkey ! NOTICE: Implicitly droping Type pktable ! NOTICE: Implicitly droping Index pg_toast_139245_idx ! NOTICE: Implicitly droping Type pg_toast_139245 -- Two columns, same table -- Make sure this still works... CREATE TABLE PKTABLE (ptest1 int, ptest2 text, ptest3 int, ptest4 text, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest3, *************** *** 791,802 **** --- 853,872 ---- NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'pktable_pkey' for table 'pktable' NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) DROP TABLE PKTABLE; + NOTICE: Implicitly droping Index pktable_pkey + NOTICE: Implicitly droping Type pktable + NOTICE: Implicitly droping Index pg_toast_139295_idx + NOTICE: Implicitly droping Type pg_toast_139295 -- And this, CREATE TABLE PKTABLE (ptest1 int, ptest2 text, ptest3 int, ptest4 text, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest3, ptest4) REFERENCES pktable); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'pktable_pkey' for table 'pktable' NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) DROP TABLE PKTABLE; + NOTICE: Implicitly droping Index pktable_pkey + NOTICE: Implicitly droping Type pktable + NOTICE: Implicitly droping Index pg_toast_139307_idx + NOTICE: Implicitly droping Type pg_toast_139307 -- This shouldn't (mixed up columns) CREATE TABLE PKTABLE (ptest1 int, ptest2 text, ptest3 int, ptest4 text, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest3, ptest4) REFERENCES pktable(ptest2, ptest1)); *************** *** 851,856 **** --- 921,927 ---- drop table fktable; NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" + NOTICE: Implicitly droping Type fktable delete from pktable; -- Now 2 columns 2 tables, matching types create table fktable (ftest1 int, ftest2 int, foreign key(ftest1, ftest2) references pktable(base1, ptest1)); *************** *** 879,886 **** --- 950,962 ---- drop table fktable; NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" NOTICE: DROP TABLE implicitly drops referential integrity trigger from table "pktable" + NOTICE: Implicitly droping Type fktable drop table pktable; + NOTICE: Implicitly droping Index pktable_base1_key + NOTICE: Implicitly droping Index pktable_pkey + NOTICE: Implicitly droping Type pktable drop table pktable_base; + NOTICE: Implicitly droping Type pktable_base -- Now we'll do one all in 1 table with 2 columns of matching types create table pktable_base(base1 int not null, base2 int); create table pktable(ptest1 int, ptest2 int, primary key(base1, ptest1), foreign key(base2, ptest2) references *************** *** 904,910 **** --- 980,989 ---- delete from pktable where base2=2; delete from pktable where base1=2; drop table pktable; + NOTICE: Implicitly droping Index pktable_pkey + NOTICE: Implicitly droping Type pktable drop table pktable_base; + NOTICE: Implicitly droping Type pktable_base -- 2 columns (2 tables), mismatched types create table pktable_base(base1 int not null); create table pktable(ptest1 text, primary key(base1, ptest1)) inherits (pktable_base); *************** *** 932,938 **** --- 1011,1022 ---- ERROR: Unable to identify an operator '=' for types 'integer' and 'text' You will have to retype this query using an explicit cast drop table pktable; + NOTICE: Implicitly droping Index pktable_pkey + NOTICE: Implicitly droping Type pktable + NOTICE: Implicitly droping Index pg_toast_139369_idx + NOTICE: Implicitly droping Type pg_toast_139369 drop table pktable_base; + NOTICE: Implicitly droping Type pktable_base -- 2 columns (1 table), mismatched types create table pktable_base(base1 int not null, base2 int); create table pktable(ptest1 text, ptest2 text[], primary key(base1, ptest1), foreign key(base2, ptest2) references *************** *** 962,964 **** --- 1046,1049 ---- drop table pktable; ERROR: table "pktable" does not exist drop table pktable_base; + NOTICE: Implicitly droping Type pktable_base Index: src/test/regress/expected/horology.out =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/regress/expected/horology.out,v retrieving revision 1.35 diff -c -r1.35 horology.out *** src/test/regress/expected/horology.out 2002/03/02 21:39:36 1.35 --- src/test/regress/expected/horology.out 2002/03/14 14:07:19 *************** *** 2335,2340 **** --- 2335,2341 ---- (6 rows) DROP TABLE TEMP_TIMESTAMP; + NOTICE: Implicitly droping Type temp_timestamp -- -- Formats -- Index: src/test/regress/expected/join.out =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/regress/expected/join.out,v retrieving revision 1.10 diff -c -r1.10 join.out *** src/test/regress/expected/join.out 2002/03/12 00:52:07 1.10 --- src/test/regress/expected/join.out 2002/03/14 14:07:35 *************** *** 1872,1878 **** --- 1872,1891 ---- -- Clean up -- DROP TABLE t1; + NOTICE: Implicitly droping Type t1 + NOTICE: Implicitly droping Index pg_toast_136403_idx + NOTICE: Implicitly droping Type pg_toast_136403 DROP TABLE t2; + NOTICE: Implicitly droping Type t2 + NOTICE: Implicitly droping Index pg_toast_136408_idx + NOTICE: Implicitly droping Type pg_toast_136408 DROP TABLE t3; + NOTICE: Implicitly droping Type t3 + NOTICE: Implicitly droping Index pg_toast_136413_idx + NOTICE: Implicitly droping Type pg_toast_136413 DROP TABLE J1_TBL; + NOTICE: Implicitly droping Type j1_tbl + NOTICE: Implicitly droping Index pg_toast_136327_idx + NOTICE: Implicitly droping Type pg_toast_136327 DROP TABLE J2_TBL; + NOTICE: Implicitly droping Type j2_tbl Index: src/test/regress/expected/name.out =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/regress/expected/name.out,v retrieving revision 1.5 diff -c -r1.5 name.out *** src/test/regress/expected/name.out 2000/01/04 16:19:34 1.5 --- src/test/regress/expected/name.out 2002/03/14 14:07:35 *************** *** 122,124 **** --- 122,125 ---- (2 rows) DROP TABLE NAME_TBL; + NOTICE: Implicitly droping Type name_tbl Index: src/test/regress/expected/numeric.out =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/regress/expected/numeric.out,v retrieving revision 1.7 diff -c -r1.7 numeric.out *** src/test/regress/expected/numeric.out 2000/04/07 19:17:42 1.7 --- src/test/regress/expected/numeric.out 2002/03/14 14:07:49 *************** *** 694,699 **** --- 694,700 ---- (6 rows) DROP TABLE fract_only; + NOTICE: Implicitly droping Type fract_only -- TO_CHAR() -- SELECT '' AS to_char_1, to_char(val, '9G999G999G999G999G999') Index: src/test/regress/expected/numerology.out =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/regress/expected/numerology.out,v retrieving revision 1.4 diff -c -r1.4 numerology.out *** src/test/regress/expected/numerology.out 2000/03/15 23:31:06 1.4 --- src/test/regress/expected/numerology.out 2002/03/14 14:07:50 *************** *** 131,136 **** --- 131,140 ---- (2 rows) DROP TABLE TEMP_INT2; + NOTICE: Implicitly droping Type temp_int2 DROP TABLE TEMP_INT4; + NOTICE: Implicitly droping Type temp_int4 DROP TABLE TEMP_FLOAT; + NOTICE: Implicitly droping Type temp_float DROP TABLE TEMP_GROUP; + NOTICE: Implicitly droping Type temp_group Index: src/test/regress/expected/oid.out =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/regress/expected/oid.out,v retrieving revision 1.5 diff -c -r1.5 oid.out *** src/test/regress/expected/oid.out 2000/11/21 03:23:20 1.5 --- src/test/regress/expected/oid.out 2002/03/14 14:07:51 *************** *** 73,75 **** --- 73,76 ---- (3 rows) DROP TABLE OID_TBL; + NOTICE: Implicitly droping Type oid_tbl Index: src/test/regress/expected/privileges.out =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/regress/expected/privileges.out,v retrieving revision 1.5 diff -c -r1.5 privileges.out *** src/test/regress/expected/privileges.out 2002/03/06 06:10:59 1.5 --- src/test/regress/expected/privileges.out 2002/03/14 14:07:53 *************** *** 502,512 **** --- 502,520 ---- -- clean up \c regression DROP TABLE atest1; + NOTICE: Implicitly droping Type atest1 + NOTICE: Implicitly droping Index pg_toast_136425_idx + NOTICE: Implicitly droping Type pg_toast_136425 DROP TABLE atest2; + NOTICE: Implicitly droping Type atest2 DROP TABLE atest3; + NOTICE: Implicitly droping Type atest3 DROP VIEW atestv1; + NOTICE: Implicitly droping Type atestv1 DROP VIEW atestv2; + NOTICE: Implicitly droping Type atestv2 DROP VIEW atestv3; + NOTICE: Implicitly droping Type atestv3 DROP GROUP regressgroup1; DROP GROUP regressgroup2; DROP USER regressuser1; Index: src/test/regress/expected/rules.out =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/regress/expected/rules.out,v retrieving revision 1.47 diff -c -r1.47 rules.out *** src/test/regress/expected/rules.out 2002/03/01 22:45:19 1.47 --- src/test/regress/expected/rules.out 2002/03/14 14:08:06 *************** *** 1198,1204 **** --- 1198,1206 ---- drop rule foorule; drop table foo; + NOTICE: Implicitly droping Type foo drop table foo2; + NOTICE: Implicitly droping Type foo2 -- -- Test rules containing INSERT ... SELECT, which is a very ugly special -- case as of 7.1. Example is based on bug report from Joel Burton. *************** *** 1258,1265 **** --- 1260,1274 ---- drop rule rrule; drop view vview; + NOTICE: Implicitly droping Type vview drop table pparent; + NOTICE: Implicitly droping Type pparent + NOTICE: Implicitly droping Index pg_toast_139160_idx + NOTICE: Implicitly droping Type pg_toast_139160 drop table cchild; + NOTICE: Implicitly droping Type cchild + NOTICE: Implicitly droping Index pg_toast_139170_idx + NOTICE: Implicitly droping Type pg_toast_139170 -- -- Check that ruleutils are working -- Index: src/test/regress/expected/select_having.out =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/regress/expected/select_having.out,v retrieving revision 1.4 diff -c -r1.4 select_having.out *** src/test/regress/expected/select_having.out 2000/01/06 06:40:54 1.4 --- src/test/regress/expected/select_having.out 2002/03/14 14:08:06 *************** *** 39,41 **** --- 39,42 ---- (2 rows) DROP TABLE test_having; + NOTICE: Implicitly droping Type test_having Index: src/test/regress/expected/select_implicit.out =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/regress/expected/select_implicit.out,v retrieving revision 1.9 diff -c -r1.9 select_implicit.out *** src/test/regress/expected/select_implicit.out 2000/09/12 21:07:17 1.9 --- src/test/regress/expected/select_implicit.out 2002/03/14 14:08:08 *************** *** 316,320 **** --- 316,323 ---- -- Cleanup DROP TABLE test_missing_target; + NOTICE: Implicitly droping Type test_missing_target DROP TABLE test_missing_target2; + NOTICE: Implicitly droping Type test_missing_target2 DROP TABLE test_missing_target3; + NOTICE: Implicitly droping Type test_missing_target3 Index: src/test/regress/expected/select_into.out =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/regress/expected/select_into.out,v retrieving revision 1.5 diff -c -r1.5 select_into.out *** src/test/regress/expected/select_into.out 2000/06/04 17:52:53 1.5 --- src/test/regress/expected/select_into.out 2002/03/14 14:08:08 *************** *** 6,13 **** --- 6,15 ---- FROM onek WHERE onek.unique1 < 2; DROP TABLE tmp1; + NOTICE: Implicitly droping Type tmp1 SELECT * INTO TABLE tmp1 FROM onek2 WHERE onek2.unique1 < 2; DROP TABLE tmp1; + NOTICE: Implicitly droping Type tmp1 Index: src/test/regress/expected/temp.out =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/regress/expected/temp.out,v retrieving revision 1.4 diff -c -r1.4 temp.out *** src/test/regress/expected/temp.out 2001/11/02 16:30:29 1.4 --- src/test/regress/expected/temp.out 2002/03/14 14:08:08 *************** *** 9,16 **** --- 9,18 ---- CREATE INDEX i_temptest ON temptest(col); DROP INDEX i_temptest; DROP TABLE temptest; + NOTICE: Implicitly droping Type pg_temp_76323_0 DROP INDEX i_temptest; DROP TABLE temptest; + NOTICE: Implicitly droping Type temptest -- test temp table selects CREATE TABLE temptest(col int); INSERT INTO temptest VALUES (1); *************** *** 23,28 **** --- 25,31 ---- (1 row) DROP TABLE temptest; + NOTICE: Implicitly droping Type pg_temp_76323_2 SELECT * FROM temptest; col ----- *************** *** 30,35 **** --- 33,39 ---- (1 row) DROP TABLE temptest; + NOTICE: Implicitly droping Type temptest CREATE TEMP TABLE temptest(col int); -- test temp table deletion \c regression Index: src/test/regress/expected/triggers.out =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/regress/expected/triggers.out,v retrieving revision 1.11 diff -c -r1.11 triggers.out *** src/test/regress/expected/triggers.out 2002/03/06 06:10:59 1.11 --- src/test/regress/expected/triggers.out 2002/03/14 14:08:11 *************** *** 81,88 **** --- 81,101 ---- ERROR: check_fkeys2_fkey_restrict: tuple referenced in fkeys update pkeys set pkey1 = 7, pkey2 = '70' where pkey1 = 10 and pkey2 = '1'; DROP TABLE pkeys; + NOTICE: Implicitly droping Index pkeys_i + NOTICE: Implicitly droping Type pkeys + NOTICE: Implicitly droping Index pg_toast_118844_idx + NOTICE: Implicitly droping Type pg_toast_118844 DROP TABLE fkeys; + NOTICE: Implicitly droping Index fkeys_i + NOTICE: Implicitly droping Type fkeys + NOTICE: Implicitly droping Index pg_toast_118858_idx + NOTICE: Implicitly droping Type pg_toast_118858 DROP TABLE fkeys2; + NOTICE: Implicitly droping Index fkeys2p_i + NOTICE: Implicitly droping Index fkeys2_i + NOTICE: Implicitly droping Type fkeys2 + NOTICE: Implicitly droping Index pg_toast_119114_idx + NOTICE: Implicitly droping Type pg_toast_119114 -- -- I've disabled the funny_dup17 test because the new semantics -- -- of AFTER ROW triggers, which get now fired at the end of a -- -- query allways, cause funny_dup17 to enter an endless loop. *************** *** 253,256 **** --- 266,271 ---- (1 row) drop table tttest; + NOTICE: Implicitly droping Type tttest drop sequence ttdummy_seq; + NOTICE: Implicitly droping Type ttdummy_seq Index: src/test/regress/expected/varchar.out =================================================================== RCS file: /projects/cvsroot/pgsql/src/test/regress/expected/varchar.out,v retrieving revision 1.3 diff -c -r1.3 varchar.out *** src/test/regress/expected/varchar.out 2001/05/21 16:54:46 1.3 --- src/test/regress/expected/varchar.out 2002/03/14 14:08:11 *************** *** 90,95 **** --- 90,96 ---- (2 rows) DROP TABLE VARCHAR_TBL; + NOTICE: Implicitly droping Type varchar_tbl -- -- Now test longer arrays of char --