> -----Original Message----- > From: vikas p verma [mailto:[EMAIL PROTECTED]] > Sent: Monday, June 10, 2002 1:10 PM > To: [EMAIL PROTECTED] > Subject: [HACKERS] PostGres Doubt > > > Hi , > > I am extremely new to PostGreSql. If any one can please answer > this question of mine. I want to insert/update records into the > postgres database through C or perl code. The only condition is > that it should be efficient. Can anybody tell me the difference > between ecpg and libpq and which one should I work on for solving > my problem. > subscribe-nomail command to [EMAIL PROTECTED] so that your > message can get through to the mailing list cleanly
ECPG is single threading. Hence, tools written in ECPG are a pain in the neck if you want multiple threads of execution. I recommend against using it for any purpose except porting a single threading project that already uses embedded SQL. The embedded SQL interface for PostgreSQL is a disaster. The libpq functions are reentrant. These will be useful for just about any project. If you are populating empty tables, then use the bulk copy interface. It is orders of magnitude faster. If you are going to completely replace the data in a table, drop the table, create the table, and use the bulk copy interface. ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html