Return-Path: pg_adm@postgres.berkeley.edu
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA10905; Fri, 27 Mar 92 11:14:47 -0800
Date: Fri, 27 Mar 92 11:14:47 -0800
Message-Id: <9203271914.AA10905@postgres.Berkeley.EDU>
From: tait@sml11.ecs.umass.edu
Subject: LibPQ
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
X-Organization: University of Massachusetts, Amherst, MA 01003
X-Time: Fri Mar 27 13:56:39 1992


I have a number of questions regarding inserting records into a
database. Most of these stem from performance problems.

1. Can I populate a database from a C program by giving a  -\i  command
and a script file name, in much the same way as the demo database is
initialized. If so how ?

2. I have written an application which inserts records into a database
by creating a string eg

append Station  (StaName = "System ",Class = "- ",Parent = "- ")

and then using the PQexec command from a C program to execute it. This
works but has 2 problems 

    a) The performance is very poor ie several seconds per record. (
    it is also poor if I use PQputline )

    b) When this record append Station  (StaName = "Sta1 ",Class = "- ",Parent = "System
")
       is entered a get the following error. This I think has to do
       with the fact that the string goes over onto a new line 

WARN:Mar 27 14:05:31:*** scanner error: Unterminated char/string constant

Does anyone have any ideas as to how to overcome the above error and
also consrning the performance problem. Is there a faster way of
inserting records ?

Thanks in advance 


Edwin J Tait
