Re: PostGres Doubt - Mailing list pgsql-hackers

From Dann Corbit
Subject Re: PostGres Doubt
Date
Msg-id D90A5A6C612A39408103E6ECDD77B82920CF39@voyager.corporate.connx.com
Whole thread Raw
In response to PostGres Doubt  ("vikas p verma" <vvicky72@rediffmail.com>)
Responses Re: PostGres Doubt  (Scott Marlowe <scott.marlowe@ihs.com>)
Re: PostGres Doubt  (Michael Meskes <meskes@postgresql.org>)
List pgsql-hackers
> -----Original Message-----
> From: vikas p verma [mailto:vvicky72@rediffmail.com]
> Sent: Monday, June 10, 2002 1:10 PM
> To: pgsql-hackers@postgresql.org
> 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 majordomo@postgresql.org 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.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [SQL] Efficient DELETE Strategies
Next
From: Yuva Chandolu
Date:
Subject: Will postgress handle too big tables?