Re: PostGres Doubt

From: "Dann Corbit" <DCorbit(at)connx(dot)com>
To: "vikas p verma" <vvicky72(at)rediffmail(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PostGres Doubt
Date: 2002-06-10 21:08:22
Message-ID: D90A5A6C612A39408103E6ECDD77B82920CF39@voyager.corporate.connx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> -----Original Message-----
> From: vikas p verma [mailto:vvicky72(at)rediffmail(dot)com]
> Sent: Monday, June 10, 2002 1:10 PM
> To: pgsql-hackers(at)postgresql(dot)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(at)postgresql(dot)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.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yuva Chandolu 2002-06-10 21:42:33 Will postgress handle too big tables?
Previous Message Tom Lane 2002-06-10 21:07:56 Re: Efficient DELETE Strategies