@@ -181,7 +181,8 @@ begin
181181 bytes_processed > 0 as has_bytes_processed,
182182 bytes_total > 0 as has_bytes_total,
183183 tuples_processed,
184- tuples_excluded
184+ tuples_excluded,
185+ tuples_skipped
185186 from pg_stat_progress_copy
186187 where pid = pg_backend_pid())
187188 select into report (to_jsonb(r)) as value
@@ -197,13 +198,17 @@ create trigger check_after_tab_progress_reporting
197198 execute function notice_after_tab_progress_reporting();
198199-- Generate COPY FROM report with PIPE.
199200copy tab_progress_reporting from stdin;
200- INFO: progress: {"type": "PIPE", "command": "COPY FROM", "relname": "tab_progress_reporting", "has_bytes_total": false, "tuples_excluded": 0, "tuples_processed": 3, "has_bytes_processed": true}
201+ INFO: progress: {"type": "PIPE", "command": "COPY FROM", "relname": "tab_progress_reporting", "tuples_skipped": 0, " has_bytes_total": false, "tuples_excluded": 0, "tuples_processed": 3, "has_bytes_processed": true}
201202-- Generate COPY FROM report with FILE, with some excluded tuples.
202203truncate tab_progress_reporting;
203204\set filename :abs_srcdir '/data/emp.data'
204205copy tab_progress_reporting from :'filename'
205206 where (salary < 2000);
206- INFO: progress: {"type": "FILE", "command": "COPY FROM", "relname": "tab_progress_reporting", "has_bytes_total": true, "tuples_excluded": 1, "tuples_processed": 2, "has_bytes_processed": true}
207+ INFO: progress: {"type": "FILE", "command": "COPY FROM", "relname": "tab_progress_reporting", "tuples_skipped": 0, "has_bytes_total": true, "tuples_excluded": 1, "tuples_processed": 2, "has_bytes_processed": true}
208+ -- Generate COPY FROM report with PIPE, with some skipped tuples.
209+ copy tab_progress_reporting from stdin(on_error ignore);
210+ NOTICE: 2 rows were skipped due to data type incompatibility
211+ INFO: progress: {"type": "PIPE", "command": "COPY FROM", "relname": "tab_progress_reporting", "tuples_skipped": 2, "has_bytes_total": false, "tuples_excluded": 0, "tuples_processed": 1, "has_bytes_processed": true}
207212drop trigger check_after_tab_progress_reporting on tab_progress_reporting;
208213drop function notice_after_tab_progress_reporting();
209214drop table tab_progress_reporting;
0 commit comments