From f9b5b41ef993a9b76b7f97b271df8034f1a24154 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 11 Nov 2002 22:19:25 +0000 Subject: Code review for ON COMMIT patch. Make the actual on-commit action happen before commit, not after :-( --- the original coding is not only unsafe if an error occurs while it's processing, but it generates an invalid sequence of WAL entries. Resurrect 7.2 logic for deleting items when no longer needed. Use an enum instead of random macros. Editorialize on names used for routines and constants. Teach backend/nodes routines about new field in CreateTable struct. Add a regression test. --- src/backend/commands/view.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/backend/commands/view.c') diff --git a/src/backend/commands/view.c b/src/backend/commands/view.c index 17a5cdaa0d4..329fd3146bb 100644 --- a/src/backend/commands/view.c +++ b/src/backend/commands/view.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.72 2002/09/22 19:42:50 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.73 2002/11/11 22:19:22 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -137,6 +137,7 @@ DefineVirtualRelation(const RangeVar *relation, List *tlist, bool replace) createStmt->inhRelations = NIL; createStmt->constraints = NIL; createStmt->hasoids = false; + createStmt->oncommit = ONCOMMIT_NOOP; /* * finally create the relation (this will error out if there's an -- cgit v1.2.3