Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
635b93e9
D
dbeaver
项目概览
suliangchun
/
dbeaver
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dbeaver
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
635b93e9
编写于
12月 21, 2020
作者:
L
LonwoLonwo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#10703 reading Redshift char/varchar view columns fixed
上级
c4fdacd3
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
29 addition
and
2 deletion
+29
-2
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/PostgreConstants.java
...rc/org/jkiss/dbeaver/ext/postgresql/PostgreConstants.java
+1
-0
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreDataTypeCache.java
...ss/dbeaver/ext/postgresql/model/PostgreDataTypeCache.java
+5
-2
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreServerExtension.java
.../dbeaver/ext/postgresql/model/PostgreServerExtension.java
+2
-0
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/impls/PostgreServerExtensionBase.java
...xt/postgresql/model/impls/PostgreServerExtensionBase.java
+5
-0
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/impls/redshift/PostgreServerRedshift.java
...ostgresql/model/impls/redshift/PostgreServerRedshift.java
+15
-0
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/impls/redshift/RedshiftView.java
...ver/ext/postgresql/model/impls/redshift/RedshiftView.java
+1
-0
未找到文件。
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/PostgreConstants.java
浏览文件 @
635b93e9
...
...
@@ -84,6 +84,7 @@ public class PostgreConstants {
"oid"
,
"oid"
,
"Row identifier"
,
false
);
public
static
final
String
TYPE_UUID
=
"uuid"
;
public
static
final
String
TYPE_BPCHAR
=
"bpchar"
;
public
static
final
String
TYPE_VARCHAR
=
"varchar"
;
public
static
final
String
TYPE_HSTORE
=
"hstore"
;
public
static
final
String
TYPE_JSON
=
"json"
;
...
...
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreDataTypeCache.java
浏览文件 @
635b93e9
...
...
@@ -94,8 +94,11 @@ public class PostgreDataTypeCache extends JDBCObjectCache<PostgreSchema, Postgre
private
void
mapAliases
(
PostgreSchema
schema
)
{
// Cache aliases
if
(
schema
.
isCatalogSchema
())
{
mapDataTypeAliases
(
schema
.
getDataSource
().
getServerType
().
getDataTypeAliases
(),
false
);
mapDataTypeAliases
(
PostgreConstants
.
SERIAL_TYPES
,
true
);
PostgreServerExtension
serverType
=
schema
.
getDataSource
().
getServerType
();
mapDataTypeAliases
(
serverType
.
getDataTypeAliases
(),
false
);
if
(
serverType
.
supportSerialTypes
())
{
mapDataTypeAliases
(
PostgreConstants
.
SERIAL_TYPES
,
true
);
}
}
}
...
...
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreServerExtension.java
浏览文件 @
635b93e9
...
...
@@ -137,4 +137,6 @@ public interface PostgreServerExtension
boolean
supportsSuperusers
();
boolean
supportsRolesWithCreateDBAbility
();
boolean
supportSerialTypes
();
}
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/impls/PostgreServerExtensionBase.java
浏览文件 @
635b93e9
...
...
@@ -453,4 +453,9 @@ public abstract class PostgreServerExtensionBase implements PostgreServerExtensi
public
boolean
supportsRolesWithCreateDBAbility
()
{
return
supportsRoles
();
}
@Override
public
boolean
supportSerialTypes
()
{
return
true
;
}
}
\ No newline at end of file
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/impls/redshift/PostgreServerRedshift.java
浏览文件 @
635b93e9
...
...
@@ -19,6 +19,7 @@ package org.jkiss.dbeaver.ext.postgresql.model.impls.redshift;
import
org.jkiss.code.NotNull
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.Log
;
import
org.jkiss.dbeaver.ext.postgresql.PostgreConstants
;
import
org.jkiss.dbeaver.ext.postgresql.model.*
;
import
org.jkiss.dbeaver.ext.postgresql.model.impls.PostgreServerExtensionBase
;
import
org.jkiss.dbeaver.model.DBUtils
;
...
...
@@ -33,6 +34,7 @@ import org.osgi.framework.Version;
import
java.sql.SQLException
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
...
...
@@ -237,6 +239,19 @@ public class PostgreServerRedshift extends PostgreServerExtensionBase {
return
true
;
}
@Override
public
boolean
supportSerialTypes
()
{
return
false
;
}
@Override
public
Map
<
String
,
String
>
getDataTypeAliases
()
{
Map
<
String
,
String
>
aliasMap
=
new
LinkedHashMap
<>(
super
.
getDataTypeAliases
());
aliasMap
.
put
(
"character"
,
PostgreConstants
.
TYPE_BPCHAR
);
aliasMap
.
put
(
"character varying"
,
PostgreConstants
.
TYPE_VARCHAR
);
return
aliasMap
;
}
@Override
public
PostgreDatabase
.
SchemaCache
createSchemaCache
(
PostgreDatabase
database
)
{
return
new
RedshiftSchemaCache
();
...
...
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/impls/redshift/RedshiftView.java
浏览文件 @
635b93e9
...
...
@@ -100,6 +100,7 @@ public class RedshiftView extends PostgreView
PostgreTableColumn
viewColumn
=
new
PostgreTableColumn
(
this
);
viewColumn
.
setName
(
colName
);
viewColumn
.
setPersisted
(
true
);
String
colTypeName
;
int
colPrecision
=
-
1
,
colScale
=
-
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录