forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite7834a1
committed
Add log_verbosity = 'silent' support to COPY command.
Previously, when the on_error option was set to ignore, the COPY commandwould always log NOTICE messages for input rows discarded due todata type incompatibility. Users had no way to suppress these messages.This commit introduces a new log_verbosity setting, 'silent',which prevents the COPY command from emitting NOTICE messageswhen on_error = 'ignore' is used, even if rows are discarded.This feature is particularly useful when processing malformed filesfrequently, where a flood of NOTICE messages can be undesirable.For example, when frequently loading malformed files via the COPY commandor querying foreign tables using file_fdw (with an upcoming patch toadd on_error support for file_fdw), users may prefer to suppressthese messages to reduce log noise and improve clarity.Author: Atsushi TorikoshiReviewed-by: Masahiko Sawada, Fujii MasaoDiscussion:https://postgr.es/m/ab59dad10490ea3734cf022b16c24cfd@oss.nttdata.com1 parentbabb399 commite7834a1
File tree
7 files changed
+23
-8
lines changed- doc/src/sgml/ref
- src
- backend/commands
- bin/psql
- include/commands
- test/regress
- expected
- sql
7 files changed
+23
-8
lines changedLines changed: 7 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
407 | 407 |
| |
408 | 408 |
| |
409 | 409 |
| |
| 410 | + | |
| 411 | + | |
410 | 412 |
| |
411 | 413 |
| |
412 | 414 |
| |
| |||
428 | 430 |
| |
429 | 431 |
| |
430 | 432 |
| |
431 |
| - | |
432 |
| - | |
433 |
| - | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
434 | 438 |
| |
435 | 439 |
| |
436 | 440 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
427 | 427 |
| |
428 | 428 |
| |
429 | 429 |
| |
430 |
| - | |
| 430 | + | |
431 | 431 |
| |
432 | 432 |
| |
| 433 | + | |
| 434 | + | |
433 | 435 |
| |
434 | 436 |
| |
435 | 437 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1320 | 1320 |
| |
1321 | 1321 |
| |
1322 | 1322 |
| |
1323 |
| - | |
| 1323 | + | |
| 1324 | + | |
1324 | 1325 |
| |
1325 | 1326 |
| |
1326 | 1327 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2916 | 2916 |
| |
2917 | 2917 |
| |
2918 | 2918 |
| |
2919 |
| - | |
| 2919 | + | |
2920 | 2920 |
| |
2921 | 2921 |
| |
2922 | 2922 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
48 |
| - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
49 | 51 |
| |
50 | 52 |
| |
51 | 53 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
760 | 760 |
| |
761 | 761 |
| |
762 | 762 |
| |
| 763 | + | |
763 | 764 |
| |
764 | 765 |
| |
765 | 766 |
| |
| |||
774 | 775 |
| |
775 | 776 |
| |
776 | 777 |
| |
777 |
| - | |
| 778 | + | |
| 779 | + | |
778 | 780 |
| |
779 | 781 |
| |
780 | 782 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
533 | 533 |
| |
534 | 534 |
| |
535 | 535 |
| |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
536 | 540 |
| |
537 | 541 |
| |
538 | 542 |
| |
|
0 commit comments
Comments
(0)