Re: Can a C function(server program) be a UDP or TCP server?

From: Jan de Visser <jdevisser(at)digitalfairway(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Can a C function(server program) be a UDP or TCP server?
Date: 2007-10-18 17:17:39
Message-ID: 200710181317.39544.jdevisser@digitalfairway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thursday 18 October 2007 12:27:59 Billow Gao wrote:
> Thanks.  This is what I want to know :-)
>
> Regards,
>
> Billow
>
> >Yeah, what he wants is to implement a function in Postgres which does
> >something like an LDAP or DNS lookup or something like that.
> >
> >Sure you can do this. The only tricky bit is the thing you mentioned about
> >reusing the connection. You could always leave the connection in a safe
> > state and don't need to worry about cleaning it up then you could just
> > store it in a static variable which would be the simplest option.
> >
> >If you want to use Postgres's facilities for allocating memory and
> > cleaning it up when no longer in use you can use some of the Postgres
> > internal API for memory contexts and resource owners. But I don't see any
> > particular reason you should need to worry about this stuff for something
> > simple you're implementing yourself.

> On 10/18/07, D'Arcy J.M. Cain <darcy(at)druid(dot)net> wrote:
> On Thu, 18 Oct 2007 11:24:24 -0400
>
> "Billow Gao" <billowgy(at)gmail(dot)com> wrote:
> > I can write the network program.
> > ...

Oh my. The worst kind of top-poster: the kind that copies *your* reply from
the bottom to the top and top-posts above that.

Shudder...

:)

jan

--
--------------------------------------------------------------
Jan de Visser                     jdevisser(at)digitalfairway(dot)com

                Baruk Khazad! Khazad ai-menu!
--------------------------------------------------------------

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2007-10-18 17:45:02 Re: max_prepared_transactions default ... why 5?
Previous Message Kevin Grittner 2007-10-18 17:16:06 Re: max_prepared_transactions default ... why 5?