(1 row)
+SET "online_analyze.verbose" = off;
+CREATE TABLE insert_tbl(
+ foo int,
+ bar text
+);
+CREATE TABLE copy_tbl(
+ foo int,
+ bar text
+);
+INSERT INTO insert_tbl VALUES (1,'a');
+COPY copy_tbl (foo, bar) FROM stdin;
+SELECT * FROM copy_tbl;
+ foo | bar
+-----+-----
+ 1 | a
+(1 row)
+
+-- Both must be true
+SELECT last_analyze IS NOT NULL AS analyzed, relname FROM pg_stat_user_tables ORDER BY relname;
+ analyzed | relname
+----------+------------
+ t | copy_tbl
+ t | insert_tbl
+(2 rows)
+
SET online_analyze.enable = off;
}
else
tblnames = NIL;
+ } else if (IsA(parsetree, CopyStmt)) {
+ CopyStmt *cpystmt = (CopyStmt*) parsetree;
+
+ tblnames = list_make1((RangeVar*)copyObject(cpystmt->relation));
+ op = CK_CREATE;
}
}
DROP TABLE oa_tbl;
SHOW online_analyze.exclude_tables;
+SET "online_analyze.verbose" = off;
+
+CREATE TABLE insert_tbl(
+ foo int,
+ bar text
+);
+CREATE TABLE copy_tbl(
+ foo int,
+ bar text
+);
+INSERT INTO insert_tbl VALUES (1,'a');
+COPY copy_tbl (foo, bar) FROM stdin;
+1 a
+\.
+SELECT * FROM copy_tbl;
+-- Both must be true
+SELECT last_analyze IS NOT NULL AS analyzed, relname FROM pg_stat_user_tables ORDER BY relname;
+
SET online_analyze.enable = off;