Return-Path: owner-postman 
Delivery-Date: Tue, 12 Apr 94 12:20:45 -0700
Return-Path: owner-postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id HAA06157 for postgres-redist; Tue, 12 Apr 1994 07:12:46 -0700
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199404121412.HAA06157@nobozo.CS.Berkeley.EDU>
X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost didn't use HELO protocol
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from student4.cl.msu.edu (student4.cl.msu.edu [35.8.2.154]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id HAA06148 for <postgres@postgres.berkeley.edu>; Tue, 12 Apr 1994 07:12:43 -0700
Received: by student4.cl.msu.edu (AIX 3.2/UCB 5.64/MSU-2.06)
 id AA78322; Tue, 12 Apr 1994 10:12:36 -0400
From: Mark Victor Priester <priester@student.msu.edu>
Message-Id: <9404121412.AA78322@student4.cl.msu.edu>
Subject: Another import question
To: postgres@postgres.Berkeley.EDU
Date: Tue, 12 Apr 1994 10:12:36 -0400 (EDT)
X-Mailer: ELM [version 2.4 PL22]
Content-Type: text
Content-Length: 1653      
Resent-To: postgres-redist@postgres.Berkeley.EDU
Resent-Date: Tue, 12 Apr 94 07:12:46 -0700
Resent-XMts: smtp

Sorry to beat up on an already battered and bruised topic, but ...

I have a large datafile that I wish to massage into a Postgres database.
I guess the only difference from other posts is that it's not ASCII ;)
I have written a chunk of code that does the following

PQsetdb("blah");
PQexec("begin");

1. read current line of datafile

2. build string of form "append CASE (name = "string, ...)"
   The object CASE already defined in "blah" from monitor.

3. send string to backend with PQexec(string from #2)

PQexec("end");


A couple of comments in no particular order:
(actually they're in numerical order I guess ;) )

1. This works fine for 10 instances/lines even for 100 instances,
   but when I set it to work on the whole file (~1.5M instances)
   it chokes early on in the game.  Is there something I need to do
   to keep the backend in sync with my process?

2. I have no particular sentimental attachment to this particular approach.
   Any suggestions are welcome.

3. I am running this on SunOS 4.1.1

4. I will be doing this (hopefully) several times in the future and would
   like comments/thoughts on the fastest way to import from a file.

Thanks for you time,

Mark

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Mark Priester               _/  Phone: 517.694.4789                    _/
_/ Barros Research Institute  _/     Fax: 517.694.4788                    _/
_/ 2430 College Road         _/ Internet: priester@student.msu.edu        _/
_/ Holt, MI 48842           _/            priester@m-net.ann-arbor.mi.us  _/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


