I don't believe there is an internal function for it, although it
would probably be an easy function to write in C and make available
with CREATE FUNCTION.
Stephan Szabo
sszabo@bigpanda.com
On Tue, 26 Sep 2000, Alexi Margo wrote:
> Hi,
>
> I'm new to PostgreSQL, but have installed it on a RedHat 6.2 box. We are
> currently trying to migrate our existing MySQL applications to PostgreSQL,
> but the differences in syntax are presenting a few problems.
>
> My main stumbling block is the apparent lack of a function to form a hash
> (or other one-way encrypt) of a password to enter as a field in the
> database. The old SQL looks something like:
>
> > INSERT INTO Users (Name, Password) VALUES ('John Smith',
> PASSWORD('mypassword'))
>
> This works because "PASSWORD" is an internal function in MySQL. Is there a
> similar function in PostgreSQL, or some other way of achieving the same
> effect? The data itself is not being moved over, so there is no need for the
> same algorithm to be used.