未验证 提交 e0dfeea6 编写于 作者: S Serge Rider 提交者: GitHub

Merge pull request #10251 from dbeaver/postgrequoted#9619

#9619 inet, uuid and other other column types values quoted
......@@ -39,6 +39,7 @@ import org.jkiss.dbeaver.model.text.parser.TPRule;
import org.jkiss.dbeaver.model.text.parser.TPRuleProvider;
import org.jkiss.utils.ArrayUtils;
import java.sql.Types;
import java.util.Arrays;
import java.util.List;
......@@ -792,7 +793,8 @@ public class PostgreDialect extends JDBCSQLDialect implements TPRuleProvider {
@NotNull
@Override
public String escapeScriptValue(DBSAttributeBase attribute, @NotNull Object value, @NotNull String strValue) {
if (value.getClass().getName().equals(PostgreConstants.PG_OBJECT_CLASS) || PostgreConstants.TYPE_BIT.equals(attribute.getTypeName()) || PostgreConstants.TYPE_INTERVAL.equals(attribute.getTypeName())) {
if (value.getClass().getName().equals(PostgreConstants.PG_OBJECT_CLASS) || PostgreConstants.TYPE_BIT.equals(attribute.getTypeName()) || PostgreConstants.TYPE_INTERVAL.equals(attribute.getTypeName())
|| attribute.getTypeID() == Types.OTHER) {
// TODO: we need to add value handlers for all PG data types.
// For now we use workaround: represent objects as strings
return '\'' + escapeString(strValue) + '\'';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册