projects
/
online_analyze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4afd3f
)
fix support 'COPY .. TO file'. Daniil Davidov & Dmitriy Koval
author
Teodor Sigaev
<teodor@sigaev.ru>
Tue, 22 Oct 2024 08:39:49 +0000
(11:39 +0300)
committer
Teodor Sigaev
<teodor@sigaev.ru>
Tue, 22 Oct 2024 08:39:49 +0000
(11:39 +0300)
online_analyze.c
patch
|
blob
|
history
diff --git
a/online_analyze.c
b/online_analyze.c
index
b9aae90
..
0479dbf
100644
(file)
--- a/
online_analyze.c
+++ b/
online_analyze.c
@@
-1051,8
+1051,13
@@
onlineAnalyzeHookerUtility(
} else if (IsA(parsetree, CopyStmt)) {
CopyStmt *cpystmt = (CopyStmt*) parsetree;
- tblnames = list_make1((RangeVar*)copyObject(cpystmt->relation));
- op = CK_CREATE;
+ /* Create tblnames only if it is not "COPY (query) TO file" command */
+ if (cpystmt->relation) {
+ tblnames = list_make1((RangeVar*)copyObject(cpystmt->relation));
+ op = CK_CREATE;
+ }
+ else
+ Assert(cpystmt->query);
}
}