libpq or ecpg? - Mailing list pgsql-general

From Rich Shepard
Subject libpq or ecpg?
Date
Msg-id Pine.LNX.4.44.0202180825240.21559-100000@salmo.appl-ecosys.com
Whole thread Raw
Responses TEST ( SORRY!!)  (Serkan Bektaş <sbektas@karincaint.com.tr>)
Re: libpq or ecpg?  (Jean-Michel POURE <jm.poure@freesurf.fr>)
List pgsql-general
  After several years of dinking with postgres from the interactive
interface, I'm finally getting to writing my accounting system. The front
end will be gtk+ (with full key bindings for those of us who prefer to work
strictly from the keyboard) and the middleware will be C. I've read the 7.2
Programmers Manual and both books I have and cannot make a rational decision
on whether to use libpq or ecpg. So I'm asking for your thoughts.

  From what I've read, both are solid pathways into the postgres backend.
libpq is the internal interface, well documented everywhere and appears rock
solid. ecpg has the major advantage of taking care of the typecasting
between numeric forms (int, float, numeric) and char. That is appealing as
it's one less detail to get wrong as I focus on writing the software.
Unfortunately, ecpg does not appear to be as thoroughly documented as is
libpq. For an apprentice postgres coder, that's a disadvantage.

  I'd greatly appreciate reading suggestions and opinions from those more
experienced than I. Are there criteria that can be applied to select one
interface rather than the other? Are there some examples of ecpg in working
code that illustrate how to properly (and effectively) use it? I prefer to
not choose by flipping a coin. :-)

Many thanks,

Rich

Dr. Richard B. Shepard, President

                       Applied Ecosystem Services, Inc. (TM)
            2404 SW 22nd Street | Troutdale, OR 97060-1247 | U.S.A.
 + 1 503-667-4517 (voice) | + 1 503-667-8863 (fax) | rshepard@appl-ecosys.com
                         http://www.appl-ecosys.com


pgsql-general by date:

Previous
From: "Gurunandan R. Bhat"
Date:
Subject: Time difference changed in 7.2
Next
From: Andrew Gould
Date:
Subject: Logging user queries - Trigger for Select?