PGCrypto with Integers and DATE types -- how to?

From: "Moran(dot)Michael" <Michael(dot)Moran(at)IGT(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: PGCrypto with Integers and DATE types -- how to?
Date: 2005-03-16 15:45:36
Message-ID: B27C8914860EE24E865D189A3735EA53100938@lasexch03.is.ad.igt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello,

How do you encrypt() & decrypt() data of types INT4 or DATE?

The PGCrypto methods encrypt() and decrypt() each take BYTEA as input:

i.e.,
encrypt( data::bytea, key::bytea, type::text)
decrypt( data::bytea, key::bytea, type::text)

So how do you convert INT4 and DATE data into BYTEA so that they can be
passed as input into the PGCrypto methods encrypt() & decrypt()?

Thank you,
Michael Moran

Browse pgsql-sql by date

  From Date Subject
Next Message KÖPFERL Robert 2005-03-16 16:22:58 Re: How does the planner treat a table function.
Previous Message Tom Lane 2005-03-16 15:41:52 Re: How to force subquery scan?