Thread: [dpage@vale-housing.co.uk: RE: ODBC docs]

[dpage@vale-housing.co.uk: RE: ODBC docs]

From
terr@terralogic.net
Date:
I cannot AFAIK use the "copy" command because the data needs to be run through my database loader.  It is the loader
codethat I am developing.   
Hi Terrell,

It sounds like you need to use the COPY command/interface from libpq,
however what you are asking is outside my area of knowledge. I would
suggest posting your problem to the pgsql-general@postgresql.org mailing
list.

Regards, Dave.

> -----Original Message-----
> From: terr@terralogic.net [mailto:terr@terralogic.net]
> Sent: 26 February 2003 15:42
> To: Dave Page
> Subject: Re: ODBC docs
>
>
> I've been through the first website you mentioned.  No joy.
> I have found some things at www.dbmaker.com.tw but I don't
> know how closely these docs reflect what postgreSQL implements.
>
> I posted an enhancment request in the features section.
>
> I've been looking for a clean way to interface C to
> postgreSQL and so far no joy.  Some things are downright ugly.
>
> 1) this is a port of an ORACLE database that used pro*fortran (ugly).
>
> 2) I can substitute C for pro*fortran and implement it any way I want.
>
> 3) I tried ecpg and the precomplier generated more than 700
> to 1000 parameters in the call.  That is rediculous.  build
> up over 4K of descriptor tables and tear it down 2x for each
> row I need to access?  (1st call is to see if it is in the
> database and the 2nd call is to insert it or update it).
>
> 4) I looked at libpg and it appears to me that we have to
> again build up the descriptors information for each parameter
> with a few function calls so again this is on a per field/per
> row level which is still HUGE overhead.
>
> 5) My data is already normalized and ready to drop on the
> disk.  All fields were ORACLE varchar which means they are
> left justified, can be null terminated if I need to do it
> (trivial) and I have both the field lengths and the string lengths.
>
> 6) libpg seems to wnat me to build up a big "insert"
> statement so that the datbase can go through all the work of
> parsing it.  Data is already parsed.
>
> 7) ODBC seems to have the ability to build up the descriptor
> information for the table and then repeatedly use this to
> execute queries and inserts.  The overhead of building these
> descriptors once is fine... but not for each row.
>
> 8) probably I've missed the obvious.  I'm new to postgreSQL.
> Can you point me in the right direction?  I've been trying to
> get help in #postgreSQL on freenode and efnet and so far not
> too many C programmers.
>
> 9) thanx.  Any help is greatly appreciated.
>
>
> On Wed, Feb 26, 2003 at 02:20:16PM -0000, Dave Page wrote:
> > Hi Terrell,
> >
> > The official PostgreSQL ODBC website is
> > http://gborg.postgresql.org/project/psqlodbc which includes
> some docs,
> > faqs and howtos. There is also documentation at:
> >
> http://www.postgresql.org/docs/view.php?>
version=7.2&idoc=0&file=odbc.h
> > tm
> > l
> >
> > Regards, Dave.
> >
> > > -----Original Message-----
> > > From: Chris Ryan [mailto:xgbe@yahoo.com]
> > > Sent: 26 February 2003 13:09
> > > To: Bruce Momjian; Dave Page
> > > Subject: Fwd: ODBC docs
> > >
> > >
> > > Bruce, Dave:
> > >
> > >     Here is yet another one that I received just this morning.
> > >
> > > Chris R.
> > >
> > > --- terr@terralogic.net wrote:
> > > > Date: Wed, 26 Feb 2003 02:22:54 -0700
> > > > From: terr@terralogic.net
> > > > To: xgbe@yahoo.com
> > > > Subject: ODBC docs
> > > >
> > > > I have been looking for some docs on using ODBC to talk to a
> > > > postgreSQL data base.  So far I have found none in the
> postgreSQL
> > > > website.  Are there any?  If so where?
> > > >
> > > > Thanks.
> > > >
> > > > Terrell Larson
> > > >
> > >
> > >
> > > __________________________________________________
> > > Do you Yahoo!?
> > > Yahoo! Tax Center - forms, calculators, tips, more
> > http://taxes.yahoo.com/
>