Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit daab4a1

Browse files
committed
Update /contrib regression tests for escape_string_warning.
1 parent 43ceb3d commit daab4a1

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

contrib/earthdistance/earthdistance.sql.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SET search_path = public;
99

1010
CREATE OR REPLACE FUNCTION earth() RETURNS float8
1111
LANGUAGE SQL IMMUTABLE
12-
AS 'SELECT \'6378168\'::float8';
12+
AS 'SELECT ''6378168''::float8';
1313

1414
-- Astromers may want to change the earth function so that distances will be
1515
-- returned in degrees. To do this comment out the above definition and

contrib/pgcrypto/expected/pgp-encrypt.out

+3-3
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ select pgp_sym_decrypt(
170170

171171
-- crlf
172172
select encode(pgp_sym_decrypt_bytea(
173-
pgp_sym_encrypt('1\n2\n3\r\n', 'key', 'convert-crlf=1'),
173+
pgp_sym_encrypt(E'1\n2\n3\r\n', 'key', 'convert-crlf=1'),
174174
'key'), 'hex');
175175
encode
176176
----------------------
@@ -179,9 +179,9 @@ select encode(pgp_sym_decrypt_bytea(
179179

180180
-- conversion should be lossless
181181
select encode(digest(pgp_sym_decrypt(
182-
pgp_sym_encrypt('\r\n0\n1\r\r\n\n2\r', 'key', 'convert-crlf=1'),
182+
pgp_sym_encrypt(E'\r\n0\n1\r\r\n\n2\r', 'key', 'convert-crlf=1'),
183183
'key', 'convert-crlf=1'), 'sha1'), 'hex') as result,
184-
encode(digest('\r\n0\n1\r\r\n\n2\r', 'sha1'), 'hex') as expect;
184+
encode(digest(E'\r\n0\n1\r\r\n\n2\r', 'sha1'), 'hex') as expect;
185185
result | expect
186186
------------------------------------------+------------------------------------------
187187
47bde5d88d6ef8770572b9cbb4278b402aa69966 | 47bde5d88d6ef8770572b9cbb4278b402aa69966

contrib/pgcrypto/sql/pgp-encrypt.sql

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ select pgp_sym_decrypt(
8585

8686
-- crlf
8787
select encode(pgp_sym_decrypt_bytea(
88-
pgp_sym_encrypt('1\n2\n3\r\n', 'key', 'convert-crlf=1'),
88+
pgp_sym_encrypt(E'1\n2\n3\r\n', 'key', 'convert-crlf=1'),
8989
'key'), 'hex');
9090

9191
-- conversion should be lossless
9292
select encode(digest(pgp_sym_decrypt(
93-
pgp_sym_encrypt('\r\n0\n1\r\r\n\n2\r', 'key', 'convert-crlf=1'),
93+
pgp_sym_encrypt(E'\r\n0\n1\r\r\n\n2\r', 'key', 'convert-crlf=1'),
9494
'key', 'convert-crlf=1'), 'sha1'), 'hex') as result,
95-
encode(digest('\r\n0\n1\r\r\n\n2\r', 'sha1'), 'hex') as expect;
95+
encode(digest(E'\r\n0\n1\r\r\n\n2\r', 'sha1'), 'hex') as expect;
9696

0 commit comments

Comments
 (0)