Re: ECPG usage

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Jasbinder Bali <jsbali(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: ECPG usage
Date: 2006-07-05 17:21:51
Message-ID: 20060705172151.29803.qmail@web31805.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Hi
> Can anyone help me with the usage of ECPG??
> Like how to go about it, what all header files to include in my C file
> and other things that i need to give due considerations before using ECPG

Sorry, I don't really know. I've never used it. But I can try to take a guess from 2 minutes I
scanned over the PostgreSQL manual.

It seems that you would write your script using only normal C and ecpg syntax. (I am not sure
this is correct).

Such a file can not be compiled directly. It has to be feed to a preprocessor first:

ecpg prog1.pgc

which generates -> prog1.c
The newly created C file is what is actually processed by the C processor. The syntax conforms to
that from libpq.

cc -c prog1.c

So, maybe "long story short" if you want to code exclusively in C and do not want to worry about
preprocessing then you should take a look at the following:
http://www.postgresql.org/docs/8.1/interactive/libpq.html

If anyone would like to correct any of my assumptions, please feel free. :-)

Regards,

Richard Broersma Jr.

In response to

  • ECPG usage at 2006-07-05 17:04:13 from Jasbinder Bali

Browse pgsql-general by date

  From Date Subject
Next Message Richard Broersma Jr 2006-07-05 17:29:38 Re: Database connectivity using a unix shell
Previous Message Joshua D. Drake 2006-07-05 17:16:26 Re: Database connectivity using a unix shell