Skip site navigation (1) Skip section navigation (2)

Re: Pgcrypto install (I've tried multiple ways)

From: "David Patricola" <david(dot)patricola(at)jefferson(dot)edu>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Pgcrypto install (I've tried multiple ways)
Date: 2011-01-27 22:57:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
I ran the script under database 'testdb', and that's the database I'm
viewing when in pgAdmin. Here's what \df decript gave me:

Schema |  Name   | Result data type | Argument data types |  Type
public | decrypt | bytea            | bytea, bytea, text  | normal

(it finds all of the functions, in fact)

However, when I run this query it says it can't find the function with the
given name and datatypes.

select decrypt(thenotes, 'thekey', 'aes') AS theoutput
from footable

-----Original Message-----
From: pgsql-novice-owner(at)postgresql(dot)org
[mailto:pgsql-novice-owner(at)postgresql(dot)org] On Behalf Of Tom Lane
Sent: Thursday, January 27, 2011 4:45 PM
To: David Patricola
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] Pgcrypto install (I've tried multiple ways) 

"David Patricola" <david(dot)patricola(at)jefferson(dot)edu> writes:
> I'm not sure what I'm doing wrong here.  I've tried to install the
> module from:
> 1.	psql shell: i\ path/to/pgcrypto.sql
> 2.	pgAdmin: execute pgScript pgcrypto.sql
> Both showed me multiple lines of CREATE FUNCTION with no other errors.
> However, when I try to test the decrypt() function it says it doesn't

Hm, are you sure you're invoking the decrypt function with the right
arguments?  Can you see it with "\df decrypt" in psql?

A different possibility is that you ran the install script in some other
database of the installation.  The functions need to be installed in
each database you want to use them in.

			regards, tom lane

In response to


pgsql-novice by date

Next:From: Tom LaneDate: 2011-01-27 23:15:02
Subject: Re: Pgcrypto install (I've tried multiple ways)
Previous:From: Tom LaneDate: 2011-01-27 21:44:42
Subject: Re: Pgcrypto install (I've tried multiple ways)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group