Add some examples.
This commit is contained in:
parent
5a95c560f0
commit
c2862e3cad
@ -1,4 +1,4 @@
|
|||||||
$PostgreSQL: pgsql/contrib/chkpass/README.chkpass,v 1.4 2007/10/01 06:52:42 darcy Exp $
|
$PostgreSQL: pgsql/contrib/chkpass/README.chkpass,v 1.5 2007/10/01 19:06:48 darcy Exp $
|
||||||
|
|
||||||
Chkpass is a password type that is automatically checked and converted upon
|
Chkpass is a password type that is automatically checked and converted upon
|
||||||
entry. It is stored encrypted. To compare, simply compare against a clear
|
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
|
|||||||
from all the usual limitations of that function; notably that only the
|
from all the usual limitations of that function; notably that only the
|
||||||
first eight characters of a password are considered.
|
first eight characters of a password are considered.
|
||||||
|
|
||||||
|
Here is some sample usage:
|
||||||
|
|
||||||
|
test=# create table test (p chkpass);
|
||||||
|
CREATE TABLE
|
||||||
|
test=# insert into test values ('hello');
|
||||||
|
INSERT 0 1
|
||||||
|
test=# select * from test;
|
||||||
|
p
|
||||||
|
----------------
|
||||||
|
:dVGkpXdOrE3ko
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
test=# select raw(p) from test;
|
||||||
|
raw
|
||||||
|
---------------
|
||||||
|
dVGkpXdOrE3ko
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
test=# select p = 'hello' from test;
|
||||||
|
?column?
|
||||||
|
----------
|
||||||
|
t
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
test=# select p = 'goodbye' from test;
|
||||||
|
?column?
|
||||||
|
----------
|
||||||
|
f
|
||||||
|
(1 row)
|
||||||
|
|
||||||
D'Arcy J.M. Cain
|
D'Arcy J.M. Cain
|
||||||
darcy@druid.net
|
darcy@druid.net
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user