From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | TalGloz <glozmantal(at)gmail(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Executing a Function with an INSERT INTO command fails |
Date: | 2018-08-29 16:54:02 |
Message-ID: | CAKFQuwZDwSLgwzn7zooJRvK3rL-oZycB+rdiksT-dgpsZ5rOKA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Aug 29, 2018 at 9:47 AM, TalGloz <glozmantal(at)gmail(dot)com> wrote:
>
> > 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"
>
>
I was referring specifically to:
https://www.postgresql.org/docs/10/static/plpgsql-errors-and-messages.html#PLPGSQL-STATEMENTS-RAISE
I was going for a conceptual communication, not syntax.
Though if you indeed get a syntax error then that precludes the "wrong
object" theory.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | TalGloz | 2018-08-29 17:09:20 | Re: Executing a Function with an INSERT INTO command fails |
Previous Message | TalGloz | 2018-08-29 16:47:34 | Re: Executing a Function with an INSERT INTO command fails |