pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: postgresql@richardneill.org
To: pgsql-bugs@postgresql.org
Subject: BUG #8467: Slightly confusing pgcrypto example in docs
Date: Mon, 23 Sep 2013 23:11:40 +0000
Message-ID: <E1VOFI4-0005nz-6r@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      8467
Logged by:          Richard Neill
Email address:      postgresql@richardneill.org
PostgreSQL version: 9.3.0
Operating system:   Documentation bug
Description:        

The documentation for pgcrypto: 
http://www.postgresql.org/docs/current/static/pgcrypto.html
(and indeed all versions from 8.3-9.3)
contains the following:


--------------------
Example of authentication:


SELECT pswhash = crypt('entered password', pswhash) FROM ... ;


This returns true if the entered password is correct.
--------------------


I found this confusing, because it's  using the same name, "pswhash" in 2
places, one of which is a boolean. It would be, imho, clearer to write the
example query as:


--------------------
SELECT is_authenticated = crypt('entered password', pswhash) FROM ... ;
--------------------


[Also, should the default example perhaps use gen_salt('bf'), as opposed to
gen_salt('md5') ?]




-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (12+ messages)  latest in thread

Message-ID: <E1VOFI4-0005nz-6r@wrigleys.postgresql.org>
Permalink:  ../E1VOFI4-0005nz-6r@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/E1VOFI4-0005nz-6r@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: postgresql@richardneill.org
  Subject: Re: BUG #8467: Slightly confusing pgcrypto example in docs
  In-Reply-To: <E1VOFI4-0005nz-6r@wrigleys.postgresql.org>
  References: <E1VOFI4-0005nz-6r@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox