head	1.3;
access;
symbols
	REL9_0_0:1.2.16.1
	REL9_1_ALPHA1:1.3
	REL9_0_RC1:1.2.16.1
	REL9_0_BETA4:1.2
	REL9_0_STABLE:1.2.0.16
	REL9_0_BETA3:1.2
	REL9_0_BETA2:1.2
	REL8_3_11:1.2
	REL8_4_4:1.2
	REL9_0_BETA1:1.2
	REL9_0_ALPHA5_BRANCH:1.2.0.14
	REL9_0_ALPHA5:1.2
	REL8_3_10:1.2
	REL8_4_3:1.2
	REL9_0_ALPHA4:1.2
	REL9_0_ALPHA4_BRANCH:1.2.0.12
	REL8_5_ALPHA3:1.2
	REL8_5_ALPHA3_BRANCH:1.2.0.10
	REL8_3_9:1.2
	REL8_4_2:1.2
	REL8_5_ALPHA2:1.2
	REL8_5_ALPHA2_BRANCH:1.2.0.8
	REL8_3_8:1.2
	REL8_4_1:1.2
	REL8_5_ALPHA1:1.2
	REL8_5_ALPHA1_BRANCH:1.2.0.6
	REL8_4_STABLE:1.2.0.4
	REL8_4_0:1.2
	REL8_4_RC2:1.2
	REL8_4_RC1:1.2
	REL8_4_BETA2:1.2
	REL8_4_BETA1:1.2
	REL8_3_7:1.2
	REL8_3_6:1.2
	REL8_3_5:1.2
	REL8_3_4:1.2
	REL8_3_3:1.2
	REL8_3_2:1.2
	REL8_3_1:1.2
	REL8_3_STABLE:1.2.0.2
	REL8_3_0:1.2
	REL8_3_RC2:1.2
	REL8_3_RC1:1.2
	REL8_3_BETA4:1.1
	REL8_3_BETA3:1.1;
locks; strict;
comment	@# @;


1.3
date	2010.08.17.04.37.20;	author petere;	state Exp;
branches;
next	1.2;

1.2
date	2007.12.06.04.12.09;	author tgl;	state Exp;
branches
	1.2.16.1;
next	1.1;

1.1
date	2007.11.10.23.30.46;	author momjian;	state Exp;
branches;
next	;

1.2.16.1
date	2010.08.17.04.37.15;	author petere;	state Exp;
branches;
next	;


desc
@@


1.3
log
@Spell and markup checking
@
text
@<!-- $PostgreSQL: pgsql/doc/src/sgml/chkpass.sgml,v 1.2 2007/12/06 04:12:09 tgl Exp $ -->

<sect1 id="chkpass">
 <title>chkpass</title>

 <indexterm zone="chkpass">
  <primary>chkpass</primary>
 </indexterm>

 <para>
  This module implements a data type <type>chkpass</> that is
  designed for storing encrypted passwords.
  Each password is automatically converted to encrypted form upon entry,
  and is always stored encrypted.  To compare, simply compare against a clear
  text password and the comparison function will encrypt it before comparing.
 </para>

 <para>
  There are provisions in the code to report an error if the password is
  determined to be easily crackable.  However, this is currently just
  a stub that does nothing.
 </para>

 <para>
  If you precede an input string with a colon, it is assumed to be an
  already-encrypted password, and is stored without further encryption.
  This allows entry of previously-encrypted passwords.
 </para>

 <para>
  On output, a colon is prepended.  This makes it possible to dump and reload
  passwords without re-encrypting them.  If you want the encrypted password
  without the colon then use the <function>raw()</> function.
  This allows you to use the
  type with things like Apache's <literal>Auth_PostgreSQL</> module.
 </para>

 <para>
  The encryption uses the standard Unix function <function>crypt()</>,
  and so it suffers
  from all the usual limitations of that function; notably that only the
  first eight characters of a password are considered.
 </para>

 <para>
  Note that the <type>chkpass</type> data type is not indexable.
  <!--
  I haven't worried about making this type indexable.  I doubt that anyone
  would ever need to sort a file in order of encrypted password.
  -->
 </para>

 <para>
  Sample usage:
 </para>

<programlisting>
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)
</programlisting>

 <sect2>
  <title>Author</title>

  <para>
   D'Arcy J.M. Cain (<email>darcy@@druid.net</email>)
  </para>
 </sect2>

</sect1>
@


1.2
log
@Make an editorial pass over the newly SGML-ified contrib documentation.
Fix lots of bad markup, bad English, bad explanations.

This commit covers only about half the contrib modules, but I grow weary...
@
text
@d1 1
a1 1
<!-- $PostgreSQL$ -->
d35 1
a35 1
  type with things like Apache's Auth_PostgreSQL module.
d46 1
a46 1
  Note that the chkpass data type is not indexable.
@


1.2.16.1
log
@Spell and markup checking
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/chkpass.sgml,v 1.2 2007/12/06 04:12:09 tgl Exp $ -->
d35 1
a35 1
  type with things like Apache's <literal>Auth_PostgreSQL</> module.
d46 1
a46 1
  Note that the <type>chkpass</type> data type is not indexable.
@


1.1
log
@Move most /contrib README files into SGML.  Some still need conversion
or will never be converted.
@
text
@d1 2
d4 2
a5 3
 <title>chkpass</title> 
 
 <!--
d9 1
a9 1
 -->
d11 4
a14 2
  chkpass is a password type that is automatically checked and converted upon
  entry.  It is stored encrypted.  To compare, simply compare against a clear
a15 2
  It also returns an error if the code determines that the password is easily
  crackable.  This is currently a stub that does nothing.
d19 3
a21 5
  Note that the chkpass data type is not indexable.
  <!--
  I haven't worried about making this type indexable.  I doubt that anyone
  would ever need to sort a file in order of encrypted password.
  -->
d25 3
a27 2
  If you precede the string with a colon, the encryption and checking are
  skipped so that you can enter existing passwords into the field.
d32 3
a34 2
  passwords without re-encrypting them.  If you want the password (encrypted)
  without the colon then use the raw() function.  This allows you to use the
d39 2
a40 1
  The encryption uses the standard Unix function crypt(), and so it suffers
d46 5
a50 1
  Here is some sample usage:
d53 5
a57 1
 <programlisting>
d85 1
a85 1
 </programlisting>
d89 1
d91 1
a91 1
   D'Arcy J.M. Cain <email>darcy@@druid.net</email>
d94 1
a95 1

@

