foo int,
bar text
);
-INSERT INTO insert_tbl VALUES (1,'a');
+INSERT INTO insert_tbl VALUES (1,'a'), (2, 'b');
COPY copy_tbl (foo, bar) FROM stdin;
SELECT * FROM copy_tbl;
foo | bar
-----+-----
1 | a
-(1 row)
+ 2 | b
+(2 rows)
+
+-- Both must be completed
+SELECT stavalues1 FROM pg_statistic WHERE starelid = 'insert_tbl'::regclass;
+ stavalues1
+------------
+ {1,2}
+ {a,b}
+(2 rows)
--- 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
+SELECT stavalues1 FROM pg_statistic WHERE starelid = 'copy_tbl'::regclass;
+ stavalues1
+------------
+ {1,2}
+ {a,b}
(2 rows)
SET online_analyze.enable = off;
foo int,
bar text
);
-INSERT INTO insert_tbl VALUES (1,'a');
+INSERT INTO insert_tbl VALUES (1,'a'), (2, 'b');
COPY copy_tbl (foo, bar) FROM stdin;
1 a
+2 b
\.
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;
+-- Both must be completed
+SELECT stavalues1 FROM pg_statistic WHERE starelid = 'insert_tbl'::regclass;
+SELECT stavalues1 FROM pg_statistic WHERE starelid = 'copy_tbl'::regclass;
SET online_analyze.enable = off;