Easiest way to compare the results of two queries row by row and column by column - Mailing list pgsql-general

Can someone suggest the easiest way to compare the results from two
queries to make sure they are identical?

I am rewriting a large number of views and I want to make sure that
nothing is changes in the results.

Something like

select compare_results('select * from v_old', 'select * from v_new');

I would want this to check that the row count and each row matched
column by column.

I am hoping someone has already written something for this...



pgsql-general by date:

Previous
From: Chris Angelico
Date:
Subject: Re: coalesce function
Next
From: David Johnston
Date:
Subject: Re: Problem with left join when moving a column to another table