SQL Developer不显示XML [英] SQL Developer doesn't display XML

查看:127
本文介绍了SQL Developer不显示XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用数据类型XMLType时,Oracle的SQL Developer不显示XML列的内容.第一行显示正常(如果选中了首选项">数据库">高级">在网格中显示XML值"),但是一旦双击黄色的小铅笔,查看值"窗口将保持空白.奇怪的是,如果将XML存储在Clob中,它就可以工作.

Oracle's SQL Developer doesn't display the content of XML columns when the datatype XMLType is used. The first lines are displayed ok (if Preferences > Database > Advanced > Display XML Value in Grid is ticked), but once you doubleclick on the little yellow pencil, the "View Value" window remains empty. Curiously, it works if you store the XML in a clob.

CREATE TABLE t (x XMLTYPE, c CLOB);
INSERT INTO t VALUES (XMLTYPE('<x/>'), '<x/>');
COMMIT;
SELECT * FROM t;

经过大量的互联网搜索,我发现了帖子说这是一个已知的错误,很快就会得到修复.是的,它从版本19.1开始又可以使用.但是,在工作中,我们会暂时停留在18.2版上.那么,有18种解决方法吗?

After a lot of internet search, I found a post by thatJeffSmith saying that it's a known bug and will be fixed soon. And yes, it is working again from version 19.1 onwards. However, at work we are stuck with version 18.2 for a while. So, is there a workaround in 18?

Version    XML View Value
17.3.0.271 ok
17.4.0.355 ok
18.1.0.095 empty
18.2.0.183 empty
19.1.0.094 ok
19.2.1.247 ok
19.4.0.354 ok (but needs modern JDK)

这是在19.1中的样子:

This is how it looks in 19.1:

其次,我找不到SQL Developer的错误列表,固定的错误列表或旧发行说明.目前,Oracle的下载页面仅列出了最新的三个版本19.1、19.2和19.4,因此找出该错误的修复时间是不可能的.

Secondly, I couldn't find a list of bugs for SQL Developer, or a list of fixed bugs, or old release notes. Currently, Oracle's download page lists only the latest three releases 19.1, 19.2 and 19.4, so it's impossilbe to find out when this bug was fixed.

推荐答案

正确的解决方案是升级到版本19(或理论上降级​​到17).

The proper solution is an upgrade to version 19 (or theoretically downgrade to 17).

如果您停留在版本18中,则有一种解决方法:

If you are stuck in Version 18, there is a workaround:

SELECT t.x.getClobVal() FROM t t;

出于某些奇怪的原因,表别名是必需的.

For some strange reason, the table alias is required.

这篇关于SQL Developer不显示XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆