Re: Executing a Function with an INSERT INTO command fails - Mailing list pgsql-general

From TalGloz
Subject Re: Executing a Function with an INSERT INTO command fails
Date
Msg-id 1535561254219-0.post@n3.nabble.com
Whole thread Raw
In response to Re: Executing a Function with an INSERT INTO command fails  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Executing a Function with an INSERT INTO command fails
List pgsql-general
> Add "RAISE ERROR" to the top function's BEGIN block and verify that the
> next time you run your calling query it indeed fails.  I'm suspecting that
> the code you are iterating over is not the same code that is being
> executed
> (search_path dynamics probably).

Do you mean like this
BEGIN
RAISE NOTICE
.
.
INSERT INTO public.runtime_benchmark (test_number, column_names,
execution_time, operation_type, seal_or_sql) VALUES (1, 'Pickup_longitude,
Dropoff_longitude', '1', 'sub', 'seal');
.
.
END;

If I use RAISE ERROR i get ERROR:  unrecognized exception condition "error"

Tal




--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html


pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Executing a Function with an INSERT INTO command fails
Next
From: "David G. Johnston"
Date:
Subject: Re: Executing a Function with an INSERT INTO command fails