Trying to run sha256 function
CREATE EXTENSION pgcrypto;
CREATE OR REPLACE FUNCTION sha256(bytea) returns text AS $$
SELECT encode(digest($1, 'sha256'), 'hex')
$$ LANGUAGE SQL STRICT IMMUTABLE;
WITH
tab_email as (SELECT '[email protected]'::text as email FROM tmp),
INSERT INTO users (email, password) VALUES ((SELECT email FROM tab_email), sha256('mypass'));
i got this error
ERROR: function sha256(text) does not exist
INSERT INTO users SELECT email, sha256('mypass') FROM tab_email;\df *.sha256show? How aboutSELECT sha256('1')?