mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
pgcrypto: Remove explicit hex encoding/decoding from tests
This was from before the hex format was available in bytea. Now we can remove the extra explicit encoding/decoding calls and rely on the default output format. Discussion: https://www.postgresql.org/message-id/flat/17dcb4f7-7ac1-e2b6-d5f7-2dfba06cd9ee%40enterprisedb.com
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
--
|
||||
-- PGP Public Key Encryption
|
||||
--
|
||||
-- ensure consistent test output regardless of the default bytea format
|
||||
SET bytea_output TO escape;
|
||||
|
||||
-- successful encrypt/decrypt
|
||||
select pgp_pub_decrypt(
|
||||
@ -38,9 +36,9 @@ select pgp_pub_decrypt(
|
||||
from keytbl where keytbl.id=1;
|
||||
|
||||
-- does text-to-bytea works
|
||||
select pgp_pub_decrypt_bytea(
|
||||
select encode(pgp_pub_decrypt_bytea(
|
||||
pgp_pub_encrypt('Secret msg', dearmor(pubkey)),
|
||||
dearmor(seckey))
|
||||
dearmor(seckey)), 'escape')
|
||||
from keytbl where keytbl.id=1;
|
||||
|
||||
-- and bytea-to-text?
|
||||
|
Reference in New Issue
Block a user