Commit 9886a46e authored by Tom Lane's avatar Tom Lane

Restore NOTICEs that were mistakenly removed from triggers regression

test expected output.  Tweak contrib/spi Makefile so that refint.so is
by default built with appropriate NOTICE support for regression testing.
parent 793a4ba3
# $Header: /cvsroot/pgsql/contrib/spi/Makefile,v 1.21 2001/09/06 10:49:30 petere Exp $ # $Header: /cvsroot/pgsql/contrib/spi/Makefile,v 1.22 2002/10/03 18:40:02 tgl Exp $
subdir = contrib/spi subdir = contrib/spi
top_builddir = ../.. top_builddir = ../..
...@@ -8,8 +8,8 @@ MODULES = autoinc insert_username moddatetime refint timetravel ...@@ -8,8 +8,8 @@ MODULES = autoinc insert_username moddatetime refint timetravel
DATA_built = $(addsuffix .sql, $(MODULES)) DATA_built = $(addsuffix .sql, $(MODULES))
DOCS = README.spi $(addsuffix .example, $(MODULES)) DOCS = README.spi $(addsuffix .example, $(MODULES))
ifdef REFINT_VERBOSE # this is needed for the regression tests;
# comment out if you want a quieter refint package for other uses
PG_CPPFLAGS = -DREFINT_VERBOSE PG_CPPFLAGS = -DREFINT_VERBOSE
endif
include $(top_srcdir)/contrib/contrib-global.mk include $(top_srcdir)/contrib/contrib-global.mk
...@@ -563,12 +563,14 @@ check_foreign_key(PG_FUNCTION_ARGS) ...@@ -563,12 +563,14 @@ check_foreign_key(PG_FUNCTION_ARGS)
elog(ERROR, "%s: tuple referenced in %s", elog(ERROR, "%s: tuple referenced in %s",
trigger->tgname, relname); trigger->tgname, relname);
} }
#ifdef REFINT_VERBOSE
else else
elog(DEBUG3, "%s: %d tuple(s) of %s are %s", {
#ifdef REFINT_VERBOSE
elog(NOTICE, "%s: %d tuple(s) of %s are %s",
trigger->tgname, SPI_processed, relname, trigger->tgname, SPI_processed, relname,
(action == 'c') ? "deleted" : "setted to null"); (action == 'c') ? "deleted" : "setted to null");
#endif #endif
}
args += nkeys + 1; /* to the next relation */ args += nkeys + 1; /* to the next relation */
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.40 2002/09/05 18:28:46 petere Exp $ # $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.41 2002/10/03 18:40:02 tgl Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -105,7 +105,7 @@ all: all-spi ...@@ -105,7 +105,7 @@ all: all-spi
.PHONY: all-spi .PHONY: all-spi
all-spi: all-spi:
$(MAKE) -C $(contribdir)/spi REFINT_VERBOSE=1 refint$(DLSUFFIX) autoinc$(DLSUFFIX) $(MAKE) -C $(contribdir)/spi refint$(DLSUFFIX) autoinc$(DLSUFFIX)
## ##
......
...@@ -75,11 +75,17 @@ ERROR: check_fkeys_pkey_exist: tuple references non-existing key in pkeys ...@@ -75,11 +75,17 @@ ERROR: check_fkeys_pkey_exist: tuple references non-existing key in pkeys
insert into fkeys values (60, '6', 4); insert into fkeys values (60, '6', 4);
ERROR: check_fkeys_pkey2_exist: tuple references non-existing key in fkeys2 ERROR: check_fkeys_pkey2_exist: tuple references non-existing key in fkeys2
delete from pkeys where pkey1 = 30 and pkey2 = '3'; delete from pkeys where pkey1 = 30 and pkey2 = '3';
NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted
ERROR: check_fkeys2_fkey_restrict: tuple referenced in fkeys ERROR: check_fkeys2_fkey_restrict: tuple referenced in fkeys
delete from pkeys where pkey1 = 40 and pkey2 = '4'; delete from pkeys where pkey1 = 40 and pkey2 = '4';
NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted
NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys2 are deleted
update pkeys set pkey1 = 7, pkey2 = '70' where pkey1 = 50 and pkey2 = '5'; update pkeys set pkey1 = 7, pkey2 = '70' where pkey1 = 50 and pkey2 = '5';
NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted
ERROR: check_fkeys2_fkey_restrict: tuple referenced in fkeys ERROR: check_fkeys2_fkey_restrict: tuple referenced in fkeys
update pkeys set pkey1 = 7, pkey2 = '70' where pkey1 = 10 and pkey2 = '1'; update pkeys set pkey1 = 7, pkey2 = '70' where pkey1 = 10 and pkey2 = '1';
NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted
NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys2 are deleted
DROP TABLE pkeys; DROP TABLE pkeys;
DROP TABLE fkeys; DROP TABLE fkeys;
DROP TABLE fkeys2; DROP TABLE fkeys2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment