mirror of
https://github.com/postgres/postgres.git
synced 2026-06-04 23:04:53 -04:00
eefdbba062
plperl - the attached small patch remedies that omission, and adds a small regression test for error and warning output - the new regression input and expected output are in separate attached files. Andrew Dunstan
24 lines
368 B
PL/PgSQL
24 lines
368 B
PL/PgSQL
-- test warnings and errors from plperl
|
|
|
|
create or replace function perl_elog(text) returns void language plperl as $$
|
|
|
|
my $msg = shift;
|
|
elog(NOTICE,$msg);
|
|
|
|
$$;
|
|
|
|
select perl_elog('explicit elog');
|
|
|
|
create or replace function perl_warn(text) returns void language plperl as $$
|
|
|
|
my $msg = shift;
|
|
warn($msg);
|
|
|
|
$$;
|
|
|
|
select perl_warn('implicit elog via warn');
|
|
|
|
|
|
|
|
|