Re: Whole-row comparison ?

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: christian(dot)roche(dot)ext(at)nsn(dot)com, pgsql-sql(at)postgresql(dot)org
Subject: Re: Whole-row comparison ?
Date: 2007-05-17 13:38:26
Message-ID: 457481.33047.qm@web31807.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> So my question is: is there a way to do some kind of whole-row
> comparison ? For instance a hash of the full row or something similar ?
> Is there a standard way of solving this problem ?

Sure it is called row wise comparison:
http://www.postgresql.org/docs/8.2/interactive/functions-comparisons.html#ROW-WISE-COMPARISON

you can write something like:

SELECT *
FROM Your_table
WHERE (c1,c2,c3,c4) = ('a',2,'xyz',123);

Regards,
Richard Broersma Jr.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Broersma Jr 2007-05-17 17:20:35 Re: Whole-row comparison ?
Previous Message Christopher Maier 2007-05-17 13:19:48 How can you generate a counter for ordered sets?