*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.23 1997/12/23 19:53:30 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.24 1997/12/23 21:38:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
return newnode;
}
+/* ---------------
+ * _copyGroupClause
+ * --------------
+ */
+static GroupClause *
+_copyGroupClause(GroupClause *from)
+{
+ GroupClause *newnode = makeNode(GroupClause);
+
+ newnode->grpOpoid = from->grpOpoid;
+ newnode->entry = copyObject(from->entry);
+
+ return newnode;
+}
+
/* ----------------
* _copyUnique
case T_Agg:
retval = _copyAgg(from);
break;
+ case T_GroupClause:
+ retval = _copyGroupClause(from);
+ break;
case T_Unique:
retval = _copyUnique(from);
break;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.121 1997/12/22 20:03:53 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.122 1997/12/23 21:38:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/* declarations for functions in this file */
static void usage(char *progname);
static void slashUsage();
-static void handleCopyOut(PGresult *res, bool quiet, FILE *copystream);
+static void handleCopyOut(PGresult *res, FILE *copystream);
static void
handleCopyIn(PGresult *res, const bool mustprompt,
FILE *copystream);
case PGRES_COPY_OUT:
*success_p = true;
if (copy_out)
- handleCopyOut(results, pset->quiet, copystream);
+ handleCopyOut(results, copystream);
else
{
if (!pset->quiet)
printf("Copy command returns...\n");
- handleCopyOut(results, pset->quiet, stdout);
+ handleCopyOut(results, stdout);
}
break;
case PGRES_COPY_IN:
if (copy_in)
handleCopyIn(results, false, copystream);
else
- handleCopyIn(results, !pset->quiet, stdin);
+ handleCopyIn(results, !pset->quiet && !pset->notty, stdin);
break;
case PGRES_NONFATAL_ERROR:
case PGRES_FATAL_ERROR:
#define COPYBUFSIZ 8192
static void
-handleCopyOut(PGresult *res, bool quiet, FILE *copystream)
+handleCopyOut(PGresult *res, FILE *copystream)
{
bool copydone;
char copybuf[COPYBUFSIZ];