Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1afSmk-0004LF-Ep for pgsql-sql@arkaria.postgresql.org; Mon, 14 Mar 2016 13:43:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1afSmk-0003YY-15 for pgsql-sql@arkaria.postgresql.org; Mon, 14 Mar 2016 13:43:50 +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.84_2) (envelope-from ) id 1afSln-0002VW-EH for pgsql-sql@postgresql.org; Mon, 14 Mar 2016 13:42:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1afSlg-0001s8-0l for pgsql-sql@postgresql.org; Mon, 14 Mar 2016 13:42:51 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u2EDgfkU030077; Mon, 14 Mar 2016 09:42:41 -0400 From: Tom Lane To: Desmond Coertzen cc: pgsql-sql@postgresql.org Subject: Re: Subselect left join / not exists() In-reply-to: References: <32307.1456498805@sss.pgh.pa.us> <10339.1457910832@sss.pgh.pa.us> Comments: In-reply-to Desmond Coertzen message dated "Mon, 14 Mar 2016 11:40:56 +0200" Date: Mon, 14 Mar 2016 09:42:41 -0400 Message-ID: <30076.1457962961@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org Desmond Coertzen writes: > I was under the impression that postgres will not allow me to declare a > function immutable if it falls outside of the bounds of the definition. IIRC, there was an explicit decision not to throw errors for "immutable function reads a table", because we have no way to be sure that such a thing might not be safe in practice in a particular usage. (That is, you actually don't ever change the table's contents after first use of the function.) But yeah, it's a gray area. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql