Thanks -- that did the trick! And when I went to consult my documentation
about this command, I realized I was looking at 7.2 docs (downloaded) vs my
currently running version of 7.3.
Manuel Sugawara
<masm (AT) fciencias (DOT) una To: Glenn_Wiens (AT) via-christi (DOT) org
m.mx> cc: pgsql-novice (AT) postgresql (DOT) org
Sent by: Fax to:
masm (AT) conexa (DOT) fcienci Subject: Re: [NOVICE] Problem with encode() function
as.unam.mx
05/21/2004 05:21 PM
Glenn_Wiens (AT) via-christi (DOT) org writes:
Quote:
but I still get the error:
ERROR: Function encode(text, "unknown") does not exist
Unable to identify a function that satisfies the given argument
types
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.
Regards,
Manuel.
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org