pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jason Long <mailing.lists@octgsoftware.com>
To: pgsql-general@postgresql.org
Subject: Easiest way to compare the results of two queries row by row and column by column
Date: Thu, 20 Jun 2013 17:18:25 -0500
Message-ID: <1371766705.15253.44.camel@localhost.localdomain> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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...



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



view thread (10+ messages)  latest in thread

Message-ID: <1371766705.15253.44.camel@localhost.localdomain>
Permalink:  ../1371766705.15253.44.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1371766705.15253.44.camel@localhost.localdomain

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: mailing.lists@octgsoftware.com
  Subject: Re: Easiest way to compare the results of two queries row by row and column by column
  In-Reply-To: <1371766705.15253.44.camel@localhost.localdomain>
  References: <1371766705.15253.44.camel@localhost.localdomain>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox