pgcryto strangeness... - Mailing list pgsql-hackers

From Sean Chittenden
Subject pgcryto strangeness...
Date
Msg-id 20020105004640.S36993@ninja1.internal
Whole thread Raw
Responses Re: pgcryto strangeness...  (Bear Giles <bear@coyotesong.com>)
List pgsql-hackers
Just started using the pgcrypt 0.4.2 (very cool stuff) and am having
some strange errors (not so cool).  Can someone make sense of the SQL
below?  I'm not 100% sure what's going on or not going on...


host=# SELECT DIGEST('asdf', 'md5') FROM users_shadow;                    digest                     
------------------------------------------------\221.\310\003\262\316I\344\245A\006\215IZ\265p
(1 row)

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
argumenttypes       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'

Any ideas as to how I can do this?  -sc

-- 
Sean Chittenden


pgsql-hackers by date:

Previous
From: Brent Verner
Date:
Subject: Re: Some interesting results from tweaking spinlocks
Next
From: mlw
Date:
Subject: Re: Some interesting results from tweaking spinlocks