Update gratuitous use of MD5 in documentation
authorPeter Eisentraut <peter_e@gmx.net>
Wed, 7 Feb 2018 02:59:40 +0000 (21:59 -0500)
committerPeter Eisentraut <peter_e@gmx.net>
Thu, 22 Feb 2018 16:34:54 +0000 (11:34 -0500)
It seems some people are bothered by the outdated MD5 appearing in
example code.  So replace it with more modern alternatives or by
a different example function.

Reported-by: Jon Wolski <jonwolski@gmail.com>
doc/src/sgml/citext.sgml
doc/src/sgml/sepgsql.sgml

index 82251de852965b38337f2eafb5dacfd636baf659..b1fe7101b20907cc315b3d1f8d352eaffae44df4 100644 (file)
@@ -80,11 +80,11 @@ CREATE TABLE users (
     pass TEXT   NOT NULL
 );
 
-INSERT INTO users VALUES ( 'larry',  md5(random()::text) );
-INSERT INTO users VALUES ( 'Tom',    md5(random()::text) );
-INSERT INTO users VALUES ( 'Damian', md5(random()::text) );
-INSERT INTO users VALUES ( 'NEAL',   md5(random()::text) );
-INSERT INTO users VALUES ( 'Bj&oslash;rn',  md5(random()::text) );
+INSERT INTO users VALUES ( 'larry',  sha256(random()::text::bytea) );
+INSERT INTO users VALUES ( 'Tom',    sha256(random()::text::bytea) );
+INSERT INTO users VALUES ( 'Damian', sha256(random()::text::bytea) );
+INSERT INTO users VALUES ( 'NEAL',   sha256(random()::text::bytea) );
+INSERT INTO users VALUES ( 'Bj&oslash;rn',  sha256(random()::text::bytea) );
 
 SELECT * FROM users WHERE nick = 'Larry';
 </programlisting>
index 273efc6e271f95bc6f27958fad705860ab632cc1..f8c99e1b002501243ef0840b52f88c228668bba8 100644 (file)
@@ -370,7 +370,7 @@ $ sudo semodule -r sepgsql-regtest
    <para>
    For example, consider:
 <synopsis>
-UPDATE t1 SET x = 2, y = md5sum(y) WHERE z = 100;
+UPDATE t1 SET x = 2, y = func1(y) WHERE z = 100;
 </synopsis>
 
     Here, <literal>db_column:update</literal> will be checked for