From: | Federico Balbi <fbalbi(at)cs(dot)utsa(dot)edu> |
---|---|
To: | postgresql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: checksum |
Date: | 2004-09-26 18:31:36 |
Message-ID: | Pine.GSO.4.44.0409261329060.9095-100000@pandora2.cs.utsa.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> David Helgason wrote:
>
> >> I was wondering if PGSQL has a function similar to
> >> binary_checksum() of
> >> MS SQL Server 2000. It is pretty handy when it comes to compare rows of
> >> data instead of having to write long boolean expressions.
> >> binary_checksum() takes a list of fields and it returns an integer value
> >> which sumarize the row content.
> >
> >
> You could use the md5 function.... such as :
>
> select md5(foo) from bar where baz = 2;
Looks like md5() takes only a string. I need to pass alist of fields
instead. I was looking at the documentattion and I think I can write
soemthing like:
field1, field2, ..., fieldn = expr1, expr2, ..., exprn
This way one operator will check all the fields for equality.
Fed
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2004-09-26 19:10:51 | Re: checksum |
Previous Message | Joshua D. Drake | 2004-09-26 18:21:23 | Re: checksum |