pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: TalGloz <glozmantal@gmail.com>
To: pgsql-general@postgresql.org
Subject: Re: Executing a Function with an INSERT INTO command fails
Date: Wed, 29 Aug 2018 09:47:34 -0700 (MST)
Message-ID: <1535561254219-0.post@n3.nabble.com> (raw)
In-Reply-To: <CAKFQuwasQV2Wn+tJx6AGqnT11HsRzvmv6QaX4T9hHei3_9kA7g@mail.gmail.com>
References: <1535533938898-0.post@n3.nabble.com>
	<019001d43f86$11742960$345c7c20$@swisspug.org>
	<1535541719123-0.post@n3.nabble.com>
	<019e01d43f91$5f3c4460$1db4cd20$@swisspug.org>
	<1535560026747-0.post@n3.nabble.com>
	<CAKFQuwasQV2Wn+tJx6AGqnT11HsRzvmv6QaX4T9hHei3_9kA7g@mail.gmail.com>


> 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




view thread (14+ messages)  latest in thread

Message-ID: <1535561254219-0.post@n3.nabble.com>
Permalink:  ../1535561254219-0.post@n3.nabble.com/
Also on:    postgresql.org/message-id/1535561254219-0.post@n3.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: glozmantal@gmail.com
  Subject: Re: Executing a Function with an INSERT INTO command fails
  In-Reply-To: <1535561254219-0.post@n3.nabble.com>
  References: <1535533938898-0.post@n3.nabble.com> <019001d43f86$11742960$345c7c20$@swisspug.org> <1535541719123-0.post@n3.nabble.com> <019e01d43f91$5f3c4460$1db4cd20$@swisspug.org> <1535560026747-0.post@n3.nabble.com> <CAKFQuwasQV2Wn+tJx6AGqnT11HsRzvmv6QaX4T9hHei3_9kA7g@mail.gmail.com> <1535561254219-0.post@n3.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox