Re: checksum

Поиск
Список
Период
Сортировка
От Joshua D. Drake
Тема Re: checksum
Дата
Msg-id 4157143B.5040108@commandprompt.com
обсуждение исходный текст
Ответ на Re: checksum  (Federico Balbi <fbalbi@cs.utsa.edu>)
Список 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@commandprompt.com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL

В списке pgsql-general по дате отправления:

Предыдущее
От: Federico Balbi
Дата:
Сообщение: Re: checksum
Следующее
От: "John Liu"
Дата:
Сообщение: select query core dump