diff options
author | Noah Misch <noah@leadboat.com> | 2017-11-11 13:07:46 -0800 |
---|---|---|
committer | Noah Misch <noah@leadboat.com> | 2017-11-11 13:07:54 -0800 |
commit | 075ced2a4c09fad1a27ec545ab632cf1504e534f (patch) | |
tree | d545d74d1f8f87d6b35906a97d9287f51b459709 /src/test/regress/sql/xml.sql | |
parent | 30a5e940ac9a96c5fee449223528a1b5555502ed (diff) |
Fix previous commit's test, for non-UTF8 databases with non-XML builds.
To ensure stable output, catch one more configuration-specific error.
Back-patch to 9.3, like the commit that added the test.
Diffstat (limited to 'src/test/regress/sql/xml.sql')
-rw-r--r-- | src/test/regress/sql/xml.sql | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/test/regress/sql/xml.sql b/src/test/regress/sql/xml.sql index fdb51c9edec..cb96e180053 100644 --- a/src/test/regress/sql/xml.sql +++ b/src/test/regress/sql/xml.sql @@ -196,11 +196,12 @@ DECLARE degree_symbol text; res xml[]; BEGIN - -- Per the documentation, xpath() doesn't work on non-ASCII data when - -- the server encoding is not UTF8. The EXCEPTION block below, - -- currently dead code, will be relevant if we remove this limitation. + -- Per the documentation, except when the server encoding is UTF8, xpath() + -- may not work on non-ASCII data. The untranslatable_character and + -- undefined_function traps below, currently dead code, will become relevant + -- if we remove this limitation. IF current_setting('server_encoding') <> 'UTF8' THEN - RAISE LOG 'skip: encoding % unsupported for xml', + RAISE LOG 'skip: encoding % unsupported for xpath', current_setting('server_encoding'); RETURN; END IF; @@ -215,9 +216,12 @@ BEGIN END IF; EXCEPTION -- character with byte sequence 0xc2 0xb0 in encoding "UTF8" has no equivalent in encoding "LATIN8" - WHEN untranslatable_character THEN RAISE LOG 'skip: %', SQLERRM; + WHEN untranslatable_character -- default conversion function for encoding "UTF8" to "MULE_INTERNAL" does not exist - WHEN undefined_function THEN RAISE LOG 'skip: %', SQLERRM; + OR undefined_function + -- unsupported XML feature + OR feature_not_supported THEN + RAISE LOG 'skip: %', SQLERRM; END $$; |