1
- $PostgreSQL: pgsql/contrib/chkpass/README.chkpass,v 1.4 2007/10/01 06:52:42 darcy Exp $
1
+ $PostgreSQL: pgsql/contrib/chkpass/README.chkpass,v 1.5 2007/10/0119: 06:48 darcy Exp $
2
2
3
3
Chkpass is a password type that is automatically checked and converted upon
4
4
entry. It is stored encrypted. To compare, simply compare against a clear
@@ -21,6 +21,36 @@ The encryption uses the standard Unix function crypt(), and so it suffers
21
21
from all the usual limitations of that function; notably that only the
22
22
first eight characters of a password are considered.
23
23
24
+ Here is some sample usage:
25
+
26
+ test=# create table test (p chkpass);
27
+ CREATE TABLE
28
+ test=# insert into test values ('hello');
29
+ INSERT 0 1
30
+ test=# select * from test;
31
+ p
32
+ ----------------
33
+ :dVGkpXdOrE3ko
34
+ (1 row)
35
+
36
+ test=# select raw(p) from test;
37
+ raw
38
+ ---------------
39
+ dVGkpXdOrE3ko
40
+ (1 row)
41
+
42
+ test=# select p = 'hello' from test;
43
+ ?column?
44
+ ----------
45
+ t
46
+ (1 row)
47
+
48
+ test=# select p = 'goodbye' from test;
49
+ ?column?
50
+ ----------
51
+ f
52
+ (1 row)
53
+
24
54
D'Arcy J.M. Cain
25
55
darcy@druid.net
26
56