File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
tools/greenplum-to-pg-tests/cmd Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -475,7 +475,7 @@ type ReplacePair struct {
475
475
}
476
476
477
477
var (
478
- schemaTableRegexp = regexp .MustCompile (`(?is)(EXISTS|FROM|INSERT INTO|JOIN|\s+ON|ROOTPARTITION|TABLE|UPDATE)\s+"?([^\s."]+)"?\."?([^\s."]+)"?` )
478
+ schemaTableRegexp = regexp .MustCompile (`(?is)(EXISTS|FROM|INSERT INTO|JOIN|GRANT\s+\w+ \s+ON|ROOTPARTITION|TABLE|UPDATE)\s+"?([^\s."]+)"?\."?([^\s."]+)"?` )
479
479
schemaTableField = regexp .MustCompile (`"?([^\s."]+)"?\."?([^\s."]+)"?\."?([^\s."]+)"?` )
480
480
)
481
481
Original file line number Diff line number Diff line change @@ -38,6 +38,21 @@ WHERE`,
38
38
from : `SELECT s.t.f FROM s.t` ,
39
39
result : `SELECT s___t.f FROM s___t` ,
40
40
},
41
+ {
42
+ // no changes
43
+ from : `select a.attname, a.atttypid, t.typname
44
+ from pg_attribute a
45
+ left outer join pg_type t on (a.atttypid = t.oid)
46
+ where attrelid = 'pg_catalog.gp_id'::regclass and
47
+ (attnum > 0 or attname='oid')
48
+ order by attnum` ,
49
+ result : `select a.attname, a.atttypid, t.typname
50
+ from pg_attribute a
51
+ left outer join pg_type t on (a.atttypid = t.oid)
52
+ where attrelid = 'pg_catalog.gp_id'::regclass and
53
+ (attnum > 0 or attname='oid')
54
+ order by attnum` ,
55
+ },
41
56
}
42
57
43
58
for i , test := range table {
You can’t perform that action at this time.
0 commit comments