Skip to content

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

@caipirginka

Description

@caipirginka

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions