1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Implement md5(bytea), update regression tests and documentation. Patch

from Abhijit Menon-Sen, minor editorialization from Neil Conway. Also,
improve md5(text) to allocate a constant-sized buffer on the stack
rather than via palloc.

Catalog version bumped.
This commit is contained in:
Neil Conway
2005-05-20 01:29:56 +00:00
parent ff0c143a3b
commit f3567eeaf2
7 changed files with 99 additions and 10 deletions

View File

@ -1,5 +1,5 @@
<!--
$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.247 2005/05/11 13:58:50 neilc Exp $
$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.248 2005/05/20 01:29:55 neilc Exp $
PostgreSQL documentation
-->
@ -2328,6 +2328,17 @@ PostgreSQL documentation
<entry><literal>5</literal></entry>
</row>
<row>
<entry><literal><function>md5</function>(<parameter>string</parameter>)</literal></entry>
<entry><type>text</type></entry>
<entry>
Calculates the MD5 hash of <parameter>string</parameter>,
returning the result in hexadecimal.
</entry>
<entry><literal>md5('Th\\000omas'::bytea)</literal></entry>
<entry><literal>8ab2d3c9689aaf18 b4958c334c82d8b1</literal></entry>
</row>
<row>
<entry>
<literal><function>decode</function>(<parameter>string</parameter> <type>text</type>,