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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 3 additions & 3 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy