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

From Peter Eisentraut
Subject Re: sha1, sha2 functions into core?
Date
Msg-id 1313046396.5229.3.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: sha1, sha2 functions into core?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: sha1, sha2 functions into core?
List pgsql-hackers
On ons, 2011-08-10 at 14:19 -0400, Tom Lane wrote:
> > 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,
> 
> ... which this approach would create, because digest() isn't
> restricted
> to just those algorithms.  I think it'd be better to just invent two
> new functions, which also avoids issues for applications that
> currently
> expect the digest functions to be installed in pgcrypto's schema.

I would also prefer to simply add sha1(bytea/text) => bytea, but the
existing md5 function is md5(bytea/text) => test, so either the new
functions would be inconsistent, or we make the new functions broken
like the old one, or we invent a different naming system, such as
digest().



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Possible Bug in pg_upgrade
Next
From: Peter Eisentraut
Date:
Subject: Re: XMLATTRIBUTES vs. values of type XML