|
6 | 6 | * |
7 | 7 | * |
8 | 8 | * IDENTIFICATION |
9 | | - * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.88 1999/09/18 19:06:40 tgl Exp $ |
| 9 | + * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.89 1999/09/27 20:00:44 momjian Exp $ |
10 | 10 | * |
11 | 11 | *------------------------------------------------------------------------- |
12 | 12 | */ |
|
29 | 29 | #include"lib/stringinfo.h" |
30 | 30 | #include"libpq/libpq.h" |
31 | 31 | #include"miscadmin.h" |
| 32 | +#include"tcop/tcopprot.h" |
32 | 33 | #include"utils/acl.h" |
33 | 34 | #include"utils/builtins.h" |
34 | 35 | #include"utils/syscache.h" |
@@ -414,6 +415,8 @@ CopyTo(Relation rel, bool binary, bool oids, FILE *fp, char *delim) |
414 | 415 |
|
415 | 416 | while (HeapTupleIsValid(tuple=heap_getnext(scandesc,0))) |
416 | 417 | { |
| 418 | +if (QueryCancel) |
| 419 | +CancelQuery(); |
417 | 420 |
|
418 | 421 | if (oids&& !binary) |
419 | 422 | { |
@@ -686,6 +689,9 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim) |
686 | 689 |
|
687 | 690 | while (!done) |
688 | 691 | { |
| 692 | +if (QueryCancel) |
| 693 | +CancelQuery(); |
| 694 | + |
689 | 695 | if (!binary) |
690 | 696 | { |
691 | 697 | intnewline=0; |
|