pl/perl not rethrowing pl/pgsql exceptions

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: pl/perl not rethrowing pl/pgsql exceptions
Date: 2010-01-05 17:49:49
Message-ID: b42b73151001050949k3028d282refe9ac46e68c4359@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

is this behavior correct?

create or replace function error() returns text as
$$
begin
raise exception 'test!';
end;
$$ language plpgsql;

create or replace function test() returns text as
$$
my $res = spi_query("select error()"); # this error is ignored
my $res = spi_query("something stupid!"); # this is not?
$$ language plperlu;

merlin

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Guillaume Lelarge 2010-01-05 18:24:40 Re: reason for default PGSTAT_ACTIVITY_SIZE
Previous Message John R Pierce 2010-01-05 17:16:22 Re: Large tables, ORDER BY and sequence/index scans