Re: [GENERAL] Shared Objects (Dynamic loading) - Mailing list pgsql-novice

From Jasbinder Bali
Subject Re: [GENERAL] Shared Objects (Dynamic loading)
Date
Msg-id a47902760608282144y30779a36i8ee14c1d360617fa@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] Shared Objects (Dynamic loading)  (Michael Fuhr <mike@fuhr.org>)
Responses Re: [GENERAL] Shared Objects (Dynamic loading)  ("Andrej Ricnik-Bay" <andrej.groups@gmail.com>)
List pgsql-novice
Well, I'm using C because later on i'll have to do socket programing for the same project (opening a socket between postgresql database and unix server, though am not sure at all how I'm or any1 else is goin to do it) and thats something i'll do in C. So to keep things pretty straight and stick to one single programing language due to other factors, I have no choice but to use C. Thats one of the design decisions taken for our project.
 
Now, for version 1 code, i think i'll have to write it in pgc code. right?
And using version 1 conventions only i'll be able to pass and read right values back and forth from DB to shared object. right?
 
Thanks,
~Jas

 
On 8/28/06, Michael Fuhr <mike@fuhr.org> wrote:
On Mon, Aug 28, 2006 at 03:26:55PM -0400, Jasbinder Bali wrote:
> Do I include this Version 1 syntax in the .pgc file or C file that i get
> after doing ECPG to the .pgc file?

You shouldn't modify the .c file that ecpg generates; the .pgc file
is the source code.  However, as Martijn and I have pointed out,
you should probably be using SPI instead of ECPG.  And as Tom and
I have mentioned, you probably shouldn't be using C at all because
everything you've said you're doing would be easier in other languages
like PL/pgSQL and PL/Perl.

--
Michael Fuhr

pgsql-novice by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: [GENERAL] Shared Objects (Dynamic loading)
Next
From: Shane Ambler
Date:
Subject: Re: Difference between char and varchar