pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter J. Holzer <hjp-pgsql@hjp.at>
To: pgsql-general@lists.postgresql.org
Subject: Re: In which session context is a trigger run?
Date: Mon, 31 Dec 2018 11:58:38 +0100
Message-ID: <20181231105838.mcbeq3jskjoyd2jq@hjp.at> (raw)
In-Reply-To: <6b3fc29a-e458-70e2-3b43-cfb98a7fbc69@aklaver.com>
References: <CAKLmikO=2kTnVpR2sjr-hTW6BW8pZwRhynVL=QZ5LnhO4jXEiw@mail.gmail.com>
	<ce1edeb5-e62e-9bc0-395c-0ebed0fcef9f@aklaver.com>
	<CAKLmikMyiYHzVtwVvuvU=nPJZFJcMNL9Qsc+3o6q=C9g8hH4Dw@mail.gmail.com>
	<c1654f3a-410d-ae7a-8e8d-b3e7a6eee810@aklaver.com>
	<CAKLmikONKsJihvYuNSboy7yGCav+-kHOgGJR8xLxksq6hbCxuw@mail.gmail.com>
	<0a13079f-27c7-68dd-b52f-af9385185d2b@aklaver.com>
	<CAKLmikNq72rSKXj2EcoDKESCtmx2xxYDhfvFk2ZJ3MMDA5drGg@mail.gmail.com>
	<68399335-b0b6-31e3-ea16-afe2c0373892@aklaver.com>
	<20181230110811.gvcmvjxcnx4vpqgl@hjp.at>
	<6b3fc29a-e458-70e2-3b43-cfb98a7fbc69@aklaver.com>

On 2018-12-30 08:56:13 -0800, Adrian Klaver wrote:
> On 12/30/18 3:08 AM, Peter J. Holzer wrote:
> > If I understood Mitar correctly he wants the trigger to execute in the
> > session where it was declared, not in the sessio where the statement was
> > executed that triggered the trigger.
> 
> There is the additional hitch that the trigger is being declared to use a
> temporary function that is defined in an alias schema pg_temp.

Yeah, but that would be neatly solved by the magic teleportation of the
trigger execution. (I think this is actually how he got the idea that
executing the trigger in a different session would solve his problem.)

        hp

-- 
   _  | Peter J. Holzer    | we build much bigger, better disasters now
|_|_) |                    | because we have much more sophisticated
| |   | hjp@hjp.at         | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/;

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (14+ messages)  latest in thread

Message-ID: <20181231105838.mcbeq3jskjoyd2jq@hjp.at>
Permalink:  ../20181231105838.mcbeq3jskjoyd2jq@hjp.at/
Also on:    postgresql.org/message-id/20181231105838.mcbeq3jskjoyd2jq@hjp.at

 · 

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: hjp-pgsql@hjp.at
  Subject: Re: In which session context is a trigger run?
  In-Reply-To: <20181231105838.mcbeq3jskjoyd2jq@hjp.at>
  References: <CAKLmikO=2kTnVpR2sjr-hTW6BW8pZwRhynVL=QZ5LnhO4jXEiw@mail.gmail.com> <ce1edeb5-e62e-9bc0-395c-0ebed0fcef9f@aklaver.com> <CAKLmikMyiYHzVtwVvuvU=nPJZFJcMNL9Qsc+3o6q=C9g8hH4Dw@mail.gmail.com> <c1654f3a-410d-ae7a-8e8d-b3e7a6eee810@aklaver.com> <CAKLmikONKsJihvYuNSboy7yGCav+-kHOgGJR8xLxksq6hbCxuw@mail.gmail.com> <0a13079f-27c7-68dd-b52f-af9385185d2b@aklaver.com> <CAKLmikNq72rSKXj2EcoDKESCtmx2xxYDhfvFk2ZJ3MMDA5drGg@mail.gmail.com> <68399335-b0b6-31e3-ea16-afe2c0373892@aklaver.com> <20181230110811.gvcmvjxcnx4vpqgl@hjp.at> <6b3fc29a-e458-70e2-3b43-cfb98a7fbc69@aklaver.com> <20181231105838.mcbeq3jskjoyd2jq@hjp.at>

* 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