Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dz5aC-0004fs-U0 for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Oct 2017 18:36:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dz5aC-0002iZ-8u for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Oct 2017 18:36:48 +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 1dz5aB-0002hS-3I for pgsql-hackers@postgresql.org; Mon, 02 Oct 2017 18:36:47 +0000 Received: from xvm-110-146.dc2.ghst.net ([46.226.110.146] helo=fetter.org) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dz5a7-0001MY-US for pgsql-hackers@postgresql.org; Mon, 02 Oct 2017 18:36:45 +0000 Received: by fetter.org (Postfix, from userid 1001) id 18C3640112; Mon, 2 Oct 2017 20:36:42 +0200 (CEST) Date: Mon, 2 Oct 2017 20:36:41 +0200 From: David Fetter To: Tom Lane Cc: Nico Williams , Adam Brusselback , pgsql-hackers Subject: Re: generated columns Message-ID: <20171002183641.GE1246@fetter.org> References: <20171002152338.GH1251@localhost> <20171002181042.GI1251@localhost> <10550.1506969038@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <10550.1506969038@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On Mon, Oct 02, 2017 at 02:30:38PM -0400, Tom Lane wrote: > Nico Williams writes: > > On Mon, Oct 02, 2017 at 12:50:14PM -0400, Adam Brusselback wrote: > >> So for me, i'd rather default to compute on read, as long storing the > >> pre-computed value is an option when necessary. > > > Sure, I agree. I was just wondering whether there might be any other > > difference besides performance characteristics. The answer to that is, > > I think, "no". > > What about non-immutable functions in the generation expression? Assuming they're permitted, which...well, I could make a case, they should be mutually exclusive with the cached option. I guess documenting the behavior in the manual would suffice, tempting as it would be to include a NOTICE when the table goes from having 0 or more generated columns all of which are immutable to having at least one that's not. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers