Thanks for all who replied ..
I am writing a function for postgres in C which connect to Oracle
db .. postgres accepts a shared object to be loaded . So, when the .so
is loaded inside postgres , .so could find oracle environments.. I am
not sure what should be the best way to do it ..
whenever a row is inserted in postgres , a trigger will call this C
function which connects to oracle and inserts the record in Oracle db
Any pointers?
My problem is
On May 9, 2:52 pm, Keith Thompson <ks...@[EMAIL PROTECTED]
> wrote:
> j...@[EMAIL PROTECTED]
(Jens Thoms Toerring) writes:
>
> > iavian <vi...@[EMAIL PROTECTED]
> wrote:
> >> I want to set a env variable in a C program? . Not through shell env
> >> variables. Any help?
>
> > This is not a C question since this only depends on how your
> > shell handles things. But, that out of the way, you simply
> > can't do that (at least with no shell I ever heard of). Your
> > C program is a process started by your shell and such a child-
> > process can never change anything in its "parent" process.
>
> The OP didn't seem to be asking about propagating the setting to the
> parent process (assuming that "parent process" is meaningful). As far
> as I can tell, the POSIX setenv() function (not standard C) would
> satisfy the requirement he stated. Whether it would satisfy his
> actual requirement is another question.
>
> <OT>In Unix-like systems, there are various ways for a process to set
> one of its own environment variables in response to information from a
> child process. You demonstrated one of them in part of your article
> that I ruthlessly snipped; other ways are possible.
> comp.unix.programmer would be a better place to discuss it -- after
> checking any FAQ lists, since this kind of question comes up
> frequently.</OT>
>
> --
> Keith Thompson (The_Other_Keith) <ks...@[EMAIL PROTECTED]
>
> Nokia
> "We must do something. This is something. Therefore, we must do this."
> -- Antony Jay and Jonathan Lynn, "Yes Minister"


|