Re: md5(large_object_id)

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: md5(large_object_id)
Date: 2015-10-07 11:38:05
Message-ID: 20151007113805.GD2708@hermes.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Oct 07, 2015 at 01:30:24PM +0200, Pavel Stehule wrote:

> > > > > I am dealing with radiology studies aka DICOM data) one would
> > > > > want an md5 function which streams in parts of a large object
> > > > > piece by piece using md5_update and m5_finalize or some such.
> > > > It would certainly be possible to write a lo_md5(oid) function to do
> > > > this, but as far as I'm aware nobody has yet done so. How are your
> > > > C skills?
> > >
> > > I had hoped someone was going to say: "Yeah, right, low
> > > hanging fruit, let's just do it for 9.next" :-)
> >
> > Someone _with_ C skills, that is.
> >
>
> if the size of blobs is less than 1GB, then it should be possible in
> plpgsql too.
>
> postgres=# \lo_import ~/Desktop/001.jpg
> lo_import 24577
> postgres=# select md5(lo_get(24577));
> ┌──────────────────────────────────┐
> │ md5 │
> ╞══════════════════════════════════╡
> │ 610ccaab8c7c60e1168abfa799d1305d │
> └──────────────────────────────────┘
> (1 row)

It is, I know. but I am exactly after the use case > 1 GB

Thanks,
Karsten
--
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thom Brown 2015-10-07 11:39:41 Re: How to drop user if objects depend on it
Previous Message Pavel Stehule 2015-10-07 11:30:24 Re: md5(large_object_id)