[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    Re: Cosmetically-varying casts added to view definitions
From:       Adrian Klaver <adrian.klaver () aklaver ! com>
Date:       2018-07-31 0:22:58
Message-ID: 7f58be67-7d02-05aa-c7f1-c343b0488f36 () aklaver ! com
[Download RAW message or body]

On 07/30/2018 04:57 PM, Ken Tanzer wrote:
> On Mon, Jul 30, 2018 at 4:52 PM Adrian Klaver <adrian.klaver@aklaver.com 
> <mailto:adrian.klaver@aklaver.com>> wrote:
> 
>     On 07/30/2018 04:29 PM, Ken Tanzer wrote:
>      > On Mon, Jul 30, 2018 at 4:10 PM Adrian Klaver
>     <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> 
>      > 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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic