Skip to content

Commit 9886a46

Browse files
committed
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.
1 parent 793a4ba commit 9886a46

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

contrib/spi/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Header: /cvsroot/pgsql/contrib/spi/Makefile,v 1.21 2001/09/06 10:49:30 petere Exp $
1+
# $Header: /cvsroot/pgsql/contrib/spi/Makefile,v 1.22 2002/10/03 18:40:02 tgl Exp $
22

33
subdir = contrib/spi
44
top_builddir = ../..
@@ -8,8 +8,8 @@ MODULES = autoinc insert_username moddatetime refint timetravel
88
DATA_built = $(addsuffix .sql, $(MODULES))
99
DOCS = README.spi $(addsuffix .example, $(MODULES))
1010

11-
ifdef REFINT_VERBOSE
11+
# this is needed for the regression tests;
12+
# comment out if you want a quieter refint package for other uses
1213
PG_CPPFLAGS = -DREFINT_VERBOSE
13-
endif
1414

1515
include $(top_srcdir)/contrib/contrib-global.mk

contrib/spi/refint.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,12 +563,14 @@ check_foreign_key(PG_FUNCTION_ARGS)
563563
elog(ERROR, "%s: tuple referenced in %s",
564564
trigger->tgname, relname);
565565
}
566-
#ifdef REFINT_VERBOSE
567566
else
568-
elog(DEBUG3, "%s: %d tuple(s) of %s are %s",
567+
{
568+
#ifdef REFINT_VERBOSE
569+
elog(NOTICE, "%s: %d tuple(s) of %s are %s",
569570
trigger->tgname, SPI_processed, relname,
570571
(action == 'c') ? "deleted" : "setted to null");
571572
#endif
573+
}
572574
args += nkeys + 1; /* to the next relation */
573575
}
574576

src/test/regress/GNUmakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.40 2002/09/05 18:28:46 petere Exp $
10+
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.41 2002/10/03 18:40:02 tgl Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -105,7 +105,7 @@ all: all-spi
105105

106106
.PHONY: all-spi
107107
all-spi:
108-
$(MAKE) -C $(contribdir)/spi REFINT_VERBOSE=1 refint$(DLSUFFIX) autoinc$(DLSUFFIX)
108+
$(MAKE) -C $(contribdir)/spi refint$(DLSUFFIX) autoinc$(DLSUFFIX)
109109

110110

111111
##

src/test/regress/expected/triggers.out

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,17 @@ ERROR: check_fkeys_pkey_exist: tuple references non-existing key in pkeys
7575
insert into fkeys values (60, '6', 4);
7676
ERROR: check_fkeys_pkey2_exist: tuple references non-existing key in fkeys2
7777
delete from pkeys where pkey1 = 30 and pkey2 = '3';
78+
NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted
7879
ERROR: check_fkeys2_fkey_restrict: tuple referenced in fkeys
7980
delete from pkeys where pkey1 = 40 and pkey2 = '4';
81+
NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted
82+
NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys2 are deleted
8083
update pkeys set pkey1 = 7, pkey2 = '70' where pkey1 = 50 and pkey2 = '5';
84+
NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted
8185
ERROR: check_fkeys2_fkey_restrict: tuple referenced in fkeys
8286
update pkeys set pkey1 = 7, pkey2 = '70' where pkey1 = 10 and pkey2 = '1';
87+
NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted
88+
NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys2 are deleted
8389
DROP TABLE pkeys;
8490
DROP TABLE fkeys;
8591
DROP TABLE fkeys2;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy