Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdaab4a1

Browse files
committed
Update /contrib regression tests for escape_string_warning.
1 parent43ceb3d commitdaab4a1

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)

[8]ページ先頭

©2009-2025 Movatter.jp