Thread: libpq or ecpg?

libpq or ecpg?

From
Rich Shepard
Date:
  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


TEST ( SORRY!!)

From
Serkan Bektaş
Date:
TEST



Re: libpq or ecpg?

From
Jean-Michel POURE
Date:
Le Lundi 18 Février 2002 17:33, Rich Shepard a écrit :
>   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.

You should be looking at abstraction layers : libgda
(http://www.gnome-db.org) and BondDB (http://bonddb.treshna.com) might be
interesting.

Do not hesitate to use http://pgadmin.postgresql.org for development.
pgAdmin2 supports CREATE OR REPLACE function.

Just my $0.02.

Cheers,
Jean-Michel POURE

Re: libpq or ecpg?

From
Rich Shepard
Date:
On Tue, 19 Feb 2002, Jean-Michel POURE wrote:

> You should be looking at abstraction layers : libgda
> (http://www.gnome-db.org) and BondDB (http://bonddb.treshna.com) might be
> interesting.

  Thank you, I'll keep these in mind.

> Do not hesitate to use http://pgadmin.postgresql.org for development.
> pgAdmin2 supports CREATE OR REPLACE function.

  This is only for Windoze. We don't do windoze and haven't for about four
years.

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