BUG #8467: Slightly confusing pgcrypto example in docs

Поиск
Список
Период
Сортировка
От postgresql@richardneill.org
Тема BUG #8467: Slightly confusing pgcrypto example in docs
Дата
Msg-id E1VOFI4-0005nz-6r@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #8467: Slightly confusing pgcrypto example in docs  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-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') ?]

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Devrim GÜNDÜZ
Дата:
Сообщение: Re: BUG #8463: Packaging problem with postgis rpms
Следующее
От: marian.krucina@gmail.com
Дата:
Сообщение: BUG #8468: Create index on type tstzrange fail