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 1fkIRR-0004Qq-QV for pgsql-general@arkaria.postgresql.org; Tue, 31 Jul 2018 00:23:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fkIRP-0004CM-NC for pgsql-general@arkaria.postgresql.org; Tue, 31 Jul 2018 00:23:07 +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.89) (envelope-from ) id 1fkIRO-0004C7-Cg for pgsql-general@lists.postgresql.org; Tue, 31 Jul 2018 00:23:07 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fkIRK-00067Q-Ez for pgsql-general@postgresql.org; Tue, 31 Jul 2018 00:23:05 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 8FDA879D; Mon, 30 Jul 2018 20:23:00 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 30 Jul 2018 20:23:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=obCjMJvW44yIh4PhEAwGWusE8uh5Q pnSi9mpOTwBfJw=; b=Ix3Y2RAoEttM+9gVxvD1uuqhJr13ZhkaGLyBvrhiQojLk EIlB89CEOn5ey47OfEQJXmkbzcJlJ7eZ0T+wbTJcasJb/MIBWliOrnO7morenDTs sBpzAK1VA3X4GLxDoPJmNGypqnpq/KfK8KQghOjULovBU5/+yDKVH/WSiVESXYb/ 0lqsPSG4IXSmP+fKBzN9HY0jdGPM/2yCXePiFJDHiR4hOnYqHiI6AuBQwhPbD9OK yYdgejdG09Loam/7cmio1VWaYY2zFFwmHD4uzGZ1th/8bxhX4F3Ddy0KK+9YNmm0 UaYsbeVEwuFrhtbWjva1wfWWUGq1JyArt8a0Og45g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=obCjMJ vW44yIh4PhEAwGWusE8uh5QpnSi9mpOTwBfJw=; b=wdFO85DtdZq4HY44lwimNx daUNicm0CQ/t4W3vh/zcN9ez+/V+7lXSB4RMcj1yz4g7Okp8SaYYLgFlYHsybROV n8E8CgkBW+07cMgMNEt6FwMMcCDn/qPjdRFU9CZh2VegdNGtkzILn9d/zMQTksKI L/h/W9Hbqlx6ZqLCxHLYHaVqQUXcZE9gAHYZujtM/ntr5kX3y3JryZZJbkUxHUBv Sd8IdX2Px487dTpD0PCNRjzr1rXf11V65RZKJiRctrEfHALBnY/Vi0HXteUcgmiD tJxo+rJyZ05Bil2G6ljp16G0F3ptbxPvxh6Z/PWJbssp6JCClDtaisXh5xenH6cQ == X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.3] (unknown [71.212.134.181]) by mail.messagingengine.com (Postfix) with ESMTPA id 66B2A1026B; Mon, 30 Jul 2018 20:22:59 -0400 (EDT) Subject: Re: Cosmetically-varying casts added to view definitions To: Ken Tanzer Cc: PG-General Mailing List References: From: Adrian Klaver Message-ID: <7f58be67-7d02-05aa-c7f1-c343b0488f36@aklaver.com> Date: Mon, 30 Jul 2018 17:22:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 07/30/2018 04:57 PM, Ken Tanzer wrote: > On Mon, Jul 30, 2018 at 4:52 PM Adrian Klaver > wrote: > > On 07/30/2018 04:29 PM, Ken Tanzer wrote: > > On Mon, Jul 30, 2018 at 4:10 PM Adrian Klaver > > > > Thanks Adrian.  I do have what are supposed to be the original view > > definitions, but I'm less than 100% confident they are accurate and > > up-to-date, which is why I thought to use the actual definitions as > > stored.  Might have to rethink that one though, or just take a > leap of > > faith that the views will functionally be the same! > > Or write a test or tests to verify they are the same. > > > How would you do that exactly?  I can see verifying that they return the > same rows given existing data, but not that this would be true with > different data. Well if the different definitions of the view are returning the exact same data currently that would mean to me their selection criteria are the same. Any data in the future would be subjected to the same criteria so there would not be a problem. That is unless you want to change the criteria in the future and which point you would need to decide which view definition to base the changes off. > > Did you mean comparing the returned results, writing some view-specific > tests on a case-by-case basis, or something way way better that I'm not > grasping? I would say comparing the results. You know what you want the view to return, so select from it for known values and see if it returns what you expect. > > Thanks! > > Ken > -- > AGENCY Software -- Adrian Klaver adrian.klaver@aklaver.com