Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

function pgp_pub_decrypt(character varying, bytea) does not exist #595

Open
caipirginka opened this issue Oct 25, 2023 · 0 comments
Open

Comments

@caipirginka
Copy link

I'm using:

PostgreSQL 16.0 (Debian 16.0-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
pgcrypto | 1.3     | public     | cryptographic functions

and the function pgp_pub_decrypt(character varying, bytea) does not exist, it is not even listed in the documentation of pgcrypto itself:
https://www.postgresql.org/docs/current/pgcrypto.html

To make everything work, I have to create it, like this:

    CREATE FUNCTION pgp_pub_decrypt(
        msg character varying,
        key bytea)
      RETURNS text AS 
    $$
	    select pgp_pub_decrypt(msg::bytea,key)
    $$ LANGUAGE SQL;

Is this workaround correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant