sha1, sha2 functions into core? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject sha1, sha2 functions into core?
Date
Msg-id 1312999579.24721.52.camel@vanquo.pezone.net
Whole thread Raw
Responses Re: sha1, sha2 functions into core?
Re: sha1, sha2 functions into core?
Re: sha1, sha2 functions into core?
List pgsql-hackers
I would like to see whether there is support for adding sha1 and sha2
functions into the core.  These are obviously well-known and widely used
functions, but currently the only way to get them is either through
pgcrypto or one of the PLs.  We could say that's OK, but then we do
support md5 in core, which then encourages people to use that, when they
really shouldn't use that for new applications.  Another weirdness is
that md5() doesn't return bytea but instead the result hex-encoded in a
string, which makes it weird to use in some cases.

One thing that might be reasonable would be to move the digest()
functions
   digest(data text, type text) returns bytea   digest(data bytea, type text) returns bytea

from pgcrypto into core, so that pgcrypto is mostly restricted to
encryption, and can be kept at arm's length for those who need to do
that.

(Side note: Would the extension mechanism be able to easily cope with a
move like that?)




pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Reduced power consumption in autovacuum launcher process
Next
From: Tom Lane
Date:
Subject: Re: SHOW command always returns text field