mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
Update /contrib regression tests for escape_string_warning.
This commit is contained in:
parent
43ceb3d449
commit
daab4a101f
@ -9,7 +9,7 @@ SET search_path = public;
|
|||||||
|
|
||||||
CREATE OR REPLACE FUNCTION earth() RETURNS float8
|
CREATE OR REPLACE FUNCTION earth() RETURNS float8
|
||||||
LANGUAGE SQL IMMUTABLE
|
LANGUAGE SQL IMMUTABLE
|
||||||
AS 'SELECT \'6378168\'::float8';
|
AS 'SELECT ''6378168''::float8';
|
||||||
|
|
||||||
-- Astromers may want to change the earth function so that distances will be
|
-- Astromers may want to change the earth function so that distances will be
|
||||||
-- returned in degrees. To do this comment out the above definition and
|
-- returned in degrees. To do this comment out the above definition and
|
||||||
|
@ -170,7 +170,7 @@ select pgp_sym_decrypt(
|
|||||||
|
|
||||||
-- crlf
|
-- crlf
|
||||||
select encode(pgp_sym_decrypt_bytea(
|
select encode(pgp_sym_decrypt_bytea(
|
||||||
pgp_sym_encrypt('1\n2\n3\r\n', 'key', 'convert-crlf=1'),
|
pgp_sym_encrypt(E'1\n2\n3\r\n', 'key', 'convert-crlf=1'),
|
||||||
'key'), 'hex');
|
'key'), 'hex');
|
||||||
encode
|
encode
|
||||||
----------------------
|
----------------------
|
||||||
@ -179,9 +179,9 @@ select encode(pgp_sym_decrypt_bytea(
|
|||||||
|
|
||||||
-- conversion should be lossless
|
-- conversion should be lossless
|
||||||
select encode(digest(pgp_sym_decrypt(
|
select encode(digest(pgp_sym_decrypt(
|
||||||
pgp_sym_encrypt('\r\n0\n1\r\r\n\n2\r', 'key', 'convert-crlf=1'),
|
pgp_sym_encrypt(E'\r\n0\n1\r\r\n\n2\r', 'key', 'convert-crlf=1'),
|
||||||
'key', 'convert-crlf=1'), 'sha1'), 'hex') as result,
|
'key', 'convert-crlf=1'), 'sha1'), 'hex') as result,
|
||||||
encode(digest('\r\n0\n1\r\r\n\n2\r', 'sha1'), 'hex') as expect;
|
encode(digest(E'\r\n0\n1\r\r\n\n2\r', 'sha1'), 'hex') as expect;
|
||||||
result | expect
|
result | expect
|
||||||
------------------------------------------+------------------------------------------
|
------------------------------------------+------------------------------------------
|
||||||
47bde5d88d6ef8770572b9cbb4278b402aa69966 | 47bde5d88d6ef8770572b9cbb4278b402aa69966
|
47bde5d88d6ef8770572b9cbb4278b402aa69966 | 47bde5d88d6ef8770572b9cbb4278b402aa69966
|
||||||
|
@ -85,12 +85,12 @@ select pgp_sym_decrypt(
|
|||||||
|
|
||||||
-- crlf
|
-- crlf
|
||||||
select encode(pgp_sym_decrypt_bytea(
|
select encode(pgp_sym_decrypt_bytea(
|
||||||
pgp_sym_encrypt('1\n2\n3\r\n', 'key', 'convert-crlf=1'),
|
pgp_sym_encrypt(E'1\n2\n3\r\n', 'key', 'convert-crlf=1'),
|
||||||
'key'), 'hex');
|
'key'), 'hex');
|
||||||
|
|
||||||
-- conversion should be lossless
|
-- conversion should be lossless
|
||||||
select encode(digest(pgp_sym_decrypt(
|
select encode(digest(pgp_sym_decrypt(
|
||||||
pgp_sym_encrypt('\r\n0\n1\r\r\n\n2\r', 'key', 'convert-crlf=1'),
|
pgp_sym_encrypt(E'\r\n0\n1\r\r\n\n2\r', 'key', 'convert-crlf=1'),
|
||||||
'key', 'convert-crlf=1'), 'sha1'), 'hex') as result,
|
'key', 'convert-crlf=1'), 'sha1'), 'hex') as result,
|
||||||
encode(digest('\r\n0\n1\r\r\n\n2\r', 'sha1'), 'hex') as expect;
|
encode(digest(E'\r\n0\n1\r\r\n\n2\r', 'sha1'), 'hex') as expect;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user