Re: checksumming data

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Can Burak Cilingir <canburak(at)cs(dot)bilgi(dot)edu(dot)tr>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: checksumming data
Date: 2005-01-04 15:48:11
Message-ID: 20050104154811.GA91445@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Tue, Jan 04, 2005 at 10:26:26AM +0200, Can Burak Cilingir wrote:

> the need for md5summing by the help of database is just curiosity. I am
> summing before insert which was enough already.

The digest() function in contrib/pgcrypto takes a BYTEA or TEXT
argument, which presumably means you'd have to read the entire file
into memory (or can it be mmap()'ed? I'm not sure). For large
data this isn't practical, so you might want to look for something
that can build the hash in blocks. See the pgcrypto source code
for examples.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message brew 2005-01-04 16:53:23 Re: pg_config missing in install
Previous Message Jeff Eckermann 2005-01-04 15:13:36 Re: [despammed] Installation