Re: checksum

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Federico Balbi <fbalbi(at)cs(dot)utsa(dot)edu>
Cc: postgresql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: checksum
Date: 2004-09-26 19:10:51
Message-ID: 4157143B.5040108@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


>>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.
>
>
>

Maybe I am missing what you are saying, but you can md5() the data
column... So you could do:

select one,two from foo where md5(one) = 'e4da3b7fbbce2345d7772b0674a318d5';

or

select one,two from foo where md5(one) = $1; or whatever.

for example....

Sincerely,

Joshua D. Drake

>Fed
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 7: don't forget to increase your free space map settings
>
>

--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd(at)commandprompt(dot)com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL

In response to

Browse pgsql-general by date

  From Date Subject
Next Message gearond 2004-09-26 21:39:05 wierd reserved word?
Previous Message Federico Balbi 2004-09-26 18:31:36 Re: checksum