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