aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/copy.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-01-28 21:02:40 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-01-28 21:02:40 +0000
commit2f0d43b251f5bfc257d45835965861202fcd263b (patch)
tree257546d7fbd03c9ae8eae54cb6eb5fb2995653d9 /src/backend/commands/copy.c
parentb3ead7c045382b5942b345239499bab0adcaef78 (diff)
downloadpostgresql-2f0d43b251f5bfc257d45835965861202fcd263b.tar.gz
postgresql-2f0d43b251f5bfc257d45835965861202fcd263b.zip
Review uses of IsUnderPostmaster, change some tests to look at
whereToSendOutput instead because they are really inquiring about the correct client communication protocol. Update some comments. This is pointing towards supporting regular FE/BE client protocol in a standalone backend, per discussion a month or so back.
Diffstat (limited to 'src/backend/commands/copy.c')
-rw-r--r--src/backend/commands/copy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index b5b3cfeefac..66850d32d56 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/copy.c,v 1.216 2004/01/26 22:35:31 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/copy.c,v 1.217 2004/01/28 21:02:39 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -829,7 +829,7 @@ DoCopy(const CopyStmt *stmt)
}
if (pipe)
{
- if (IsUnderPostmaster)
+ if (whereToSendOutput == Remote)
ReceiveCopyBegin(binary, length(attnumlist));
else
copy_file = stdin;
@@ -879,7 +879,7 @@ DoCopy(const CopyStmt *stmt)
}
if (pipe)
{
- if (IsUnderPostmaster)
+ if (whereToSendOutput == Remote)
SendCopyBegin(binary, length(attnumlist));
else
copy_file = stdout;
@@ -929,7 +929,7 @@ DoCopy(const CopyStmt *stmt)
errmsg("could not write to file \"%s\": %m",
filename)));
}
- else if (IsUnderPostmaster && !is_from)
+ else if (whereToSendOutput == Remote && !is_from)
SendCopyEnd(binary);
pfree(attribute_buf.data);
pfree(line_buf.data);