Re: pgcryto strangeness...

Поиск
Список
Период
Сортировка
От Bear Giles
Тема Re: pgcryto strangeness...
Дата
Msg-id 200201051546.IAA11245@eris.coyotesong.com
обсуждение исходный текст
Ответ на pgcryto strangeness...  (Sean Chittenden <sean@chittenden.org>)
Список pgsql-hackers
> host=# SELECT DIGEST('asdf', 'md5') FROM users_shadow;
>                      digest                     
> ------------------------------------------------
>  \221.\310\003\262\316I\344\245A\006\215IZ\265p
> (1 row)

You must encode() the results.

(For the record, I consider that a serious design flaw.
It may not be possible to safely dump and restore tables
containing unencoded 8-bit data.)

> host=# SELECT DIGEST(password, 'md5') FROM users_shadow;
> ERROR:  Function 'digest(varchar, unknown)' does not exist
>         Unable to identify a function that satisfies the given argument types
>         You may need to add explicit typecasts
> host=# SELECT DIGEST(CAST(password AS bytea), CAST('md5' AS TEXT)) FROM users_shadow;
> ERROR:  Cannot cast type 'varchar' to 'bytea'
Try dropping the first cast.



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

Предыдущее
От: Michael Meskes
Дата:
Сообщение: Re: ecpg compile error on AIX
Следующее
От: Bear Giles
Дата:
Сообщение: JDBC: why is PGobject class instead of interface?