From: | Andre Lopes <lopes80andre(at)gmail(dot)com> |
---|---|
To: | postgresql Forums <pgsql-general(at)postgresql(dot)org> |
Subject: | Hosting without pgcrypto functions. There are other solutions? |
Date: | 2010-06-13 20:37:22 |
Message-ID: | AANLkTilWMpZcjmGX890sTn7dj8PHYH1Mrna_jwJM0_X9@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I have an account in A2Hosting.com, and I'm developing some functions that
deal with encryption.
A2Hosting.com don't have available the function "digest()"
[code]
ERROR: function digest(unknown, unknown) does not exist
LINE 1: select digest('ffff', 'sha1')
^
HINT: No function matches the given name and argument types. You might need
to add explicit type casts.
Indicação de entrada :
select digest('ffff', 'sha1')
[/code]
I need to compile a SHA1 function, but without the digest() function,
nothing done...
[code]
CREATE OR REPLACE FUNCTION sha1(bytea) returns text AS $$
SELECT encode(digest($1, 'sha1'), 'hex')
$$ LANGUAGE SQL STRICT IMMUTABLE;
[/code]
There is a way to get this job done without the digest() function?
I need also to be able to do this select "select substr(gen_salt('md5'), 0,
10)" but there is no "gen_salt()" available...
What is my best option? To change hosting account? There is some hosting
accounts with this functions available in the Postgre?
Best Regards,
From | Date | Subject | |
---|---|---|---|
Next Message | John T. Dow | 2010-06-13 20:41:01 | Re: Re: Error on Windows server could not open relation base/xxx/xxx Permission denied |
Previous Message | Sergey Konoplev | 2010-06-13 19:52:32 | Re: Partial indexes instead of partitions |