head     1.1;
branch   ;
access   ;
symbols  ;
locks    ; strict;
comment  @ * @;


1.1
date     91.03.08.20.14.33;  author kemnitz;  state Exp;
branches ;
next     ;


desc
@tests the copy command.
@



1.1
log
@Initial revision
@
text
@#include <stdio.h>

main(argc, argv)

int argc;
char **argv;

{
	char s[100];

	FILE *fp, *fopen();

	PQsetdb("test");
	PQexec("copy jj () from stdin");
	printf("begin copy\n");

	fp = fopen(argv[1], "r");

	while (!feof(fp))
	{
		fgets(s, 100, fp);
		if (!feof(fp))
		{
			PQputline(s);
		}
	}
	PQputline(".\n");
	PQendcopy();
	printf("done\n");
}
@
