Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1elFBV-0002F7-5S for pgsql-bugs@arkaria.postgresql.org; Mon, 12 Feb 2018 14:34:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1elFBU-0007NR-03 for pgsql-bugs@arkaria.postgresql.org; Mon, 12 Feb 2018 14:34:20 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1elExo-0001yb-PK for pgsql-bugs@lists.postgresql.org; Mon, 12 Feb 2018 14:20:12 +0000 Received: from n3.nabble.com ([162.255.23.22]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1elExm-0007Mk-5Z for pgsql-bugs@postgresql.org; Mon, 12 Feb 2018 14:20:11 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 77C56B1D430C for ; Mon, 12 Feb 2018 07:20:09 -0700 (MST) Date: Mon, 12 Feb 2018 07:20:09 -0700 (MST) From: Mark Scheffer To: pgsql-bugs@postgresql.org Message-ID: <1518445209487-0.post@n3.nabble.com> In-Reply-To: References: <151844034484.1446.1721073839109092583@wrigleys.postgresql.org> <1518442667671-0.post@n3.nabble.com> Subject: Re: BUG #15060: Row in table not found when using pg function in an expression MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Marko Tiikkaja-4 wrote > I don't think this is relevant, since the changes were NOT made by the SQL > command calling the function. They were made by the INSERT which executed > earlier in a VOLATILE function. Yes I should have read a few lines further, and wake up: > Because of this snapshotting behavior, a function containing only SELECT > commands can safely be marked STABLE, even if it selects from tables that > might be undergoing modifications by concurrent queries. PostgreSQL will > execute all commands of a STABLE function using the snapshot established > for the calling query, and so it will see a fixed view of the database > throughout that query. Sorry for inconvenience. Hope the VOLATILE-STABLE difference in behavior helps in resolving this bug. -- Sent from: http://www.postgresql-archive.org/PostgreSQL-bugs-f2117394.html