Re: Pgcrypto install (I've tried multiple ways) - Mailing list pgsql-novice

From Tom Lane
Subject Re: Pgcrypto install (I've tried multiple ways)
Date
Msg-id 9064.1296171244@sss.pgh.pa.us
Whole thread Raw
In response to Re: Pgcrypto install (I've tried multiple ways)  ("David Patricola" <david.patricola@jefferson.edu>)
Responses Re: Pgcrypto install (I've tried multiple ways)  ("David Patricola" <david.patricola@jefferson.edu>)
Re: Pgcrypto install (I've tried multiple ways)  ("David Patricola" <david.patricola@jefferson.edu>)
List pgsql-novice
"David Patricola" <david.patricola@jefferson.edu> writes:
> Actually, what is bytea in terms of type, or rather, what types of database
> fields will this work with?  The field I'm calling from the table is varchar
> (the encrypt function worked find for this).

bytea is for arbitrary byte strings, ie, non-textual data.  Typically
you'd store the output of encrypt() (which yields bytea) in the database
and then apply decrypt() to that.  Not sure what you're trying to do
above.

BTW, according to the pgcrypto man page, use of the PGP functions is
preferred over directly using encrypt/decrypt.

            regards, tom lane

pgsql-novice by date:

Previous
From: "David Patricola"
Date:
Subject: Re: Pgcrypto install (I've tried multiple ways)
Next
From: "David Patricola"
Date:
Subject: Re: Pgcrypto install (I've tried multiple ways)