Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g5AXS-0001Eb-2F for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Sep 2018 14:11:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g5AXP-0004vJ-Pe for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Sep 2018 14:11:35 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1g5AXP-0004vC-C8 for pgsql-hackers@lists.postgresql.org; Wed, 26 Sep 2018 14:11:35 +0000 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1g5AXM-0003TK-Cz for pgsql-hackers@postgresql.org; Wed, 26 Sep 2018 14:11:34 +0000 Received: by mail-qt1-x843.google.com with SMTP id z14-v6so12348842qtn.2 for ; Wed, 26 Sep 2018 07:11:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=2oE9quv8gq9+5McPuQ+hRDZ9DzcKohn/75Z25KK4GIM=; b=fuS1iHL5EUFSIopSzKr3AUyvjbdSDypj0nJMYQfacyF/pkvYHXj4XTCI7q4s5HprWc 3AxYDIPLPHLEiYPcrA5hjwdLdiqxemlkCSXJ/QzJvhA24HjH35T5yJWg6K4oksw6wQry P9ExTkPeTwN+pu2nuRQaVd+ssq4zCcivir6XraJIZDIagFIhhgET8Tgo1sZNoZltY7q1 FKFdmztzynAPljDRBm7ytahBq3qi2CWIp26mXsjgU7aNwF/Hq1kDZyC8bZ3wJ9JdDK5f wII7R9owfEsp+Hpn1VKHP54IzVMhqr/gVCnKVONL0C+zgn7jL8of5xiJBbsRdK7TSTyM kcGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=2oE9quv8gq9+5McPuQ+hRDZ9DzcKohn/75Z25KK4GIM=; b=CJ4r2WuoFr8TZ/47O0xWp0ep3VGsHexC9mXXUuj6dqJLWzH3V6Qz/vfUijgsYuMxAV 7XgvN47k1FhYHPVQ6mUyXGjc26+UpkgrMr7xdXAcpMfJ7TD/9BoGcR1v8Fi71NejqkDy 8FQqfJSG04ZtECb1TsnyDhkED0Q7TTlzSf3D+bdTfYWU2N+Wt+R8UqFSJsIYtu9ZtumK N3bvUHWioAg2JBEwbFlKWRWFZ/iCr4gLPFD8/Z8ER39oO067m3R5WLYi5PcJvrez5gZb feaEvMJUysSPfQtZzF2j1utwZ1WPRd2uumheh0lUXdQGyoqt0KgwB66sSpSfecCVqRfO hEQg== X-Gm-Message-State: ABuFfohkOJx0D0hvCa1ksTlJAbsgZ8zVOrZbCgJSiwRY2kgHm7nHu/dn e1dxK32clO5YEaj58N8Hj5q9qA== X-Google-Smtp-Source: ACcGV61kB1GW6M+wPBQ+UY8T0Cf6RuVQN3b0Sm8N1C0wbTXHGX5Z7OYRCnAVMm3eXVRPgTcnTKiAHA== X-Received: by 2002:ac8:266b:: with SMTP id v40-v6mr4679367qtv.104.1537971090304; Wed, 26 Sep 2018 07:11:30 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id k71-v6sm3997234qkh.30.2018.09.26.07.11.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Sep 2018 07:11:29 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id DE6CB6B9; Wed, 26 Sep 2018 11:11:27 -0300 (-03) Date: Wed, 26 Sep 2018 11:11:27 -0300 From: Alvaro Herrera To: Bruce Momjian Cc: "David G. Johnston" , Michael Paquier , Andres Freund , PostgreSQL-development Subject: Re: transction_timestamp() inside of procedures Message-ID: <20180926141127.dvvkkms5gpuan3qc@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180926004739.GA15378@momjian.us> User-Agent: NeoMutt/20180716 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-Sep-25, Bruce Momjian wrote: > Well, it is an entire paragraph, so it might be too much. If you > download the zip file here: > > http://www.wiscorp.com/sql200n.zip > > and open 5CD2-02-Foundation-2006-01.pdf, at the top of page 289 under > General Rules, paragraph label 3 has the description. It talks about > procedure statements and trigger functions, which seems promising. I have the 2011 draft, not the 2006 one; you seem to be referring to (which is 6.32 in the 2011 draft I have). General rule 3 is entirely unreadable, and is followed by this note: WG3:LCY-025 took no action on the preceding instance of general containment. It was felt that this rule is too complicated, to the point of being virtually unintelligible. In addition, the rule does not recognize that s can be evaluated implicitly as s. It is believed that this rule does not reflect actual practice and should be rewritten to align it with implementations. Note that Subclause 15.1, “Effect of opening a cursor”, also has a General Rule on this subject. See Possible Problem FND-992 . In SQL2016, this rule was removed completely. I don't think this offers any practical guidance. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services