Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gdvHS-0007SH-NT for pgsql-general@arkaria.postgresql.org; Mon, 31 Dec 2018 10:58:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gdvHQ-0004QA-Vk for pgsql-general@arkaria.postgresql.org; Mon, 31 Dec 2018 10:58:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gdvHQ-0004Q3-Nl for pgsql-general@lists.postgresql.org; Mon, 31 Dec 2018 10:58:44 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gdvHM-0005Lo-GW for pgsql-general@lists.postgresql.org; Mon, 31 Dec 2018 10:58:43 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 40BD12171; Mon, 31 Dec 2018 11:58:38 +0100 (CET) Date: Mon, 31 Dec 2018 11:58:38 +0100 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: In which session context is a trigger run? Message-ID: <20181231105838.mcbeq3jskjoyd2jq@hjp.at> References: <0a13079f-27c7-68dd-b52f-af9385185d2b@aklaver.com> <68399335-b0b6-31e3-ea16-afe2c0373892@aklaver.com> <20181230110811.gvcmvjxcnx4vpqgl@hjp.at> <6b3fc29a-e458-70e2-3b43-cfb98a7fbc69@aklaver.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="focspf5hbvketaln" Content-Disposition: inline In-Reply-To: <6b3fc29a-e458-70e2-3b43-cfb98a7fbc69@aklaver.com> User-Agent: NeoMutt/20170113 (1.7.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --focspf5hbvketaln Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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 --=20 _ | 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 --focspf5hbvketaln Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAlwp9lUACgkQ8g5IURL+ KF2E+w/8CE+IrItCfooFCTyRTWO/Leb+5OhAPmfSJRwcr7X4Vfos6GPaDf60b+M8 Bv85lD2YCFxWs6W5cuTlStG9uKtM2woJO/aFknGPmOsRtjJLOkRztx5DI+tHVsDm 7ZBtaCQ6M+McYwGVBsXzrbYlzT1t1yNf2PKdijGtQSpFAKb+dF4uLz2AS9whY4Xa PY5DQZK+opsdICZRT3J+fJz6GTbOziz/rrogxlYPRr/5Ig+TYm91aWGG6zX0B4k3 KRSxcsPz4Hp/S6l6qz6i/wLZ3PT0bGkoUt/O3S9syLiHbswqeAqz/PxW+TU4NboY rDWr2ZbCsWB6fQxAeF8H32p27QZKbNsODyNJVi/06u/Uen5I7Onu2yitZ7i/8sSM SjQbmXs14ao9vgdid8KDArSHM0O6aEEsoiV5hxkJC2C56pCt1JdpNHL36EXVNy4N RN3Y71Fqltzj2JwgOR/D02GUSth4RNk7HDFXn4ECNHuRSEARAsmaNw1JsSJ/gUHp iLC7BkbyEPlvbZ4kqn0+CVLoL8+NBunI1DQUAty5MfCmlFd5jml8RKNoaEUUu2Xl H08e2YQeMDy3euNBsxutf+qDrOMDQWuAdO86uVV/t1IvNInYLOVTJ7zj3Aif6iJM cxgJe3XKshcn2+wU5S9C897p4VvpzPsIRBO7TwGsxVFRQK83R5U= =usYa -----END PGP SIGNATURE----- --focspf5hbvketaln--