compare two rows

From: Ben Kim <bkim(at)tamu(dot)edu>
To: pgsql-admin(at)postgresql(dot)org
Subject: compare two rows
Date: 2010-10-12 20:17:47
Message-ID: 20101012201747.GA720@tamu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Admins,

What is the best way to compare two rows from within psql cli client?

It has ~30 fields, and the two rows are duplicate data but there might
be differences.

id field1 field2 field3 ...
===========================
id1 value1 value2 value3 ...
id2 value1 value2 value3 ...

I could write a generic script to iterate through the list of fields and
compare each field values, or concatenate the fields to a string, but wondered what is out there.

Also, is there a way around to use select row(...) = row(...)?

Thanks.
--
Ben Kim

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2010-10-12 21:11:17 Re: compare two rows
Previous Message Kevin Grittner 2010-10-12 20:08:11 Re: default console user authentication?