Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VOWLw-00086C-3k for pgsql-bugs@arkaria.postgresql.org; Tue, 24 Sep 2013 17:24:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VOWLv-0002P7-Eq for pgsql-bugs@arkaria.postgresql.org; Tue, 24 Sep 2013 17:24:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VOFIG-0000e2-Hx for pgsql-bugs@postgresql.org; Mon, 23 Sep 2013 23:11:52 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VOFIB-0001iz-Tk for pgsql-bugs@postgresql.org; Mon, 23 Sep 2013 23:11:52 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VOFI9-00052n-H9 for pgsql-bugs@postgresql.org; Mon, 23 Sep 2013 23:11:47 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.80) (envelope-from ) id 1VOFI4-0005nz-6r for pgsql-bugs@postgresql.org; Mon, 23 Sep 2013 23:11:40 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: BUG #8467: Slightly confusing pgcrypto example in docs To: pgsql-bugs@postgresql.org From: postgresql@richardneill.org Message-Id: Date: Mon, 23 Sep 2013 23:11:40 +0000 X-Pg-Spam-Score: -4.2 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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