pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Richard Broersma <richard.broersma@gmail.com>
To: Ben Kim <bkim@tamu.edu>
Cc: pgsql-admin@postgresql.org
Subject: Re: compare two rows
Date: Tue, 12 Oct 2010 17:30:28 -0500
Message-ID: <4CB49B3402000025000368C0@gw.wicourts.gov> (raw)
In-Reply-To: <20101012221055.GC985@tamu.edu>
References: <AANLkTimX4BNmUm7KJ72FUBu+FgcKDxZdMcK4FkTfOmwA@mail.gmail.com>
	<4CB479DB02000025000368A9@gw.wicourts.gov>
	<20101012201747.GA720@tamu.edu>
	<AANLkTinpScsTqJwiM_=3=PN+jjdvHrR8RTdWToA_iP7P@mail.gmail.com>
	<20101012221055.GC985@tamu.edu>

Ben Kim <bkim@tamu.edu> wrote:
 
> create table test_dup (id serial primary key, val text);
 
> How can I check whether the two rows are the same or different?
 
Well, with a primary key in there, they had *better* be different.
 
It would seem you want to see if some *subset* of the columns in two
rows match?  All columns except those in the primary key?
 
The next question is whether you want to just compare two specific
rows or list all duplicates.
 
-Kevin



view thread (7+ messages)  latest in thread

Message-ID: <4CB49B3402000025000368C0@gw.wicourts.gov>
Permalink:  ../4CB49B3402000025000368C0@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4CB49B3402000025000368C0@gw.wicourts.gov

 · 

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-admin@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov, richard.broersma@gmail.com, bkim@tamu.edu
  Subject: Re: compare two rows
  In-Reply-To: <4CB49B3402000025000368C0@gw.wicourts.gov>
  References: <AANLkTimX4BNmUm7KJ72FUBu+FgcKDxZdMcK4FkTfOmwA@mail.gmail.com> <4CB479DB02000025000368A9@gw.wicourts.gov> <20101012201747.GA720@tamu.edu> <AANLkTinpScsTqJwiM_=3=PN+jjdvHrR8RTdWToA_iP7P@mail.gmail.com> <20101012221055.GC985@tamu.edu> <4CB49B3402000025000368C0@gw.wicourts.gov>

* 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