Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
e1640620
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
e1640620
编写于
2月 12, 2018
作者:
A
Adam Lee
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "Support gptransfer tables with dots in the names"
This reverts commit
6a765ec2
.
上级
6a765ec2
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
10 addition
and
11 deletion
+10
-11
gpMgmt/bin/gptransfer
gpMgmt/bin/gptransfer
+10
-11
未找到文件。
gpMgmt/bin/gptransfer
浏览文件 @
e1640620
...
...
@@ -1957,7 +1957,7 @@ FROM (
if
self
.
_fast_mode
:
distributed_clause
=
self
.
_get_distributed_by
()
wext_sql
=
\
'''CREATE WRITABLE EXTERNAL WEB TABLE gptransfer.
\"
%s
\"
(LIKE
\"
%s
\"
.
\"
%s
\"
)
'''CREATE WRITABLE EXTERNAL WEB TABLE gptransfer.
%s
(LIKE
\"
%s
\"
.
\"
%s
\"
)
EXECUTE 'cat > %s.$GP_SEGMENT_ID'
FORMAT '%s'
'''
%
(
self
.
_wext_name
,
...
...
@@ -1972,7 +1972,7 @@ FROM (
wext_sql
+=
""" ENCODING 'UTF8' %s"""
%
distributed_clause
else
:
wext_sql
=
\
'''CREATE WRITABLE EXTERNAL TABLE gptransfer.
\"
%s
\"
( LIKE
\"
%s
\"
.
\"
%s
\"
)
'''CREATE WRITABLE EXTERNAL TABLE gptransfer.
%s
( LIKE
\"
%s
\"
.
\"
%s
\"
)
LOCATION (%s)
FORMAT '%s' '''
\
%
(
self
.
_wext_name
,
...
...
@@ -1997,7 +1997,7 @@ FROM (
self
.
_table_pair
.
dest
)
urls
=
','
.
join
([
"'%s'"
%
url
for
url
in
self
.
_ext_gpfdist_urls
])
ext_sql
=
\
"""CREATE EXTERNAL TABLE gptransfer.
\"
%s
\"
(LIKE
\"
%s
\"
.
\"
%s
\"
)
"""CREATE EXTERNAL TABLE gptransfer.
%s
(LIKE
\"
%s
\"
.
\"
%s
\"
)
LOCATION(%s)
FORMAT '%s' """
\
%
(
self
.
_ext_name
,
...
...
@@ -2207,7 +2207,7 @@ FROM (
"""
cur
=
None
try
:
query
=
"""INSERT INTO gptransfer.
\"
%s
\"
SELECT * FROM
\"
%s
\"
.
\"
%s
\"
"""
\
query
=
"""INSERT INTO gptransfer.
%s
SELECT * FROM
\"
%s
\"
.
\"
%s
\"
"""
\
%
(
self
.
_wext_name
,
self
.
_table_pair
.
source
.
schema
,
self
.
_table_pair
.
source
.
table
)
...
...
@@ -2236,7 +2236,7 @@ FROM (
"""
cur
=
None
try
:
query
=
"""INSERT INTO
\"
%s
\"
.
\"
%s
\"
SELECT * FROM gptransfer.
\"
%s
\"
"""
\
query
=
"""INSERT INTO
\"
%s
\"
.
\"
%s
\"
SELECT * FROM gptransfer.
%s
"""
\
%
(
self
.
_table_pair
.
dest
.
schema
,
self
.
_table_pair
.
dest
.
table
,
self
.
_ext_name
)
...
...
@@ -2270,7 +2270,7 @@ FROM (
logger
.
debug
(
'Dropping writable external table for source table %s...'
,
self
.
_table_pair
.
source
)
drop_wext_sql
=
"""DROP EXTERNAL WEB TABLE gptransfer.
\"
%s
\"
"""
\
drop_wext_sql
=
"""DROP EXTERNAL WEB TABLE gptransfer.
%s
"""
\
%
(
self
.
_wext_name
)
cur
=
execSQL
(
self
.
_src_conn
,
drop_wext_sql
)
cur
.
close
()
...
...
@@ -2286,7 +2286,7 @@ FROM (
try
:
logger
.
debug
(
'Dropping external table for destination table %s...'
,
self
.
_table_pair
.
dest
)
drop_ext_sql
=
"""DROP EXTERNAL TABLE gptransfer.
\"
%s
\"
"""
\
drop_ext_sql
=
"""DROP EXTERNAL TABLE gptransfer.
%s
"""
\
%
(
self
.
_ext_name
)
cur
=
execSQL
(
self
.
_dest_conn
,
drop_ext_sql
)
cur
.
close
()
...
...
@@ -2448,8 +2448,7 @@ class GpTransferTable(object):
def
_is_identifier_supported
(
self
,
identifier
):
"""
Verify that the characters of identifier starts with a-z, or A-Z or underscore,
followed by lower or upper case (a-z, A-Z), or digits (0-9), or
underscore (_), or dot (.).
followed by lower or upper case (a-z, A-Z), or digits(0-9), or underscore (_)
"""
if
not
((
identifier
[
0
:
1
]
>=
'a'
and
identifier
[
0
:
1
]
<=
'z'
)
or
...
...
@@ -2461,7 +2460,7 @@ class GpTransferTable(object):
if
not
((
c
>=
'a'
and
c
<=
'z'
)
or
(
c
>=
'A'
and
c
<=
'Z'
)
or
(
c
>=
'0'
and
c
<=
'9'
)
or
(
c
==
'_'
)
or
(
c
==
'.'
)
):
(
c
==
'_'
)):
return
False
return
True
...
...
@@ -3871,7 +3870,7 @@ class GpTransfer(object):
table_obj
.
schema
,
SCHEMA_DELIMITER
,
table_obj
.
table
))
logger
.
error
(
'Found unsupported identifiers'
)
logger
.
error
(
'Valid identifiers must start with a-z, or A-Z or underscore followed by a-z, '
'or A-Z, or 0-9, or underscore
, or dot
'
)
'or A-Z, or 0-9, or underscore'
)
logger
.
error
(
'A list of these tables has been written to the file %s'
,
GPTRANSFER_FAILED_TABLES_FILE
)
sys
.
exit
(
1
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录