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

Commit1161d89

Browse files
committed
Remove dependency on database encoding in citext regression test.
Testing convert_to(..., 'ISO-8859-1') fails if there isn't a conversionfunction available from the database encoding to ISO-8859-1. This hasbeen broken since day one, but the breakage was hidden bypg_do_encoding_conversion's failure to complain, up till commit49c817e.Since the data being converted in this test is plain ASCII, no actualconversion need happen (and if it did, it would prove little about citextanyway). So that we still have some code coverage of the convert() familyof functions, let's switch to using convert_from, with SQL_ASCII as thespecified source encoding. Per buildfarm.
1 parent4333eee commit1161d89

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

‎contrib/citext/expected/citext.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1691,7 +1691,7 @@ SELECT btrim('xyxtrimyyx'::citext, 'xy'::text ) = 'trim' AS t;
16911691

16921692
-- chr() takes an int and returns text.
16931693
-- convert() and convert_from take bytea and return text.
1694-
SELECTconvert_to( name, 'ISO-8859-1' ) =convert_to( name::text, 'ISO-8859-1' ) AS t FROM srt;
1694+
SELECTconvert_from( name::bytea, 'SQL_ASCII' ) =convert_from( name::text::bytea, 'SQL_ASCII' ) AS t FROM srt;
16951695
t
16961696
---
16971697
t

‎contrib/citext/expected/citext_1.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1691,7 +1691,7 @@ SELECT btrim('xyxtrimyyx'::citext, 'xy'::text ) = 'trim' AS t;
16911691

16921692
-- chr() takes an int and returns text.
16931693
-- convert() and convert_from take bytea and return text.
1694-
SELECTconvert_to( name, 'ISO-8859-1' ) =convert_to( name::text, 'ISO-8859-1' ) AS t FROM srt;
1694+
SELECTconvert_from( name::bytea, 'SQL_ASCII' ) =convert_from( name::text::bytea, 'SQL_ASCII' ) AS t FROM srt;
16951695
t
16961696
---
16971697
t

‎contrib/citext/sql/citext.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ SELECT btrim('xyxtrimyyx'::citext, 'xy'::text ) = 'trim' AS t;
572572
-- chr() takes an int and returns text.
573573
-- convert() and convert_from take bytea and return text.
574574

575-
SELECTconvert_to( name,'ISO-8859-1' )=convert_to( name::text,'ISO-8859-1' )AS tFROM srt;
575+
SELECTconvert_from( name::bytea,'SQL_ASCII' )=convert_from( name::text::bytea,'SQL_ASCII' )AS tFROM srt;
576576
SELECT decode('MTIzAAE='::citext,'base64')= decode('MTIzAAE='::text,'base64')AS t;
577577
-- encode() takes bytea and returns text.
578578
SELECT initcap('hi THOMAS'::citext)= initcap('hi THOMAS'::text)AS t;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp