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 1iLFPJ-0004iG-2Y for pgsql-general@arkaria.postgresql.org; Thu, 17 Oct 2019 23:42:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iLFPH-00081b-Fz for pgsql-general@arkaria.postgresql.org; Thu, 17 Oct 2019 23:42:11 +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 1iLFPF-00081R-Bw for pgsql-general@lists.postgresql.org; Thu, 17 Oct 2019 23:42:11 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iLFPA-0004yo-5t for pgsql-general@lists.postgresql.org; Thu, 17 Oct 2019 23:42:09 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id A856B3E4; Thu, 17 Oct 2019 19:42:00 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 17 Oct 2019 19:42:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=3 cxNGeUGAt7DmN1OvIpF8eOdZ7ApFPwNKPDR6ve6fyU=; b=ImTZX7B93rXqVRJr+ piiTXPNCrmXNlzgahTtEAi9XAZvtAv9lY5WDg3E9pC5+J4aXyLYoom7dX6KAvTNj 2N0p9fOkjznwYo0LyYP6RBE21qj6yHgvCgpefcypn1uth/JhH7ZJHxQM68DcZeia W0lunrobLKudEivrlFJxixehU3XuhUJ70Ec3UvRXpSiEo2dL72coKR3ieRgvqWI0 +UGfIJptTRh2BRf/4NE1b9Ya77Yg7MwJhJ8q6Lm9zwQEJX3H7786Zx9rdAfRPg9q dzxH7NBnbu+Oq9tKf6cSb4IXzRrFIyQ8A7bP8N+PmFZtN15yiGA2dQyoolL4P39H ZL/Vw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=3cxNGeUGAt7DmN1OvIpF8eOdZ7ApFPwNKPDR6ve6f yU=; b=Y2wBy3oqMV6N1oPSH6wK4WoGcR1xo48KTqtQVw4msXQXFTi5m1M3PD3G6 YTm5++Hbj3JQBAWc/9xd0QC6wLHqb3G7hJa8R2wHNGAz85/LoZORTBwKhwAuS/bx UODGweDPPNxESSzghtIa04Gjg41vdhPOoy+02gGyL2jZAqoX/rQtVSQT4OiCXr3C Ta6jvZNSVDwdFcwRPI8TBam84D6hUu7xJNPaGcTafbo/3ya88enNUsv2w0+P7Xvy eyPL8l0Y/uVPEzJIC/672ymT+Tu8miIqJF9cbObxI0Adiej+mbZcooPlcJY0miml n7T/ePveaT/22NnF7VNHwbekL+WAg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrjeekgddvtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghenucfkphepudejgedrvddu rddufeehrddvtdeinecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrg hvvghrsegrkhhlrghvvghrrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from [192.168.1.2] (174-21-135-206.tukw.qwest.net [174.21.135.206]) by mail.messagingengine.com (Postfix) with ESMTPA id 5577380060; Thu, 17 Oct 2019 19:41:59 -0400 (EDT) Subject: Re: stable for each row before insert trigger To: =?UTF-8?B?0J7Qu9C10LMg0KHQsNC80L7QudC70L7Qsg==?= , "pgsql-generallists.postgresql.org" References: <925B864A-0C60-4A2A-9072-88FB5501323F@ya.ru> From: Adrian Klaver Message-ID: Date: Thu, 17 Oct 2019 16:41:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <925B864A-0C60-4A2A-9072-88FB5501323F@ya.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 10/17/19 4:31 PM, Олег Самойлов wrote: > Hi all. > > According to documentation the words "VOLATILE, STABLE, IMMUTABLE" is somehow useful with trigger functions, for instance mentioned that the AFTER INSERT trigger should be VOLATILE. The question is how this words affect a for each row before insert trigger? Can be some optimisation here? > > https://www.postgresql.org/docs/11/xfunc-volatility.html -- Adrian Klaver adrian.klaver@aklaver.com