| From: | Joe Conway <mail(at)joeconway(dot)com> | 
|---|---|
| To: | David H <godave621(at)yahoo(dot)com> | 
| Cc: | pgsql-novice(at)postgresql(dot)org | 
| Subject: | Re: howto use pgencrypto ? | 
| Date: | 2003-12-05 06:23:50 | 
| Message-ID: | 3FD02476.4040701@joeconway.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-novice | 
David H wrote:
> select encrypt
> ('srcip'::bytea,'pass'::bytea,'bf'::text)::bytea as
> "test" from tbltcplog limit 3;
> 
> I got:
> 
> ERROR:  Function encrypt(bytea, bytea, text) does not
> exist
>         Unable to identify a function that satisfies
> the given argument types
>         You may need to add explicit typecasts
The pgcrypto README doesn't seem to mention it, but in general, after 
building any of the contrib libraries, you need to "load" them into any 
databases in which you want to use their functions. Something like:
psql mydatabase < pgcrypto.sql
However, If you are using the regression database after running make 
installcheck, the functions should be there. I get this:
regression=# \df encrypt
                      List of functions
  Result data type | Schema |  Name   | Argument data types
------------------+--------+---------+---------------------
  bytea            | public | encrypt | bytea, bytea, text
(1 row)
So I'd conclude you are not using the regression database and need to 
follow the first suggestion ;-)
HTH,
Joe
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Simon Chalmers | 2003-12-05 06:48:13 | Re: howto use pgencrypto ? | 
| Previous Message | David H | 2003-12-05 05:10:49 | howto use pgencrypto ? |