Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dz2ZT-00011C-Fb for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Oct 2017 15:23:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dz2ZT-0007SG-2Q for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Oct 2017 15:23:51 +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 1dz2ZQ-0007KW-So for pgsql-hackers@postgresql.org; Mon, 02 Oct 2017 15:23:49 +0000 Received: from sub4.mail.dreamhost.com ([69.163.253.135] helo=homiemail-a24.g.dreamhost.com) by makus.postgresql.org with esmtps (TLS1.1:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dz2ZN-0005eU-5Q for pgsql-hackers@postgresql.org; Mon, 02 Oct 2017 15:23:47 +0000 Received: from homiemail-a24.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a24.g.dreamhost.com (Postfix) with ESMTP id 2D4A770F6787; Mon, 2 Oct 2017 08:23:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=cryptonector.com; bh=G+ixLjxRaEtR40 EQm4hKIm2sL0o=; b=E4Ducgk9217YsAXW611OcNL6jxRfMRfdYWRIbnWl5olE0S ws2sy7UVPI/U0G0VhJchXYCS1Ss/PvW9og9mQTMX2aY6/90WwabD7ZKtp126b7wO Naydf4mzcn5lfFaUK/NEQDmwNFV74IivWymxIevzyhU+dewo82ZQzq1Z2nTa0= Received: from localhost (cpe-70-123-158-140.austin.res.rr.com [70.123.158.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by homiemail-a24.g.dreamhost.com (Postfix) with ESMTPSA id D887B70F6785; Mon, 2 Oct 2017 08:23:42 -0700 (PDT) Date: Mon, 2 Oct 2017 10:23:41 -0500 From: Nico Williams To: Peter Eisentraut Cc: pgsql-hackers Subject: Re: generated columns Message-ID: <20171002152338.GH1251@localhost> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Thu, Aug 31, 2017 at 12:16:43AM -0400, Peter Eisentraut wrote: > In previous discussions, it has often been a source of confusion whether > these generated columns are supposed to be computed on insert/update and > stored, or computed when read. The SQL standard is not explicit, but > appears to lean toward stored. DB2 stores. Oracle computes on read. Question: How would one know the difference between storing computed columns vs. computing them on read? Answer?: Performance. If the computation is slow, then you'll really notice on read. Nico -- -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers