Fw: libpq or Embedded SQL in C

Started by Thuan Truongover 21 years ago3 messagesgeneral
Jump to latest
#1Thuan Truong
ttruong@overtonesoftware.com

All,

I need to upload (insert) a flat file to PostgresSQL DB (on Solaris 9) using C. I wonder if I should use libpq functions or embedded SQL in C (libecpg). Any help is appreciated. If you have any sample programs, please send along.

Thanks,
Andy Truong

#2Dann Corbit
DCorbit@connx.com
In reply to: Thuan Truong (#1)
Re: Fw: libpq or Embedded SQL in C

You may be able to use the COPY command, which would probably be a lot
faster.
http://techdocs.postgresql.org/techdocs/usingcopy.php

There are sample programs in the INTERFACES subdirectory for each of the
interface types.

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Thuan Truong
Sent: Tuesday, August 17, 2004 2:42 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Fw: libpq or Embedded SQL in C

All,

I need to upload (insert) a flat file to PostgresSQL DB (on
Solaris 9) using C. I wonder if I should use libpq functions or
embedded SQL in C (libecpg). Any help is appreciated. If you have any
sample programs, please send along.

Thanks,
Andy Truong

#3Thuan Truong
ttruong@overtonesoftware.com
In reply to: Dann Corbit (#2)
Re: Fw: libpq or Embedded SQL in C

MessageThanks, Dann. Let me try and will let you know.

Andy
----- Original Message -----
From: Dann Corbit
To: Thuan Truong ; pgsql-general@postgresql.org
Sent: Tuesday, August 17, 2004 7:26 PM
Subject: Re: [GENERAL] Fw: libpq or Embedded SQL in C

You may be able to use the COPY command, which would probably be a lot faster.
http://techdocs.postgresql.org/techdocs/usingcopy.php

There are sample programs in the INTERFACES subdirectory for each of the interface types.
-----Original Message-----
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Thuan Truong
Sent: Tuesday, August 17, 2004 2:42 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Fw: libpq or Embedded SQL in C

All,

I need to upload (insert) a flat file to PostgresSQL DB (on Solaris 9) using C. I wonder if I should use libpq functions or embedded SQL in C (libecpg). Any help is appreciated. If you have any sample programs, please send along.

Thanks,
Andy Truong