Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit77838f7

Browse files
committed
Currently, nonfatal warnings are not trapped (as they should be) by
plperl - the attached small patch remedies that omission.Andrew Dunstan
1 parent970bb03 commit77838f7

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

‎src/pl/plperl/GNUmakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Makefile for PL/Perl
2-
# $PostgreSQL: pgsql/src/pl/plperl/GNUmakefile,v 1.22 2005/05/24 17:07:41 tgl Exp $
2+
# $PostgreSQL: pgsql/src/pl/plperl/GNUmakefile,v 1.23 2005/07/06 22:33:39 momjian Exp $
33

44
subdir = src/pl/plperl
55
top_builddir = ../../..
@@ -37,7 +37,7 @@ OBJS = plperl.o spi_internal.o SPI.o
3737
SHLIB_LINK =$(perl_embed_ldflags)$(BE_DLLLIBS)
3838

3939
REGRESS_OPTS = --dbname=$(PL_TESTDB) --load-language=plperl
40-
REGRESS = plperl plperl_trigger plperl_shared
40+
REGRESS = plperl plperl_trigger plperl_shared plperl_elog
4141

4242
include$(top_srcdir)/src/Makefile.shlib
4343

‎src/pl/plperl/plperl.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* ENHANCEMENTS, OR MODIFICATIONS.
3434
*
3535
* IDENTIFICATION
36-
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.79 2005/07/03 21:56:16 tgl Exp $
36+
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.80 2005/07/06 22:33:39 momjian Exp $
3737
*
3838
**********************************************************************/
3939

@@ -190,13 +190,17 @@ plperl_init_interp(void)
190190
"","-e",
191191
/* all one string follows (no commas please) */
192192
"SPI::bootstrap(); use vars qw(%_SHARED);"
193+
"sub ::plperl_warn { my $msg = shift; &elog(&NOTICE, $msg); } "
194+
"$SIG{__WARN__} = \\&::plperl_warn; "
193195
"sub ::mkunsafefunc {return eval(qq[ sub { $_[0] $_[1] } ]); }"
194196
};
195197

196198
staticchar*strict_embedding[3]= {
197199
"","-e",
198200
/* all one string follows (no commas please) */
199201
"SPI::bootstrap(); use vars qw(%_SHARED);"
202+
"sub ::plperl_warn { my $msg = shift; &elog(&NOTICE, $msg); } "
203+
"$SIG{__WARN__} = \\&::plperl_warn; "
200204
"sub ::mkunsafefunc {return eval("
201205
"qq[ sub { use strict; $_[0] $_[1] } ]); }"
202206
};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp