> but I still get the error:
> ERROR: Function encode(text, "unknown") does not exist
> Unable to identify a function that satisfies the given argument
> You may need to add explicit typecasts
> Is there a way I can accomplish this task?
The problem is that there is no cast from varchar to bytea (which is
what encode takes as first argument). Try creating the cast first:
CREATE CAST (varchar as bytea) WITHOUT FUNCTION;
SELECT encode(password::bytea, 'base64'::text) FROM texttable;
You may want to drop the cast afterwards.
In response to
pgsql-novice by date
|Next:||From: Jeffrey Melloy||Date: 2004-05-22 02:52:48|
|Subject: Re: Set search_path|
|Previous:||From: Glenn_Wiens||Date: 2004-05-21 19:50:31|
|Subject: Problem with encode() function|