Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c2862e3

Browse files
committed
Add some examples.
1 parent 5a95c56 commit c2862e3

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

contrib/chkpass/README.chkpass

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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/01 19:06:48 darcy Exp $
22

33
Chkpass is a password type that is automatically checked and converted upon
44
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
2121
from all the usual limitations of that function; notably that only the
2222
first eight characters of a password are considered.
2323

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+
2454
D'Arcy J.M. Cain
2555
darcy@druid.net
2656

0 commit comments

Comments
 (0)