From: Michael Fuhr <mike@fuhr.org>
To: Dirk Jagdmann <jagdmann@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: MD5 sums of large objects
Date: Sun, 8 Apr 2007 19:07:27 -0600
Message-ID: <20070409010727.GA80424@winnie.fuhr.org> (raw)
In-Reply-To: <5d0f60990704081707m56b29423ob5d63103623305b2@mail.gmail.com>
References: <5d0f60990704081003p615530acx86257a70bff33fa4@mail.gmail.com>
<20070408173757.GA78999@winnie.fuhr.org>
<5d0f60990704081707m56b29423ob5d63103623305b2@mail.gmail.com>
On Mon, Apr 09, 2007 at 02:07:16AM +0200, Dirk Jagdmann wrote:
> this works like charm. Although I did fix the argument for lo_lseek:
Oops; thanks for fixing that.
> INV_READ constant integer := 262144; -- 0x40000 from libpq-fs.h
You could also use a hex constant (the cast to integer is necessary):
INV_READ constant integer := x'40000'::integer;
> IF id is null THEN
> RETURN NULL;
> END IF;
The above check is unnecessary since the function is marked STRICT,
aka RETURNS NULL ON NULL INPUT.
> I vote for this function beeing included either somewhere in the
> contrib directories, as you often don't need the full power of
> pgcrypto is md5 suffices for your hashing needs.
You could make a proposal in pgsql-hackers but I think 8.3 is in
feature freeze so don't expect to see it until 8.4, if it's accepted
at all. There's always PgFoundry :-)
--
Michael Fuhr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mike@fuhr.org, jagdmann@gmail.com
Subject: Re: MD5 sums of large objects
In-Reply-To: <20070409010727.GA80424@winnie.fuhr.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox