From bf56f0759bdfa87f143c3abd09f893a5f530fe88 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 10 Aug 2001 18:57:42 +0000 Subject: Make OIDs optional, per discussions in pghackers. WITH OIDS is still the default, but OIDS are removed from many system catalogs that don't need them. Some interesting side effects: TOAST pointers are 20 bytes not 32 now; pg_description has a three-column key instead of one. Bugs fixed in passing: BINARY cursors work again; pg_class.relhaspkey has some usefulness; pg_dump dumps comments on indexes, rules, and triggers in a valid order. initdb forced. --- src/backend/commands/trigger.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/backend/commands/trigger.c') diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index 833d7876974..1cdbe791227 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.94 2001/08/02 15:59:28 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.95 2001/08/10 18:57:34 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -336,10 +336,8 @@ DropTrigger(DropTrigStmt *stmt) if (namestrcmp(&(pg_trigger->tgname), stmt->trigname) == 0) { - - /*** Delete any comments associated with this trigger ***/ - - DeleteComments(tuple->t_data->t_oid); + /* Delete any comments associated with this trigger */ + DeleteComments(tuple->t_data->t_oid, RelationGetRelid(tgrel)); simple_heap_delete(tgrel, &tuple->t_self); tgfound++; @@ -407,10 +405,8 @@ RelationRemoveTriggers(Relation rel) while (HeapTupleIsValid(tup = heap_getnext(tgscan, 0))) { - - /*** Delete any comments associated with this trigger ***/ - - DeleteComments(tup->t_data->t_oid); + /* Delete any comments associated with this trigger */ + DeleteComments(tup->t_data->t_oid, RelationGetRelid(tgrel)); simple_heap_delete(tgrel, &tup->t_self); -- cgit v1.2.3